Routing
Highlighted
Routing

OSPF to BGP redistribution route-filter [

‎07-12-2019 01:59 AM

I have a defualt route coming into ospf from BGP but then ospf needs to redistribute all routes to BGP to go out to internet.     

All ospf routess are in routing table of router but for some reason its not been advertised to BGP.

 

show configuration | display set | match injectpolicy1
set protocols bgp group ISP export injectpolicy1
set policy-options policy-statement injectpolicy1 term injectterm1 from protocol ospf
set policy-options policy-statement injectpolicy1 term injectterm1 then accept

 

show configuration protocols bgp
group ISP{
type external;
family inet {
unicast;
}
export [ connected-static injectpolicy1 ];
peer-as *****;
local-as 65500;
neighbor 172.31.255.1;
}

 

 

None of the ospf routes are showing up in BGP table. 

 

 

4 REPLIES 4
Routing

Re: OSPF to BGP redistribution route-filter [

‎07-12-2019 02:10 AM
I see that the first policy that will be evaluated would be “connected-static” . Once it has evaluated then it will go to the next policy injectpolicy1.

So if you have a term in connected-static that rejects the ospf route then the evaluation will not go to the next policy injectpolicy1.



show configuration protocols bgp
group ISP{
type external;
family inet {
unicast;
}
export [ connected-static injectpolicy1 ];
peer-as *****;
local-as 65500;
neighbor 172.31.255.1;
}




Regards,
Jibu
Routing

Re: OSPF to BGP redistribution route-filter [

‎07-12-2019 02:10 AM

Hi Simon,

 

may be the policy connected-static has a term blocking the routes. also check show route advertising-protocol bgp 172.31.255.1 to see if advertised to the peer or not.

================

If this solves your problem, please mark this post as "Accepted Solution."If this solves your problem, please mark this post as "Accepted Solution."

Regards,
A.A.
Routing

Re: OSPF to BGP redistribution route-filter [

‎07-12-2019 02:19 AM

Yes that has fixed the issue. Smiley Happy

 

don't you think i am learning default from BGP and advertising ospf back to BGP will default route not get advertised too ?

Will it cause any issues. ?

Routing
Solution
Accepted by topic author simon.widdup@gmail.com
‎07-12-2019 02:53 AM

Re: OSPF to BGP redistribution route-filter [

‎07-12-2019 02:24 AM

Hi Simon,

 

if you are doing mutual distribution on the same router you need to consider router preference for different protocols as when you distribute the route from BGP pref = 170 to OSPF you will have OSPF external route pref = 150 so BGP route will not active as there is more preferable route in the table.

 

https://www.juniper.net/documentation/en_US/junos/topics/reference/general/routing-protocols-default...

 

=====================

 

If this solves your problem, please mark this post as "Accepted Solution."If this solves your problem, please mark this post as "Accepted Solution."

Regards,
A.A.