除了使用dig / nslookup之外,我无法解析主机名.在/ etc / hosts中声明主机工作正常. DNSmasq也没有绑定正在运行.以下是运行dig google.com时tcpdump端口53的输出:
21:02:49.269083 IP txxxxxx1.corp.mxxxxxxs.com.39872 > dxxxxxx3.corp.mxxxxxs.com.domain: 7362+ A? google.com. (28) 21:02:49.269614 IP dxxxxxx3.corp.mxxxxxxs.com.domain > txxxxxx1.corp.mxxxxxxs.com.39872: 7362 5/0/0 A ord08s07-in-f19.1e100.net,[|domain] 21:02:49.270506 IP txxxxxx1.corp.mxxxxxxs.com.33316 > dxxxxxx3.corp.mxxxxxxs.com.domain: 30910+ PTR? 83.225.125.74.in-addr.arpa. (44) 21:02:49.303321 IP dxxxxxx3.corp.mxxxxxxs.com.domain > txxxxxx1.corp.mxxxxxxs.com.33316: 30910*- 1/0/0 (83)
运行ping google.com时的结果:
21:03:05.027197 IP txxxxxx1.corp.mxxxxxxs.com.59151 > dxxxxxx3.corp.mxxxxxxs.com.domain: 56092+ A? google.com. (28) 21:03:05.029069 IP dxxxxxx3.corp.mxxxxxxs.com.domain > txxxxxx1.corp.mxxxxxxs.com.59151: 56092 5/0/0 A ord08s07-in-f18.1e100.net,[|domain] 21:03:05.029309 IP txxxxxx1.corp.mxxxxxxs.com.58238 > dxxxxxx3.corp.mxxxxxxs.com.domain: 10345+ PTR? 82.225.125.74.in-addr.arpa. (44) 21:03:05.065058 IP dxxxxxx3.corp.mxxxxxxs.com.domain > txxxxxx1.corp.mxxxxxxs.com.58238: 10345*- 1/0/0 (83)
与主机名一起使用时,Ping不会返回任何数据包.上述结果从命令发出后延迟约5秒.我没有ping IP的麻烦.
/etc/resolv.conf的内容:
nameserver 10.100.52.11 nameserver 10.100.52.13
当与dig一起使用时,两个名称服务器都会产生良
路线结果-n:
Destination Gateway Genmask Flags Metric Ref Use Iface 10.xxx.131.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 10.xxx.131.1 0.0.0.0 UG 0 0 0 eth0
/ etc / hosts的内容:
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 10.xxx.131.xxx txxxxxx1.corp.mxxxxxxs.com ast01 10.xxx.32.xxx mail.mxxxxxxs.com
如果UseDNS设置为yes,则SSHD甚至不允许登录. NSCD正在运行:nscd 28525 0.0 0.0 233652 2900? Ssl 20:10 0:00 /usr/sbin / nscd.
谢谢!
. . .编辑
我解决了这个问题/etc/nsswitch.conf有一行:
hosts:files赢得dns
我把它改为:
hosts:dns文件获胜
现在一切正常.奇怪的是,事情在上周工作正常.什么都没有改变,当然不是DNS.希望这有助于某人.