nslookup ignores server parameter
nslookup appears to ignore the server parameter. Rather, it queries the name server configured in resolve.conf for both the query and the “server” command line parameter.
E.g. :
- nslookup www.google.com 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com
Name: www.google.com
Address 1: 216.58.192.4 nuq04s29-in-f4.1e100.net
Address 2: 2607:f8b0:4005:801::2004 nuq04s29-in-x04.1e100.net
results in:
17:47:38.936983 IP 192.168.1.14.51106 >192.168.1.1.domain: 59410+
PTR? 8.8.8.8.in-addr.arpa. (38)
17:47:38.943374 IP 192.168.1.1.domain >192.168.1.14.51106: 59410
1/0/0 PTR google-public-dns-a.google.com. (82)
17:47:38.944409 IP 192.168.1.14.57886 >192.168.1.1.domain: 53635+ A?
www.google.com. (32)
17:47:38.944432 IP 192.168.1.14.57886 >192.168.1.1.domain: 54053+
AAAA? www.google.com. (32)
17:47:38.946028 IP 192.168.1.1.domain >192.168.1.14.57886: 53635
1/0/0 A 216.58.192.4 (48)
17:47:38.948873 IP 192.168.1.1.domain >192.168.1.14.57886: 54053
1/0/0 AAAA 2607:f8b0:4005:801::2004 (60)
17:47:38.949917 IP 192.168.1.14.59880 >192.168.1.1.domain: 63998+
PTR? 4.192.58.216.in-addr.arpa. (43)
17:47:38.955059 IP 192.168.1.1.domain >192.168.1.14.59880: 63998
1/0/0 PTR nuq04s29-in-f4.1e100.net. (81)
17:47:38.956042 IP 192.168.1.14.61812 >192.168.1.1.domain: 11062+
PTR?
4.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.1.0.8.0.5.0.0.4.0.b.8.f.7.0.6.2.ip6.arpa.
(90)
17:47:38.959066 IP 192.168.1.1.domain >192.168.1.14.61812: 11062
1/0/0 PTR nuq04s29-in-x04.1e100.net. (129)
(from redmine: issue id 4841, created on 2015-11-11)