OSPF Stubby Area Types

Continuing from a previous blog post about OSPF where we explored Multi Area OSPF, let's take a look at a cool OSPF feature: Stubby Areas.

Stubby Areas?

There are sites inside the network that need to send the packets to the Internet. All such packets need to arrive at the router connected to the Internet.

Also, if routers want to communicate to the other area they must send the packets to the ABR, meaning they can use the default route to do that.

By using ABR's address as a default route the routers in a stub area can still reach all their destinations, without the need to have specific routes in their routing tables.

When an area is configured as Stubby ABR no longer advertises External routes into an area and instead advertises default route to the area.

As with everything in routing there are a few types of areas that behave differently.

Types of Areas

  • Stubby Area

    Stubby Area is an area into which ABR doesn't advertise external routes. The ABR instead advertises a default route to itself into a Stub Area, which means the ABR becomes a default gateway. However, routers still have Inter-Area routes.
  • Totally Stubby Area

    Neither External nor Inter-Area routes are advertised into a Totally Stubby area.
  • Not-So-Stubby Area (NSSA)

    Not-So-Stubby area is an area in which ABRs don't advertise External routes. ABRs do advertise Inter-Area routes into NSSA areas. However, NSSA Areas also allow redistribution of External routes into them by the ASBR. That means an ASBR can be connected to the NSSA area and redistribute routes into it. Those routes are then advertised through the area to the ABR.
  • Totally Not-So-Stubby Area (Totally NSSA)

    Totally NSSA is similar to the NSSA n the way that External routes can be redistributed into it by the ASBR. However, they're also similar to Totally Stubby Areas because ABRs don't advertise External or Inter-Area routes into them.

OK, now we know about OSPF stubby area types. As examples often illustrate the concepts better than a dry text, let's try a simple configuration example.

NOTE: In this blog post, we'll stick to the Stubby and Totally Stubby area types, and we'll get to NSSA and Totally NSSA in another blog post about Networking.

Configuration Example

In this example, we'll advertise 10.0.1.0/24 network with EIGRP on R6 and redistribute those EIGRP routes into OSPF on ASBR.

As for other stuff, we'll first configure other areas normally, and then as Stubby.

BTW, I think I have done enough Networking posts where I show you the command line output in plain text. This time I'll show you the relevant parts of router's running configuration, especially for those things that are easy to do, like interface and basic OSPF configuration.

First, let's make a recap of networks and interface addresses used:

  • R3 -> 192.168.1.1/24
  • R6 -> 10.0.1.0/24
  • R1 -> 172.30.1.1/24

As for the networks between the routers:

  • R3 - ABR1 -> 172.16.0.0/30
  • ABR1 - ABR2 -> 172.16.0.4/30
  • R1 - ABR2 -> 172.16.0.8/30
  • ABR2 - ASBR -> 172.16.0.12/30
  • R6 - ASBR -> 172.16.1.0/30

OK, we have everything we need, let's configure our network. We'll start with OSPF stuff and at the end configure EIGRP and redistribution. Then we'll configure Areas 1 & 2 as stubby.

Basic Interface and OSPF Configuration

Configuration of R3:

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 172.16.0.1 255.255.255.252
 ip ospf 3 area 1
!
interface FastEthernet1/0
 ip address 192.168.1.1 255.255.255.0
 ip ospf 3 area 1
!

You might wonder how to use this configuration. Well, it's simple. On a router go to global config mode:

Router>enable
Router#configure terminal

And there simply paste (right-click in Putty) the configuration. Then you have to manually "no shutdown" the interfaces.

Configuration of ABR1:

interface Loopback0
 ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
 ip address 172.16.0.2 255.255.255.252
 ip ospf 10 area 1
!
interface Serial1/0
 ip address 172.16.0.5 255.255.255.252
 ip ospf 10 area 0
!

Now, let's configure R1 and ABR2 so that we have connectivity between areas. R1 is up first because it's simpler:

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 172.16.0.9 255.255.255.252
 ip ospf 1 area 2
!
interface FastEthernet1/0
 ip address 172.30.1.1 255.255.255.0
 ip ospf 1 area 2
!

Now for ABR2. We have three interfaces to configure, so let's get to it:

interface Loopback0
 ip address 12.12.12.12 255.255.255.255
!
interface Serial0/0
 ip address 172.16.0.6 255.255.255.252
 ip ospf 20 area 0
!
interface FastEthernet1/0
 ip address 172.16.0.13 255.255.255.252
 ip ospf 20 area 0
!
interface FastEthernet2/0
 ip address 172.16.0.10 255.255.255.252
 ip ospf 20 area 2
!

As you can see, now we have some OSPF routes and AREA 1 can communicate with AREA 2. Let's view routes on R1 and try to ping 192.168.1.1 address.

R1#show ip route ospf
     172.16.0.0/30 is subnetted, 4 subnets
O IA    172.16.0.12 [110/2] via 172.16.0.10, 00:00:41, FastEthernet0/0
O IA    172.16.0.4 [110/65] via 172.16.0.10, 00:00:41, FastEthernet0/0
O IA    172.16.0.0 [110/66] via 172.16.0.10, 00:00:41, FastEthernet0/0
O IA 192.168.1.0/24 [110/67] via 172.16.0.10, 00:00:14, FastEthernet0/0
 
R1#ping 192.168.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1104/1284/1576 ms

OK, now we see that OSPF indeed does work and that Areas have connectivity. Now, let's configure R6 with EIGRP and ASBR with OSPF and EIGRP and then we can make areas 1 and 2 stub and see what happens.

R6 is up first:

interface FastEthernet0/0
 ip address 172.16.1.1 255.255.255.252
!
interface FastEthernet1/0
 ip address 10.0.1.1 255.255.255.0
!
router eigrp 1
 network 10.0.1.0 0.0.0.255
 network 172.16.1.0 0.0.0.3
 no auto-summary
!

Now let's configure Interface addresses, OSPF and EIGRP on ASBR, and then later we'll configure redistribution:

interface Loopback0
 ip address 9.9.9.9 255.255.255.255
!
interface FastEthernet0/0
 ip address 172.16.1.2 255.255.255.252
!
interface FastEthernet1/0
 ip address 172.16.0.14 255.255.255.252
 ip ospf 9 area 0
!
router eigrp 1
 network 172.16.1.0 0.0.0.3
 no auto-summary
!

OK, now ASBR has both EIGRP and OSPF running, and we need to redistribute routes. That means we have to inject all the routes from EIGRP into OSPF so that OSPF know those routes and vice-versa.

Route redistribution on ASBR

So, let's do it. First, let's redistribute OSPF routes into EIGRP. We'll do that by the use of redistribute EIGRP subcommand. But first, we'll need to configure the default metric values for redistributed routes into EIGRP. We'll do that by using default-metric EIGRP subcommand.

ASBR(config)#router eigrp 1
ASBR(config-router)#default-metric ?
  <1-4294967295>  Bandwidth in Kbits per second
 
ASBR(config-router)#default-metric 10000 ?
  <0-4294967295>  Delay metric, in 10 microsecond units
 
ASBR(config-router)#default-metric 10000 50 ?
  <0-255>  Reliability metric where 255 is 100% reliable
 
ASBR(config-router)#default-metric 10000 50 255 ?
  <1-255>  Effective bandwidth metric (Loading) where 255 is 100% loaded
 
ASBR(config-router)#default-metric 10000 50 255 1 ?
  <1-65535>  Maximum Transmission Unit metric of the path
 
ASBR(config-router)#default-metric 10000 50 255 1 1500

Then, we'll just use redistribute command with OSPF Process Id:

ASBR(config-router)#redistribute ospf 9

The router does the redistribution and we can see the effects:

ASBR#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(9.9.9.9)
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
 
P 10.0.1.0/24, 1 successors, FD is 30720
        via 172.16.1.1 (30720/28160), FastEthernet0/0
P 192.168.1.0/24, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.16.0.12/30, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.30.1.0/24, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.16.0.8/30, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.16.0.4/30, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.16.0.0/30, 1 successors, FD is 268800
        via Redistributed (268800/0)
P 172.16.1.0/30, 1 successors, FD is 28160
        via Connected, FastEthernet0/0

Now, let's redistribute from EIGRP into OSPF. It's much simpler, we only have to specify to redistribute subnets as well:

ASBR(config)#router ospf 9
ASBR(config-router)#redistribute eigrp 1 subnets

We can verify the redistribution:

ASBR#show ip ospf database
 
            OSPF Router with ID (9.9.9.9) (Process ID 9)
 
!!!!!!!!!!! OUTPUT OMITTED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
                Type-5 AS External Link States
 
Link ID         ADV Router      Age         Seq#       Checksum Tag
10.0.1.0        9.9.9.9         71          0x80000001 0x004B26 0
172.16.1.0      9.9.9.9         78          0x80000001 0x00368B 0

OK, now all OSPF areas should have all the routes from EIGRP. Let's verify that on R3 in AREA 1:

R3#show ip route ospf
     172.16.0.0/30 is subnetted, 5 subnets
O IA    172.16.0.12 [110/66] via 172.16.0.2, 00:10:54, FastEthernet0/0
O IA    172.16.0.8 [110/66] via 172.16.0.2, 00:10:54, FastEthernet0/0
O IA    172.16.0.4 [110/65] via 172.16.0.2, 00:10:54, FastEthernet0/0
O E2    172.16.1.0 [110/20] via 172.16.0.2, 00:03:39, FastEthernet0/0
     172.30.0.0/24 is subnetted, 1 subnets
O IA    172.30.1.0 [110/67] via 172.16.0.2, 00:06:24, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.1.0 [110/20] via 172.16.0.2, 00:03:39, FastEthernet0/0

Making Areas Stubby

We can see that R3 does indeed have 172.16.1.0 and 10.0.1.0 networks that are OSPF External Type 2. Now, let's make AREA 1 Stubby and see what happens.

NOTE that for an area to become stubby all the routes must agree on area type. So, when we configure Area 1 as Stubby on R3 the OSPF neighborship will fail.

R3(config)#router ospf 3
R3(config-router)#area 1 stub
R3(config-router)#
*Mar  1 00:17:26.843: %OSPF-5-ADJCHG: Process 3, Nbr 11.11.11.11 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset

We need to configure Area 1 as Stubby on ABR1 too:

ABR1(config)#router ospf 10
ABR1(config-router)#area 1 stub
ABR1(config-router)#
*Mar  1 00:21:14.555: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on FastEthernet0/0 from LOADING to FULL, Loading Done

When we did it, the neighborship comes back up. Now let's switch to R3 to see the effects of making Area 1 stubby:

R3#show ip route
 
!!!!!!!! OUTPUT OMITTED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Gateway of last resort is 172.16.0.2 to network 0.0.0.0
 
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     172.16.0.0/30 is subnetted, 4 subnets
O IA    172.16.0.12 [110/66] via 172.16.0.2, 00:02:57, FastEthernet0/0
O IA    172.16.0.8 [110/66] via 172.16.0.2, 00:02:57, FastEthernet0/0
O IA    172.16.0.4 [110/65] via 172.16.0.2, 00:02:57, FastEthernet0/0
C       172.16.0.0 is directly connected, FastEthernet0/0
     172.30.0.0/24 is subnetted, 1 subnets
O IA    172.30.1.0 [110/67] via 172.16.0.2, 00:03:07, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet1/0
O*IA 0.0.0.0/0 [110/2] via 172.16.0.2, 00:03:07, FastEthernet0/0

See what happened? R3 no longer has External routes in the routing table, and has a default route via 172.16.0.2. This shows us that ABR indeed does filter external routes and a default route to ABR is used instead, so R3 has smaller routing table and it can still reach EIGRP networks via ABR1.

OK, we successfully made AREA1 a Stubby area. Now, let's make AREA2 totally stubby, meaning we won't even have Intra-Area routes advertised into the area and a default route will be used instead.

First, let's take a look at the situation "before":

R1#show ip route ospf
     172.16.0.0/30 is subnetted, 5 subnets
O IA    172.16.0.12 [110/2] via 172.16.0.10, 00:27:38, FastEthernet0/0
O IA    172.16.0.4 [110/65] via 172.16.0.10, 00:27:38, FastEthernet0/0
O IA    172.16.0.0 [110/66] via 172.16.0.10, 00:27:38, FastEthernet0/0
O E2    172.16.1.0 [110/20] via 172.16.0.10, 00:13:41, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.1.0 [110/20] via 172.16.0.10, 00:13:41, FastEthernet0/0
O IA 192.168.1.0/24 [110/67] via 172.16.0.10, 00:13:46, FastEthernet0/0

Now, let's configure AREA2 as Totally Stubby. The only difference in the configuration is that we must include the "no summary" keyword. First up is R1:

R1(config)#router ospf 1
R1(config-router)#area 2 stub no-summary
R1(config-router)#
*Mar  1 00:31:17.087: %OSPF-5-ADJCHG: Process 1, Nbr 12.12.12.12 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset

Now for the same thing on ABR2:

ABR2(config)#router ospf 20
ABR2(config-router)#area 2 stub no-summary
ABR2(config-router)#
*Mar  1 01:10:48.855: %OSPF-5-ADJCHG: Process 20, Nbr 1.1.1.1 on FastEthernet2/0 from LOADING to FULL, Loading Done

Now let's see the effects on R1:

R1#show ip route
 
!!!!!!!! OUTPUT OMITTED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Gateway of last resort is 172.16.0.10 to network 0.0.0.0
 
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.0.8 is directly connected, FastEthernet0/0
     172.30.0.0/24 is subnetted, 1 subnets
C       172.30.1.0 is directly connected, FastEthernet1/0
O*IA 0.0.0.0/0 [110/2] via 172.16.0.10, 00:00:02, FastEthernet0/0

Now we can see that R1 no longer has any External or Inter-Area routes.

Summary

In this article we learned how to setup Multi Area OSPF network, how to redistribute routes from one routing protocol into another, namely OSPF to EIGRP and vice versa. Finally we made AREAs 1 and 2 Stubby and Totally Stubby.

I hope you learned something from this or at least found this post interesting. Until next time I wish you best of luck with studying, certifications and configurations.

Comments are closed