Default routes
Originate a conditional default and avoid advertising an exit that is not usable.
Understand
In a normal area, default-information originate advertises 0.0.0.0/0 as an external route when a default is present in the local routing table, unless policy changes the condition. The always keyword removes that presence requirement and can attract traffic to a router with no exit. A static default’s presence alone also does not prove upstream service health.
Stub ABRs originate a Type 3 default into the stub area; NSSA defaults use their own rules. These are different mechanisms from a Type 5 default in a normal area. Use tracking or carefully designed policy when real upstream health must control advertisement.
Lab setup
Use a fresh lab for this lesson; changes from other lessons are not cumulative. All outputs are illustrative excerpts, not recorded router tests. Transit cost is explicitly 10 and Loopback0 cost is 1. Interface names may vary by image.
| Router | Interface | IPv4 address | Area |
|---|---|---|---|
| R1 | Gi1 | 192.0.2.1/30 | 0 |
| R2 | Gi1 | 192.0.2.2/30 | 0 |
Loopback0 is 10.255.0.<router number>/32; area assignments: R1: area 0, R2: area 0.
Complete baseline configurations
R1
configure terminal
hostname R1
router ospf 1
router-id 10.255.0.1
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.1 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endR2
configure terminal
hostname R2
router ospf 1
router-id 10.255.0.2
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.2 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endApply
R1 is the simulated exit. The Null0 default below is deliberately a discard-only laboratory stand-in, not Internet connectivity. It allows observing origination and withdrawal without a provider. Do not expect external pings to succeed.
R1
configure terminal
ip route 0.0.0.0 0.0.0.0 Null0
router ospf 1
default-information originate metric 10 metric-type 1
endVerify and interpret
R2# show ip route ospf | include 0.0.0.0
O*E1 0.0.0.0/0 [110/20] via 192.0.2.1, GigabitEthernet1
R2# show ip ospf database external 0.0.0.0
Advertising Router: 10.255.0.1
Network Mask: /0
Metric Type: 1
Metric: 10R2 adds its internal cost 10 to the external seed 10. The route is a candidate default, but the lab exit discards traffic.
R1 · withdraw exit condition
configure terminal
no ip route 0.0.0.0 0.0.0.0 Null0
endR2# show ip route 0.0.0.0
% Network not in tableWithout always and without another eligible default at R1, origination stops after convergence.
R1 · restore
configure terminal
ip route 0.0.0.0 0.0.0.0 Null0
endVerify the external default returns. A real deployment would replace Null0 with a valid, monitored upstream next hop and validate forwarding. Never use always as a generic repair for an absent default.
Technical references
Key Takeaways
- Normal-area default origination is an external advertisement.
- Without always, a local default is normally required.
- Route presence and upstream service health are different.
- Stub and NSSA defaults follow different mechanisms.
- A discard-only lab default proves advertisement, not Internet access.