Redistributing BGP into OSPF

Unanswered Question
Jul 31st, 2007

We are multi-homing between two different providers on two seperate routers. We want to redistribute BGP routes into OSPF, we have done this and it works but the default route that we get from the carrier isn't going into OSPF. I have put in both the default-information originate command and the redistribute bgp **** command. Is there any trick to get it to inject the default route as well? We want to do this so that the layer behind it can intelligently select what default gateway to choose based on the circuit being up or down.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
mohammedmahmoud Tue, 07/31/2007 - 08:04


To have the default route redistributed into OSPF, you need the default-originate under OSPF.

Router(config-router)# default-information originate [always] [metric metric-value] [metric-type type-value] [route-map map-name]

When you use this command for the OSPF process, the default network must reside in the routing table, and you must satisfy the route-map map-name keyword and argument (if config). Use the default-information originate always route-map map-name form of the command when you do not want the dependency on the default network in the routing table (conditional).

Whenever you use the default-information router configuration command to redistribute routes into an OSPF routing domain, the Cisco IOS software automatically becomes an Autonomous System Boundary Router (ASBR). However, an ASBR does not, by default, generate a default route into the OSPF routing domain. The software still must have a default route for itself before it generates one, except when you have specified the always keyword.

If there is further any problems please post your config and the appropriate show commands.


Mohammed Mahmoud.

rraver Tue, 07/31/2007 - 09:04

*******************BGP ROUTER***************

show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 0 5650 7385 i

*> 0 5650 7385 26662 i

*> 0 5650 7385 26662 i

*> 0 5650 7385 26662 i

ospf config

router ospf 10


redistribute bgp 36400 metric 200

network area 0

default-information originate metric 300


fw-dl-asaprim# show route | inc

show route | inc

Gateway of last resort is to network

S* [1/0] via, outside

router ospf 10

network area 0


show route

O E2 [110/1] via, 1:49:05, outside

O E2 [110/200] via, 1:41:52, outside

O E2 [110/1] via, 1:49:05, outside

O E2 [110/200] via, 1:41:52, outside

rraver Tue, 07/31/2007 - 09:06

I posted some of the cofnig and show commands into it. The only thing I can think of is because I have a static default on the firewall it won't accept it, but I can't remove it because it is live to see. I don't think it's that becasue the default doesn't show up as being propegated to the firewall through OSPF. I have two routers with the same config, code, and general BGP config and it's not working.

rraver Tue, 07/31/2007 - 09:11

Looking at the ospf database on the firewall I see this ...

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag 1104 0x80000009 0xdfd5 10 1038 0x80000004 0xc9c1 10

Does OSPF ignore default routes if it sees a static default in the ASA firewall?

Harold Ritter Tue, 07/31/2007 - 09:19

Absolutely. The static route is installed in the routing table as its administrative distance is lower than the one of the OSPF route.

Hope this helps,

mohammedmahmoud Tue, 07/31/2007 - 09:27

Hi Robert,

As Harold has pointed out, yes the static default route (AD=1) is better than the OSPF default route (AD=110), and that's why the OSPF default route is not inserted into the routing table, other wise all your other configuration is right with no problems.


Mohammed Mahmoud.

rraver Tue, 07/31/2007 - 09:34

ah, I knew the static would take priority I just thought it would list the other ones as a higher value but still display in the routing table. Thanks for looking at this.

mohammedmahmoud Tue, 07/31/2007 - 09:43


You are very welcomed, checking the OSPF database is always a nice move after doing your configuration, to make sure of the effect of what you did.


Mohammed Mahmoud.


This Discussion