首页 > 其他 > 详细

1-PC1有默认网关/Normal-ARP(正常ARP)

时间:2018-07-06 20:18:35      阅读:207      评论:0      收藏:0      [点我收藏+]
1、实验拓扑:
技术分享图片
拓展:
(1)PC1问跨网段的目的的MAC,这时候默认网关会把自己的MAC给PC1,这个时候就是代理ARP的过程。
(2)电脑也是有路由表的,要去Ping别人,要去先找有没这条路由条目
2、命令部署:
基本部署:
PC1(config)#int f0/0
PC1(config-if)#no shutdown
PC1(config-if)#ip add 12.1.1.1 255.255.255.0
PC1(config)#no ip routing

R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#int f0/1
R2(config-if)#no shutdown
R2(config-if)#ip add 23.1.1.2 255.255.255.0

R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 23.1.1.3 255.255.255.0
R3(config-if)#int lo1
R3(config-if)#ip add
R3(config-if)#ip add 3.3.3.3 255.255.255.0

重点部署:
PC1(config)#ip default-gateway 12.1.1.2
R2(config)#ip route 0.0.0.0 0.0.0.0 23.1.1.3
R3(config)#ip route 12.1.1.0 255.255.255.0 f0/0

3、抓包验证:
(1)查看R2—>f0/0的MAC地址、PC—>f0/0的MAC地址等
PC1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 12.1.1.2 - c001.1858.0000 ARPA FastEthernet0/0

PC1#show int f0/0
FastEthernet0/0 is up, line protocol is up
Hardware is Gt96k FE, address is c001.1858.0000 (bia c001.1858.0000)

R2#show int f0/0
FastEthernet0/0 is up, line protocol is up
Hardware is Gt96k FE, address is c002.3430.0000 (bia c002.3430.0000)

清除ARP:
方法:先把PC1接口shutdown—>no shutdown—>clear arp-cache

R2开启Debug功能:
R2#debug arp
ARP packet debugging is on

(2)抓包结果:
R2#
Mar 1 00:28:34.899: IP ARP: rcvd req src 12.1.1.1 c001.1858.0000, dst 12.1.1.2 FastEthernet0/0
Mar 1 00:28:34.899: IP ARP: sent rep src 12.1.1.2 c002.3430.0000,
dst 12.1.1.1 c001.1858.0000 FastEthernet0/0
新版抓包,抓到的还是3.3.3.3的地址。
(3)看到的地址永远是R2的f0/0的MAC地址

技术分享图片

1-PC1有默认网关/Normal-ARP(正常ARP)

原文:http://blog.51cto.com/13856092/2137350

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!