第一步:在Bob上配置主机与IP地址的映射关系
Bob(config)# ip host PEER 1.1.1.2
第二步:查看当前路由器上进行的映射关系配置
R1#sh hosts
Default domain is not set
Name/address lookup uses static mappings
Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate
temp - temporary, perm - permanent
NA - Not Applicable None - Not defined
Host Port Flags Age Type Address(es)
PEER None (perm, OK) 0 IP 1.1.1.2
第三步:验证
Bob#ping PEER
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/69/84 ms
原文:https://blog.51cto.com/starshomes/2537500