Nslookup: Difference between revisions
m →See also: host command |
Tags: Mobile edit Mobile web edit |
||
(137 intermediate revisions by 97 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Utility to query the Domain Name System}} |
|||
{{lowercase}} |
{{lowercase}} |
||
{{Infobox software |
|||
'''nslookup''' is a [[network administration]] [[command-line]] tool available for many computer [[operating system]]s for querying the [[Domain Name System]] (DNS) to obtain [[domain name]] or [[IP address]] mapping or for any other specific [[DNS record]]. |
|||
| name = nslookup |
|||
| logo = |
|||
| screenshot = Nslookup screenshot.png |
|||
| screenshot size = |
|||
| caption = The {{code|nslookup}} command |
|||
| developer = Andrew Cherenson, [[Internet Systems Consortium]], [[IBM]], [[Microsoft]], Lucas Suggs |
|||
| released = |
|||
| latest release version = |
|||
| latest release date = |
|||
| operating system = [[Unix]], [[Unix-like]], [[OS/2]], [[Microsoft Windows]], [[ReactOS]] |
|||
| platform = [[Cross-platform]] |
|||
| genre = [[Command (computing)|Command]] |
|||
| license = [[BSD licenses|BSD]] |
|||
| website = |
|||
}} |
|||
'''nslookup''' (from ''name server lookup'') is a [[network administration]] [[command-line tool]] for querying the [[Domain Name System]] (DNS) to obtain the mapping between [[domain name]] and [[IP address]], or other [[DNS record]]s. |
|||
== |
==Overview== |
||
nslookup is a member of the [[BIND]] name server software. Andrew Cherenson created nslookup as a class project at UC Berkeley in 1986 and it first shipped in 4.3-Tahoe BSD<ref>{{cite web|url=https://www.unix.com/man-page/bsd/1/nslookup/|title=4.3BSD Manual}}</ref> |
|||
The name ''nslookup'' means ''name server lookup''. Nslookup uses the operating system's local Domain Name System resolver library to perform its queries. Thus, it is configured automatically by the contents of the operating system file [[resolv.conf]].<ref> |
|||
In the development of BIND 9, the [[Internet Systems Consortium]] planned to deprecate nslookup in favor of [[Host (Unix)|host]] and [[Dig (command)|dig]]. This decision was reversed in 2004 with the release of BIND 9.3<ref>{{cite web|url=https://lists.isc.org/pipermail/bind-announce/2004-September/000155.html|title=BIND 9.3.0 is now available|publisher=Isc.org|date=2004-09-23|access-date=2015-01-13}}</ref> and nslookup has been fully supported since then. |
|||
{{cite web |
|||
| url = http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch12_01.htm |
|||
| title = DNS and BIND, Fourth Edition: Chapter 12. nslookup and dig |
|||
| publisher = O'Reilly |
|||
| accessdate = 2010-07-20 |
|||
}} |
|||
</ref> |
|||
Unlike [[Dig (command)|dig]], nslookup does not use the operating system's local Domain Name System resolver library to perform its queries, and thus may behave differently. Additionally, vendor-provided versions may include the output of other sources of name information, such as [[Hosts (file)|host files]], and [[Network Information Service]]. Some behaviors of nslookup may be modified by the contents of [[resolv.conf]].<ref>{{cite web|url=http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch12_01.htm|title=DNS and BIND, Fourth Edition: Chapter 12. nslookup and dig|publisher=[[O'Reilly Media|O'Reilly]]|access-date=20 July 2010}}</ref> |
|||
The nslookup utility is generally considered obsolete from historical and technical points of view.<ref> |
|||
[http://cr.yp.to/djbdns/nslookup.html Notes on nslookup] by [[Daniel J. Bernstein]]; "Do not use the ancient nslookup program. [...] nslookup does not work correctly if you specify a non-recursive server on the command line." |
|||
</ref> Modern alternatives to ''nslookup'' are the [[Host (Unix)|host]] and [[Domain Information Groper|dig]] programs. |
|||
The [[Linux]] version of nslookup is the original BSD version written by Andrew Cherenson.<ref>{{Cite web|url=https://linux.die.net/man/1/nslookup|title=nslookup(1) - Linux man page|website=linux.die.net}}</ref> |
|||
==Usage== |
|||
nslookup operates in interactive or non-interactive mode. When used interactively, when the program is invoked without arguments (another option exists), the user issues parameter configurations or requests when presented the nslookup prompt ('>') in line by line fashion. In non-interactive mode parameters and the query are specified as command line arguments in the invocation of the program. |
|||
The [[ReactOS]] version was developed by Lucas Suggs and is licensed under the [[GNU General Public License|GPL]].<ref>{{Cite web|url=https://github.com/reactos/reactos|title=reactos/reactos|website=GitHub|date=3 January 2022}}</ref> |
|||
The general command syntax is: |
|||
<source lang=DOS> |
|||
nslookup [-option] [name | -] [server] |
|||
</source> |
|||
== |
==Usage== |
||
nslookup operates in interactive or non-interactive mode. When used interactively by invoking it without arguments or when the first argument is - (minus sign) and the second argument is a [[hostname]] or Internet address of a name server, the user issues parameter configurations or requests when presented with the nslookup prompt (<code>></code>). When no arguments are given, then the command queries the default server. The - (minus sign) invokes subcommands which are specified on the command line and should precede nslookup commands. In non-interactive mode, i.e. when the first argument is a name or Internet address of the host being searched, parameters and the query are specified as command line arguments in the invocation of the program. The non interactive mode searches the information for a specified host using the default name server.<ref>{{cite web |url=http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds4/nslookup.htm |archive-url=https://archive.today/20130103083758/http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds4/nslookup.htm |url-status=dead |archive-date=2013-01-03 |title=pSeries and AIX Information Center |publisher=Publib.boulder.ibm.com |access-date=2012-09-05 }}</ref> |
|||
The following example queries the Domain Name System for the [[IP address]] of the domain name ''example.com'' by issuing the command ''nslookup example.com'' to the command line interpreter (shell): |
|||
<source lang=DOS> |
|||
$ nslookup example.com |
|||
Server: 192.168.0.254 |
|||
Address: 192.168.0.254#53 |
|||
Non-authoritative answer: |
|||
Name: example.com |
|||
Address: 192.0.32.10 |
|||
</source> |
|||
This is an example of interactive, prompted use of the nslookup application. The user executes the program without any arguments and issues parameters and queries at the program prompt ('>'): |
|||
<source lang=DOS> |
|||
$ nslookup |
|||
Default Server: dsldevice.lan |
|||
Address: 192.168.0.254 |
|||
> server 8.8.8.8 |
|||
Default Server: google-public-dns-a.google.com |
|||
Address: 8.8.8.8 |
|||
> set type=mx |
|||
> wikipedia.org |
|||
Server: google-public-dns-a.google.com |
|||
Address: 8.8.8.8 |
|||
Non-authoritative answer: |
|||
wikipedia.org MX preference = 10, mail exchanger = mchenry.wikimedia.org |
|||
wikipedia.org MX preference = 50, mail exchanger = lists.wikimedia.org |
|||
> exit |
|||
</source> |
|||
In this example, the program first displays its default name server configuration, after which the user changes the name server to be used to the host at IP address <tt>8.8.8.8</tt>. The type of query to be performed is specified by setting the type of record to be fetched (mx record). Finally, the user simply issues the domain name at the prompt to receive the query results. The command ''exit'' ends the interactive session and terminate the program. |
|||
==See also== |
==See also== |
||
* [[Dig_(command)|dig]], a utility that interrogates DNS servers directly for troubleshooting and system administration purposes. |
|||
* [[Domain Information Groper]] (dig) |
|||
* [[Host_(Unix)|host]] is a simple utility for performing Domain Name System lookups. |
|||
* [[List of DNS record types]] - possible types of records stored and queried within DNS |
|||
* [[Root name server]] - top-level name servers providing top level domain name resolution |
|||
* [[whois]] |
* [[whois]] |
||
* [[BIND]] name server |
|||
* [[host (Unix)]], a simple utility for performing Domain Name System lookups |
|||
==References== |
==References== |
||
{{ |
{{Reflist}} |
||
==Further reading== |
|||
*{{Cite book|first=Daniel J.|last=Barrett|year=2012|title=Macintosh Terminal Pocket Guide: Take Command of Your Mac|publisher=[[O'Reilly Media|O'Reilly]]|isbn=978-1449328986}} |
|||
*{{Cite book|first=William R.|last=Stanek|year=2008|title=Windows Command-Line Administrator's Pocket Consultant, 2nd Edition|publisher=[[Microsoft Press]]|isbn=978-0735622623}} |
|||
==External links== |
==External links== |
||
{{Wikiversity}} |
|||
* Microsoft Windows |
|||
{{Wikibooks|Guide to Windows Commands}} |
|||
** [http://technet.microsoft.com/en-us/library/bb490721.aspx nslookup] – [[Microsoft TechNet]] library |
|||
'''Microsoft Windows''' |
|||
** [http://support.microsoft.com/kb/200525/ Using NSlookup.exe] - Microsoft Knowledgebase |
|||
* [https://technet.microsoft.com/en-us/library/bb490721.aspx nslookup] – [[Microsoft TechNet]] library |
|||
* Unix-like OSs |
|||
* [https://support.microsoft.com/kb/200525/ Using NSlookup.exe], [[Microsoft Knowledge Base]] |
|||
** {{man|1|nslookup}} |
|||
'''Unix-like OSs''' |
|||
*Other |
|||
* {{man|1|nslookup|die.net}} |
|||
** {{dmoz|Computers/Internet/Protocols/DNS/Web_Tools|DNS Web Tools}} (includes web-version of nslookup) |
|||
* [https://gitlab.isc.org/isc-projects/bind9/-/tree/main/bin/dig nslookup source code in ISC Gitlab repository (Mozilla Public License)] |
|||
{{Unix commands}} |
{{Unix commands}} |
||
Line 79: | Line 61: | ||
[[Category:DNS software]] |
[[Category:DNS software]] |
||
[[Category: |
[[Category:Internet Protocol based network software]] |
||
[[Category:OS/2 commands]] |
|||
[[Category:Unix network-related software]] |
[[Category:Unix network-related software]] |
||
[[Category:Windows communication and services]] |
[[Category:Windows communication and services]] |
||
[[Category:Windows administration]] |
[[Category:Windows administration]] |
||
[[ar:إن إس لوك أب]] |
|||
[[de:Nslookup]] |
|||
[[el:Nslookup]] |
|||
[[es:Nslookup]] |
|||
[[fr:Nslookup]] |
|||
[[it:Nslookup]] |
|||
[[nl:Nslookup]] |
|||
[[pl:Nslookup]] |
|||
[[pt:Nslookup]] |
|||
[[ru:Nslookup]] |
|||
[[sv:Nslookup]] |
|||
[[uk:Nslookup]] |
Latest revision as of 05:05, 23 August 2024
Developer(s) | Andrew Cherenson, Internet Systems Consortium, IBM, Microsoft, Lucas Suggs |
---|---|
Operating system | Unix, Unix-like, OS/2, Microsoft Windows, ReactOS |
Platform | Cross-platform |
Type | Command |
License | BSD |
nslookup (from name server lookup) is a network administration command-line tool for querying the Domain Name System (DNS) to obtain the mapping between domain name and IP address, or other DNS records.
Overview
[edit]nslookup is a member of the BIND name server software. Andrew Cherenson created nslookup as a class project at UC Berkeley in 1986 and it first shipped in 4.3-Tahoe BSD[1] In the development of BIND 9, the Internet Systems Consortium planned to deprecate nslookup in favor of host and dig. This decision was reversed in 2004 with the release of BIND 9.3[2] and nslookup has been fully supported since then.
Unlike dig, nslookup does not use the operating system's local Domain Name System resolver library to perform its queries, and thus may behave differently. Additionally, vendor-provided versions may include the output of other sources of name information, such as host files, and Network Information Service. Some behaviors of nslookup may be modified by the contents of resolv.conf.[3]
The Linux version of nslookup is the original BSD version written by Andrew Cherenson.[4]
The ReactOS version was developed by Lucas Suggs and is licensed under the GPL.[5]
Usage
[edit]nslookup operates in interactive or non-interactive mode. When used interactively by invoking it without arguments or when the first argument is - (minus sign) and the second argument is a hostname or Internet address of a name server, the user issues parameter configurations or requests when presented with the nslookup prompt (>
). When no arguments are given, then the command queries the default server. The - (minus sign) invokes subcommands which are specified on the command line and should precede nslookup commands. In non-interactive mode, i.e. when the first argument is a name or Internet address of the host being searched, parameters and the query are specified as command line arguments in the invocation of the program. The non interactive mode searches the information for a specified host using the default name server.[6]
See also
[edit]- dig, a utility that interrogates DNS servers directly for troubleshooting and system administration purposes.
- host is a simple utility for performing Domain Name System lookups.
- List of DNS record types - possible types of records stored and queried within DNS
- Root name server - top-level name servers providing top level domain name resolution
- whois
- BIND name server
References
[edit]- ^ "4.3BSD Manual".
- ^ "BIND 9.3.0 is now available". Isc.org. 2004-09-23. Retrieved 2015-01-13.
- ^ "DNS and BIND, Fourth Edition: Chapter 12. nslookup and dig". O'Reilly. Retrieved 20 July 2010.
- ^ "nslookup(1) - Linux man page". linux.die.net.
- ^ "reactos/reactos". GitHub. 3 January 2022.
- ^ "pSeries and AIX Information Center". Publib.boulder.ibm.com. Archived from the original on 2013-01-03. Retrieved 2012-09-05.
Further reading
[edit]- Barrett, Daniel J. (2012). Macintosh Terminal Pocket Guide: Take Command of Your Mac. O'Reilly. ISBN 978-1449328986.
- Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623.
External links
[edit]Microsoft Windows
Unix-like OSs