OSPF的虚链路配置
生活随笔
收集整理的這篇文章主要介紹了
OSPF的虚链路配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
OSPF的虛鏈路配置 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
OSPF多區要求普通區域必須和骨干區域(area 0)相連,如果一個區域不能和骨干區域直接相連,可以使用虛鏈路把該區域邏輯上連接到骨干區域。
?
OSPF多區要求普通區域必須和骨干區域(area 0)相連,如果一個區域不能和骨干區域直接相連,可以使用虛鏈路把該區域邏輯上連接到骨干區域。
?
在這個實驗中,我們把區域2連接到骨干區域,虛鏈路從區域1通過。?
R1的配置 Router> en Router# config? t Router(config)# host? R1 R1(config)# int? e0/1 R1(config-if)# ip? add? 192.168.1.1? 255.255.255.0 R1(config-if)# no? shut R1(config-if)# int? e0/0 R1(config-if)# ip? add? 192.168.2.1? 255.255.255.0 R1(config-if)# no? shut R1(config-if)# exit R1(config)# router? ospf? 10 R1(config-router)# net? 192.168.1.1? <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.0.0.0? a? 0 R1(config-router)# net? 192.168.2.1? 0.0.0.0? a? 0 R1(config-router)# end R1#?
?
R2的配置 Router> en Router# config? t Router(config)# host? R2 R2(config)# int? e0/0 R2(config-if)# ip? add? 192.168.2.2? 255.255.255.0 R2(config-if)# no? shut R2(config-if)# int? e0/1 R2(config-if)# ip? add? 192.168.3.1? 255.255.255.0? R2(config-if)# no? shut R2(config-if)# exit R2(config)# router? ospf? 10 R2(config-router)# net? 192.168.2.2? 0.0.0.0? a? 0 R2(config-router)# net? 192.168.3.1? 0.0.0.0? a? 1 R2(config-router)# end R2#?
?
R3的配置 Router> en Router# config? t Router(config)# host? R3 R3(config)# int? e0/1 R3(config-if)# ip? add? 192.168.3.2? 255.255.255.0 R3(config-if)# no? shut R3(config-if)# int? e0/2 R3(config-if)# ip? add? 192.168.4.1? 255.255.255.0 R3(config-if)# no? shut R3(config-if)#exit R3(config)# router? ospf? 10 R3(config-router)# net? 192.168.3.2? 0.0.0.0? a? 1 R3(config-router)# net? 192.168.4.1? 0.0.0.0? a? 1 R3(config-router)# end R3#?
?
R4的配置?
Router> en Router# config? t Router(config)# host? R4 R4(config)#i int? e0/2 R4(config-if)# ip? add? 192.168.4.2? 255.255.255.0 R4(config-if)# no? shut R4(config-if)# int? e0/3 R4(config-if)# ip? add? 192.168.5.1? 255.255.255.0 R4(config-if)# no? shut R4(config-if)# exit R4(config)# router? ospf? 10 R4(config-router)# net? 192.168.4.2? 0.0.0.0? a? 1 R4(config-router)# net? 192.168.5.1? 0.0.0.0? a? 2 R4(config-router)# end R4#?
R5的配置 Router> en Router# config? t Router(config)# host? R5 R5(config)# int? e0/3 R5(config-if)# ip? add? 192.168.5.2? 255.255.255.0 R5(config-if)# no? shut R5(config-if)# int? e0/1 R5(config-if)# ip? add? 192.168.6.1? 255.255.255.0 R5(config-if)# no? shut R5(config-if)# exit R5(config)# router? ospf? 10 R5(config-router)# net? 192.168.5.2? 0.0.0.0? a? 2 R5(config-router)# net? 192.168.6.1? 0.0.0.0? a? 2 R5(config-router)# end R5#?
配置完成后,在R1、R2、R3、R5上用show? ip? route來查看路由表,路由表都不完整,只有R4的路由表是完整的。下面在R2(ABR)和R4(ABR)上配置虛鏈路?
R2# config? t R2(config)# router? ospf? 10 R2(config-router)# area? 1? virtual-link? 192.168.5.1? (è192.168.5.1是R4的路由ID) R2(config-router)#end R2#?
?
R4# config? t R4(config)# router? ospf? 10 R4(config-router)# area? 1? virtual-link? 192.168.3.1? (è192.168.3.1是R2的路由ID) R4(config-router)#end R4#?
?
配置完成后,在R1、R2、R3、R4、R5上用show? ip? route來查看路由表,都能看有6條路由就是成功了!?
轉載于:https://blog.51cto.com/xiangruyimo/331847
總結
以上是生活随笔為你收集整理的OSPF的虚链路配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学教育成空中楼阁 巨额学费背后却是失业风
- 下一篇: [CTO札记]盛大游戏上市,是对《文化产