Stub areas have many advantages, but can someone tell me what are their disadvantages?
OSPF Stub Area – Disadvantages Explained
ospfstub
Related Solutions
If you're asking specifically what Areas do in OSPF, there are many resources out there which have a wealth of information. These are just a few selections:
- The Cisco OSPF Design Guide
- A Cisco Design Technote What Are OSPF Areas and Virtual Links?
- PacketLife.net blog entry on OSPF Area Types
However, a good answer to "What is the advantage of OSPF Areas?", is this quote from the Cisco Design Technote, What are OSPF Areas:
An OSPF network can be divided into sub-domains called areas. An area is a logical collection of OSPF networks, routers, and links that have the same area identification. A router within an area must maintain a topological database for the area to which it belongs. The router doesn't have detailed information about network topology outside of its area, thereby reducing the size of its database.
In short OSPF Areas allow you to segment your network topology to enable greater scalability and maintain a greater level of control.
Edit: In response to your comment "How can OSPF Areas increase the speed of communication?":
By itself, using OSPF Areas doesn't increase the speed of communication. It removes roadblocks to communication/scalability.
Think of it like this (this isn't a perfect analogy, and over-simplifies the issue, but it should help give the general idea):
If a company takes hundreds of telephone calls each day, and has to send all of it's telephone calls to a single secretary, calls into the company will be slow. However if there is a central secretary who knows about many secretaries who all take calls for a different portion of the company, calls can more quickly be processed.
A similar issue arises when routing tables for any one device get too large/unmanageable. Splitting them into more manageable areas can help speed traffic along to it's destination.
OSPF Backbone
Why is area 0 the backbone area in OSPF? Why must all other areas connect to it?
This is explained very well in RFC 3509, Section 1.21:
1.2 Motivation
In OSPF domains the area topology is restricted so that there must be a backbone area (area 0) and all other areas must have either physical or virtual connections to the backbone. The reason for this star-like topology is that OSPF inter-area routing uses the distance-vector approach and a strict area hierarchy permits avoidance of the "counting to infinity" problem. OSPF prevents inter-area routing loops by implementing a split-horizon mechanism, allowing ABRs to inject into the backbone only Summary-LSAs derived from the intra-area routes, and limiting ABRs' SPF calculation to consider only Summary-LSAs in the backbone area's link-state database.
OSPF is usually considered a link-state protocol. What some people miss is that OSPF uses both link-state protocol and distance-vector protocol algorithms.
- Routes within the backbone, or a non-backbone area are computed as a link-state protocol does (ref Dijkstra's algorithm).
- When OSPF must carry non-backbone routes through the backbone, it uses some distance-vector behavior (i.e. parts of the Bellman Ford algorithm) to propagate Type3 LSA metrics into non-backbone areas.
Simple example of OSPF's distance-vector behavior:
<-- Area 5 --><-- Area 0 --><-- Area 4 -->
R5-----------R1-----------R2------------R3---------------------R4
Cost 3 Cost 5 Cost 7 Cost 12
LSA--> LSA-->
Type3 LSA Type3 LSA
{From R1} {From R2}
R5 cost is 3 R5 cost is 8
Consider what happens to a /32 Loopback route for R5.
- R5 sends a Type1 LSA containing the /32 Loopback
- R1 (Area 5 ABR), is connected to Area 0; it translates the Type1 LSA into a Type3 LSA with a cost of 3.
- R2 (Area 4 ABR) receives R1's Type3 LSA (metric 3) and changes the metric to R5's Loopback, based on R2's cost to R1. Now R2's Type3 LSA for R5 has a cost of 8. This is the distance-vector behavior I mentioned above.
Requiring all non-backbone routes to go through the backbone is a loop-prevention mechanism.
Connecting non-backbone OSPF areas at an ABR
If 2 areas aren't connected through area 0 (discontiguous), how does OSPF behaving as a link state protocol increase the possibility of routing loops?
As we saw above, OSPF uses distance-vector behavior to send routes through the Area 0 backbone. Distance-vector protocols have well-known limits, such as the count-to-infinity problem. OSPF would be vulnerable to the same issues, if we didn't have boundaries on its behavior.
1RFC 3509 describes Cisco IOS's ABR behavior
Best Answer
Basically, a stub area is a dead-end area. For instance, a stub are cannot be used as a transit for virtual links.
RFC 2328, OSPF Version 2, Section 3.6 Supporting stub areas
Cisco has a document, OSPF Design Guide, that has a section on stub areas: