资源描述:
《永久存在路由表中的静态路由.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、永久存在路由表中的静态路由环境如图:实验目的:使用permanent参数,将静态路由永久的存放在路由表中。说明:配置IP地址的动作必须在做路由之前。不然,路由是无法知道该从哪个借口将数据包丢出去。所谓永久路由:就是在静态路由被写进路由表后,不会被再次移除出路由表。基本设置R1Router>enRouter#configureterminalRouter(config)#hostnamer1r1(config)#interfaceserial1/2r1(config-if)#ipaddress12.
2、12.12.1255.255.255.0r1(config-if)#noshutdownr1(config-if)#exitr1(config)#interfaceloopback0r1(config-if)#ipaddress1.1.1.1255.255.255.0r1(config-if)#noshutdownr1(config-if)#exitr1(config)#iproute2.2.2.0255.255.255.012.12.12.2r1(config)#exitR2Router>enR
3、outer#configureterminalRouter(config)#hostnamer2r2(config)#interfaceserial1/3r2(config-if)#ipaddress12.12.12.2255.255.255.0r2(config-if)#noshutdownr2(config-if)#exitr2(config)#interfaceloopback0r2(config-if)#ipaddress2.2.2.2255.255.255.0r2(config-if)#
4、noshutdownr2(config-if)#exitr2(config)#iproute1.1.1.0255.255.255.012.12.12.1r2(config)#exit查看路由表R1r1#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternal
5、type2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotset1.0.0.0/24issubnetted,1subne
6、tsC1.1.1.0isdirectlyconnected,Loopback02.0.0.0/24issubnetted,1subnetsS2.2.2.0[1/0]via12.12.12.212.0.0.0/24issubnetted,1subnetsC12.12.12.0isdirectlyconnected,Serial1/2显然包含2.2.2.2的路由条目2.0.0.0/24issubnetted,1subnetsS2.2.2.0[1/0]via12.12.12.2在R1的路由表里面R2r2
7、#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-
8、2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotset1.0.0.0/24issubnetted,1subnetsS1.1.1.0[1/0]via12.12.12.12.0.0.0/24issubnetted,1subnetsC2.2.2.0isdirectlyconnected,Loopba