OSPF Blog Content

OSPF - Open Shortest Path First

OSPF Explained Step By Step With Practicals From CCNA To CCIE Level

Types of area



The Open Shortest Path First (OSPF) protocol defines several special-case area types, including:
        * Stub areas
        * Totally stubby areas
        * Not-so-stubby areas (NSSAs)
        * Totally NSSA.

The purpose of all four types of stub areas is to inject default routes into an area so that external and inter-area link-state advertisements (LSAs) are not flooded in. Stub areas are designed to reduce the amount of flooding, the link-state database (LSDB) size, and the routing table size in routers within the area.
And these special area we can only use for Normal area not for backbone area Area-0

         1.stub area

                * in this area LSA 5 will not be allowed
                * in this area ASBR can't be present
                * Area-0 cannot be a STUB area
                * in a single area all routers should be stub (Part of Hello Parameters to form the neighborship)
                * when we create area as stub then ABR will generate default route in stub area in form of type 3 LSA with default cost 1.
                * In this area router will exchange hello with E bit not set.(no external domain capability)

So here we can see we have 2 ABR routers, so once we convert Area-1 into STUB area, Area-1 will no longer accept any external routes and both ABR router will generate a default route in Type-3 LSA with Default cost-1

Router-2
Router ospf 1
Area-1 stub
Exit

Router-6
Router ospf 1
Area-1 stub
Exit

Router-3
Router ospf 1
Area-1 stub
Exit

Now lets check the database and metric value

Router-3 Database
R3#show ip ospf database
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                 Router Link States (Area 1)...
                 Net Link States (Area 1)...
                 Summary Net Link States (Area 1)

Link ID          ADV Router          Age          Seq#          Checksum
0.0.0.0          2.2.2.2          423          0x80000001 0x0075C0
0.0.0.0          6.6.6.6          411          0x80000001 0x00FC29
1.1.1.1          6.6.6.6          408          0x80000003 0x00DE3F
4.4.4.4          2.2.2.2          421          0x80000003 0x00CC55
4.4.4.4          6.6.6.6          408          0x80000003 0x004AC8
6.6.6.6          2.2.2.2          421          0x80000003 0x007A9E
6.6.6.6          6.6.6.6          408          0x80000003 0x00E328
12.0.0.0          2.2.2.2          421          0x80000003 0x00D453
12.0.0.0          6.6.6.6          408          0x80000003 0x0070A5
14.0.0.0          2.2.2.2          421          0x80000003 0x00C460
14.0.0.0          6.6.6.6          408          0x80000003 0x004CC8
46.0.0.0          2.2.2.2          421          0x80000003 0x002DD6
46.0.0.0          6.6.6.6          408          0x80000003 0x00A055


Router-3 Summary LSA
R3#show ip ospf database summary 0.0.0.0
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                 Summary Net Link States (Area 1)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 432
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x75C0
Length: 28
Network Mask: /0
        MTID: 0          Metric: 1

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 420
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 6.6.6.6
LS Seq Number: 80000001
Checksum: 0xFC29
Length: 28
Network Mask: /0
         MTID: 0          Metric: 1

Here in this output we can see we are getting default route from both ABR and both are advertising using default metric-1

        2.Totally STUB area
In OSPF stub area we can see we are getting a default route as type-3 LSA and other individual LSA-3 too, and all the routers who wants to communicate to LSA-3 will go via ABR and if we already have a default route as Type-3 LSA, so there is no need of individual routes as Type-3 LSA and can be ignored
To achieve this we use totally stub area
                * all features of stub + LSA3 will also filter but a default route is generate as LSA3
                * Only ABR originate LSA-3 so we eed to run totally stub feature only on aBR, on other routers we can just enable STUB area
                * On normal area routers no need to run totally stub feature

Here we will enable Totally STUB only on ABR routers and STUB on Router-3
Router-2
Router ospf 1
Area-1 stub no-summary
Exit

Router-6
Router ospf 1
Area-1 stub no-summary
Exit

Router-3
Router ospf 1
Area-1 stub
Exit

Now lets check the database and metric value
Router-3 Database
R3#show ip ospf database
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                  Router Link States (Area 1)...
                  Net Link States (Area 1)...
                  Summary Net Link States (Area 1)

Link ID          ADV Router          Age          Seq#          Checksum
0.0.0.0          2.2.2.2          1          0x80000003 0x0071C2
0.0.0.0          6.6.6.6          5          0x80000003 0x00F82B


Router-3 Summary LSA
R3#show ip ospf database summary 0.0.0.0
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                  Summary Net Link States (Area 1)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 45
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000003
Checksum: 0x71C2
Length: 28
Network Mask: /0
         MTID: 0          Metric: 1

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 49
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 6.6.6.6
LS Seq Number: 80000003
Checksum: 0xF82B
Length: 28
Network Mask: /0
         MTID: 0          Metric: 1


         3.NSSA Area
                  * in this area ASBR can present
                  * in this area LSA-7 will genrate for external routes
                  * ABR will translate that LSA 7 to LSA 5
                  * Do not originate any default route
                  * NSSA area block External Routes in form of LSA-5
                  * LSA-7 can be injected with code N2 and N1
                  * LSA7 will come with N2 routes and also have forwarding add to prevent suboptimal routing and router add loopback address in forwarding add field if loopback is not present then it use exit interface add

Redistribution into an NSSA creates a special type of LSA known as a Type-7 External LSA, which can exist only in an NSSA. An NSSA ASBR (router ASBR1 in the figure in this slide) generates this LSA, and an NSSA ABR translates it into a Type-5 LSA, which gets propagated into the OSPF domain. The NSSA retains the other stub area features; the ABR can send a default route into the NSSA instead of external routes from other ASBRs (for example from ASBR2 in the figure in this slide). The default behavior on a Cisco router is that no default route gets propagated unless specifically configured to do so.
<>

         4.Totally NSSA Area
                  * All features of NSSA area + LSA3 will also filter and add a default route
                  * ABR blocks Type-3, Type-4 and Type-5 LSAs
                  * ABR generate a default route with cost 1 as Type-3 LSA

Here we will enable Totally STUB only on ABR routers and STUB on Router-3
Router-2
Router ospf 1
Area-1 nssa no-summary
Exit

Router-6
Router ospf 1
Area-1 nssa no-summary
Exit

Router-3
Router ospf 1
Area-1 nssa
Exit

Now lets check the database and metric value
Router-3 Database
R3#show ip ospf database
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                  Router Link States (Area 1)...
                  Net Link States (Area 1)...
                  Summary Net Link States (Area 1)

Link ID          ADV Router          Age          Seq#          Checksum
0.0.0.0          2.2.2.2          18          0x80000005 0x00F435
0.0.0.0          6.6.6.6          8          0x80000005 0x007C9D


Router-3 Summary LSA
R3#show ip ospf database summary 0.0.0.0
         OSPF Router with ID (3.3.3.3) (Process ID 1)
                  Summary Net Link States (Area 1)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 34
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000005
Checksum: 0xF435
Length: 28
Network Mask: /0
         MTID: 0          Metric: 1

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 25
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 6.6.6.6
LS Seq Number: 80000005
Checksum: 0x7C9D
Length: 28
Network Mask: /0
         MTID: 0          Metric: 1

image
image
image
image