Areas & Hierarchy
OSPF's hierarchical design using areas is what makes it scalable for large networks. Understanding areas is crucial for OSPF mastery.
Why Areas?
The Scalability Problem
Without areas, every router would need to:
- Maintain the entire network topology
- Run SPF calculation for every network change
- Store all LSAs in memory
- Process all network updates
This becomes unmanageable in large networks!
Area Concept
An area is a logical grouping of routers that share the same Link State Database (LSDB). Areas provide:
Benefits
- Reduced LSDB size: Routers only need intra-area topology
- Faster SPF: Smaller database means faster calculations
- Reduced memory usage: Less LSAs to store
- Localized flooding: LSAs stay within area boundaries
- Better stability: Changes in one area don't affect others
Design Rules
- Backbone area: Area 0 must exist
- Contiguous areas: All routers in area must be connected
- ABR requirement: Non-backbone areas must connect to Area 0
- No transit areas: Traffic can't pass through non-backbone areas
Area Types in Detail
Backbone Area (Area 0)
Characteristics
- Must exist in every OSPF network
- All other areas must connect to it
- Carries inter-area traffic
- Cannot be a stub area
- May contain ASBRs
Standard Areas
Area Type | LSA Types | External Routes | ABR Behavior |
---|---|---|---|
Normal Area | 1, 2, 3, 4, 5 | Full external routing | Floods all LSA types |
Stub Area | 1, 2, 3 | Default route only | Blocks Type 4 & 5 LSAs |
Totally Stub | 1, 2 | Default route only | Blocks Type 3, 4 & 5 LSAs |
NSSA | 1, 2, 3, 7 | Type 7 LSAs | Converts Type 7 to Type 5 |
Totally NSSA | 1, 2, 7 | Type 7 LSAs | Blocks Type 3, converts Type 7 |
Router Types
OSPF defines different router types based on their function and location in the network hierarchy. Each type has specific responsibilities and capabilities.
Internal Router (IR)
Characteristics
- All interfaces belong to the same area
- Maintains only intra-area LSAs (Types 1 and 2)
- Simplest router type
- Most common in leaf networks
Area Border Router (ABR)
Critical Role
ABRs are the gatekeepers between areas. They control what routing information flows between areas and are crucial for network stability.
ABR Responsibilities
Function | Description | LSA Types Involved |
---|---|---|
LSA Translation | Converts Type 1/2 LSAs to Type 3 LSAs | 1, 2 → 3 |
Route Summarization | Aggregates routes between areas | 3 |
Area Filtering | Blocks LSAs from entering stub areas | 4, 5 |
Default Route Injection | Injects default routes into stub areas | 3 |
NSSA Translation | Converts Type 7 LSAs to Type 5 LSAs | 7 → 5 |
LSA Types
Link State Advertisements (LSAs) are the building blocks of OSPF's link-state database. Each LSA type serves a specific purpose and contains different information about the network topology.
LSA Fundamentals
All LSAs share a common 20-byte header format, but contain different information in their bodies. LSAs are identified by their type, originating router, and Link State ID.
Type 1 LSA - Router LSA
Type 1 LSA Content
Router LSAs describe the state and cost of the router's links to the area.
Type 2 LSA - Network LSA
Type 3 LSA - Summary LSA
Type 4 LSA - ASBR Summary LSA
Type 5 LSA - External LSA
Network Types
OSPF behavior varies significantly based on the network type. Understanding these types is crucial for proper OSPF operation and troubleshooting.
Why Network Types Matter
Network types determine:
- Whether DR/BDR election occurs
- Hello and Dead timer values
- How LSAs are flooded
- Adjacency formation behavior
Network Type Overview
Network Type | DR/BDR | Hello Timer | Dead Timer | Adjacency | Common Media |
---|---|---|---|---|---|
Broadcast | Yes | 10 seconds | 40 seconds | Automatic | Ethernet, WiFi |
Point-to-Point | No | 10 seconds | 40 seconds | Automatic | Serial, PPP |
Point-to-Multipoint | No | 30 seconds | 120 seconds | Automatic | Frame Relay |
NBMA | Yes | 30 seconds | 120 seconds | Manual | Frame Relay, ATM |
Point-to-Multipoint NBMA | No | 30 seconds | 120 seconds | Manual | Frame Relay |
Neighbors & Adjacency
OSPF neighbor relationships are the foundation of the protocol. Understanding how neighbors are discovered, how adjacencies are formed, and how they're maintained is crucial for OSPF operations.
Neighbor Discovery Process
Hello Protocol
OSPF uses Hello packets for neighbor discovery and maintenance. These packets:
- Discover neighbors on the network segment
- Establish bidirectional communication
- Maintain neighbor relationships
- Elect DR and BDR on multi-access networks
Neighbor State Machine
Detailed State Descriptions
State | Trigger | Description | Duration |
---|---|---|---|
Down | Initial state | No recent information received from neighbor | Until Hello received |
Init | Hello received | Hello received but router ID not in neighbor list | Until bidirectional |
2-Way | Bidirectional communication | Router sees itself in neighbor's Hello packet | Stable for DRother |
ExStart | Adjacency decision | Master/slave relationship established | Brief transition |
Exchange | DD negotiation complete | Database Description packets exchanged | Until DD complete |
Loading | LSRs sent | Link State Request/Update exchange | Until database synchronized |
Full | Database synchronized | Full adjacency established | Maintained with Hellos |