資源描述:
《6.ospf單區(qū)域》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、OSPF:OpenShortestPathFirst開放最短路徑優(yōu)先協(xié)議拓?fù)鋱D如下:(點(diǎn)對(duì)點(diǎn)多路訪問型)接口連接:Router1S0/0<---->Router2S0/0Router3S0/1<---->Router2S0/1Router3F1/0<---->Router2F1/0路由器參考配置如下:路由器R1的配置:Router>//用戶模式Router>enable//從用戶模式進(jìn)入到特權(quán)模式Router#configureterminal//從特權(quán)模式進(jìn)入到全局模式Router(config)#hostnameR1//給路由器從命名為
2、R1R1(config)#noipdomainlookup//關(guān)閉域名查找R1(config)#lineconsole0//進(jìn)入控制口R1(config-line)#loggingsynchronous//光標(biāo)跟隨R1(config-line)#exec-timeout00//關(guān)閉延遲R1(config-line)#exitR1(config)#interfaceloopback0//配置回環(huán)接口的ip地址R1(config-if)#ipaddress1.1.1.1255.255.255.0R1(config-if)#interfaces0
3、/0//配置串口的ip地址R1(config-if)#ipaddress192.1.1.1255.255.255.0R1(config-if)#noshutdown//激活物理接口R1(config-if)#endR1#showiproute//查看路由表信息Codes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype
4、2E1-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,1subnetsC1.1.1.0isdirectlyconnec
5、ted,Loopback0C192.1.1.0/24isdirectlyconnected,Serial0/0R1#configureterminal//進(jìn)入全局配置模式R1(config)#routerospf1//啟用ospf協(xié)議加進(jìn)程號(hào)(進(jìn)程號(hào)可不同)R1(config-router)#network1.1.1.10.0.0.0area2//宣告ip、反向掩碼和區(qū)域號(hào)R1(config-router)#network192.1.1.10.0.0.0area2//區(qū)域號(hào)要相同R1(config-router)#endR1#showipr
6、oute//查看路由表信息Codes: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-2ia-IS-ISinterarea,*-
7、candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotset//[110/65]:管理距離110;成本(度量值)651.0.0.0/24issubnetted,1subnetsC1.1.1.0isdirectlyconnected,Loopback02.0.0.0/32issubnetted,1subnetsO2.2.2.2[110/65]via192.1.1.2,00:02:22,Serial0/
8、03.0.0.0/32issubnetted,1subnetsO3.3.3.3[110/129]via192.1.1.2,00:02:22,Serial0/0O193.1.1.0