OSPF Special Area Introduction, Stub, Totally Stub, NSSA, Totally NSSA

1.1.0 Routing OSPF Special Area Introduction, Stub, Totally Stub, NSSA, Totally NSSA

Creation and precautions of special regions

Generation : OSPF reduces the size of the LSDB of routers in the network by dividing areas. For those non-backbone areas located on the border of the AS, if the device is a relatively low-end router, it cannot bear too many routing entries. Therefore, the special area feature of OSPF can further reduce the number of LSAs and the size of the routing table. (Considering the performance of low-end equipment, reduce equipment burden through OSPF special area feature)

Note : Only the non-backbone area can be configured as a special area, and the backbone area cannot be configured as a special area. Even if it is configured, it will not take effect, because the backbone area links multiple areas. .

Stub area

Introduction : Stub end area and stub area are used to represent the last node of a network, and no other network nodes will be connected in the future.

Features : The routing device in this area does not allow Type 4 and Type 5 LSAs in its LSDB, but it will generate a Type 3 default route pointing to the ABR device in this special area. The absence of category 45 means that there are not a large number of external routing entries, and access through the default route greatly reduces the burden on the device.

Brief features : reject categories 4 and 5, and generate category 3 default routes.

Configuration :

1. If an area is to be configured as a stub area, all routers in the area must be configured as stub routers .

  • You only need to enter in the non-backbone area mode stubto set it as a stub area, and all devices in this area need to be set as stubs.

insert image description here

2. ASBRs cannot exist in the stub area , and the external routes of the autonomous system cannot be propagated in the area, because the stub area is also called the stub area.

insert image description here

配置网络中的OSPF及Rip上线(省略省略IP地址配置)

[AR1]ospf 1 rou 1.1.1.1
[AR1-ospf-1]a 0
[AR1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0

[AR2]ospf 1 rou 2.2.2.2
[AR2-ospf-1]a 0
[AR2-ospf-1-area-0.0.0.0]netwo 10.1.12.2 0.0.0.0
[AR2-ospf-1-area-0.0.0.0]q
[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]netwo 10.1.23.2 0.0.0.0
[AR2-ospf-1-area-0.0.0.1]stub
[AR2-ospf-1-area-0.0.0.1]q
[AR2-ospf-1]

[AR3]rip
[AR3-rip-1] ver 2
[AR3-rip-1]netwo 10.0.0.0
[AR3-rip-1]q
[AR3]ospf 1 router 3.3.3.3
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]network 10.1.23.3 0.0.0.0
[AR3-ospf-1-area-0.0.0.1]stub


[AR4]rip
[AR4-rip-1] ver 2
[AR4-rip-1]netwo 192.168.4.0
[AR4-rip-1]networ 10.0.0.0
[AR4-rip-1]q

Routing changes after the stub is established

1. Generated 3 types of default routes (Sum-Net) and backbone area routing information from ABR.

<AR3>display ospf lsdb

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            470  36    80000005       1
 Router    3.3.3.3         3.3.3.3            469  36    80000004       1
 Network   10.1.23.3       3.3.3.3            470  32    80000002       0
 Sum-Net   0.0.0.0         2.2.2.2            509  28    80000001       1
 Sum-Net   10.1.12.0       2.2.2.2            529  28    80000001       1

<AR3>display ip routing-table protocol ospf 
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
        0.0.0.0/0   OSPF    10   2           D   10.1.23.2       GigabitEthernet0/0/0
      10.1.12.0/24  OSPF    10   2           D   10.1.23.2       GigabitEthernet0/0/0

Stub external routing import test

Import RIP routes into OSPF area1 (stub area), and test whether external routes cannot exist in the stub area.

[AR3]ospf 1 
[AR3-ospf-1]import-route rip

# 引入之后,并没有在LSDB中看到生成5类的外部路由,故说明Stub中不能存在4类、5类及不能存在外部路由的结论成立。
[AR3-ospf-1]dis ospf lsdb

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            620  36    80000005       1
 Router    3.3.3.3         3.3.3.3            619  36    80000004       1
 Network   10.1.23.3       3.3.3.3            620  32    80000002       0
 Sum-Net   0.0.0.0         2.2.2.2            659  28    80000001       1
 Sum-Net   10.1.12.0       2.2.2.2            679  28    80000001       1

Totally Stub area

Introduction : Totally Stub completely stub area, which belongs to the completely end area.

Features : The Stub area is further optimized. In this area, detailed LSAs of types 3, 4, and 5 are not allowed, but only a default route of type 3 exists. Compared with the stub area, the details of three types are reduced, and the database in the non-backbone area is further compressed to reduce the pressure on equipment.

Brief features : Reject categories 3, 4, and 5, but a default route of category 3 will be generated, and there is only one default route LSA of category 3 in the LSDB in TotallyStub.

Configuration :

1. If an area is to be configured as a Totally Stub area, all routers in the area must be configured as Totally Stub routers .

2. The Totally Stub area is the same as the Stub area, and the import of external routes is invalid.

insert image description here

[AR2]ospf 1 
[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]stu no-summary 

[AR3]ospf 1
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]stub no-summary 

LSDB information in the Totally Stub area

The adjacency relationship between AR2 and AR3 has been established, indicating that the LSA interaction is complete. Checking the LSDB, you can see that there are no other three types of details except the default three types.

<AR3>dis ospf pee br

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------
 
 

<AR3>dis ospf lsdb 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2             19  36    8000000B       1
 Router    3.3.3.3         3.3.3.3             12  36    8000000A       1
 Network   10.1.23.3       3.3.3.3             12  32    80000002       0
 Sum-Net   0.0.0.0         2.2.2.2             23  28    80000001       1
 

NSSA area

Introduction : Compared with the Stub area, the NSSA area implements the operation of importing external routes in the area.

Features :

  • Like stubs, Type 4 and Type 5 LSAs are not allowed in the area, but Type 1, 2, 3, and 7 LSAs are allowed, and the ABR generates a Type 7 default route.
  • The external routes imported into the NSSA area are transmitted in the area as Type 7 details. After being transmitted to the ABR, the ABR converts the Type 7 into Type 5 and transmits them to other OSPF areas.
  • The NSSA area not only eliminates the external routing details transmitted from other areas, but also ensures that the NSSA area can transmit the adjacent external routes to other areas.
    insert image description here

Brief features : reject categories 4 and 5, generate a default route of category 7, and transfer the imported external routes as category 7 in the NSSA area.

Configuration :

1. Like the Stub area, all devices in the NSSA area need to be configured nssa.

insert image description here

[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]undo stub	【如果之前配置成了stub,需要先删除之前的配置】
[AR2-ospf-1-area-0.0.0.1]nssa

[AR3-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]undo stub
[AR3-ospf-1-area-0.0.0.1]nssa

Check the current LSDB

1. The NSSA-type LSA in the LSDB is the type 7 default route generated by the ABR (AR2).

<AR3>display ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------
 
 
 <AR3>display ospf lsdb 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            115  36    80000004       1
 Router    3.3.3.3         3.3.3.3            114  36    80000005       1
 Network   10.1.23.3       3.3.3.3            114  32    80000001       0
 Sum-Net   10.1.12.0       2.2.2.2            162  28    80000001       1
 NSSA      0.0.0.0         2.2.2.2            162  36    80000001       1

Import external routes and check LSDB twice

1. After the external routes are imported into the NSSA area, the external routes seen in the NSSA area are 7 types of details.

[AR3]ospf 1
[AR3-ospf-1]import-route rip

[AR3-ospf-1]display ospf lsdb 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            211  36    80000004       1
 Router    3.3.3.3         3.3.3.3              2  36    80000006       1
 Network   10.1.23.3       3.3.3.3            210  32    80000001       0
 Sum-Net   10.1.12.0       2.2.2.2            258  28    80000001       1
 NSSA      10.1.23.0       3.3.3.3              2  36    80000001       1【外部路由】
 NSSA      192.168.4.0     3.3.3.3              2  36    80000001       1【外部路由】
 NSSA      10.1.34.0       3.3.3.3              2  36    80000001       1【外部路由】
 NSSA      0.0.0.0         2.2.2.2            258  36    80000001       1

2. The external routes seen in the backbone area are details of category 5 (External)

  • You may wonder, there is 10.1.23.0 outside NSSA, why there is no category 5 of this entry on the backbone?
    • Because the priority of external routes (category 5 specific routes) is 150, and the priority of common OSPF routes is 10, LSAs of type Sum-Net3 have a higher priority than LSAs of type External5. Therefore, only 10.1.23.0 of type 3 can be seen, but 10.1.23.0 of type 5 cannot be seen.
  • Why can't four types of LSAs be seen here in the backbone area?
    • In the current environment, type 5 LSAs of AR2 are flooded in the backbone area, and AR1 in the backbone area can directly find AR2 through type 1 and type 2, so there is no need to generate type 4 LSAs.
    • But if there is a new area Area2 adjacent to AR1, then there will be types 4 and 5 in AR2.
      insert image description here
<AR1>display ospf lsdb 

	 OSPF Process 1 with Router ID 1.1.1.1
		 Link State Database 

		         Area: 0.0.0.0
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            407  36    80000007       1
 Router    1.1.1.1         1.1.1.1            562  36    80000005       1
 Network   10.1.12.2       2.2.2.2            555  32    80000003       0
 Sum-Net   10.1.23.0       2.2.2.2            407  28    80000005       1
 

		 AS External Database
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 External  192.168.4.0     2.2.2.2            152  36    80000001       1
 External  10.1.34.0       2.2.2.2            152  36    80000001       1

Totally NSSA area

Introduction : A complete NSSA area, indicating that the area is a stub of the network.

Features :

  • Compared with the NSSA area, Type 3 details are not allowed in the TotallyNSSA area, so a default Type 3 default route needs to be generated.

  • Types 3, 4, and 5 details do not exist in a complete NSSA area, but there are Type 3 default routes and Type 7 default routes.

  • Complete NSSA areas can still continue to import external routes and advertise them to other areas of OSPF.

Brief features : reject categories 3, 4, and 5, generate default routes of category 3 and category 7, and still import external routes.

Configuration :

insert image description here

[AR2]ospf 1
[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]nssa no-summary 

[AR3]ospf 1
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]nssa no-summary 

[AR3-ospf-1]dis ospf lsdb 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            413  36    80000005       1
 Router    3.3.3.3         3.3.3.3            334  36    80000006       1
 Network   10.1.23.3       3.3.3.3            407  32    80000002       0
 Sum-Net   0.0.0.0         2.2.2.2            467  28    80000001       1【3类默认路由】
 NSSA      0.0.0.0         2.2.2.2            467  36    80000001       1【7类默认路由】

Import external route observation

[AR3]ospf 1
[AR3-ospf-1]import-route rip 


[AR3-ospf-1]dis ospf lsdb 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Link State Database 

		         Area: 0.0.0.1
 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric
 Router    2.2.2.2         2.2.2.2            549  36    80000005       1
 Router    3.3.3.3         3.3.3.3              5  36    80000007       1
 Network   10.1.23.3       3.3.3.3            543  32    80000002       0
 Sum-Net   0.0.0.0         2.2.2.2            603  28    80000001       1
 NSSA      10.1.23.0       3.3.3.3              5  36    80000001       1【外部路由】
 NSSA      192.168.4.0     3.3.3.3              5  36    80000001       1【外部路由】
 NSSA      10.1.34.0       3.3.3.3              5  36    80000001       1【外部路由】
 NSSA      0.0.0.0         2.2.2.2            603  36    80000001       1
 

Comparison of the four

Stub and NSSA

  • Both filter types 4 and 5 LSAs
  • Stub generates 3 types of default routes, NSSA generates 7 types of default routes
  • NSSA can import external routes as type 7 LSAs

TotallyStub与TotallyNSSA

  • Both filter types 3, 4, and 5 LSAs

  • Totally Stub generates 3 types of default routes, Totally NSSA generates 3 types of default routes and 7 types of default routes

  • Totally NSSA can still import external routes as Type 7 LSAs

Guess you like

Origin blog.csdn.net/qq_45443704/article/details/128745857