Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Redistributing BGP into OSPF

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.

8 REPLIES

Re: Redistributing BGP into OSPF

hi,

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.

HTH,

Mohammed Mahmoud.

Community Member

Re: Redistributing BGP into OSPF

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

show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 0.0.0.0 216.190.37.49 0 5650 7385 i

*> 13.8.0.0/17 216.190.37.49 0 5650 7385 26662 i

*> 13.8.0.0/16 216.190.37.49 0 5650 7385 26662 i

*> 13.9.0.0/16 216.190.37.49 0 5650 7385 26662 i

ospf config

router ospf 10

log-adjacency-changes

redistribute bgp 36400 metric 200

network 172.16.2.0 0.0.0.255 area 0

default-information originate metric 300

**************FIREWALL********************

fw-dl-asaprim# show route | inc 0.0.0.0

show route | inc 0.0.0.0

Gateway of last resort is 172.16.2.1 to network 0.0.0.0

S* 0.0.0.0 0.0.0.0 [1/0] via 172.16.2.1, outside

router ospf 10

network 172.16.2.0 255.255.255.0 area 0

log-adj-changes

show route

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

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

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

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

Community Member

Re: Redistributing BGP into OSPF

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.

Community Member

Re: Redistributing BGP into OSPF

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

0.0.0.0 172.16.2.1 1104 0x80000009 0xdfd5 10

0.0.0.0 216.190.37.50 1038 0x80000004 0xc9c1 10

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

Cisco Employee

Re: Redistributing BGP into OSPF

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,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Re: Redistributing BGP into OSPF

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.

HTH,

Mohammed Mahmoud.

Community Member

Re: Redistributing BGP into OSPF

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.

Re: Redistributing BGP into OSPF

Robert,

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.

HTH,

Mohammed Mahmoud.

496
Views
5
Helpful
8
Replies
CreatePlease to create content