验证配置结果
# 在设备RouterA上执行ping serverB命令,可以ping通,且对应的目的地址为10.4.1.1。
<RouterA> ping serverB PING serverB (10.4.1.1): 56 data bytes, press CTRL_C to break Reply from 10.4.1.1: bytes=56 Sequence=1 ttl=126 time=4 ms Reply from 10.4.1.1: bytes=56 Sequence=2 ttl=126 time=1 ms Reply from 10.4.1.1: bytes=56 Sequence=3 ttl=126 time=1 ms Reply from 10.4.1.1: bytes=56 Sequence=4 ttl=126 time=1 ms Reply from 10.4.1.1: bytes=56 Sequence=5 ttl=126 time=1 ms --- serverB ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/1/4 ms# 在设备RouterA上执行ping huawei.com命令,可以ping通,且对应的目的地址为10.2.1.3。
<RouterA> ping huawei.comTrying DNS server (10.3.1.2) PING huawei.com (10.2.1.3): 56 data bytes, press CTRL_C to break Reply from 10.2.1.3: bytes=56 Sequence=1 ttl=126 time=6 ms Reply from 10.2.1.3: bytes=56 Sequence=2 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=3 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=4 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=5 ttl=126 time=4 ms --- huawei.com ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 4/4/6 ms# 在设备RouterA上执行ping huawei命令,可以ping通,且对应的域名变为huawei.com,目的地址为10.2.1.3。
<RouterA> ping huaweiTrying DNS server (10.3.1.2) PING huawei.com (10.2.1.3): 56 data bytes, press CTRL_C to break Reply from 10.2.1.3: bytes=56 Sequence=1 ttl=126 time=6 ms Reply from 10.2.1.3: bytes=56 Sequence=2 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=3 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=4 ttl=126 time=4 ms Reply from 10.2.1.3: bytes=56 Sequence=5 ttl=126 time=4 ms --- huawei.com ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 4/4/6 ms# 在RouterA用display ip host命令可以查看到静态DNS表项中主机名和IP地址的对应关系。
<RouterA> display ip hostHost Age Flags AddressserverB 0 static 10.4.1.1serverC 0 static 10.4.1.2 # 在RouterA用display dns dynamic-host命令可以查看到动态缓存区中的动态DNS表项信息。
<RouterA> display dns dynamic-hostHost TTL Type Address(es) huawei.com 114 IP 10.2.1.3 说明:显示信息中的TTL表示该表项存在的时间,单位是秒。