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.

Details

  • 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.

Examples

Basic Examples  (5)

Look up the IP addresses associated with a host:

Look up the hostname for an IP address:

Look up IPv4 addresses associated with the host:

Look up IPv6 addresses associated with the host:

Look up all the properties associated with a host:

Look up the full names associated with IP addresses:

Wolfram Research (2015), HostLookup, Wolfram Language function, https://reference.wolfram.com/language/ref/HostLookup.html.

Text

Wolfram Research (2015), HostLookup, Wolfram Language function, https://reference.wolfram.com/language/ref/HostLookup.html.

CMS

Wolfram Language. 2015. "HostLookup." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HostLookup.html.

APA

Wolfram Language. (2015). HostLookup. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HostLookup.html

BibTeX

@misc{reference.wolfram_2024_hostlookup, author="Wolfram Research", title="{HostLookup}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/HostLookup.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_hostlookup, organization={Wolfram Research}, title={HostLookup}, year={2015}, url={https://reference.wolfram.com/language/ref/HostLookup.html}, note=[Accessed: 21-November-2024 ]}