[Madlug] ping & dig disagree on IP address

John Heim jheim at math.wisc.edu
Fri Jan 25 16:52:08 CST 2008


I can't figure out why dig is giving me one IP address for a server and ping 
is going somewhere else. The IP for ldap1.johnheim.com was in the /etc/hosts 
file. But I took it out, saved the file, and re-ran ping. But ping is acting 
as if the line for ldap1 is still in /etc/hosts. I even tried rebooting and 
it still doesn't go to the right IP address.

# ping -c1 ldap1.johnheim.com
PING ldap1.johnheim.com (192.168.0.190) 56(84) bytes of data.
64 bytes from ldap1.johnheim.com (192.168.0.190): icmp_seq=1 ttl=64 
time=0.197
 ms

--- ldap1.johnheim.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.197/0.197/0.197/0.000 ms
# dig ldap1.johnheim.com

; <<>> DiG 9.2.4 <<>> ldap1.johnheim.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2978
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;ldap1.johnheim.com.           IN      A

;; ANSWER SECTION:
ldap1.johnheim.com.    86400   IN      CNAME   george.johnheim.com.
george.johnheim.com.   86400   IN      A       192.168.0.12

;; AUTHORITY SECTION:
johnheim.com.          86400   IN      NS      gracie.johnheim.com.
johnheim.com.          86400   IN      NS      george.johnheim.com.

;; ADDITIONAL SECTION:
gracie.johnheim.com.   86400   IN      A       192.168.0.14

;; Query time: 3 msec
;; SERVER: 192.168.0.12#53(192.168.0.12)
;; WHEN: Fri Jan 25 16:38:02 2008
;; MSG SIZE  rcvd: 125




More information about the Madlug mailing list