Home Network Layer OSPF Version 2 OSPF Totally Stubby Area: Operation and Configuration

OSPF Totally Stubby Area: Operation and Configuration

In OSPF, there’s a special area type called OSPF totally stub area where all routers are configured to be completely stubby. In other words, the routers don’t allow external and inter-area routing data; they only exchange a limited list of LSA types: LSA Types 1 and 2, and LSA Type 3 to propagate the 0.0.0.0 route only. If you want to isolate a part of your network or reduce the routing information sent around your network, OSPF totally stub areas can be helpful.

Upon the completion of this tutorial, you will be able to answer the following questions:

  • What is totally stubby area in OSPF?
  • Why do we need OSPF totally stubby area in OSPF?
  • How many OSPF LSA types are supported by a totally stubby area in OSPF?
  • How do I set up a totally stubby area in OSPF?
  • How to configure a totally stubby area in OSPF on different network operating systems, specifically Cisco IOS, Cisco IOS-XR, and Juniper JunOS?
  • What is the difference between a stub area and a totally stubby area?
  • What is the difference between an OSPF totally stubby area and NSSA?
  • What is the difference between an OSPF totally stubby area and a totally NSSA?
  • What is the difference between the backbone area and a totally stubby area in OSPF?

In the rest of this lesson, we will use the following network topology (Figure 1).

Figure 1 – Network diagram of an OSPF routing domain

In Figure 1, our routing domain consists of one OSPF autonomous system and EIGRP AS 15. The OSPF routing domain consists of area 0 and area 234, considered totally stubby. Additionally, router R1 is configured to inject EIGRP routes in OSPF.

Here are the routing configurations on the routers.

Router R1

R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.12.1 0.0.0.0 area 0
R1(config-router)# redistribute eigrp 15 subnets
R1(config-router)# 
R1(config-router)# router eigrp 15
R1(config-router)# network 10.0.15.1 0.0.0.0
R1(config-router)# no auto-summary

Router R2

R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.12.2 0.0.0.0 area 0
R2(config-router)# network 10.0.23.2 0.0.0.0 area 234
R2(config-router)# area 234 stub no-summary

Router R3

R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 10.0.23.3 0.0.0.0 area 234
R3(config-router)# network 10.0.34.3 0.0.0.0 area 234
R3(config-router)# area 234 stub

Router R4

R4(config)# router ospf 1
R4(config-router)# router-id 4.4.4.4
R4(config-router)# network 10.0.34.4 0.0.0.0 area 234
R4(config-router)# area 234 stub

Router R5

R5(config)# router eigrp 15
R5(config-router)# network 10.0.15.5 0.0.0.0
R5(config-router)# no auto-summary

What is OSPF Totally Stubby Area?

Like OSPF stub areas, an OSPF totally stubby area does not allow Type 4 and Type 5 LSAs (ASBR summary and external LSAs) within the area. Additionally, that particular kind of OSPF area prohibits also Type 3 LSAs, except those carrying the 0.0.0.0/0 route. When you configure an OSPF area as a totally stubby area, the area’s ABRs stop flooding Type 3, Type4, and Type 5 LSAs, and inject instead the default route into the totally stubby area.

To sum up, an OSPF totally stubby area is a stub area that does not allow inter-area routes.

Figure 2 – OSPF routes prohibited in an OSPF totally stub area

Figure 2 states that routers R3 and R4 cannot receive a Type 3 LSA describing the link between routers R2 and R1 from ABR R2 (Examples 1 and 2). Moreover, R2 acting as an ABR injects the 0.0.0.0/0 into area 234 (Example 3), and thus the stubby routers can reach the 10.0.12.0/24 subnet using the gateway of last resort.

R3# show ip ospf database

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

                Router Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         80          0x80000003 0x005B7F 1
3.3.3.3         3.3.3.3         66          0x80000007 0x00DD81 2
4.4.4.4         4.4.4.4         67          0x80000005 0x00D4DB 1

                Net Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.23.3       3.3.3.3         79          0x80000001 0x008F68
10.0.34.4       4.4.4.4         67          0x80000001 0x00429D

                Summary Net Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         2.2.2.2         195         0x80000001 0x0075C0

Example 1 – OSPF LSAs of area 234 on router R3

R4# show ip ospf database 

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

                Router Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         67          0x80000003 0x005B7F 1
3.3.3.3         3.3.3.3         53          0x80000007 0x00DD81 2
4.4.4.4         4.4.4.4         52          0x80000005 0x00D4DB 1

                Net Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.23.3       3.3.3.3         66          0x80000001 0x008F68
10.0.34.4       4.4.4.4         52          0x80000001 0x00429D

                Summary Net Link States (Area 234)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         2.2.2.2         182         0x80000001 0x0075C0

Example 2 – OSPF LSAs of area 234 on router R4

R4# show ip ospf database summary

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

                Summary Net Link States (Area 234)

  LS age: 1223
  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: 

Example 3 – LSA Type 3 generated by router R2 to advertise the default route in area 234

If an OSPF totally stub area has many ABRs, they all advertise the default route into the OSPF area. And depending on the configuration of each stubby router, it may install one or multiple default routes depending on the path costs to the ABRs. By default, ABR advertises the 0.0.0.0/0 route with cost 1 (Example 4).

R2# show ip ospf database summary 0.0.0.0

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

                Summary Net Link States (Area 234)

  LS age: 939
  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 

Example 4 – Default route’s data injected by R2 in area 234

Finally, OSPF totally stubby areas are supported by Cisco and other similar vendors even though they are not defined in RFC 2328.

OSPF Totally Stub Areas Does Not Allow Stubby Routers to Become ASBRs

Before continuing, we add a loopback interface on router R4 (Example 5 and 6), and then redistribute R4’s connected subnets in OSPF.

R4(config)# interface loopback 0
R4(config-if)# ip address 4.4.4.4 255.255.255.255

Example 5 – Configuring a loopback interface on router R4

R4(config)# router ospf 1
R4(config-router)# redistribute connected subnets

Example 6 – Redistributing connected routes in OSPF

Unlike an NSSA area, considered also a stubby area, an OSPF totally stub area prohibits member routers from injecting external routes into the area. Example 7 illustrates this fact. Cisco IOS states that it is not possible for router R4 to become ASBR because the router is not attached to a non-stubby area.

*Sep 28 02:02:10.104: %OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area

Example 7 – Message shown after issuing the redistribute connected subnets on router R4

Moreover, router R1 could redistribute EIGRP AS 15’s routes into OSPF but R2 could not inject them into area 234. To sum up, OSPF totally stub areas restrict member routers from flooding LSAs Type 5 in the area.

How OSPF Default Route Get Advertised in an OSPF Totally Stubby Area

By default, ABRs attached to an OSPF totally stubby area advertise the 0.0.0.0/0 into the stub area as an inter-area route with cost 1 using an LSA Type 3 (Example 8).

R2# show ip ospf database summary 0.0.0.0

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

                Summary Net Link States (Area 234)

  LS age: 939
  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 

Example 8 – Default route injected by R2 in area 234

To change the default cost, use the area default-cost command. Example 9 sets the cost of the default route injected in a stub area to 111.

R2(config)# router ospf 1
R2(config-router)# area 234 default-cost 111

Example 9 – Setting the cost of the default route to 111

Note that this configuration affects default routes injected in stub areas only not the default route configured with the default-information originate command.

Why Do We Use OSPF Totally Stubby Areas?

We can divide OSPF areas into two categories: transit areas and non-transit areas (areas that cannot route traffic between other OSPF areas). OSPF totally stubby areas fall into the second category. So while an OSPF standard area allows transit traffic, a totally stub area does not because it is often isolated by design.

Routers within a totally stubby area do need to know detailed routing information about the current OSPF domain and external networks, and thus, configuring an isolated OSPF area as a totally stubby area would help reduce the size of the member routers’ routing tables and LSDBs, especially in a large network.

Since ABRs do not advertise all routing information with routers in a totally stubby area, routing traffic within the area gets reduced also because stubby routers exchange LSAs Type 1 and 2, and LSAs Type 3 advertising the default routes.

Finally, if you want to prevent a particular area from becoming a transit area for traffic destined to external networks, you can set it up as a totally stubby area.

OSPF Totally Stubby Area Configuration Made Easy

How to configure an OSPF totally stubby area on Cisco IOS

Configuring an OSPF totally stub area on Cisco IOS consists of two steps:

Step 1: Issue the area stub command on the non-ABR routers of the area in question

R1(config)# router ospf 1
R1(config-router)# area 123 stub

Step 2: Issue the area stub no-summary command on each ABR in the area.

R10(config)# router ospf 1
R10(config-router)# area 123 stub no-summary

How to configure an OSPF totally stubby area on Cisco IOS-XR

Configuring an OSPF totally stub area on Cisco IOS-XR requires two steps:
Step 1: issue the stub command on the non-ABR routers of the area in question.

RP/0/0/CPU0:R10(config)# router ospf 1
RP/0/0/CPU0:R10(config-ospf)# area 222
RP/0/0/CPU0:R10(config-ospf-ar)# stub

Step 2: Issue the stub no-summary command on each ABR in the area.

RP/0/0/CPU0:R20(config)# router ospf 1
RP/0/0/CPU0:R20(config-ospf)# area 222
RP/0/0/CPU0:R20(config-ospf-ar)# stub no-summary

Configuring OSPF Totally Stubby Areas on Juniper JunOS

Like Cisco, Juniper JunOS supports OSPF totally stubby areas. To configure an OSPF area to become totally stubby, use the stub command on all routers in the area.

 set protocols ospf area 0.0.0.10 stub

Next, issue the default-metric and no-summaries commands on the ABRs.

 set protocols ospf area 0.0.0.10 stub default-metric 10
 set protocols ospf area 0.0.0.10 stub no-summaries

Related Lessons to OSPF Totally Stubby Area

Conclusion

I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.

Mohamed Ouamer is a computer science teacher and a self-published author. He taught networking technologies and programming for more than fifteen years. While he loves to share knowledge and write, Mohamed's best passions include spending time with his family, visiting his parents, and learning new things.

Exit mobile version