fortypoundhead.com

NSLOOKUP

Posted On 2007-05-02 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Networking Linux
Views: 1457


Query Internet name servers

Syntax:
nslookup

nslookup host-to-find

nslookup server

interactive mode:

nslookup -server

nslookup [-options] [host-to-find ]

Options:

host [server ]
Look up information for host using the current default server or using server,
if specified. If host is an Internet address and the query type is A or PTR ,
the name of the host is returned. If host is a name and does not have a trailing
period, the default domain name is appended to the name. (This behavior depends
on the state of the set options domain , srchlist , defname , and search.

To look up a host not in the current domain, append a period to the name.

server domain
lserver domain
Change the default server to domain ; lserver uses the initial server to look up
information about domain while server uses the current default server.
If an authoritative answer can''t be found, the names of servers that might have
the answer are returned.
root
Change the default server to the server for the root of the domain name space.
Currently, the host ns.internic.net is used. (This command is a synonym for
`lserver ns.internic.net'' The name of the root server can be changed with
the `set root '' command.

finger [name ] [> filename ]
finger [name ] [>> filename ]
Connects with the finger server on the current host. The current host is
defined when a previous lookup for a host was successful and returned address
information (see the `set querytype=A '' command). The name is optional. > and
>> can be used to redirect output in the usual manner.

ls [option ] domain [> filename ]
ls [option ] domain [>> filename ]
List the information available for domain , optionally creating or appending
to filename The default output contains host names and their Internet addresses.
Option can be one of the following:

-t querytype list all records of the specified type (see querytype below).
-a list aliases of hosts in the domain; synonym for `-t CNAME ''
-d list all records for the domain; synonym for `-t ANY''
-h list CPU and operating system information for the domain; synonym for `-t HINFO''
-s list well-known services of hosts in the domain; synonym for `-t WKS''

When output is directed to a file, hash marks are printed for every 50 records
received from the server.

view filename
Sort and lists the output of previous ls command(s) with more(1).

set keyword [= value ] This command is used to change state information that affects the lookups.
run man nslookup for a full list of valid keywords.

set all Print the current value of the frequently-used options
to set Information about the current default server and host is also printed.

help
? Print a brief summary of commands.

exit Exit the program.
Nslookup has two modes: interactive and non-interactive.

Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain.

Non-interactive mode is used to print just the name and requested information for a host or domain.

The options listed under the `set '' command can be specified in the .nslookuprc file in the user''s home directory (listed one per line). Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen.


About the Author

FortyPoundHead has posted a total of 1974 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.80.247.254

Before you can post, you need to prove you are human. If you log in, this test goes away.



Recent Forum Posts

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff

Job Spammer: Bilal Uddin
dwirch posted on April 25, 2017 at about 11:00 in Spammers

Bug Fix: Contact Form Error
dwirch posted on April 21, 2017 at about 11:38 in Site News

Bug Fix: Ophion Time Tracker
dwirch posted on April 9, 2017 at about 11:30 in Site News

Job Spammer: Yogesh Kapadne
dwirch posted on March 31, 2017 at about 8:04 in Spammers

Job Spammer: Sathya Narayana
dwirch posted on March 15, 2017 at about 7:18 in Spammers