How To Configure OSPF Default Route
How To Configure OSPF Default Route
R1(config)#router ospf 1
R1(config-router)#default-information originate ?
always Always advertise default route
metric OSPF default metric
metric-type OSPF metric type for default routes
route-map Route-map reference
Lessons
<cr>
There are a number of things. We can change the metric or metric type,
but the most important thing most people forget is the always
keyword.
If you use the default-information originate command, you can
advertise a default route in OSPF. OSPF won’t advertise a default route
if you don’t already have it in your routing table. If you add the
always keyword, it will advertise the default route even if you don’t
have it in the routing table. Once you have advertised the default route,
it will look like this on other routers:
Configurations
Want to take a look for yourself? Here you will find the final
configuration of each device.
R1
hostname R1
!
Lessons
interface FastEthernet0/1
ip address 192.168.12.1 255.255.255.0
!
router ospf 1
network 192.168.12.0
default-information originate always
!
end
R2
hostname R2
!
interface FastEthernet0/1
ip address 192.168.12.2 255.255.255.0
!
router ospf 1
network 192.168.12.0
!
end
« Previous Lesson
OSPF LSA Types Explained
Next Lesson
OSPF Summarization
Configuration
»
Tags: Default Route
Forum Replies
bharath628
Lessons
BR,Srini
ReneMolenaar
A good example would be a small network where one router has an Internet
connection. You can advertise the default route to all routers in the network.
hamoodrehman87
Rene,
Great lesson I have a question in my lab I have 3 routers
R1---- 192.168 1.0---- R2
R2-----192.168.2.0 ----R3
I am advertising default route on R2 but I can not ping 192.168.2.3 from R1.
R1 can see a default route O*E2 0.0.0.0/0 [110/1] via 192.168.1.2, 00:08:46,
FastEthernet0/0.
Hamood
ReneMolenaar
Hi Hamood,
R1 knows the default route so we can assume that the packet makes it from
R1 to R2. Since 192.168.2.0 is directly connected to R2, it knows how to reach
R3 (192.168.2.3). What about the return traffic?
Does R3 also have the default route in its routing table or is there anything
preventing it from responding to R1?
Lessons
Rene
palanimuthukar
Hi Rene
I have a couple of questions. Why this is sent as a Type 5 LSA even when the
R1 and R2 routers are in same area. I guess since this is a Type 5 LSA it shows
as an O*E2 ( External with Metric 2, so the actual cost of R1 to R2)
Thanks
Palani
Lessons