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

1、实验拓扑:
1-PC1有默认网关/Normal-ARP(正常ARP)
拓展:
(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)

转载于:https://blog.51cto.com/13856092/2137350

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值