nslookup

Use this command to query name servers, translating hostnames to IP addresses or IP addresses to hostnames.

Syntax

nslookup [-x] [-v {4 | 6}] host

Parameters

-x (Optional) Specifies that a reverse lookup should be performed. If this parameter is used, then you must specify an IP address as the host variable.
-v {4 | 6} (Optional) Specifies the IP version for this name server lookup. Auto-detect (non-configurable) is used for a reverse lookup.
host Specifies the host name, or an IP address, in the case of a reverse lookup.

Defaults

  • If reverse lookup is not specified, the lookup is a name lookup.
  • If -v not specified, the IP version is autodetected.

Mode

All command modes.

Usage

A reverse lookup provides the endpoint IP address and returns the hostname.

Example

The following example performs a reverse lookup providing the host name for IP address 127.0.0.1:

System(su)->nslookup -x 127.0.0.1
Name: localhost
Address: 127.0.0.1