修改静态路由的管理距离.docx_第1页
修改静态路由的管理距离.docx_第2页
修改静态路由的管理距离.docx_第3页
修改静态路由的管理距离.docx_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

修改静态路由的管理距离环境如图:实验目的,使用静态路由命令的参数,修改静态路由的管理距离。基本设置R1RouterenRouter#configure terminal Router(config)#hostname r1r1(config)#interface serial 1/2r1(config-if)#ip address 12.12.12.1 255.255.255.0r1(config-if)#no shutdown r1(config-if)#exitr1(config)#interface loopback 0r1(config-if)#ip address 1.1.1.1 255.255.255.0r1(config-if)#no shutdown r1(config-if)#exitr1(config)#ip route 2.2.2.0 255.255.255.0 12.12.12.2r1(config)#exitR2RouterenRouter#configure terminal Router(config)#hostname r2r2(config)#interface serial 1/3r2(config-if)#ip address 12.12.12.2 255.255.255.0r2(config-if)#no shutdown r2(config-if)#exitr2(config)#interface loopback 0r2(config-if)#ip address 2.2.2.2 255.255.255.0r2(config-if)#no shutdown r2(config-if)#exitr2(config)#ip route 1.1.1.0 255.255.255.0 12.12.12.1r2(config)#exit查看路由表R1r1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set 1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 1/0 via 12.12.12.2 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/2显然包含2.2.2.2的路由条目 2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 1/0 via 12.12.12.2在R1的路由表里面R2r2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set 1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 1/0 via 12.12.12.1 2.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/3包含1.1.1.1的路由条目 1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 1/0 via 12.12.12.1在R2的路由表里面Ping测试执行命令r1#ping 2.2.2.2可以连通Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/116/256 ms执行命令r1#ping 2.2.2.2 source 1.1.1.1可以连通Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:Packet sent with a source address of 1.1.1.1 !Success rate is 100 percent (5/5), round-trip min/avg/max = 32/106/204 ms由于两个路由器的路由表中的两条静态路由都正常工作。因此连通性良好。将静态路由的管理距离改为2执行命令r1#configure terminal r1(config)#no ip route 2.2.2.0 255.255.255.0 12.12.12.2r1(config)#ip route 2.2.2.0 255.255.255.0 12.12.12.2 2r1(config)#exit查看路由表r1#show ip route结果Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set 1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 2/0 via 12.12.12.2 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/2可以看见静态路由的管理距离变成了2之前的静态路由是: 2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 1/0 via 12.12.12.2现在的静态路由是: 2.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 2/0 via 12.12.12.2将静态路由的管理距离改成255执行命令r1#configure terminal r1(config)#no ip route 2.2.2.0 255.255.255.0 12.12.12.2 2r1(config)#ip route 2.2.2.0 255.255.255.0 12.12.12.2 255r1(config)#exit查看路由表r1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resor

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论