The following is a quick logical topology I whipped up in Paint, leaving out the Loopback info as that would make for a lot of micro-text, this is what will be configured once we go through some Redistribution and Stub Area configuration:

Topology_OSPF_Stubs

 

To inject routes into OSPF, which then makes the router an ASBR, you enter the following command in router config mode:

“redistribute connected subnets” – This is what I am working with for now, though the basis of the command starts out as “redistribute …” in router config. If you do not add ‘subnets’ onto the connected redistribution, it will only bring in classful networks, and if issued without ‘subnets’ in the command it will need to be removed with “no redistribute connected” and add back in with subnets command.

“show ip ospf” shows what type of routes are being redistributed, what type of router the local router is, and all sorts of information for about anything OSPF related.

The first type of Stub area to speak upon is just that, a “Stub Area.” To configure a stub area, the command is:

“area 34 stub” – And this must be configured in router config mode on both neighbors, here is an example of the OSPF route table before creating the Stub Area:

R4#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/66] via 172.12.34.3, 00:01:19, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/66] via 172.12.34.3, 00:00:45, FastEthernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/2] via 172.12.34.3, 00:00:17, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
O        5.5.5.5 [110/67] via 172.12.34.3, 00:03:16, FastEthernet0/1
100.0.0.0/16 is subnetted, 7 subnets
O E2     100.1.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.2.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.3.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.4.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.5.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.6.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
O E2     100.7.0.0 [110/20] via 172.12.34.3, 00:02:32, FastEthernet0/1
172.12.0.0/16 is variably subnetted, 4 subnets, 2 masks
O        172.12.15.0/24 [110/66] via 172.12.34.3, 00:03:16, FastEthernet0/1
O        172.12.123.0/24 [110/65] via 172.12.34.3, 00:03:16, FastEthernet0/1

This creates a stub area, which will eliminate O E2 (External routes Redistributed into OSPF), and create a single default Inter-Area route to the next hop IP address, indicated in the OSPF route table as O*IA, however Inter-Area routes (IA) will still show the OSPF route table for the Stub Area, for example:

R4(config-router)#do sh ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is 172.12.34.3 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 172.12.34.3, 00:00:07, FastEthernet0/1
1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/66] via 172.12.34.3, 00:00:07, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/66] via 172.12.34.3, 00:00:07, FastEthernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/2] via 172.12.34.3, 00:00:07, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
O IA     5.5.5.5 [110/67] via 172.12.34.3, 00:00:07, FastEthernet0/1
172.12.0.0/16 is variably subnetted, 4 subnets, 2 masks
O IA     172.12.15.0/24 [110/66] via 172.12.34.3, 00:00:07, FastEthernet0/1
O IA     172.12.123.0/24 [110/65] via 172.12.34.3, 00:00:07, FastEthernet0/1

To further reduce the OSPF route table, you must make the area a Total stub, by issuing the following command **ON THE ABR**, though it CAN be issued on both routers without affecting the outcome and both routers must still be configured as Stubs to begin with:

“area 34 stub no-summary” – This prevents Summary LSA’s from entering the Area, and further reducing the OSPF route table to a single default route to the next hop IP:

R3(config-router)#area 34 stub no-summary
R3(config-router)#
ASR#4
[Resuming connection 4 to r4 … ]

R4(config-router)#do sh ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is 172.12.34.3 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 172.12.34.3, 00:00:08, FastEthernet0/1

The cost of 2 was explained as being the cost not of the local router to the destination network, but the cost of the ASBR to the destination network, there are ways to manipulate this coming up later.

  • Stub Areas prevent type 5 LSA’s from entering the Area
  • Total Stub Areas prevent types 3, 4, and 5 LSA’s from entering the Area
  • Area 0 / Backbone Area cannot be configured as ANY kind of Stub Area
  • Areas containing Virtual-Links cannot be Stub Areas

NSSAs (Not So Stubby Area) are configured very similar to a Stub network, however some of the behaviors are different at first glance. To begin the command issued again on both neighbors router config mode is:

“area 15 nssa” – I used routers 1 and 5 for my NSSA and left 3 and 4 for Total stub usage.

Here is how the routing table transforms as you configure an NSSA Stub network, beginning with how R5 see’s OSPF routes prior to any Stub configurations:

R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/2] via 172.12.15.1, 00:00:59, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/66] via 172.12.15.1, 00:00:59, FastEthernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/66] via 172.12.15.1, 00:00:59, FastEthernet0/1
100.0.0.0/16 is subnetted, 7 subnets
O E2     100.1.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.2.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.3.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.4.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.5.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.6.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
O E2     100.7.0.0 [110/20] via 172.12.15.1, 00:00:59, FastEthernet0/1
172.12.0.0/16 is variably subnetted, 4 subnets, 2 masks
O IA     172.12.34.0/24 [110/66] via 172.12.15.1, 00:00:59, FastEthernet0/1
O IA     172.12.123.0/24 [110/65] via 172.12.15.1, 00:00:59, FastEthernet0/1

After configuring “area 15 nssa” on both routers, this is the new route table:

R5(config-router)#do show ip route
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/2] via 172.12.15.1, 00:00:09, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/66] via 172.12.15.1, 00:00:09, FastEthernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/66] via 172.12.15.1, 00:00:09, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback5
100.0.0.0/16 is subnetted, 7 subnets
O N2     100.1.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.2.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.3.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.4.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.5.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.6.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
O N2     100.7.0.0 [110/20] via 172.12.15.1, 00:00:09, FastEthernet0/1
172.12.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.12.15.0/24 is directly connected, FastEthernet0/1
L        172.12.15.5/32 is directly connected, FastEthernet0/1
O IA     172.12.34.0/24 [110/66] via 172.12.15.1, 00:00:09, FastEthernet0/1
O IA     172.12.123.0/24 [110/65] via 172.12.15.1, 00:00:09, FastEthernet0/1

The E2 (External / Redistributed) routes have turned into N2 route types, which I am not sure at this point what significance that has, however it did not summarize them and create a default Inter-Area route like as happened when creating a basic stub Area.

To further summarize and “Stub” this area, you must make this a Not So Stubby Total Stub Area, which requires the exact same configuration syntax that you add to a regular stub area to make it a Total stub area, again configure it on the ABR:

“area 15 nssa no-summary” – This will create one default Inter-Area static route for all the Inter-Area (O IA) routes in your route table, however the External / Redistributed routes still are sticking in the OSPF route table as shown in the following output:

R1(config-router)#area 15 nssa no-summary
R1(config-router)#
ASR#5
[Resuming connection 5 to r5 … ]

R5(config-router)#do show ip route
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is 172.12.15.1 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 172.12.15.1, 00:00:06, FastEthernet0/1
5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback5
100.0.0.0/16 is subnetted, 7 subnets
O N2     100.1.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.2.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.3.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.4.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.5.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.6.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
O N2     100.7.0.0 [110/20] via 172.12.15.1, 00:07:26, FastEthernet0/1
172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        172.12.15.0/24 is directly connected, FastEthernet0/1
L        172.12.15.5/32 is directly connected, FastEthernet0/1

I am not sure yet if there is a way to configure the NSSA Area to condense the External / Redistributed routes into a single default Inter-Area route, I have a suspicion it has to do with that Type 7 LSA, or it might just be what makes it Not So Stubby?

We shall see, on to the next topic, Summarization in OSPF!