cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3036
Views
5
Helpful
28
Replies

ospf type 5 prefix and bgp

anastasiou82
Level 1
Level 1

Hi everyone.

The last days i have been struggling with the following case:

Lets assume that we have two directly connected routers R1 ----> R2 . Among them there is  eBGP Peering. R2 advertises some prefixes to R1 through BGP. Moreover on R1 i have configured some static routes as well as i have

redistributed 

those routes into ospf

(redistribute static)

on R1.  When the eBGP Peering is down, i am able to see the

redistributed

static routes as ospf type 5 (

show ip ospf

database summary). But, in case where eBGP peering is up, ospf type 5 routes are removed from ospf database.

Could someone explain me why this happens ?

Thanks a lot,

Nikos

 

 

 

1 Accepted Solution

Accepted Solutions

Hi,

the reason is

redistribution

happens through routing table. If there is no route in routing table with

redistributing

protocol, then it can not be

redistributed

to another protocol.

In your case, you have static, ospf and BGP. You learn the same routes from BGP and static. When BGP is UP, routes installed to routing table as BGP route. Since you don't have BGP>OSPF

redistribution

you don't see any external

(redistributed)

route in OSPF (type5).

When BGP is down, BGP routes are gone from routing table and now for prefixes static routes are installed. You have

STATIC> OSPF

thus rotues are

redistributed

and you see type5 LSA for external prefixes.

HTH,
Please rate and mark as an accepted solution if you have found any of the information provided useful.

View solution in original post

28 Replies 28

That not complete story R must ibgp with other router which make this issue 

anastasiou82
Level 1
Level 1

The static routes and the routes which are advertised over eBGP are the same.  

Hi

 Do you have

redistribute

static on BGP  ?

Hi,

Yes on R1. Essentially the static routes on R1 are advertised over eBGP from R2

This can be due the protocol preference as router selects the route with the highest preference. eBGP preference is 255 while OSPF is 10.

when the BGP is down the OSPF routes is installed but when eBGP come up , it has the preference

Jul 1 16:33:18.246: RIB Redist, Topo Base, dest x.x.x.x, mask 255.255.224.0, Down

what was that sorry?

The message i get (

show ip ospf 

events) when the eBGP peering goes up

Run this command with and without the BGP:

 

show ip ospf X  rib redistribution x.x.x.x

 

FlavioMiranda_0-1688231009656.png

 

I will check it. Thanks al lot Flavio

You´re welcome.

 But, it seems it is related to protocol preference. 

can I see config of R1
R1-R2 
both have eBGP and in same time there is OSPF between two routers ?
If Yes then eBGP have AD=20 and it prefer than OSPF=110 

no, R1-R2 have only eBGP peering.  R1 has ospf peering with other router. 

OK your static route have AD upper than 20 ?

show me config and show me show ip bgp and show ip route