一、ospf路由代码类型
1、代码是0 表示ospf的区域的路由
2、代码是0 IA 表示ospf区域间路由
3、代码是0 E1 表示外部路由
4、代码是0 E2 表示外部路由
提示:0E1路由度量:本路由器到ASBR路由度量加上ASBR到外部路由的度量
0E2路由度量:ASBR外部路由的度量
默认用0E2
二、ospf学习外部路由
<?xml:namespace prefix = o />
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
在承载多种路由的路由器上配置
(config)#router ospf 进程号
(config-router)#redistribute rip subnets 把外部的rip路由发送ospf环境。这回的是E2要用E1加上metric-type
调试ospf的事件: #show ip ospf erents
三、ospf区域类型
1、 骨干区域:区域号位0的区域用于实现区域间通信。 建议最好只有一个骨干区域
2、 存根区域或者未节区域:不接收外部路由的区域(外部路由指的是非ospf的路由)
1) 不接收外部路由
2) 该区域内不能有ASBR存在
3) 该区域要存在ABR最好只存在一个ABR
4) 该区域正常接收ospf区域间路由
5) 该区域不能有“虚链路”通过
3配置
在存根区域的所有路由器上(包括ABR)
(config-router)#area 区域号 stub

R1:
配置ip地址
配置路由rip
(config-router)#router rip
(config-router)#version 2
(config-router)#network 172.16.0.0
(config-router)#router ospf o
(config-router)#network 172.16.0.0
(config-router)#network202.110.100.0
(config-router)#redistribute rip subenets
R2: 配置ip地址
配置路由rip
(config-router)#router ospf o
(config-router)#network202.110.100.0
R3:
4完全存根区域或者完全末节区域
特性
1、不接收外部路由
2、该区域内不能有ASBR存在
3、该区域要存在ABR最好只存在一个ABR
4、该区域不能有“虚链路”通过
5、cisco私有属性
配置
1 在该区域ABR上
(config-router)#area 区域号 stub no-summary
2在该区域的所有内部路由器上
(config-router)#area区域号 stub
在上个实验上加上两步
去了骨干区域的 area 1 stub换成 area 1 stub no-summary
转载于:https://blog.51cto.com/jiangxinlong/299592