用ping绑定奇怪的行为

我已经绑定了我的局域网,并创build了一个区域:

$ORIGIN example.com. $TTL 604800 ; 1 week @ IN SOA ns1.example.com. max.example.com. ( 2017103151 ; serial 604800 ; refresh (1 week) 86400 ; retry (1 day) 2419200 ; expire (4 weeks) 604800 ; minimum (1 week) ) IN NS ns1.example.com. IN NS ns2.example.com. MX 10 mx1.example.com. server1 A 192.168.1.100 ns1 A 192.168.1.101 ns2 A 192.168.1.102 mx1 A 192.168.1.100 ftp CNAME server1 pop3 CNAME server1 imap CNAME server1 

反向区域:

 $ORIGIN 1.168.192.in-addr.arpa. $TTL 604800 ; 1 week @ IN SOA ns1.example.com. max.example.com. ( 2017103136 ; serial 604800 ; refresh (1 week) 86400 ; retry (1 day) 2419200 ; expire (4 weeks) 604800 ; minimum (1 week) ) IN NS ns1.example.com. IN NS ns2.example.com. 100 PTR ftp.example.com. 100 PTR mx1.example.com. 100 PTR www.example.com. 100 PTR smtp.example.com. 100 PTR mail.example.com. 100 PTR pop3.example.com. 100 PTR imap.example.com. 101 PTR ns1.example.com. 102 PTR ns2.example.com. 

一切正常,但ping命令有一个奇怪的行为:

 ping mx1.example.com 64 bytes from www.example.com (192.168.1.100): icmp_seq=1 ttl=64 time=0.102 ms ping imap.example.com 64 bytes from pop3.example.com (192.168.1.100): icmp_seq=1 ttl=64 time=0.102 ms 

这是一种正常的行为,当您尝试ping www.google.com时,您会得到类似的结果。 这里是一个例子:

 khaled@my-server:~$ ping www.google.com PING www.google.com (216.58.212.100) 56(84) bytes of data. 64 bytes from lhr35s06-in-f4.1e100.net (216.58.212.100): icmp_seq=1 ttl=54 time=94.5 ms 64 bytes from lhr35s06-in-f4.1e100.net (216.58.212.100): icmp_seq=2 ttl=54 time=96.0 ms 64 bytes from lhr35s06-in-f4.1e100.net (216.58.212.100): icmp_seq=3 ttl=54 time=94.5 ms 

您可以看到返回的名称与ping命令中使用的原始名称不同。 这显然是一个反向的DNS名称。 要validation,您可以使用以下命令:

 khaled@my-server:~$ host 216.58.212.100 100.212.58.216.in-addr.arpa domain name pointer lhr35s06-in-f100.1e100.net. 100.212.58.216.in-addr.arpa domain name pointer lhr35s06-in-f4.1e100.net. 

您可以使用-n选项禁用反向查找,如:

 khaled@my-server:~$ ping -n www.google.com PING www.google.com (216.58.212.100) 56(84) bytes of data. 64 bytes from 216.58.212.100: icmp_seq=1 ttl=54 time=94.6 ms 64 bytes from 216.58.212.100: icmp_seq=2 ttl=54 time=94.6 ms