cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3043
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

 

 

 

28 Replies 28

Yes,

Is upper than 20. 

then friend your make LOOP,

redistribute

static into eBGP -> AD will be 20 
and then

redistribute

static to OSPF, 
the OSPF see eBGP not static route and hence the lsa5 disappear
you can change static route AD (only one for test) and check OSPF LSA5 
or you can change the eBGP AD 
I prefer change AD of static 

The

redistribution

exist only into OSPF. Just changed the metric for that static route lower than 20 (eBGP AD) and the route remains on ospf database. Running

show ibgp

i see that this prefix has

r>

(rib failure). Thus the AD is the point i think. Is that setup correct or not ? 

Thanks for your time

there is iBGP or eBGP?

eBGP

Running

show ibgp

i see that this prefix has

r>

(rib failure)<<- this typo I think

show ip bgp

i mean. ok i will send you the config

show me the config of R1 and R2 
thanks 
MHM

You select solution same what I mention before' that OK 

But I need to see config' I need to know why

bgp show rib

failure.

If you can 

Thanks 

MHM

Hello


@anastasiou82 wrote:

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


So as I stated previously with BGP having a lower seed metric then ospf that's why you only see those

redistributed

static in ospf as a type 5 as/when the bgp peering is down


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello
Sounds like those static routes being

redistributed

into OSPF are also being advertised via BGP and with BGP having a lower seed metric then ospf that's why you only see those

redistributed

static in ospf as a type 5 as/when the bgp peering is down


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

"Sounds like those static routes being

redistributed

into OSPF are also being advertised via BGP "

Correct! 

 

 

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.

@anastasiou82  friend still waiting the config, I need to see why prefix learn from eBGP and static route, and config of OSPF. 
I need to know

next-hop

of static route and eBGP neighbor IP. 
thanks 
MHM