cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
751
Views
0
Helpful
6
Replies

BGP and OSPF route issue

andrew_ho
Level 1
Level 1

Hi,

My router has an existing OSPF route of:

O E2    10.183.161.64/27 [110/1000] via 168.217.1.251, 00:03:12, Vlan101

When it learns the same route from BGP, I would expect OSPF route to be replaced by the BGP route. However, this doesn't happen. The route exists in the BGP routing table but not flagged as the best route and hence not replacing the OSPF route.

* 10.183.161.64/27 10.188.63.1           5171             0 64513 ?

If I manually remove the OSPF route, I will eventually get:

B       10.183.161.64/27 [20/5171] via 10.188.63.1, 00:05:36

And when I manually put the OSPF route back, the BGP route will stay, but OSPF route will appear in the OSPF database.

10.183.161.64   10.183.1.2      186         0x80000001 0x00D9A5 0

Can someone explain to me why? And how can I fix this?

Thanks,


Andrew

6 Replies 6

CSCO11508096
Level 1
Level 1

Hi,

When you put both bgp and ospf route in your configuration, what is showing in your FIB table....????

just thinking it loud. How is the next-hop 10.188.63.1  learnt here? BGP is not installing 10.183.161.64/27

as the best route as it looks like the next-hop is not reachable. Once you remove the ospf the next hope becomes reachable and BGP installs in the routing table. Once it installs in the routing table and ospf comes to replace it then the AD wins and ospf route doesnt get placed in the RIB . However it doesnt explain why it would loose the prefix in the ospf database..ummm

milan.kulik
Level 10
Level 10

Hi,

aren't you also redistributing OSPF to BGP?

I could imagine a scenario which would explain your routing behaviour then.

HTH,

Milan

Hi Milan,

Yes, OSFP is also redistributed to BGP. However, this route should have been filtered out by a route-map. The idea is to have the route learnt from a different AS. But there is also a floating static on the local AS (ISDN headend router) which redistributes it into the OSPF. Does it fit your scenario?

Thanks,


Andrew Ho

Hi,

it's difficult to say.

I'd need to know more details.

Without a diagram of all routers involved, redistribution route-maps, next-hops, sh ip route and sh ip bgp x.x.x.x for the problematic subnets I'm lost here.

I can only say a general opinion:

When redistributing between OSPF and BGP mutually, it's often necessary to think which prefix comes first.

When redistributed from OSFP to BGP, the BGP prefix gets the weight attibute value 32768 by default.

And when the same prefix is received from BGP later on, the higher weight value of the redistributed prefix wins and the new prefix received from BGP is not considered to be the best one (as you might expect).

HTH,

Milan

Hi

I agree with Kishore, in most cases the BGP learned prefixes don't install in routing-table because of problems with next-hop reachability, you should just have a look how the ip 10.188.63.1 is reached in both cases - with and without OSPF.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card