收藏 分销(赏)

Cisco路由器路由重定向.docx

上传人:pc****0 文档编号:5644817 上传时间:2024-11-15 格式:DOCX 页数:4 大小:20.86KB 下载积分:10 金币
下载 相关 举报
Cisco路由器路由重定向.docx_第1页
第1页 / 共4页
Cisco路由器路由重定向.docx_第2页
第2页 / 共4页


点击查看更多>>
资源描述
Cisco路由配置路由器缺省路由及IP重定向3  [ 2012年7月13日 ] 【大 中 小】 1.2   IP重定向         当数据链路上连接多个路由器时,如A、B2个路由器,假如主机终端X设置的缺省网关为A,而实际目的地址需通过B才能到 达,路由器A不仅要向路由器B转发报文,而且还要向主机发送ICMP重定向信息,通知他如果继续想特定的目的发送报文,那么请接将报文发送给路由器B,以 下实验R1仿真为终端X,而R2、R3即为路由器A、B.         R1和上一个实验一样的配置。         R2:         R2(config)#clock timezone cet 1         R2(config)#ip subnet-zero         R2(config)#interface loopback 0         R2(config-if)#ip address .2 255.255.255.0         R2(config-if)#ip ospf network point-to-point         R2(config)#interface ethernet 0         R2(config-if)#ip address 112.1.1.2 255.255.255.0         R2(config-if)#router ospf 10         R2(config-router)#router-id .2         R2(config-router)#network .0 255.255.255.255 area 0         R3:         R3(config)#interface ethernet 0         R3(config-if)#ip address 112.1.1.3 255.255.255.0         R3(config)#interface loopback 0         R3(config-if)#ip address .1 255.255.255.0 secondary         R3(config-if)#ip address .3 255.255.255.0 secondary         R3(config-if)#ip address .2 255.255.255.0 secondary         R3(config-if)#ip address .4 255.255.255.0 secondary         R3(config-if)#ip address .3 255.255.255.0         R3(config-if)#ip ospf network point-to-point         R3(config-if)#router ospf 10         R3(config-router)#router-id .3         R3(config-router)#network .0 255.255.255.255 area 0         R1已经关闭了路由功能,所有已开始时看不到任何路由的只有默认网关:         R1#show ip route         Default gateway is 112.1.1.2         Host               Gateway           Last Use    Total Uses Interface         ICMP redirect cache is empty         在 这种情况下,R1如要访问R3,默认情况下会先到R2,因为R2/R3都在同一个网络内,因此R2收到R1的目的为。3的数据报文后,查看路由表,发现下 一跳就是接收该数据报文的接口E0,等于接收和发送都是同一个接口,因此,R2便通知R1,下次往3.3.3.3直接发给R3即可。0 - 注意,这个重定向信息,由路由器发出,对主机有效,如果R1启用路由功能,配置默认路由指向R2,一样会收到重定向信息,但是对于作为路由器的R1,会忽视重定向信息,仍然会将后继数据报文发给R2,可通过以下办法验证: 启用R1的路由功能:         R1(config)#ip routing         R2(config)#access-list 101 permit ip any host .3         R2(config)#access-list 101 permit ip any any         R2(config)#interface ethernet 0         R2(config-if)#ip access-group 101 in         从R1发起ping         R1#ping .3         Type escape sequence to abort.         Sending 5, 100-byte ICMP Echos to .3, timeout is 2 seconds:         !!!!!         Success rate is 100 percent (5/5), round-trip min/avg/max = ms         R1#ping .3         Type escape sequence to abort.         Sending 5, 100-byte ICMP Echos to .3, timeout is 2 seconds:         !!!!!         Success rate is 100 percent (5/5), round-trip min/avg/max = ms         查看R2的访问列表计数:可见全部数据报文都经过了R2的以太网口在转发出去。         R2#show ip access-lists 101         Extended IP access list 101         10 permit ip any host .3 (20 matches)         20 permit ip any any (132 matches)         IOS对于进入本接口之后,本路由器应答或从相同接口转发出去的数据报文,会双倍计数,即五个数据报文计数为10.         (5)关闭R1的路由功能,并在此pingR3         R1#ping .3         Type escape sequence to abort.         Sending 5, 100-byte ICMP Echos to .3, timeout is 2 seconds:         !!!!!         Success rate is 100 percent (5/5), round-trip min/avg/max = ms         查看R2的通过访问控制,截取的数据报文个数:         R2#show access-lists 101         Extended IP access list 101         10 permit ip any host .3 (22 matches)         20 permit ip any any (434 matches)         计数增长了2,实质上只截取了1个数据报文,即R2收到第一个数据报文之后,发出重定向,之后,R1便直接将目的地址为。3的数据报文转发给R3.
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 行业资料 > 医学/心理学

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服