How To Guides for TCP/IP

TSO commands to look up DNS information

Name Server Lookup

nslookup
>

Determine the authoritative name servers for a name

> set q=ns
> name

Change to the authoritative name server

> server newns

Look up the IP address for a name

> set q=a
> name

Look up the name for an IP address

> set q=ptr
> ipaddr
nslookup hostname
nslookup
EZB3042I > ls domain.com
EZB3042I > set q=ns
EZB3042I > hostname
EZB3112I Authoritative answers can be found from:
EZB3143I  ns1.domain.com internet address = nnn.nnn.nnn.nnn
EZB3143I  ns2.domain.com internet address = nnn.nnn.nnn.nnn
EZB3042I > server ns1.domain.com
EZB3042I > set q=a
EZB3042I > hostname
EZB3042I > set q=ptr
EZB3042I > ipaddr

ls lists all of the names in the given domain. set q=ns sets the query type to allow determining the authoritative name server for a given host name. server can be used to set the default server being queried to an authoritative name server, or any other name server. set q=a sets the query type to return the IP address for a given host name. set q=ptr sets the query type to do a reverse lookup, which returns the host name for a given IP addrses.

Next: dig 

Home > Internet > TCP/IP > DNS Lookups > nslookup

Viewing mobile website page. Switch to WML or Full HTML