![]() | ![]() |
Before we get into the options, we need to cover the introductory lines. The default name server is bladerunner.fx.movie.edu. This means that nslookup will query bladerunner unless we specify another name server. The address 0.0.0.0 means "this host." When nslookup is using address 0.0.0.0 or 127.0.0.1 as its name server, it is using the server running on the local system -- in this case, bladerunner.% nslookup Default Server: bladerunner.fx.movie.edu Address: 0.0.0.0 > set all Default Server: bladerunner.fx.movie.edu Address: 0.0.0.0 Set options: nodebug defname search recurse nod2 novc noignoretc port=53 querytype=A class=IN timeout=5 retry=4 root=a.root-servers.net. domain=fx.movie.edu srchlist=fx.movie.edu > ^D
The options come in two flavors: Boolean and value. The options that do not have an equals sign after them are Boolean options. They have the interesting property of being either "on" or "off." The value options can take on different, well, values. How can we tell which Boolean options are on and which are off? The option is off when a "no" precedes the option's name. nodebug means that debugging is off. As you might guess, the searchoption is on.
How you change Boolean or value options depends on whether you are using nslookup interactively or not. In an interactive session, you change an option with the set command, as in set debug or set domain=classics.movie.edu. From the command line, you omit the word set and precede the option with a hyphen, as in nslookup -debug or nslookup -domain=classics.movie.edu. The options can be abbreviated to their shortest unique prefix, e.g., nodeb for nodebug. In addition to its abbreviation, the querytype option can also be called simply type.
Let's go through each of the options:
[95]This gives you an easy way to determine which version of nslookup you're running: type set all and check whether the default search list includes just the local domain name (BIND 4.9 or later) or ancestor domain names, too (BIND 4.8.3 or earlier).
You might also use .nslookuprc to set your search list to something other than your host's default search list or to change the timeouts nslookup uses.set root=a.root-servers.net.