Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure an OSPF NSSA Area

Network Requirements

  • Configure OSPF for all devices, and divide the devices into three areas: Area 0, Area 1, and Area 2. Configure Area 1 and Area 2 as NSSA areas.
  • On Device4, redistribute a static route to OSPF. After the configuration is completed, all devices can learn intra-area and inter-area routes, but external routes cannot be injected into Area 1.
  • Introduce a default route to the ABR of Area 1 so that Device1 can access an external network through the default route.

Network Topology

Networking for Configuring an OSPF NSSA Area

Figure 7-9 Networking for Configuring an OSPF NSSA Area

Configuration Steps

Step 1: Create VLANs, and add ports to the required VLANs. (Omitted)

Step 2: Configure IP addresses for the ports. (Omitted)

Step 3: Configure an OSPF process and let the interfaces cover the related areas.

#Configure Device1. Configure Area 1 to an NSSA area.

Device1#configure terminal
Device1(config)#router ospf 100
Device1(config-ospf)#router-id 1.1.1.1
Device1(config-ospf)#area 1 nssa
Device1(config-ospf)#network 10.0.0.0 0.0.0.255 area 1
Device1(config-ospf)#network 100.0.0.0 0.0.0.255 area 1
Device1(config-ospf)#exit

#Configure Device2. Configure Area 1 to an NSSA area.

Device2#configure terminal
Device2(config)#router ospf 100
Device2(config-ospf)#router-id 2.2.2.2
Device2(config-ospf)#area 1 nssa
Device2(config-ospf)#network 10.0.0.0 0.0.0.255 area 1
Device2(config-ospf)#network 20.0.1.0 0.0.0.255 area 0
Device2(config-ospf)#exit

#Configure Device3. Configure Area 2 to an NSSA area.

Device3#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#router-id 3.3.3.3
Device3(config-ospf)#area 2 nssa
Device3(config-ospf)#network 20.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#network 30.0.0.0 0.0.0.255 area 2
Device3(config-ospf)#exit

#Configure Device4. Configure Area 2 to an NSSA area.

Device4#configure terminal
Device4(config)#router ospf 100
Device4(config-ospf)#router-id 4.4.4.4
Device4(config-ospf)#area 2 nssa
Device4(config-ospf)#network 30.0.0.0 0.0.0.255 area 2
Device4(config-ospf)#network 110.0.0.0 0.0.0.255 area 2
Device4(config-ospf)#exit

Step 4: On Device4, configure a static route, and redistribute the route into the OSPF.

#Configure Device4.

Device4(config)#ip route 200.1.1.0 255.255.255.0 110.0.0.2
Device4(config)#router ospf 100
Device4(config-ospf)#redistribute static
Device4(config-ospf)#exit

#Query OSPF LSDB of Device3.

Device3#show ip ospf database  
 
            OSPF Router with ID (3.3.3.3) (Process ID 100) 
 
                Router Link States (Area 0) 
Link ID   ADV Router  Age  Seq#       CkSum  Link count
2.2.2.2	  2.2.2.2     179  0x80000004 0xe110 1  
3.3.3.3   3.3.3.3     177  0x80000004 0xa345 1  
 
                Net Link States (Area 0) 
Link ID   ADV Router  Age  Seq#       CkSum
20.0.0.2  3.3.3.3     182  0x80000001 0xf60d  
 
                Summary Link States (Area 0) 
Link ID    ADV Router  Age Seq#        CkSum   Route
10.0.0.0   2.2.2.2     214 0x80000001  0xd455  10.0.0.0/24  
100.0.0.0  2.2.2.2     173 0x80000001  0x4886  100.0.0.0/24  
30.0.0.0   3.3.3.3     208 0x80000001  0xb160  30.0.0.0/24  
110.0.0.0  3.3.3.3     171 0x80000001  0xa719  110.0.0.0/24  
 
                ASBR-Summary Link States (Area 0) 
Link ID    ADV Router  Age Seq#        CkSum
4.4.4.4    3.3.3.3     171 0x80000001  0x72ac  
 
                Router Link States (Area 2 [NSSA]) 
Link ID    ADV Router  Age Seq#        CkSum  Link count
3.3.3.3    3.3.3.3     175 0x80000004  0x686f 1  
4.4.4.4    4.4.4.4     177 0x80000005  0xe46a 2  
 
                Net Link States (Area 2 [NSSA]) 
Link ID    ADV Router  Age Seq#        CkSum
30.0.0.2   4.4.4.4     177 0x80000001  0xc827  
 
                Summary Link States (Area 2 [NSSA]) 
Link ID    ADV Router  Age Seq#        CkSum   Route
10.0.0.0   3.3.3.3     172 0x80000001  0xde48  10.0.0.0/24  
20.0.0.0   3.3.3.3     214 0x80000001  0x52cb  20.0.0.0/24  
100.0.0.0  3.3.3.3     172 0x80000001  0x5279  100.0.0.0/24  
 
                NSSA-external Link States (Area 2 [NSSA]) 
Link ID     ADV Router Age Seq#        CkSum   Route 
200.1.1.0   4.4.4.4    247 0x80000001  0x6cde  N2 200.1.1.0/24 [0x0]  
 
                AS External Link States  
Link ID     ADV Router Age Seq#        CkSum   Route 
200.1.1.0   3.3.3.3    176 0x80000001  0x0156  E2 200.1.1.0/24 [0x0] 

According to the OSPF database, the ABR in the NSSA area (Area 2) converts NSSA-external LSAs into AS External LSAs. Therefore, the other areas can normally learn external routes that are redistributed from the NSSA area (Area 2).

#Query the routing table of Device2.

Device2#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 10.0.0.0/24 is directly connected, 00:02:53, vlan2
C 20.0.0.0/24 is directly connected, 00:02:51, vlan3
O 30.0.0.0/24 [110/2] via 20.0.0.2, 00:02:04, vlan3
O 100.0.0.0/24 [110/2] via 10.0.0.1, 00:02:04, vlan2
O 110.0.0.0/24 [110/3] via 20.0.0.2, 00:02:02, vlan3
C 127.0.0.0/8 is directly connected, 06:47:22, lo0 
OE 200.1.1.0/24 [150/20] via 20.0.0.2, 00:02:02, vlan3

Device2 has learnt the external routes that have been redistributed from the NSSA area (Area 2).

#Query the routing table of Device1.

Device1#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 10.0.0.0/24 is directly connected, 00:02:29, vlan3
O 20.0.0.0/24 [110/2] via 10.0.0.2, 00:01:44, vlan3
O 30.0.0.0/24 [110/3] via 10.0.0.2, 00:01:41, vlan3 
C 100.0.0.0/24 is directly connected, 01:53:00, vlan2
O 110.0.0.0/24 [110/4] via 10.0.0.2, 00:01:40, vlan3
C 127.0.0.0/8 is directly connected, 383:45:55, lo0

According to the queried information, route 200.1.1.0/24 does not exist in the routing table of Device1, indicating that the external route redistributed by Device4 has not been injected to the NSSA area (Area 1), while the routes of other areas have been added into the routing table.

Step 5: Configure Device2, and introduce a default route to Area 1.

#Configure Device2. At this time, Device2 is the ABR of Area 1.

Device2(config)#router ospf 100
Device2(config-ospf)#router-id 2.2.2.2
Device2(config-ospf)#area 1 nssa default-information-originate
Device2(config-ospf)#exit

note


  • After the area area-id nssa no-summary command is executed on the ABR of the NSSA area, the area is called a totally NSSA area. At this time, the ABR generates a default route and flood the default route into the NSSA area. After the command is configured, the number of summary LSAs and corresponding inter-area routes will be further decreased. The devices in the area access a network outside the area or outside the AS through the default route.

Step 6: Check the result.

#Query OSPF LSDB of Device2.

Device2#show ip ospf database  
 
            OSPF Router with ID (2.2.2.2) (Process ID 100) 
 
                Router Link States (Area 0) 
Link ID   ADV Router  Age  Seq#       CkSum  Link count
2.2.2.2	  2.2.2.2     455  0x80000004 0xe110 1  
3.3.3.3   3.3.3.3     455  0x80000004 0xa345 1  
 
                Net Link States (Area 0) 
Link ID   ADV Router  Age  Seq#       CkSum
20.0.0.2  3.3.3.3     461  0x80000001 0xf60d  
 
                Summary Link States (Area 0) 
Link ID    ADV Router Age  Seq#       CkSum   Route
10.0.0.0   2.2.2.2    492  0x80000001 0xd455  10.0.0.0/24  
100.0.0.0  2.2.2.2    449  0x80000001 0x4886  100.0.0.0/24  
30.0.0.0   3.3.3.3    487  0x80000001 0xb160  30.0.0.0/24  
110.0.0.0  3.3.3.3    449  0x80000001 0xa719  110.0.0.0/24  
 
                ASBR-Summary Link States (Area 0) 
Link ID    ADV Router Age  Seq#       CkSum
4.4.4.4    3.3.3.3    449  0x80000001 0x72ac  
 
                Router Link States (Area 1 [NSSA]) 
Link ID    ADV Router  Age Seq#       CkSum  Link count
1.1.1.1    1.1.1.1     456 0x80000005 0x8d0f 2  
2.2.2.2    2.2.2.2     457 0x80000004 0x59ad 1  
 
                Net Link States (Area 1 [NSSA]) 
Link ID    ADV Router  Age Seq#       CkSum
10.0.0.2   2.2.2.2     457 0x80000001 0x61ba  
 
                Summary Link States (Area 1 [NSSA]) 
Link ID    ADV Router  Age Seq#       CkSum   Route 
20.0.0.0   2.2.2.2     492 0x80000001 0x70b1  20.0.0.0/24  
30.0.0.0   2.2.2.2     449 0x80000001 0xf71f  30.0.0.0/24  
110.0.0.0  2.2.2.2     448 0x80000001 0xedd7  110.0.0.0/24  
 
                NSSA-external Link States (Area 1 [NSSA]) 
Link ID    ADV Router  Age Seq#       CkSum   Route 
0.0.0.0    2.2.2.2     31  0x80000001 0x5b42  N2 0.0.0.0/0 [0x0]  
 
                AS External Link States  
Link ID    ADV Router  Age Seq#       CkSum   Route 
200.1.1.0  3.3.3.3     454 0x80000001 0x0156  E2 200.1.1.0/24 [0x0] 

OSPF has generated a NSSA-external LSA for the default route.

#Query the routing table of Device1.

Device1#show ip route  
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B BGP, i-ISIS  
 
Gateway of last resort is not set 
 
OE 0.0.0.0/0 [150/1] via 10.0.0.2, 00:00:22, vlan3 
C 10.0.0.0/24 is directly connected, 00:07:29, vlan3
O 20.0.0.0/24 [110/2] via 10.0.0.2, 00:06:44, vlan3
O 30.0.0.0/24 [110/3] via 10.0.0.2, 00:06:41, vlan3 
C 100.0.0.0/24 is directly connected, 01:58:00, vlan2
O 110.0.0.0/24 [110/4] via 10.0.0.2, 00:06:40, vlan3
C 127.0.0.0/8 is directly connected, 383:50:55, lo0 

The routing table of Device1 has learnt the default route 0.0.0.0, and Device1 communicates with the network outside the AS through the default route.