📜 ⬆️ ⬇️

OSPF Area Types

Introduction


Good day!

In this article, I would like to talk about the types of OSPF areas. I’ve already come across articles on how to configure OSPF using areas. I want to consider how these types of regions differ from each other: normal, stub, totally stubby, NSSA, totally NSSA. So, let's begin.

OSPF refers to the link state dynamic routing protocol category. This means that routers do not send information about networks to each other as updates. Instead, routers exchange status information about their interfaces or channel status announcements. To do this, use special types of packages, which are called LSA - Link State Advertisement. These messages are of different types. Having understood the types of LSA, you can easily figure out what the different types of OSPF areas differ from each other.
')
For example, I will use the following topology:

image

Basic configuration


All Cisco routers. First, configure OSPF in Area 0 (blue). There are three routers in this area: ABR, R1AR0, R2AR0. There is a point-to-point connection (10.1.1.0/24) between R1AR0 and ABR, and Ethernet (10.2.2.0/24) between R1AR0 and R2AR0. Loopback interfaces with 10.10.x.0 / 32 addresses are created on R2AR0.

R1AR0:
hostname R1AR0
!
int s0 / 0
no shut
ip address 10.1.1.1 255.255.255.0
!
int fa1 / 0
no shut
ip address 10.2.2.1 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.255.255.255 area 0

Simple configuration. Add interfaces to OSPF. We set the Router-ID, only to make it easier to determine whether the LSA belongs to a specific router.


R2AR1:
hostname R2AR0
!
int f0 / 0
no shut
description CONNECTION TO R1AR1
ip address 10.2.2.2 255.255.255.0
!
int s0 / 0
no shut
description CONNECTION TO RIPRTR
ip address 10.3.3.1 255.255.255.0
!
int loop 0
ip address 10.10.0.1 255.255.255.255
!
int loop 1
ip address 10.10.1.1 255.255.255.255
!
int loop 2
ip address 10.10.2.1 255.255.255.255
!
int loop 3
ip address 10.10.3.1 255.255.255.255
!
router ospf 1
router-id 2.2.2.2
network 10.2.2.2 0.0.0.0 area 0
network 10.10.0.0 0.0.255.255 area 0

Similar configuration. Note that the s0 / 0 interface is not involved in the operation of OSPF. Later he will work with RIP.


ABR:
hostname ABR
!
int s0 / 0
no shut
ip address 10.1.1.2 255.255.255.0
!
int s0 / 1
no shut
ip address 192.168.1.1 255.255.255.0
!
router ospf 1
router-id 1.1.2.2
network 10.0.0.0 0.255.255.255 area 0

While in OSPF we include only the interface s0 / 0 with the address 10.1.1.2.

LSA type 1 and 2


Now let's look at the routing tables and what is stored in the LSDB database.
R1AR0:
R1AR0 # sh ip ro
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.10.1.1/32 [110/2] via 10.2.2.2, 00:07:47, FastEthernet1 / 0
O 10.10.0.1/32 [110/2] via 10.2.2.2, 00:07:47, FastEthernet1 / 0
O 10.10.3.1/32 [110/2] via 10.2.2.2, 00:07:47, FastEthernet1 / 0
O 10.10.2.1/32 [110/2] via 10.2.2.2, 00:07:47, FastEthernet1 / 0
C 10.2.2.0/24 is directly connected, FastEthernet1 / 0
C 10.1.1.0/24 is directly connected, Serial0 / 0
R1AR0 # sh ip opf database database-summary

OSPF Router with ID (10.2.2.1) (Process ID 1)

Area 0 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 0 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 4 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 0 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 0 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 4 0 0


In the routing table, we see routes marked with the code “O” - OSPF. In the LSDB database, we see that the total LSA is 4, both for Area 0 and for the OSPF process. The database contains 3 - Router LSA (type 1) and 1 - Network LSA (Type 2). We will see a similar picture in the database on the other routers. So, what are the LSA of these types?

Router LSA (Type 1)


This type of LSA generates each router in the region and performs flooding across the region, but not beyond it. In our area now there are 3 routers, respectively, in the database we see 3 Router LSA. This type of LSA represents a router and its interfaces. Let's look at it in more detail:
R1AR0 # sh ip opf database router

OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 0)

LS age: 14
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0xD17C
Length: 60
Number of Links: 3

Link connected to: a Transit Network
(Link ID) Designated Router address: 10.2.2.2
(Link Data) Router Interface address: 10.2.2.1
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.2.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64


LS age: 18
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.2.2
Advertising Router: 1.1.2.2
LS Seq Number: 80000003
Checksum: 0x81F6
Length: 48
Number of Links: 2

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 10.1.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64


Adv Router is not reachable
LS age: 131
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000006
Checksum: 0x193E
Length: 84
Number of Links: 5

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.10.0.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.10.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.10.2.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: a Stub Network
(Link ID) Network / subnet number: 10.10.3.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: a Transit Network
(Link ID) Designated Router address: 10.2.2.1
(Link Data) Router Interface address: 10.2.2.2
Number of TOS metrics: 0
TOS 0 Metrics: 10









This is the LSA of this router: Router-id 1.1.1.1.





This router has the listed interfaces.

















The following router: 1.1.2.2 (ABR).







And its interfaces.












Last router (R2AR0).









Its interfaces, including a bunch of loopback.



Let's recap. Router LSA (Type 1):

Network LSA (type 2)


The second type of LSA that we see in our area is Network LSA. There is an Ethernet segment in the area to which 2 routers are connected (R1AR0 and R2AR0). Ethernet, Frame Relay, ATM - these types of networks belong to the networks with multiple access: Broadcast MultiAccess (Ethernet) and Non Broadcast MultiAccess (NBMA). Those. Several routers are connected to a common data transfer medium at the same time and the network has or does not have broadcast capabilities. If in such a network all routers exchanged topological information with each other, then this would result in sending out a large number of LSA copies, each with each one. To prevent multiple distribution of copies in such network segments, DR and BDR routers are selected. LSDB synchronization other routers will perform only with them.
The DR router generates a Network LSA to represent such network segments. In fact, Network LSA is a transit network and all routers connected to it:
R1AR0 # sh ip ospf database network

OSPF Router with ID (1.1.1.1) (Process ID 1)

Net Link States (Area 0)

Routing Bit Set on this LSA
LS age: 1449
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.2.2.2 (address of Designated Router)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x1501
Length: 32
Network Mask: / 24
Attached Router: 2.2.2.2
Attached Router: 1.1.1.1










ID and address of the DR router.



Routers connected to the transit network.


We summarize. Network LSA (Type 2):

Normal Area and Summary LSA (Type 3)


OSPF design assumes a two-tier architecture. There is a trunk area (Backbone, id 0.0.0.0) and the rest of the areas that need to be connected to the trunk. The connections between the regions are carried out by routers, whose interfaces are connected to two or more areas. In OSPF terminology, they are called the Area Border Router (ABR). We set up the main area. Now let's configure another area:
ABR:
hostname ABR
!
router ospf 1
network 192.168.1.1 0.0.0.0 area 1

Add the second interface and connect it to Area 1.


R1AR2:
hostname R1AR1
!
int s0 / 1
description CONNECTION TO ASBR
no shut
ip address 192.168.2.1 255.255.255.0
!
int s0 / 0
description CONNECTION TO ABR
no shut
ip address 192.168.1.2 255.255.255.0
!
router ospf 1
router-id 3.3.3.3
network 192.168.0.0 0.0.255.255 area 1

All interfaces in Area 1.


ASBR:
hostname ASBR
!
int s0 / 0
description CONNECTION TO R1AR1
no shut
ip address 192.168.2.2 255.255.255.0
!
router ospf 1
router-id 4.4.4.4
network 192.168.0.0 0.0.255.255 area 1
!
ip route 1.0.0.0 255.0.0.0 null0
ip route 2.0.0.0 255.0.0.0 null0
ip route 3.0.0.0 255.0.0.0 null0
!

Similar configuration. We do not pay attention to static routes yet, they will be needed later.


Now let's see how the topological database and the routing table have changed. Still perform the necessary commands on R1AR0 (Area 0):
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.10.1.1/32 [110/2] via 10.2.2.2, 00:08:10, FastEthernet1 / 0
O 10.10.0.1/32 [110/2] via 10.2.2.2, 00:08:10, FastEthernet1 / 0
O 10.10.3.1/32 [110/2] via 10.2.2.2, 00:08:10, FastEthernet1 / 0
O 10.10.2.1/32 [110/2] via 10.2.2.2, 00:08:10, FastEthernet1 / 0
C 10.2.2.0/24 is directly connected, FastEthernet1 / 0
C 10.1.1.0/24 is directly connected, Serial0 / 0
O IA 192.168.1.0/24 [110/128] via 10.1.1.2, 00:08:10, Serial0 / 0
O IA 192.168.2.0/24 [110/192] via 10.1.1.2, 00:07:22, Serial0 / 0
R1AR0 # sh ip opf database database-summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

Area 0 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 6 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 0 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 6 0 0


In the routing table appeared routes marked with the code “O IA” - OSPF routes from other areas. And in the topological database, two Summary LSAs were added (type 3). How many networks are transferred from Area 1 to Area 0? That's right - two: 192.168.1.1 and 192.168.2.0. How much is the Summary LSA? Too two.
Let's look at the details:
R1AR0 # sh ip opf database summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

Summary Net Link States (Area 0)

Routing Bit Set on this LSA
LS age: 919
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 192.168.1.0 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000001
Checksum: 0x2468
Length: 28
Network Mask: / 24
TOS: 0 Metric: 64

Routing Bit Set on this LSA
LS age: 868
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 192.168.2.0 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000001
Checksum: 0x9BAF
Length: 28
Network Mask: / 24
TOS: 0 Metric: 128








The network address and the identifier of the router that announced it.



Let's execute the same commands, but on a router from another area:
ASBR # sh ip ro
S 1.0.0.0/8 is directly connected, Null0
S 2.0.0.0/8 is directly connected, Null0
S 3.0.0.0/8 is directly connected, Null0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O IA 10.10.1.1/32 [110/194] via 192.168.2.1, 00:08:12, Serial0 / 0
O IA 10.10.0.1/32 [110/194] via 192.168.2.1, 00:08:12, Serial0 / 0
O IA 10.10.3.1/32 [110/194] via 192.168.2.1, 00:08:12, Serial0 / 0
O IA 10.10.2.1/32 [110/194] via 192.168.2.1, 00:08:12, Serial0 / 0
O IA 10.2.2.0/24 [110/193] via 192.168.2.1, 00:08:15, Serial0 / 0
O IA 10.1.1.0/24 [110/192] via 192.168.2.1, 00:08:15, Serial0 / 0
O 192.168.1.0/24 [110/128] via 192.168.2.1, 00:08:15, Serial0 / 0
C 192.168.2.0/24 is directly connected, Serial0 / 0

ASBR # sh ip ospf database database-summary

OSPF Router with ID (4.4.4.4) (Process ID 1)

Area 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 9 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 0 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 9 0 0

ASBR # sh ip ospf database summary

OSPF Router with ID (4.4.4.4) (Process ID 1)

Summary Net Link States (Area 1)

Routing Bit Set on this LSA
LS age: 1021
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.1.1.0 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0x45A4
Length: 28
Network Mask: / 24
TOS: 0 Metric: 64

Routing Bit Set on this LSA
LS age: 1021
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.2.2.0 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0x38AE
Length: 28
Network Mask: / 24
TOS: 0 Metric: 65

Routing Bit Set on this LSA
LS age: 1023
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.10.0.1 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0xEDF0
Length: 28
Network Mask: / 32
TOS: 0 Metric: 66

Routing Bit Set on this LSA
LS age: 1024
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.10.1.1 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0xE2FA
Length: 28
Network Mask: / 32
TOS: 0 Metric: 66

Routing Bit Set on this LSA
LS age: 1025
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.10.2.1 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0xD705
Length: 28
Network Mask: / 32
TOS: 0 Metric: 66

Routing Bit Set on this LSA
LS age: 1027
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 10.10.3.1 (summary Network Number)
Advertising Router: 1.1.2.2
LS Seq Number: 80000002
Checksum: 0xCC0F
Length: 28
Network Mask: / 32
TOS: 0 Metric: 66



The number of networks received from another area and the number of Summary LSAs also match. Also note that all Summary LSA was announced by a single router - ABR, i.e. border router area connecting them to each other.
What is the meaning of Summary LSA? Let's remember how OSPF works:
  1. Routers are friends.
  2. Synchronize LSDB.
  3. On each router, Dijkstra works out, which calculates all possible alternatives to all networks.
  4. Of these, selects the best routes by metric and sets them into the routing table.

An ordinary router, for example, from area 1, is a third step necessary for networks from other areas? Why does he need details about the topology of other areas? All the same, the entrance to other areas through the boundary router (ABR). Therefore, the ABR router converts the received Router and Network LSA to Summary LSA. Those. it represents networks from the opposite region, as if connected to it. Area 0 sees all networks from Area 1 connected to ABR and vice versa. Optimized performance, reduces the amount of flooding. I draw attention to the fact that, as such, summation in the usual sense is not performed. Simply, instead of the detailed Router and Network LSA, the more general Summary LSA is transmitted.
We summarize. Summary LSA (Type 3):

External LSA (type 5) and dead-end (Stub) areas


External LSA


Now we will connect the external routing domain to Area 0, in my case, working under the control of the RIP protocol and configure the transfer of routes from RIP to OSPF.
R2AR1:
hostname R2AR0
!
router rip
version 2
network 10.0.0.0
!
router ospf 1
redistribute rip subnets

Turn on RIP.





We configure the transfer of RIP routes to OSPF.


RTRRIP:
hostname RIPRTR
!
int s0 / 0
no shut
description CONNECTION TO R2AR0
ip address 10.3.3.2 255.255.255.0
!
router rip
version 2
no auto-summary
network 10.0.0.0
network 172.20.0.0
!
int loop 0
ip address 172.20.0.1 255.255.255.0
!
int loop 1
ip address 172.20.1.1 255.255.255.0
!
int loop 2
ip address 172.20.2.1 255.255.255.0
!
int loop 3
ip address 172.20.3.1 255.255.255.0

Basic configuration.
Turn on RIP.







As usual, we will look at the routing table and LSDB on the router from 0 area:
R1AR0 # sh ip ro
172.20.0.0/16 is variably subnetted, 5 subnets, 2 masks
O E2 172.20.0.0/24 [110/20] via 10.2.2.2, 00:00:17, FastEthernet1 / 0
O E2 172.20.0.0/16 [110/20] via 10.2.2.2, 00:04:46, FastEthernet1 / 0
O E2 172.20.1.0/24 [110/20] via 10.2.2.2, 00:00:17, FastEthernet1 / 0
O E2 172.20.2.0/24 [110/20] via 10.2.2.2, 00:00:17, FastEthernet1 / 0
O E2 172.20.3.0/24 [110/20] via 10.2.2.2, 00:00:17, FastEthernet1 / 0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O 10.10.1.1/32 [110/2] via 10.2.2.2, 00:04:47, FastEthernet1 / 0
O 10.10.0.1/32 [110/2] via 10.2.2.2, 00:04:47, FastEthernet1 / 0
O 10.10.3.1/32 [110/2] via 10.2.2.2, 00:04:47, FastEthernet1 / 0
O 10.10.2.1/32 [110/2] via 10.2.2.2, 00:04:47, FastEthernet1 / 0
O E2 10.3.3.0/24 [110/20] via 10.2.2.2, 00:04:47, FastEthernet1 / 0
C 10.2.2.0/24 is directly connected, FastEthernet1 / 0
C 10.1.1.0/24 is directly connected, Serial0 / 0
O IA 192.168.1.0/24 [110/128] via 10.1.1.2, 00:04:49:16, Serial0 / 0
O IA 192.168.2.0/24 [110/192] via 10.1.1.2, 00:04:49:16, Serial0 / 0

R1AR0 # sh ip opf database database-summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

Area 0 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 6 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 6 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 12 0 0



The same on the router from area 1:
R1AR1 # sh ip ro

Gateway of last resort is not set

172.20.0.0/16 is variably subnetted, 5 subnets, 2 masks
O E2 172.20.0.0/24 [110/20] via 192.168.1.1, 00:02:28, Serial0 / 0
O E2 172.20.0.0/16 [110/20] via 192.168.1.1, 00:06:52, Serial0 / 0
O E2 172.20.1.0/24 [110/20] via 192.168.1.1, 00:02:28, Serial0 / 0
O E2 172.20.2.0/24 [110/20] via 192.168.1.1, 00:02:28, Serial0 / 0
O E2 172.20.3.0/24 [110/20] via 192.168.1.1, 00:02:27, Serial0 / 0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O IA 10.10.1.1/32 [110/130] via 192.168.1.1, 00:45:40, Serial0 / 0
O IA 10.10.0.1/32 [110/130] via 192.168.1.1, 00:45:40, Serial0 / 0
O IA 10.10.3.1/32 [110/130] via 192.168.1.1, 00:45:40, Serial0 / 0
O IA 10.10.2.1/32 [110/130] via 192.168.1.1, 00:45:40, Serial0 / 0
O E2 10.3.3.0/24 [110/20] via 192.168.1.1, 00:06:54, Serial0 / 0
O IA 10.2.2.0/24 [110/129] via 192.168.1.1, 00:45:40, Serial0 / 0
O IA 10.1.1.0/24 [110/128] via 192.168.1.1, 00:45:41, Serial0 / 0
C 192.168.1.0/24 is directly connected, Serial0 / 0
C 192.168.2.0/24 is directly connected, Serial0 / 1

R1AR1 # sh ip opf database database-summary

OSPF Router with ID (3.3.3.3) (Process ID 1)

Area 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 0 0 0
Type-7 Ext 3 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 12 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 0 0 0
Type-7 Ext 3 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 0 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 12 0 0



On both routers, the routes labeled “O E2” appeared in the table, and the Type-5 Ext LSA counter increased in the topological database.
Detailed information:
R1AR1 # sh ip opf database external

OSPF Router with ID (3.3.3.3) (Process ID 1)

Type-5 AS External Link States

Routing Bit Set on this LSA
LS age: 1215
Options: (No TOS-capability, DC)
LS Type: AS External Link

Link State ID: 10.3.3.0 (External Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xE3A4
Length: 36
Network Mask: / 24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0

Routing Bit Set on this LSA
LS age: 941
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 172.20.0.255 (External Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xF5E1
Length: 36
Network Mask: / 24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
...


C External LSA (type 5) is simple. They are generated by an ASBR router (a router connected to an external routing domain and transmitting foreign routes to OSPF) to represent external routes that it sends to OSPF. Flood in all areas.
We summarize. External LSA (type 5):

Stub and Totally Stubby areas


Finally we got to the special types of areas J. Let's summarize the small results:
LSA type
Who creates?
Boundaries of flooding
Router (1)
Everything
Region
Network (2)
DR
Region
Summary (3)
ABR
Neighboring areas
External (5)
ASBR
All areas


Now once again look at the routing table of a regular router from Area 1:
R1AR1 # sh ip ro
172.20.0.0/24 is subnetted, 4 subnets
O E2 172.20.0.0 [110/20] via 192.168.1.1, 00:21:00, Serial0 / 0
O E2 172.20.1.0 [110/20] via 192.168.1.1, 00:21:00, Serial0 / 0
O E2 172.20.2.0 [110/20] via 192.168.1.1, 00:21:00, Serial0 / 0
O E2 172.20.3.0 [110/20] via 192.168.1.1, 00:21:00, Serial0 / 0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O IA 10.10.1.1/32 [110/130] via 192.168.1.1, 01:04:10, Serial0 / 0
O IA 10.10.0.1/32 [110/130] via 192.168.1.1, 01:04:10, Serial0 / 0
O IA 10.10.3.1/32 [110/130] via 192.168.1.1, 01:04:13, Serial0 / 0
O IA 10.10.2.1/32 [110/130] via 192.168.1.1, 01:04:13, Serial0 / 0
O E2 10.3.3.0/24 [110/20] via 192.168.1.1, 00:25:27, Serial0 / 0
O IA 10.2.2.0/24 [110/129] via 192.168.1.1, 01:04:13, Serial0 / 0
O IA 10.1.1.0/24 [110/128] via 192.168.1.1, 01:04:13, Serial0 / 0
C 192.168.1.0/24 is directly connected, Serial0 / 0
C 192.168.2.0/24 is directly connected, Serial0 / 1





External

Summary

Now we make this area a dead end (Stub). To do this, we give the following command on ABR, R1AR0, ASBR:
router ospf 1
area 1 stub

The command must be executed on all routers from area 1. The parameter is configured on all routers, since it affects the formation of adjacency relationships.
Now look at the routing table:
R1AR1 (config-router) #do sh ip ro

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O IA 10.10.1.1/32 [110/130] via 192.168.1.1, 00:01:24, Serial0 / 0
O IA 10.10.0.1/32 [110/130] via 192.168.1.1, 00:01:24, Serial0 / 0
O IA 10.10.3.1/32 [110/130] via 192.168.1.1, 00:01:24, Serial0 / 0
O IA 10.10.2.1/32 [110/130] via 192.168.1.1, 00:01:24, Serial0 / 0
O IA 10.2.2.0/24 [110/129] via 192.168.1.1, 00:01:24, Serial0 / 0
O IA 10.1.1.0/24 [110/128] via 192.168.1.1, 00:01:24, Serial0 / 0
C 192.168.1.0/24 is directly connected, Serial0 / 0
C 192.168.2.0/24 is directly connected, Serial0 / 1
O * IA 0.0.0.0/0 [110/65] via 192.168.1.1, 00:01:26, Serial0 / 0


Please note that all external (External LSA) routes have disappeared, and instead the default route (Summary LSA) has appeared. Those. for the stub area, the ABR router converts all External LSA into a single Summary LSA 0.0.0.0/0. At the same time, internal OSPF routes from other areas are transmitted as usual. The stub area is designed to reduce update traffic. By making the region a dead end, you kind of tell all the routers in this area that the entire outside world (not OSPF) is for ABR. External LSA walking in dead-end areas is prohibited.
What is the Totally Stubby area? This is a modification of the stub area made by Cisco. It is configured very simply. The following command is executed on the ABR router (and only on it):
router ospf 1
area 1 stub no-summary

Now let's look at the routing table:
R1AR1 (config-router) #do sh ip ro
C 192.168.1.0/24 is directly connected, Serial0 / 0
C 192.168.2.0/24 is directly connected, Serial0 / 1
O * IA 0.0.0.0/0 [110/65] via 192.168.1.1, 00:00:58, Serial0 / 0


As you can see, now not only External, but Summary LSA has been converted to a single Summary LSA 0.0.0.0/0. No-summary - we filter Summary LSA.
We summarize:

NSSA area and NSSA LSA (type 7)


Not so stubby area - not quite a dead end area. External LSA walking in dead-end areas is prohibited. But imagine that in this area you need to transfer some external route to OSPF. For example, forward a static route to the provider, etc. In our topology in Area 1, there is an ASBR router on which several static routes are configured. When we try to send these routes to OSPF, we get the error message:
ASBR (config-router) #redistribute static subnets
Warning: Router is currently an ASBR while it is stub area

Reason: Walking External LSA in stub areas is prohibited, and as a result, ASBRs are prohibited in stub areas. What if ASBR and external route transfer is needed? To solve this problem, we can change the region type to NSSA. This area defines a special type of LSA - NSSA External (type 7), which can only exist in this area . Those. You get the same benefits associated with monitoring updates as for dead ends, but you can also transfer external routes. In general, pure deception: if External LSA is prohibited, we will use NSSA External LSA, which are allowed J. Of course, not deception, but an additional RFC 3101 to OSPF.
To configure all routers in the NSSA area, execute the following commands:
router ospf 1
no area 1 stub
area 1 nssa


To transfer the default route that replaces External LSA, you need to run the following command on the ABR router:
router ospf 1
area 1 nssa
area 1 nssa default-information-originate


After that we can transfer external routes on the ASBR router:
ASBR (config-router) #redistribute static subnets


Let's look at the routing table and LSDB on routers from areas 0 and 1:
R1AR1 # sh ip route

O N2 1.0.0.0/8 [110/20] via 192.168.2.2, 00:02:18, Serial0 / 1
O N2 2.0.0.0/8 [110/20] via 192.168.2.2, 00:02:18, Serial0 / 1
O N2 3.0.0.0/8 [110/20] via 192.168.2.2, 00:02:18, Serial0 / 1



Area 1 (NSSA)
R1AR1 # sh ip opf database database-summary

OSPF Router with ID (3.3.3.3) (Process ID 1)

Area 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 1 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 10 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 0 0 0
Summary Net 6 0 0
Summary ASBR 1 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 5 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 15 0 0




Area 1 (NSSA)
R1AR0 # sh ip ro
O E2 1.0.0.0/8 [110/20] via 10.1.1.2, 00:08:16, Serial0 / 0
O E2 2.0.0.0/8 [110/20] via 10.1.1.2, 00:08:16, Serial0 / 0
O E2 3.0.0.0/8 [110/20] via 10.1.1.2, 00:08:16, Serial0 / 0

Area 0 (Normal / Backbone)
R1AR0 # sh ip opf data database-summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

Area 0 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Prefixes redistributed in Type-7 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Subtotal 6 0 0

Process 1 database summary
LSA Type Count Delete Maxage
Router 3 0 0
Network 1 0 0
Summary Net 2 0 0
Summary ASBR 0 0 0
Type-7 Ext 0 0 0
Opaque Link 0 0 0
Opaque Area 0 0 0
Type-5 Ext 8 0 0
Prefixes redistributed in Type-5 0
Opaque AS 0 0 0
Total 14 0 0




Area 0 (Normal / Backbone)

NSSA External (type 7) can only exist in the NSSA area. Therefore, in this area we see in the routing table of the network, marked with the code "N", and this type of LSA is present in LSDB. On the router from another area, we see the usual external routes, and there is no NSSA External LSA in the database. An ABR router converts NSSA External (type 7) to External (type 5) and transfers them to other areas.
Detailed information on NSSA External:
R1AR1 # sh ip ospf database nssa-external

OSPF Router with ID (3.3.3.3) (Process ID 1)

Type-7 AS External Link States (Area 1)

Routing Bit Set on this LSA
LS age: 882
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 1.0.0.0 (External Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x34E3
Length: 36
Network Mask: / 8
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 192.168.2.2
External Route Tag: 0











Network address and ID of the router that announced the network.






Next-hop.



Last area: Totally NSSA. Cisco's expansion, similar to Totally Stub areas. In addition to blocking External LSA, Summary LSA will also be blocked. Configured on the ABR router:
router ospf 1
area 1 nssa default-information-originate no-summary



Conclusion


Let's summarize.
Types of LSA:
LSA type
Who creates?
Boundaries of flooding
Router (1)
Everything
Region
Network (2)
DR
Region
Summary (3)
ABR
Neighboring areas
External (5)
ASBR
All areas
NSSA External (7)
ASBR
Only NSSA area. On ABR it is converted to External LSA and flood to the neighboring areas.


Types of areas:
Area type

Backbone
  • ID = 0.0.0.0
  • Can not be a dead end
  • All other areas must have a backbone connection.

Normal
  • All LSAs are allowed except NSSA External (7)

Stub
  • External LSA (5) blocked
  • ABR converts External LSA (5) to Summary LSA (3) 0.0.0.0/0

Totally Stubby
  • Cisco modification
  • External LSA (5) and Summary LSA (3) are blocked.
  • ABR converts External LSA (5) and Summary LSA (3) into a single Summary LSA (3) 0.0.0.0/0

NSSA
  • External LSA (5) blocked
  • ABR converts External LSA (5) to Summary LSA (3) 0.0.0.0/0
  • ASBR allowed
  • NSSA External LSA (7) is used to transfer external routes.
  • On ABR, NSSA External LSA (7) is converted to External LSA (5) and transmitted to neighboring areas

Totally NSSA
  • External LSA (5) and Summary LSA (3) are blocked.
  • ABR converts External LSA (5) and Summary LSA (3) to Summary LSA (3) 0.0.0.0/0
  • ASBR allowed
  • NSSA External LSA (7) is used to transfer external routes.
  • On ABR, NSSA External LSA (7) is converted to External LSA (5) and transmitted to neighboring areas



Thanks for attention. I hope it was interesting.

Source: https://habr.com/ru/post/162163/


All Articles