1. 程式人生 > >18-高級路由:OSPF區域類型:Not-So-Stubby

18-高級路由:OSPF區域類型:Not-So-Stubby

fault config tex nss 3.1.1 高級 ability -s forward

一、實驗拓撲:
技術分享圖片
二、命令部署:
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