目标地址不正确:foo.bar.local

我不明白为什么我最后得到“不好的目的地址”。

DNS工作:

root@pc:~# nslookup foo.bar.local Server: 127.0.1.1 Address: 127.0.1.1#53 Name: foo.bar.local Address: 10.100.71.28 

Traceroute到IP作品:

 root@pc:~# tcptraceroute 10.100.71.28 443 Selected device eth1, address 172.17.6.82, port 34878 for outgoing packets Tracing some path to 10.100.71.28 on TCP port 443 (https), 30 hops max 1 172.17.6.254 0.401 ms 0.510 ms 0.402 ms 2 10.130.4.2 0.941 ms 0.893 ms 0.800 ms 3 * * * 4 * * * 5 10.100.63.11 17.915 ms 20.109 ms 17.054 ms 6 10.100.71.28 [open] 22.654 ms 17.680 ms 21.081 ms 

Tcptraceroute到主机名不起作用?

 root@pc:~# tcptraceroute foo.bar.local 443 Bad destination address: foo.bar.local 

更新

其他命令如ping或traceroute也不能访问foo.bar.local。

我没有从这个输出:

 getent hosts foo.bar.local 

问题中的命令显示DNS正在工作,IPnetworking正在工作。

哪里不对? 🙂

您的操作系统不像nslookup那样直接连接到DNS。

如果命令tcptraceroute foo.bar.local运行,则在操作系统询问DNS之前发生名称服务切换 。

我这样解决:

 diff -r /var/tmp/etc-saved/nsswitch.conf /etc/nsswitch.conf 11c11 < hosts: files mdns4_minimal [NOTFOUND=return] dns --- > hosts: files dns