[CentOS] inconsistent DNS results - ping vs dig vs nslookup
robert henrichs
centos at henrichs.biz
Wed Jun 22 17:03:32 UTC 2011
I am getting what I believe to be inconsistent replies/results from
my CentOs machine, trying to ping URLs. Pinging by URL fails the DNS
lookup, while pinging the IP address (that should have been returned)
works. The DNS lookup also fails NSLOOKUP, but interestingly, dig
and wget return A records with the correct IP.
Robert Henrichs.
- = - = - - = - = - - = - = -
- = - = -
(INFO/examples:)
cat /etc/sysconfig/network-scripts/ifcfg-eth0
cat /etc/resolv.conf
PBX in a Flash PURPLE Daemon Status - Version 1.8.1 Released on 041211
System Information
Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE
SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE
Fail2ban = ONLINE | Internet = OFFLINE | Ip6Tables = ONLINE
BlueTooth = ONLINE | Hidd = ONLINE | NTPD = ONLINE
SendMail = ONLINE | Samba = OFFLINE | Webmin = ONLINE
Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A
PBX in a Flash Version = 1.7.5.6
FreePBX Version = 2.8.1.4
Running Asterisk Version = 1.8.3.3
Asterisk Source Version = 1.8.3.3
Dahdi Source Version = 2.4.1.2+2.4.1
Libpri Source Version = 1.4.11.5
IP Address = 192.168.70.40 on eth0
Operating System = CentOS release 5.6 (Final)
Kernel Version = 2.6.18-238.9.1.el5 - 32 Bit
root at pbx:/etc/sysconfig/network-scripts $ cat ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
TYPE=ethernet
BOOTPROTO=none
BROADCAST=192.168.70.255
IPADDR=192.168.70.40
NETMASK=255.255.255.0
GATEWAY=192.168.70.2
HWADDR=00:1D:7D:26:31:D0
ONBOOT=yes
DHCP_HOSTNAME=pbx.local
root at pbx:/etc/sysconfig/network-scripts $
root at pbx:/etc $ cat resolv.conf
search isp.com
nameserver 216.146.35.35
nameserver 216.146.36.36
nameserver 8.8.8.8
root at pbx:/etc $ ping www.henrichs.org
ping: unknown host www.henrichs.org
root at pbx:/etc $ ping 69.64.155.165
PING 69.64.155.165 (69.64.155.165) 56(84) bytes of data.
64 bytes from 69.64.155.165: icmp_seq=1 ttl=238 time=92.9 ms
64 bytes from 69.64.155.165: icmp_seq=2 ttl=238 time=89.1 ms
64 bytes from 69.64.155.165: icmp_seq=3 ttl=238 time=89.1 ms
64 bytes from 69.64.155.165: icmp_seq=4 ttl=238 time=89.7 ms
64 bytes from 69.64.155.165: icmp_seq=5 ttl=238 time=88.3 ms
64 bytes from 69.64.155.165: icmp_seq=6 ttl=238 time=90.6 ms
--- 69.64.155.165 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5002ms
rtt min/avg/max/mdev = 88.398/90.013/92.994/1.514 ms
root at pbx:/etc $ tracert www.henrichs.org
www.henrichs.org: Temporary failure in name resolution
Cannot handle "host" cmdline arg `www.henrichs.org' on position 1 (argc 1)
root at pbx:/etc $ dig www.henrichs.org
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> www.henrichs.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48631
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 5, ADDITIONAL: 0
;; QUESTION SECTION:
;www.henrichs.org. IN A
;; ANSWER SECTION:
www.henrichs.org. 3566 IN CNAME ehost-services119.com.
ehost-services119.com. 3565 IN A 69.64.155.165
;; AUTHORITY SECTION:
ehost-services119.com. 3565 IN NS dns1.name-services.com.
ehost-services119.com. 3565 IN NS dns2.name-services.com.
ehost-services119.com. 3565 IN NS dns3.name-services.com.
ehost-services119.com. 3565 IN NS dns4.name-services.com.
ehost-services119.com. 3565 IN NS dns5.name-services.com.
;; Query time: 18 msec
;; SERVER: 216.146.35.35#53(216.146.35.35)
;; WHEN: Wed Jun 22 12:17:53 2011
;; MSG SIZE rcvd: 194
root at pbx:/etc $ wget www.henrichs.org
--2011-06-22 12:18:38-- http://www.henrichs.org/
Resolving www.henrichs.org... failed: Temporary failure in name resolution.
wget: unable to resolve host address `www.henrichs.org'
root at pbx:/etc $ nslookup www.henrichs.org
Server: 216.146.35.35
Address: 216.146.35.35#53
Non-authoritative answer:
www.henrichs.org canonical name = ehost-services119.com.
Name: ehost-services119.com
Address: 69.64.155.165
root at pbx:/etc $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.70.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.70.2 0.0.0.0 UG 0 0 0 eth0
root at pbx:/etc $
More information about the CentOS
mailing list