您的位置:首页 > 其它

默认路由下一跳是端口和对端IP地址与ARP代理分析

2012-09-16 21:48 344 查看
实验目的:

验证默认路由下一跳和对端IP的区别。

实验拓扑:





配置:

R1:

interface FastEthernet0/0

ip address 123.1.1.1 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

R2:

interface FastEthernet0/0

ip address 123.1.1.2 255.255.255.0

!

interface FastEthernet0/1

ip address 24.1.1.2 255.255.255.0

R3 :

interface FastEthernet0/0

ip address 123.1.1.3 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

R4:

interface FastEthernet0/1

ip address 24.1.1.4 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 FastEthernet0/1

验证:

在R2的F0/0端口没有关闭代理ARP













从上面可以看出:

如果收到ARP请求的路由器有去往目标网络的路由,那么路由器将会使用自己接口的二层链路地址来回复数据源,声称自己的二层链路地址就是目标的二层链路地址,所以可以通。

如果关闭R2的F0/0 的代理ARP功能

R2(config)#int f0/0

R2(config-if)#no ip pro

R2(config-if)#no ip proxy-arp

R2(config-if)#


(清楚R1的ARP表,要先shut的F0/0)

R1(config)#int f0/0

R1(config-if)#shut

R1(config-if)#end

R1#

*Mar 1 00:30:25.383: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down

*Mar 1 00:30:26.307: %SYS-5-CONFIG_I: Configured from console by console

*Mar 1 00:30:26.383: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

R1#clos

R1#cle

R1#clear arp

R1#clear arp-cache

R1#show arp






从上图可以看出不同是以为2层封装失败。

如果将R1的默认路由改成下一跳IP(123.1.1.2)

R1#conf t

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#no ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

R1(config)#ip route 24.1.1.0 255.255.255.0 123.1.1.2

R1(config)#end





可以看出在R2的F0/0关闭代理ARP的情况下仍然可通

结论:

当配置静态路由时,如果指定远程目标为直连,则可能因为下一跳路由器关闭了代理ARP而造成通信失败,但静态路由指定为下一跳地址时,通信不会受到任何影响。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  默认路由 代理ARP