Here is my hand-drawn diagram using my Wipebook:
On the link 10.2.3.0 /30, R3 should be .2, not .3. Sorry for the typo.
And here is a much more legible version using Dia:
On the link 10.2.3.0 /30, R3 should be .2, not .3. Sorry for the typo.
And here is a much more legible version using Dia:
I chose to run this lab on my home lab instead of GNS3 since I wanted to add a few Layer 2 switches.
The equipment in this lab:
2) 1721 routers (R1 and R2)
1) 2621 router (R3)
2) 3550 switches (SW1 and SW2)
2) 2950 switches (AS1 and AS2)
I'm using serial connections between all of the routers (10.1.2.0, 10.1.3.0 and 10.2.3.0). Ethernet connections on all the links connected from SW1 and SW2.
As you can see from the diagrams, the way that Area 11 extends to the routers and Area 22 is only extended to the first Layer 3 switch. The reason I did this was to make the Link State Databases different on the Layer 3 switches. From here we are going to change the area types and watch how the routing tables change on SW1 and SW2. We'll also consider how traffic flows are going to change as we change the area types.
I cranked up the speed on the serial connections to 1,000,000 Kbits and left the Ethernet connections at 100,000 Kbits (FastEthernet) that way the links between the routers are the faster paths and I also changed the OSPF auto-cost reference-bandwidth to 1000 Mbits. This way the preferred links will be the serial links. Additionally, I've set R3 as the designated router for both of the Ethernet networks (10.13.1.0 and 10.23.2.0).
Since most of the changes we make will affect SW1, let's start with a baseline of SW1's OSPF database and SW1's IP routing table.
SW1's OSPF database:
SW1's IP routing table:
SW1 has all of the links and is load balancing when possible (to 2.2.2.2 and 10.1.3.0). Also, note that there is no gateway of last resort (default gateway) on this topology.
Let's head over to R3 since that is at the center of the topology.
R3's OSPF database:
R3's IP routing table:
So, what are the different types of areas that Areas 11 and 22 can be?
Stub Area
Totally Stubby Area
Not-So-Stubby Area (NSSA)
Totally Not-So-Stubby Area (Totally NSSA)
Since I won't be adding an Autonomous System Boarder Router (ASBR) to this lab, let's focus on stub area versus totally stubby area.
Stub Area
Let's start with a stub area. In a stub area, the Area Boarder Routers (ABRs) inject a default route into the area.
Under the OSPF configuration on R1, R3, and SW1, we add the line: area 11 stub
Let's look at the IP routing table on R3:
No changes are made to R3's table. Let's take a look at R3's OSPF database:
The main item to notice is the addition of 0.0.0.0 from 1.1.1.1 and 3.3.3.3 into Area 11. Let's see how SW1 is viewing Area 11 now.
Here we can see the addition of 0.0.0.0 to SW1's OSPF database as well.
SW1's IP routing table:
Here we see that the gateway of last resort has changed to 10.13.1.2 and that 0.0.0.0/0 is load balancing between 10.13.1.2 and 10.13.1.1. SW1 still has all of the links in the routing table since all of the links are part of the same OSPF network. By changing Area 11 into a stub area, all we have done is added a load balanced default route from SW1 to R1 and to R3.
Totally Stubby Area
A totally stubby area removes all of the interarea entries from the area and relies on a default route for traffic leaving the area.
To configure this in this lab, we add the line: area 11 stub no-summary to R1 and R3. We can add the line to SW1 as well (just for consistency), but this command only needs to be added at the ABRs since they are the devices that will be injecting the information into the area.
Starting with R3's OSPF database again:
The Summary Net Link States (Area 11) is reduced to only a default route.
R3's routing table is unchanged.
Over to SW1 now:
Just as R3 reported, the Summary Net Link States (Area 11) is reduced to a default route.
SW1's routing table:
SW1 now has a dramatically reduced routing table. The table now holds the three directly connected networks and then the load balanced default route to R1 and R3.
But before we do a dance of joy, what does having a load balanced default route really do for Area 11?
In this case, it means that all traffic leaving SW1 to anywhere outside of Area 11 will be load balanced (alternating packets) to R1 and to R3. Is that a problem? Sort of is, in my opinion.
Let's do a traceroute from SW1 to 1.1.1.1:
Load balanced between R1 and R3 as we expected. However, 1.1.1.1 is directly connected to R1. So, packet 2 needed to take an extra hop from R3 to R1 via 10.1.3.0 /30.
Going to 2.2.2.2, this is not as big of a deal since R1 and R3 have a direct link of equal bandwidth to R2.
Things get a little weird when we try to send data from SW1 to SW2.
First, traffic is load balanced to R1 and to R3 just as before. But when we look at the routing table of R1 to 5.5.5.5, we have load balancing there as well since the link costs are the same from R1 to SW2 (via R3 and via R2).
If we had a small flow of 16 packets that needed to be sent from SW1 to SW2, 8 packets would be sent to R1 and 8 packets would be sent to R3. Of the 8 packets sent to R1, 4 would go to R2 and 4 would go to R3 (and those 4 packets would have extra latency having gone to R1 first). SW2 would receive 4 packets from R2 and 12 from R3.
If Area 11 was left as a stub area, SW1 would have an entry to 5.5.5.5 via R3. R3 would then send the traffic directly to SW2. Simple and deterministic. Easy to troubleshoot and easy to follow the path.
But where this is now a totally stubby area, there is not an entry for 5.5.5.5 in SW1's routing table, the traffic is balanced to R1 and to R3. R1 then load balances the traffic between R2 and R3. Not very efficient, in my opinion.
However, totally stubby areas are great when there is a single entry and single exit point for an area. If we were to convert Area 22 into a totally stubby area, we would not see an impact on SW2's routing table since it is an ABR, but we can reduce the size of SW2's OSPF database by making Area 22 a totally stubby area.
SW2's OSPF database as a normal area:
SW2's OSPF database as a totally stubby area:
Notice that the Summary Net Link States (Area 22) shrinks to a single entry of 0.0.0.0.
If there were another router downstream from SW2, the routing table would have the links within the area (such as 192.168.22.0 /24) and a default route to SW2.
Let's add a router to Area 22 and see how the OSPF database and IP routing table look from within a totally stubby area.
Here is the topology with R4 added via Dia:
R4's OSPF database:
Super small OSPF database. Router Link States for the two routers (SW2 and R4), a Net Link State for the broadcast network of 192.168.22.0, and a Summary Net Link State with a default network out of the area.
And a super small routing table. One entry for the connected network and a default route to leave the area. If there was a loopback and a network statement to include that loopback, there would be three entries.
To summarize this post:
With multiple exit points from an area, a stub area might be a good idea to help load balance traffic out of the area. But it also depends on how the backbone area is engineered. A stub area will shrink the OSPF database if there are a lot of external OSPF networks.
Additionally, making the area a totally stubby area might cause traffic to become even more diffused. This also depends on how the backbone area is engineered. But for an area with only a single exit point, totally stubby areas can dramatically reduce the size of both the OSPF database and the IP routing table.
Please contact me if you have any questions on this.
Thank you for reading!
No comments:
Post a Comment