Sub topic 3
Route Types and Path Preference
Assume IPv4 addressing, subnet masks, routing tables, and basic OSPF concepts. OSPF chooses routes in this order:
| Route type | Source | Typical preference |
|---|---|---|
| Intra-area | Same area | Highest |
| Inter-area | Another OSPF area | Next |
| External E1/E2 | Redistributed from another system | Lowest |
An E1 route adds the internal OSPF cost to the external cost. An E2 route usually compares only the external cost.
Configure and Verify a Small Network
This Cisco IOS-style example enables OSPF, sets a stable router ID, makes a LAN passive, and tunes one interface cost.
router ospf 1
router-id 1.1.1.1
passive-interface GigabitEthernet0/2
!
interface GigabitEthernet0/0
ip address 10.0.12.1 255.255.255.252
ip ospf 1 area 0
!
interface GigabitEthernet0/2
ip address 192.168.1.1 255.255.255.0
ip ospf 1 area 0Check operation with:
show ip ospf neighbor
show ip ospf interface brief
show ip ospf database
show ip route ospfTroubleshoot Stuck Adjacencies
A neighbor stuck in Down, Init, or ExStart often indicates:
- An interface is down or the link is misaddressed.
- Area IDs, hello timers, or dead timers differ.
- Authentication settings do not match.
- The subnet mask or OSPF network type differs.
- MTU values prevent database exchange.
Compare both routers’ interface details and logs. Confirm that each router sees the other router’s Hello packets.
Passive Interfaces and Authentication
A passive interface advertises its connected network but sends no Hellos. Use it for user-facing LANs. Apply authentication only when both neighbors use matching credentials and authentication types.
Special Areas and Summarization
Stub areas block selected external LSAs and use a default route. Totally stubby areas also suppress most inter-area routes. NSSA permits limited external redistribution through a Type 7 LSA.
An ABR can summarize routes between areas. An ASBR can summarize redistributed external routes. Summarization reduces LSDB size and limits route changes, but an incorrect summary can send traffic toward a nonexistent destination.
OSPFv3 for IPv6
OSPFv3 uses IPv6 link-local addresses for neighbor communication and runs per link. IPv6 addresses are configured separately from the OSPF process. The area model and SPF behavior remain familiar, but address-family and authentication commands vary by platform.
Exercise
A route to the same prefix is available as intra-area and external E2. Which route does OSPF prefer?
Show answer
The intra-area route, because OSPF prefers internal routes before external routes.