Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

ip mismatch between ping and nslookup

Joseph Luk
Occasional Advisor

ip mismatch between ping and nslookup

Hi All,

I got an issue about ping, when I ping a host which name entry is in hosts file but the ping always use DNS to resolve the name and totally ignor the hosts file entry . the OS HPUX 11.31
From the following output can see the IP for host ausysb01 is 172.16.8.35 but when pinging it it reply from 172.16.8.44

Can any one give me an idea what is going on for this one and how the ping get the difference IP

===============

# nslookup ausysb01
Using /etc/hosts on: AUSYSPA1

looking up FILES
Name: AUSYSB01.AUSY.ASTRAZENECA.NET
Address: 172.16.8.35
Aliases: AUSYSB01

# nsquery hosts ausysb01

Using "files [NOTFOUND=continue UNAVAIL=continue] dns" for the hosts policy.

Searching /etc/hosts for ausysb01
Hostname: AUSYSB01.AUSY.ASTRAZENECA.NET
Aliases: AUSYSB01
Address: 172.16.8.35
Switch configuration: Terminates Search
# ping ausysb01
PING ausysb01.ausy.astrazeneca.net: 64 byte packets
64 bytes from 172.16.8.44: icmp_seq=0. time=0. ms
64 bytes from 172.16.8.44: icmp_seq=1. time=0. ms

----ausysb01.ausy.astrazeneca.net PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
================

Regards,
joseph
3 REPLIES
Shibin_2
Honored Contributor

Re: ip mismatch between ping and nslookup

What is in your /etc/nsswitch.conf ?
Regards
Shibin
Joseph Luk
Occasional Advisor

Re: ip mismatch between ping and nslookup

the nsswitch.conf is
files[NOTFOUND=continue UNAVAIL=continue] dns

BTW I find the issuse is caused by ipnodes which is point to DNS then files, After I chane it as well the problem fixed.

Thanks anyway.

Joseph
Joseph Luk
Occasional Advisor

Re: ip mismatch between ping and nslookup

The issue was caused by ipnodes after change it to files then DNS problem fixed