1.实验环境
主机A和主机B连接到交换机,并与一台路由器互连
2.需求描述
- 主机A和主机B连接到交换机,并与一台路由器互连
 - 主机A和主机B设置为同一网段,网关设置为路由接口地址
 - 查看ARP相关信息,熟悉在PC和Cisco设备上的常用命令
 
3.推荐步骤
- 首先通过 ping 命令验证两台主机是否连通,然后查看主机上的缓存表,最后清除缓存表中的选项
 - 在路由器上ping主机,然后查看路由器的arp 缓存表,最后清除缓存项目
 - step3在路由器上为主机A绑定错误的MA 地址,然后通过 ping 测试,并分析测试结果
 

4.实验步骤
4.1、通过 ping 命令验证两台主机是否连通
C:\>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
Reply from 192.168.1.2: bytes=32 time=3ms TTL=128
Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128Ping statistics for 192.168.1.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 3ms, Average = 1msC:\> 
4.2、查看主机上的缓存表,最后清除缓存表中的选项
C:\>arp -a      #查看缓存表Internet Address      Physical Address      Type192.168.1.2           0009.7c6c.5a22        dynamicC:\> 
C:\>arp -aInternet Address      Physical Address      Type192.168.1.2           0009.7c6c.5a22        dynamicC:\>arp -d        #删除缓存表中的选项
C:\>arp -a
No ARP Entries Found     #未找到ARP选项
C:\> 
5.使用路由器
5.1、在路由器上ping主机
Router#ping 192.168.1.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5) 
5.2、路由器的arp 缓存表
Router#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.1.1             -   000A.4168.A201  ARPA   GigabitEthernet0/0
Internet  192.168.1.2             0   0009.7C6C.5A22  ARPA   GigabitEthernet0/0
Router# 
5.3、清除arp缓存表
略