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 Route Summary on Inter-Area OSPF Routes

Network Requirements

  • Configure OSPF for all devices, and divide the devices into two areas, Area 0 and Area 1.
  • To decrease the number of inter-area routes, inter-area routes are summarized on the ABR. The routes in Area 0 are summarized to form 10.0.0.0/16. The routes in Area 1 are summarized to form 20.0.0.0/16.

Network Topology

Networking for Configure Route Summary on Inter-Area OSPF Routes

Figure 7-6 Networking for Configure Route Summary on Inter-Area OSPF Routes

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 interface cover different areas.

#Configure Device1.

Device1#configure terminal
Device1(config)#router ospf 100
Device1(config-ospf)#router-id 1.1.1.1
Device1(config-ospf)#network 10.0.1.0 0.0.0.255 area 0
Device1(config-ospf)#network 10.0.2.0 0.0.0.255 area 0
Device1(config-ospf)#network 10.0.3.0 0.0.0.255 area 0
Device1(config-ospf)#exit

#Configure Device2.

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

#Configure Device3.

Device3#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#router-id 3.3.3.3
Device3(config-ospf)#network 20.0.1.0 0.0.0.255 area 1
Device3(config-ospf)#network 20.0.2.0 0.0.0.255 area 1
Device3(config-ospf)#network 20.0.3.0 0.0.0.255 area 1
Device3(config-ospf)#exit

#Query the OSPF LSDB and routing table 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
1.1.1.1	   1.1.1.1       1419  0x80000007   0x4f81  3  
2.2.2.2    2.2.2.2       1414  0x80000004   0x4bb9  1  
 
                Net Link States (Area 0) 
 
Link ID    ADV Router    Age   Seq#         CkSum 
10.0.1.2   2.2.2.2       1419  0x80000001   0x38e0  
 
                Summary Link States (Area 0) 
 
Link ID    ADV Router    Age   Seq#         CkSum    Route
20.0.1.0   2.2.2.2       1437  0x80000001   0x47d7   20.0.1.0/24  
20.0.2.0   2.2.2.2       1363  0x80000001   0x46d6   20.0.2.0/24  
20.0.3.0   2.2.2.2       1363  0x80000001   0x3be0   20.0.3.0/24  
 
                Router Link States (Area 1) 
Link ID    ADV Router    Age   Seq#         CkSum    Link count
2.2.2.2    2.2.2.2       1368  0x80000004   0xe70b   1  
3.3.3.3    3.3.3.3       1341  0x80000006   0x6138   3  
 
                Net Link States (Area 1) 
Link ID    ADV Router    Age   Seq#         CkSum
20.0.1.1   2.2.2.2       1368  0x80000001   0x24e3  
 
                Summary Link States (Area 1) 
 
Link ID    ADV Router    Age   Seq#         CkSum    Route
10.0.1.0   2.2.2.2       1442  0x80000001   0xc95f   10.0.1.0/24  
10.0.2.0   2.2.2.2       1409  0x80000001   0xc85e   10.0.2.0/24  
10.0.3.0   2.2.2.2       1409  0x80000001   0xbd68   10.0.3.0/24  
 
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.1.0/24 is directly connected, 00:30:31, vlan2
O 10.0.2.0/24 [110/2] via 10.0.1.1, 00:23:37, vlan2
O 10.0.3.0/24 [110/2] via 10.0.1.1, 00:23:37, vlan2
C 20.0.1.0/24 is directly connected, 02:09:10, vlan3
O 20.0.2.0/24 [110/2] via 20.0.1.2, 00:22:51, vlan3
O 20.0.3.0/24 [110/2] via 20.0.1.2, 00:22:51, vlan3
C 127.0.0.0/8 is directly connected, 05:28:14, lo0 

In the OSPF database of Device2, three inter-area LSAs are generated respectively for Area 0 and Area 1. The intra-area routes of the areas have also been added into the routing table.

#Query the OSPF LSDB and routing table of Device1.

Device1#show ip ospf database  
 
            OSPF Router with ID (1.1.1.1) (Process ID 100) 
 
                Router Link States (Area 0) 
Link ID    ADV Router   Age  Seq#         CkSum   Link count
1.1.1.1    1.1.1.1      249  0x80000008   0x4d82  3  
2.2.2.2    2.2.2.2      191  0x80000005   0x49ba  1  
 
                Net Link States (Area 0) 
 
Link ID    ADV Router   Age  Seq#         CkSum
10.0.1.2   2.2.2.2      471  0x80000002   0x36e1  
 
                Summary Link States (Area 0) 
 
Link ID    ADV Router   Age  Seq#         CkSum    Route
20.0.1.0   2.2.2.2      251  0x80000002   0x45d8   20.0.1.0/24  
20.0.2.0   2.2.2.2      1988 0x80000001   0x46d6   20.0.2.0/24  
20.0.3.0   2.2.2.2      1988 0x80000001   0x3be0   20.0.3.0/24  
 
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.1.0/24 is directly connected, 00:25:11, vlan2 
C 10.0.2.0/24 is directly connected, 00:24:58, vlan3
C 10.0.3.0/24 is directly connected, 00:24:44, vlan4
O 20.0.1.0/24 [110/2] via 10.0.1.2, 00:14:59, vlan2
O 20.0.2.0/24 [110/3] via 10.0.1.2, 00:14:12, vlan2
O 20.0.3.0/24 [110/3] via 10.0.1.2, 00:14:12, vlan2
C 127.0.0.0/8 is directly connected, 116:19:42, lo0 

The OSPF database of Device1 contains three inter-area LSAs, and the three routes have been added into the routing table.

#Query the OSPF LSDB and routing table of Device3.

Device3#show ip ospf database  
 
            OSPF Router with ID (3.3.3.3) (Process ID 100) 
 
                Router Link States (Area 1) 
Link ID    ADV Router  Age  Seq#        CkSum   Link count
2.2.2.2    2.2.2.2     532  0x80000005  0xe50c  1  
3.3.3.3    3.3.3.3     506  0x80000007  0x5f39  3  
 
                Net Link States (Area 1) 
Link ID    ADV Router  Age  Seq#        CkSum
20.0.1.1   2.2.2.2     532  0x80000002  0x22e4  
 
                Summary Link States (Area 1) 
 
Link ID    ADV Router  Age  Seq#        CkSum    Route
10.0.1.0   2.2.2.2     82   0x80000002  0xc760   10.0.1.0/24  
10.0.2.0   2.2.2.2     382  0x80000002  0xc65f   10.0.2.0/24  
10.0.3.0   2.2.2.2     262  0x80000002  0xbb69   10.0.3.0/24  
 
Device3#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 
 
O 10.0.1.0/24 [110/2] via 20.0.1.1, 00:24:04, vlan2
O 10.0.2.0/24 [110/3] via 20.0.1.1, 00:24:04, vlan2
O 10.0.3.0/24 [110/3] via 20.0.1.1, 00:24:04, vlan2
C 20.0.1.0/24 is directly connected, 02:09:51, vlan2
C 20.0.2.0/24 is directly connected, 02:07:21, vlan3
C 20.0.3.0/24 is directly connected, 02:07:09, vlan4
C 127.0.0.0/8 is directly connected, 360:20:45, lo0

Similarly, the OSPF database of Device3 contains three inter-area LSAs, and the three routes have been added into the routing table.

Step 4: On the ABR, configure inter-area route summary. Now Device2 is the ABR.

#On Device2, summarize the routes in Area 0 to form route 10.0.0.0/16, and summarize the routes in Area 1 to form route 20.0.0.0/16.

Device2(config)#router ospf 100
Device2(config-ospf)#area 0 range 10.0.0.0/16
Device2(config-ospf)#area 1 range 20.0.0.0/16
Device2(config-ospf)#exit

Step 5: Check the result.

#Query the OSPF LSDB and routing table 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
1.1.1.1	    1.1.1.1      305  0x80000009  0x4b83  3  
2.2.2.2     2.2.2.2      297  0x80000006  0x47bb  1  
 
                Net Link States (Area 0) 
Link ID     ADV Router   Age  Seq#        CkSum
10.0.1.2    2.2.2.2      527  0x80000003  0x34e2  
 
                Summary Link States (Area 0) 
Link ID     ADV Router   Age  Seq#        CkSum    Route
20.0.0.0    2.2.2.2      23   0x80000001  0x52cd   20.0.0.0/16  
 
                Router Link States (Area 1) 
Link ID     ADV Router   Age  Seq#        CkSum    Link count
2.2.2.2     2.2.2.2      277  0x80000006  0xe30d   1  
3.3.3.3     3.3.3.3      332  0x80000008  0x5d3a   3  
 
                Net Link States (Area 1) 
Link ID     ADV Router   Age  Seq#        CkSum
20.0.1.1    2.2.2.2      317  0x80000003  0x20e5  
 
                Summary Link States (Area 1) 
Link ID     ADV Router   Age  Seq#        CkSum    Route
10.0.0.0    2.2.2.2      26   0x80000001  0xd455   10.0.0.0/16  
 
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 
 
O 10.0.0.0/16 [110/1] is directly connected, 00:00:31, null0
C 10.0.1.0/24 is directly connected, 00:40:31, vlan2 
O 10.0.2.0/24 [110/2] via 10.0.1.1, 00:33:37, vlan2
O 10.0.3.0/24 [110/2] via 10.0.1.1, 00:33:37, vlan2 
O 20.0.0.0/16 [110/1] is directly connected, 00:00:27, null0
C 20.0.1.0/24 is directly connected, 02:19:10, vlan3 
O 20.0.2.0/24 [110/2] via 20.0.1.2, 00:32:51, vlan3
O 20.0.3.0/24 [110/2] via 20.0.1.2, 00:32:51, vlan3
C 127.0.0.0/8 is directly connected, 05:38:14, lo0 

Comparing the result with the result of Step 2, you will find that only one summarized inter-area LSA is generated respectively for Area 0 and Area 1 in the OSPF database of Device2. Similarly, a summary route with the output interface being Null0 is automatically added into the routing table.

#Query the OSPF LSDB and routing table of Device1.

Device1#show ip ospf database  
 
            OSPF Router with ID (1.1.1.1) (Process ID 100) 
 
                Router Link States (Area 0) 
Link ID    ADV Router    Age   Seq#        CkSum    Link count
1.1.1.1	   1.1.1.1       1338  0x80000009  0x4b83   3  
2.2.2.2    2.2.2.2       1332  0x80000006  0x47bb   1  
 
                Net Link States (Area 0) 
Link ID    ADV Router    Age   Seq#        CkSum
10.0.1.2   2.2.2.2       1563  0x80000003  0x34e2  
 
                Summary Link States (Area 0) 
Link ID    ADV Router    Age   Seq#        CkSum   Route
20.0.0.0   2.2.2.2       90    0x80000001  0x52cd  20.0.0.0/16  
 
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.1.0/24 is directly connected, 00:40:11, vlan2
C 10.0.2.0/24 is directly connected, 00:39:58, vlan3
C 10.0.3.0/24 is directly connected, 00:39:44, vlan4
O 20.0.0.0/16 [110/2] via 10.0.1.2, 00:02:18, vlan2
C 127.0.0.0/8 is directly connected, 116:44:42, lo0 

On Device1, you will find that the OSPF database contains only the summarized inter-area LSA, and the routing table leans only the summary route 20.0.0.0/16 of Area 1. Similarly, Device3 learns only the summary route 10.0.0.0/16 of Area 0.