18-高级路由:OSPF区域类型:Not-So-Stubby
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了18-高级路由:OSPF区域类型:Not-So-Stubby相关的知识,希望对你有一定的参考价值。
一、实验拓扑:
二、命令部署:
1、将Area 1变为nssa区域:
R1(config)#router ospf 110
R1(config-router)#area 1 nssa
R3(config)#router ospf 110
R3(config-router)#area 1 nssa
R1#show ip route ospf
R1#show ip route ospf database 查看数据库
R1#show ip ospf database nssa-external 查看nssa-external详细信息
2、R4右边增加R6路由器:
①查看R1、R3是否都有关于R6的O E2路由:
R4(config)#router ospf 110
R4(config-router)#redistribute rip subnets
②R1 ABR部署命令,使得R3获得1条静态路由
R1(config)#router ospf 110
R1(config-router)#area 1 nssa default-information-originate
Note:后边可以修改为O N1、Metric 100等操作
3、R1下方增加R7路由器,并重分发进入R1的OSPF 110
①EIGRP部署和重分发:
R1(config)#router eigrp 17
R1(config-router)#no auto-summary
R1(config-router)#network 17.1.1.0 0.0.0.255
R7(config)#router eigrp 17
R7(config-router)#no auto-summary
R7(config-router)#network 7.7.7.0 0.0.0.255
R7(config-router)#network 17.1.1.0 0.0.0.255
R1(config)#router ospf 110
R1(config-router)#redistribute eigrp 17 subnets
②R1上部署命令,不希望重分发的外部路由进入NSSA区域,即R3学习不到R7的路由条目:
R1(config)#router ospf 110
R1(config-router)#area 1 nssa no-redistribution
三、验证:
1、将Area 1变为nssa区域:R1上是否默认都是O N1?查看database可以看到R1(ABR)将7类转换为了5类
①R1#show ip route ospf
O N1 35.1.1.0 [110/3] via 13.1.1.3, 00:01:55, FastEthernet1/0
O N1 192.168.8.0/24 [110/3] via 13.1.1.3, 00:00:23
O N1 192.168.9.0/24 [110/3] via 13.1.1.3, 00:00:23, FastEthernet1/0
O N1 5.0.0.0/8 [110/3] via 13.1.1.3, 00:00:23, FastEthernet1/0
O N1 192.168.10.0/24 [110/3] via 13.1.1.3, 00:00:23, FastEthernet1/0
O N1 192.168.11.0/24 [110/3] via 13.1.1.3, 00:00:23, FastEthernet1/0
②R1#show ip ospf database
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag
5.0.0.0 3.3.3.3 282 0x80000001 0x000C01 0
35.1.1.0 3.3.3.3 691 0x80000001 0x006D7F 0
192.168.8.0 3.3.3.3 344 0x80000001 0x00435D 0
192.168.9.0 3.3.3.3 344 0x80000001 0x003867 0
192.168.10.0 3.3.3.3 344 0x80000001 0x002D71 0
192.168.11.0 3.3.3.3 344 0x80000001 0x00227B 0
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
5.0.0.0 202.100.11.1 343 0x80000001 0x006384 0
35.1.1.0 202.100.11.1 427 0x80000001 0x00C403 0
192.168.8.0 202.100.11.1 343 0x80000001 0x009AE0 0
192.168.9.0 202.100.11.1 343 0x80000001 0x008FEA 0
192.168.10.0 202.100.11.1 343 0x80000001 0x0084F4 0
192.168.11.0 202.100.11.1 343 0x80000001 0x0079FE 0
③R1#show ip ospf database nssa-external
OSPF Router with ID (202.100.11.1) (Process ID 110)
Type-7 AS External Link States (Area 1)
Routing Bit Set on this LSA
LS age: 619
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 192.168.10.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x2D71
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
TOS: 0
Metric: 1
Forward Address: 3.3.3.3
External Route Tag: 0
2、增加R6,查看R1、R3是否有路由条目:
①R1有2条O E2,R3没有关于R6的路由条目
R1#show ip route ospf
O E2 6.0.0.0/8 [110/20] via 12.1.1.2, 00:00:48, FastEthernet0/0
O E2 46.1.1.0 [110/20] via 12.1.1.2, 00:00:48, FastEthernet0/0
R3#show ip route ospf
1.0.0.0/24 is subnetted, 1 subnets
O IA 1.1.1.0 [110/2] via 13.1.1.1, 00:12:53, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/3] via 13.1.1.1, 00:12:53, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/4] via 13.1.1.1, 00:12:53, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.1.1.0 [110/3] via 13.1.1.1, 00:12:53, FastEthernet0/0
O IA 202.100.10.0/24 [110/2] via 13.1.1.1, 00:12:53, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/2] via 13.1.1.1, 00:12:53, FastEthernet0/0
O IA 202.100.11.0/24 [110/2] via 13.1.1.1, 00:12:53, FastEthernet0/0
②R1(ABR)部署命令后:R3上有1条:Seed Metric 1的ON 2的默认路由
R3#show ip route ospf
O*N2 0.0.0.0/0 [110/1] via 13.1.1.1, 00:02:25, FastEthernet0/0
3、R1下方增加R7路由器:
①查看R3、R2和R4关于R7路由条目的区别:R3是O N1路由,R2和R4是O E2路由;
因为只有当R1是ASBR时,才具备将7类转为5类。
R2#show ip route ospf
O E2 17.1.1.0 [110/20] via 12.1.1.1, 00:02:40, FastEthernet0/0
O E2 7.7.7.0 [110/20] via 12.1.1.1, 00:02:40, FastEthernet0/0
R3#show ip route ospf
O N2 17.1.1.0 [110/20] via 13.1.1.1, 00:03:56, FastEthernet0/0
O N2 7.7.7.0 [110/20] via 13.1.1.1, 00:03:56, FastEthernet0/0
②R1上部署命令,不希望重分发的外部路由进入NSSA区域,即R3学习不到R7的路由条目。
R3#show ip route ospf
1.0.0.0/24 is subnetted, 1 subnets
O IA 1.1.1.0 [110/2] via 13.1.1.1, 00:23:23, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/3] via 13.1.1.1, 00:23:23, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/4] via 13.1.1.1, 00:23:23, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.1.1.0 [110/3] via 13.1.1.1, 00:23:23, FastEthernet0/0
O IA 202.100.10.0/24 [110/2] via 13.1.1.1, 00:23:23, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/2] via 13.1.1.1, 00:23:23, FastEthernet0/0
O IA 202.100.11.0/24 [110/2] via 13.1.1.1, 00:23:23, FastEthernet0/0
O*N2 0.0.0.0/0 [110/1] via 13.1.1.1, 00:14:12, FastEthernet0/0
以上是关于18-高级路由:OSPF区域类型:Not-So-Stubby的主要内容,如果未能解决你的问题,请参考以下文章
17-高级路由:OSPF区域类型:StubTotally Stubby