楼主,其实你这样是可以通的。
具体过程如下:
PC1发起ping,并且有指定网关为192.168.2.10,也就是PC2的地址,那么首先会进行arp解析:
采用路由器模拟PC,PC2上开启debug arp,那么在PC2上可以看到如下log:
*Mar 1 00:04:21.339: IP ARP: rcvd req src 192.168.1.1 cc00.0694.0000, dst 192.168.2.1 FastEthernet0/0
*Mar 1 00:04:21.339: IP ARP: sent rep src 192.168.2.1 cc02.0694.0000,
dst 192.168.1.1 cc00.0694.0000 FastEthernet0/0
*Mar 1 00:04:22.347: ICMP: echo reply sent, src 192.168.2.1, dst 192.168.1.1
*Mar 1 00:04:22.347: IP ARP: creating incomplete entry for IP address: 192.168.1.1 interface FastEthernet0/0
*Mar 1 00:04:22.351: IP ARP: sent req src 192.168.2.1 cc02.0694.0000,
dst 192.168.1.1 0000.0000.0000 FastEthernet0/0
此时PC2的ARP表已经解析到PC1的MAC,并且发送了自己的ARP回应给PC1(包含PC2的MAC),那么这时候,PC1就可以利用PC2的MAC地址来进行数据包的封装,随后出现了PING通的现象,具体如下:
*Mar 1 00:04:22.403: IP ARP: rcvd rep src 192.168.1.1 cc00.0694.0000, dst 192.168.2.1 FastEthernet0/0
*Mar 1 00:04:23.331: ICMP: echo reply sent, src 192.168.2.1, dst 192.168.1.1
*Mar 1 00:04:23.371: ICMP: echo reply sent, src 192.168.2.1, dst 192.168.1.1
*Mar 1 00:04:23.411: ICMP: echo reply sent, src 192.168.2.1, dst 192.168.1.1
*Mar 1 00:04:23.455: ICMP: echo reply sent, src 192.168.2.1, dst 192.168.1.1
有什么问题继续跟帖~
|