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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Default Route from BGP into OSPF?

Hello,

We have two seperate 7206VXR routers with two seperate links to our upstream provider. We then run OSPF internally to connect our other routers, switches, etc. The provider sends us a default route via BGP.

Currently, we are generating a default route in our OSPF network with the "default-information originate" command. Unfortunately, when the BGP link on our main border router (let's call it "BorderRtrA") dies, the router will continue to advertise the default route in OSPF. The outcome is that the incoming traffic will come in our other border router ("BorderRtrB"), but outbound traffic still tries to go out through BorderRouterB.

How do I get OSPF to track the state of the BGP links, and change the default route to the other router when the link dies?

Thanks.

8 REPLIES
Cisco Employee

Re: Default Route from BGP into OSPF?

I don't completely understand why BorderRtrA still originates the default into OSPF if the link to the ISP on this box dies. Are you using the always keyword on the command "default-information originate" or are you running iBGP between the two border routers? If so, why?

The two border routers could operate independantly from a BGP standpoint and each inject the default route into OSPF if they receive it from eBGP.

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
Gold

Re: Default Route from BGP into OSPF?

It should work it will depend on how you made it select rtr a in the first place.

If the 2 boarder routers both have default routes from your ISP and you have default-information originate on both routers but with different metrics then OSPF should work correctly since it will stop sending out the default route when it looses the BGP route. This will allow the router with the lower metric ospf route to take over.

I suspect you have IBGP running between the routers.

When router A loses his direct route to the ISP he will now learn it via IBGP form router b. He puts this default route in his routing table and now OSPF thinks he can advertise it even though the nexthop is not directly connected to him.

This may work if router A can get to router b outside interface via OSPF. Not real effecient but it may work. If it can't then the taffic will loop or get dropped.

New Member

Re: Default Route from BGP into OSPF?

Actually, we don't have iBGP between the two upstream routers. Sounds like I need to add this right away to get the outbound to fail over correctly, correct?

Gold

Re: Default Route from BGP into OSPF?

No ibgp causes this issue.

Your ourbound traffic should work using the default information orginate. I assume these are normal OSPF areas Stub and NSSA areas are special when it comes to default route.

You need to go into the router when you think it does not have a route to the ISP and do a show IP route and see where it is getting the default route from.

Unless you have a bug in the IOS the router will not generate a OSPF default route unless there is already a default route in the routing table.

New Member

Re: Default Route from BGP into OSPF?

Thank you! I'll work on getting iBGP in place and see how it performs.

Cisco Employee

Re: Default Route from BGP into OSPF?

Tom,

As Tim pointed out, you don't want to run iBGP between the two border routers in this scenario. You should rather check where the default route is learnt from on BorderRtrA when it looses its Internet conectivity. "default-information originate" shouldn't continue to inject the default route into OSPF unless there is a default route present in the RIB from a source other than OSPF and the keyword always is not configured.

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
New Member

Re: Default Route from BGP into OSPF?

I am a bit confused with the process. Following a scenario from Halabi, I setup OSPF and BGP in a similar situation. I have two border routers both receiving a default route via bgp from different providers. I have these two border routers running iBGP with each other. Both router use a conditional default-originate command under OSPF. The backup router is setup to use local preference to choose to accept the default from the primary router via iBGP as opposed to using the default learned through eBGP.

This works partially. When the iBGP neighbor relationship breaks, the backup router starts advertising the default and all is well. The problem starts when the primary comes back and re-establishes the neighbor. When this happens, the backup router does not stop advertising the default route even though a look at his routing table shows that he is learning a default via iBGP. This is very bad because all the traffic traversing the nearest downstream router learns this router and forwards traffic to this router which in turn forward it back causing a continous loop. I am not sure exactly how to fix this. Can someone help?

New Member

Re: Default Route from BGP into OSPF?

Here are the most relevant details,

The only thing that I just noticed is that I did not have a full iBGP mesh with the backup. Fixed that just now, but can't test for a while.

primary rtr backup rtr

| |

| |

rtr --------------------------rtr

Primary outbound router

default-information originate route-map SEND_DEFAULT_IF

neighbor 172.16.255.9 update-source Loopback0

neighbor 172.16.255.9 next-hop-self

access-list 11 permit 0.0.0.0

access-list 12 permit 157.130.xxx.xxx

route-map SEND_DEFAULT_IF permit 10

match ip address 11

match ip next-hop 12

_________________________________________________________________________

Backup outbound router

default-information originate route-map SEND_DEFAULT_IF

neighbor 172.16.255.1 update-source Loopback0

neighbor 172.16.255.1 next-hop-self

neighbor 172.16.255.1 route-map setlocalpref in

route-map setlocalpref permit 10

set local-preference 300

access-list 1 permit 0.0.0.0

access-list 2 permit 12.117.xxx.xxx

route-map SEND_DEFAULT_IF permit 10

match ip address 1

match ip next-hop 2

206
Views
5
Helpful
8
Replies
CreatePlease login to create content