Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

HostLookup

HostLookup[name]
gives the IP address for the host with the specified name.

HostLookup[address]
gives the host name for the host at the specified IP address.

HostLookup[spec,prop]
gives a specified property of the host.

HostLookup[spec,All]
gives an association of properties found for the host.

DetailsDetails

  • If a host cannot be found, HostLookup returns Missing["NotFound"].
  • Possible properties in HostLookup include:
  • "FullName"full name of host
    "IPv4Addresses"IPv4 IP addresses
    "IPv6Addresses"IPv6 IP addresses
  • In HostLookup[host], host can be a URL, given as a string or a URL object. It can also be an IP address given as a string or an IPAddress object.

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Look up the IP addresses associated with a host:

In[1]:=
Click for copyable input
Out[1]=

Look up the hostname for an IP address:

In[1]:=
Click for copyable input
Out[1]=

Look up IPv4 addresses associated with the host:

In[1]:=
Click for copyable input
Out[1]=

Look up IPv6 addresses associated with the host:

In[1]:=
Click for copyable input
Out[1]=

Look up all the properties associated with a host:

In[1]:=
Click for copyable input
Out[1]=

Look up the full names associated with IP addresses:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2015
(10.3)