default-information originate
Instructs an OSPF router to inject a default route (0.0.0.0/0) into the OSPF domain. This transforms the router into an Autonomous System Boundary Router (ASBR), acting as the ultimate "Gateway of Last Resort" for the entire enterprise network pointing toward the Internet.
Quick Reference
Router(config-router)#(External)no default-information originateSyntax & Mechanisms
Under normal circumstances, OSPF strictly refuses to advertise the 0.0.0.0 route using a standard network statement. You must use this specific command to distribute the internet gateway.
- Standard Execution: When executed by itself, the router will check its own routing table. If and only if it has a valid static default route installed, it will generate the OSPF advertisement to share it.
- [always] Keyword: Forces the router to advertise a default route to the OSPF domain even if it doesn't currently have a default route in its own table. This is useful if the primary internet link flaps frequently and you want to prevent OSPF convergence storms across the entire enterprise.
CLI Deployment Scenarios
Scenario 1: Securing the Enterprise Edge
You are configuring the primary internet-facing router (R1). First, you set a static route pointing to the ISP. Then, you tell OSPF to flood that route downstream to the core and access switches.
Scenario 2: The "Always" Override
You are running a simulated CCNA lab or have a dynamic ISP link that occasionally goes down. You want this router to remain the permanent default gateway for the network regardless of its upstream connection state.
CCNA Exam Gotchas
The Prerequisite Failure
The most common troubleshooting ticket on the CCNA regarding this command is: "An engineer entered `default-information originate`, but the downstream routers are not receiving the route. Why?"
The Answer: Because the engineer forgot to configure the static ip route 0.0.0.0 0.0.0.0 pointing to the ISP on the edge router first. Without the always keyword, OSPF will not advertise what it doesn't have in its own routing table.
E1 vs. E2 Metric Types
When downstream routers receive this injected route, it will show up in their routing table as O*E2 (OSPF External Type 2).
• Type 2 (Default): The metric cost stays exactly the same (usually 1 or 20) no matter how far away the router is from the edge.
• Type 1: The cost increments dynamically as the packet hops from router to router.