首页 > IT基础架构 > 网络安全 > ccnp学习009--路由与交换(03ospf)
一
1、例子
区域0(172.16.96.0/24 to 172.16.127.0/24)他别连接了区域1(172.16.32.0/24 to 172.16.63.0/24)和区域2(172.16.64.0/24 to 172.16.95.0/24)
router1
#router ospf 100
(config-router)#network 172.16.32.1 0.0.0.0 area 1
(config-router)#network 172.16.96.1 0.0.0.0 area 0
(config-router)#area 0 range 172.16.96.0 255.255.224.0
(config-router)#area 1 range 172.16.32.0 255.255.224.0
router2
#ip ospf 100
(config-router)#network 172.16.64.1 0.0.0.0 area 2
(config-router)#network 172.16.96.1 0.0.0.0 area 0
(config-router)#area 0 range 172.16.96.0 255.255.224.0
(config-router)#area 2 range 172.16.64.0 255.255.224.0
缺省路由在OSPF(ASBR上的配置)
#default-information originate [always]
r1
router ospf
network 10.1.1.1 0.0.0.0 area 0
default-information originate metric 10
ip route 0.0.0.0 0.0.0.0 192.1.1.2
2、ospf特定区域类型
三类:stub areas totally stublly areas
not-so-stubby areas
成为stub
#area area-id stub
#area area-id stub no-summary (totally stub )
#area area-id default-cost number
3、虚电路
用于把没有和主干相连的区域边接到主干上,但不一般不主张,同时也是与主干连路的一个备份。
#area area-id virtual-link route-id
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/181629/viewspace-819081/ ,如需转载,请注明出处,否则将追究法律责任。