It is currently Tue Feb 07, 2012 5:43 pm


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Ospf configuration question!
PostPosted: Wed Mar 24, 2010 11:12 pm 
Hi,
During the configuration of ospf, can we configure a default route which directs traffic out through a particular loopback or interface (say loop0). This default route will eventually be advertised throughout the entire network topology.
If so how?
Thanks






Top
  
 
 Post subject: Re: Ospf configuration question!
PostPosted: Thu Mar 25, 2010 12:33 am 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 509
Location: Australia
I thought this would be easy:
Code:
router ospf 1
redistribute static
network 0.0.0.0 255.255.255.255 area 0

ip route 0.0.0.0 0.0.0.0 Loopback0

But luckily I tested it before I posted ;)

OSPF doesn't redistribute the default route in this case. I haven't worked out why, but I have a work-around. Here's the work-around - I hope someone else comes up with a better solution - I'll be watching.
Code:
hostname R1
router ospf 1
redistribute static
network 0.0.0.0 255.255.255.255 area 0

!Dummy route to all Class A addresses
ip route 0.0.0.0 128.0.0.0 Loopback0
!Dummy route to all Class B, C, D... addresses
ip route 128.0.0.0 128.0.0.0 Loopback0

Proof on R2
Code:
R2#show ip route
!output ommitted
O E2 0.0.0.0/1 [110/20] via 10.1.2.1, 00:24:42, FastEthernet0/0
O E2 128.0.0.0/1 [110/20] via 10.1.2.1, 00:24:19, FastEthernet0/0

_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
 Post subject: Re: Ospf configuration question!
PostPosted: Fri Mar 26, 2010 1:47 am 
rednectar wrote:
I thought this would be easy:
Code:
router ospf 1
redistribute static
network 0.0.0.0 255.255.255.255 area 0

ip route 0.0.0.0 0.0.0.0 Loopback0

But luckily I tested it before I posted ;)

OSPF doesn't redistribute the default route in this case. I haven't worked out why, but I have a work-around. Here's the work-around - I hope someone else comes up with a better solution - I'll be watching.
Code:
hostname R1
router ospf 1
redistribute static
network 0.0.0.0 255.255.255.255 area 0

!Dummy route to all Class A addresses
ip route 0.0.0.0 128.0.0.0 Loopback0
!Dummy route to all Class B, C, D... addresses
ip route 128.0.0.0 128.0.0.0 Loopback0

Proof on R2
Code:
R2#show ip route
!output ommitted
O E2 0.0.0.0/1 [110/20] via 10.1.2.1, 00:24:42, FastEthernet0/0
O E2 128.0.0.0/1 [110/20] via 10.1.2.1, 00:24:19, FastEthernet0/0


Makes Sense!
Thanks RedNectar!


Top
  
 
 Post subject: Re: Ospf configuration question!
PostPosted: Sun Apr 04, 2010 9:42 pm 
To redistribute a default route with OSPF you need to use "default-information originate" into ospf statement.

This command will generate a default route for others routers into OSPF cloud. On the default gateway, you put a static route like "ip route 0.0.0.0 0.0.0.0 lo 0"

Regards,

Lionel






Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO