ospf路由以及优化

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

OSPF配置---重分发---路由优化STUB NSSA

R1的配置

R1#no

R1#config t

R1(config)#hostname r1

r1(config)#interface e0/0

r1(config-if)#ip address 192.168.10.1 255.255.255.0

r1(config-if)#no shu

r1(config)#interface e0/1

r1(config-if)#ip address 192.168.20.1 255.255.255.0

r1(config-if)#no shu

r1(config-if)#router ospf 10

r1(config-router)#network 192.168.10.0 0.0.0.255 area 10

r1(config-router)#network 192.168.20.0 0.0.0.255 area 10

R2的配置

R2#no

R2#config t

R2(config)#hostname r2

r2(config)#interface e0/1

r2(config)#interface e0/1

r2(config-if)# ip address 192.168.20.2 255.255.255.0

r2(config-if)# no shu

r2(config-if)#interface e0/2

r2(config-if)# ip address 192.168.30.1 255.255.255.0

r2(config-if)# no shu

r2(config-if)#router ospf 10

r2(config-router)#network 192.168.20.0 0.0.0.255 area 10 r2(config-router)#network 192.168.30.0 0.0.0.255 area 0

R3的配置

R3#no

R3#config t

R3(config)#hostname r3

r3(config)#interface e0/2

r3(config-if)#ip address 192.168.30.2 255.255.255.0

r3(config-if)#no shu

r3(config-if)#interface e0/3

r3(config-if)#ip address 192.168.40.1 255.255.255.0

r3(config-if)#no shu

r3(config-if)#router ospf 10

r3(config-router)# network 192.168.30.0 0.0.0.255 area 0 r3(config-router)# network 192.168.40.0 0.0.0.255 area 0

R4的配置

R4#no

R4#config t

R4(config)#hostname r4

r4(config)#interface e0/3

r4(config-if)#ip address 192.168.40.2 255.255.255.0

r4(config-if)#no shu

r4(config-if)#interface e0/0

r4(config-if)#ip address 192.168.50.1 255.255.255.0

r4(config-if)#no shu

r4(config-if)#router ospf 10

r4(config-router)#network 192.168.40.0 0.0.0.255 area 0 r4(config-router)#network 192.168.50.0 0.0.0.255 area 20

R5的配置

R5#no

R5#config t

R5(config)#hostname r5

r5(config)#interface e0/0

r5(config-if)#ip address 192.168.50.2 255.255.255.0

r5(config-if)#no shu

r5(config-if)#interface e0/1

r5(config-if)#ip address 192.168.60.1 255.255.255.0

r5(config-if)#no shu

r5(config-if)#router ospf 10

r5(config-router)# network 192.168.50.0 0.0.0.255 area 20

r5(config-router)# network 192.168.60.0 0.0.0.255 area 20 Pc的配置

查看每个路由器的路由表show ip route

所有的路由都学习到了!!!

使用vpc ping 192.168.60.1 测试连通性

Ok通了!!!

路由优化

在AREA 20 上做stub

注意!!!Stub区域不能出现自治系统边界路由器ASBR 不能是骨干区域AREA 0

R4(config)#router ospf 10

R4(config-router)#area 20 stub

----------------------------------------------

R5(config)#router ospf 10

R5(config-router)#area 20 stub

配置stub后使用show ip route 查看R5路由表

可以看出在R5上注入了一条默认静态路由

相关文档
最新文档