{"id":159,"date":"2011-11-30T09:55:00","date_gmt":"2011-11-30T09:55:00","guid":{"rendered":"http:\/\/test.bleuanus.nl\/index.php\/nslookup\/"},"modified":"2018-12-11T16:09:09","modified_gmt":"2018-12-11T15:09:09","slug":"nslookup","status":"publish","type":"post","link":"https:\/\/www.bleuanus.nl\/index.php\/2011\/11\/30\/nslookup\/","title":{"rendered":"NSLookup"},"content":{"rendered":"<p class=\"last-modified\">This post was most recently updated on December 11th, 2018<\/p><h1>How to Use nslookup<\/h1>\n<p>If your site is connected to the Internet, you can use the <em>>nslookup<\/em> (1) program to  interactively find MX and other records. To run <em>>nslookup<\/em> , just type  its name:<\/p>\n<blockquote>\n<pre>% <code> <b> >nslookup<\/b> <\/code><\/pre>\n<\/blockquote>\n<p>Note that you may have to give the full pathname. Under SunOS, <em>>nslookup<\/em> lives in the  <em>\/usr\/etc<\/em> directory; under Ultrix, in <em>\/usr\/ucb<\/em> ; and under  HP-UX, in <em>\/usr\/bin<\/em> .<\/p>\n<p>Once <em>>nslookup<\/em>  is running, it prints the name of your default name server and the IP address  for that machine, then a <code>><\/code> character as a prompt and awaits  input:<\/p>\n<blockquote>\n<pre>Server:  Your.Main.ServerAddress:  123.45.67.8><\/pre>\n<\/blockquote>\n<p>To tell <em>>nslookup<\/em> to look up  only MX records, [14] use the <em>set<\/em> command:<\/p>\n<p>Beginning with V8.7 <em>sendmail<\/em>, you can also use the <code>\/mx<\/code>  command in <code>-bt<\/code> rule-testing mode to look up MX  records.<\/p>\n<blockquote>\n<pre>> <code> <b> set type=mx<\/b> <\/code>><\/pre>\n<\/blockquote>\n<p>Now look up some real hosts and domains. First look up the domain  <em>sendmail.org<\/em> by entering its name at the prompt:<\/p>\n<blockquote>\n<pre>> <code> <b> sendmail.org.<\/b> <\/code><\/pre>\n<\/blockquote>\n<p>Note the trailing dot that tells <em>>nslookup<\/em> that the  local, default domain should not be appended prior to the lookup. The output  produced by the above lookup looks like this:<\/p>\n<blockquote>\n<pre>> <code> <b> sendmail.org.<\/b> <\/code>Server:Address:  123.45.67.8sendmail.org    preference = 20, mail exchanger = mail1.reference.comsendmail.org    preference = 30, mail exchanger = mail2.reference.comsendmail.org    preference = 10, mail exchanger = mail.mailsite.rutgers.edumail1.reference.com     inet address = 206.171.3.24mail2.reference.com     inet address = 128.102.240.18mail.mailsite.rutgers.edu     inet address = 204.247.98.2><\/pre>\n<\/blockquote>\n<p>The first two lines again show the name and IP address of the local DNS  server. The next three lines show that the domain <code>sendmail.org<\/code> has  three MX records. Mail addressed to that domain is sent to the machine with the  lowest preference (cost), which happens to be  <code>mail.mailsite.rutgers.edu<\/code> . If that machine is down (or not  accepting mail), the message is sent to the machine with the next higher cost,  <code>mail1.reference.com<\/code> . The last three lines show the IP addresses (A  records) for those machines.<\/p>\n<p>Now look up a real UUCP host, <em>www<\/em> . Enter its name as if it were a  part of the <em>yahoo.com<\/em> domain:<\/p>\n<blockquote>\n<pre>> <code> <b> www.yahoo.com.<\/b> <\/code><\/pre>\n<\/blockquote>\n<p>The output produced shows that <em>www<\/em> has an MX record:<\/p>\n<blockquote>\n<pre>www.yahoo.com   preference = 5, mail exchanger = .yahoo.com.yahoo.com inet address = 128.32.201.15><\/pre>\n<\/blockquote>\n<p>Mail sent to <code>www.yahoo.com<\/code> is instead delivered to the machine  named <code>.yahoo.com<\/code> , which in turn forwards that mail over a dial-up  line to the UUCP host <em>www<\/em> .<\/p>\n<p>Machines that have MX records do not necessarily have A  records. The host <em>www<\/em> is such a machine. You tell <em>>nslookup<\/em> (1) to look up  an A record with the <em>set<\/em> command:<\/p>\n<blockquote>\n<pre>> <code> <b> set type=a<\/b> <\/code>> <code> <b> www.yahoo.com.<\/b> <\/code>*** No address information available for www.yahoo.com.<\/pre>\n<\/blockquote>\n<p>The <em>>nslookup<\/em>  (1) program is a useful tool for performing all the same lookups that are done  by <em>sendmail<\/em> . Each type of lookup corresponds to a <i>set type<\/i> . The list of some available <em>>nslookup<\/em>.<\/p>\n<table class=\"table\">\n<caption class=\"table\">Table: Some >nslookup Types <\/caption>\n<thead class=\"thead\">\n<tr valign=\"top\">\n<th align=\"left\">Type<\/th>\n<th align=\"left\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"tbody\">\n<tr valign=\"top\">\n<td>a<\/td>\n<td>IP address<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>cname<\/td>\n<td>Canonical name for an alias<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>hinfo<\/td>\n<td>Host CPU and operating system type<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>mx<\/td>\n<td>Mail exchanger records<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>ns<\/td>\n<td>Name server record<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>any<\/td>\n<td>Union of all records<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u00a0<\/p>\n<p>To exit <em>>nslookup<\/em>, just type  <i>exit<\/i>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post was most recently updated on December 11th, 2018How to Use nslookup If your site is connected to the Internet, you can use the >nslookup (1) program to interactively find MX and other records. To run >nslookup , just type its name: % >nslookup Note that you may have to give the full pathname. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":1,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/159\/revisions\/252"}],"wp:attachment":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/tags?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}