Routing
Reply
Contributor
lanzailan
Posts: 50
Registered: ‎12-12-2009
0

How to make BGP preferred than static

Hi all,

 

I have MX10 with redundant links active-standy running BGP & gre tunnel to J2320 and to some other sites.

The other end I have J2320 also with backup standby  + gre tunnels running static and primary running BGP. 

I need to give priority to BGP and when BGP route down, it will automatically goes to static. 

I changed preference value at protocols BGP on J and MX - BGP preferred. When I simulate by shutting down the primary on J, the outbound traffics to MX is directed to backup which is through tunnels, but inbound traffics from MX is still preferred BGP.

I thought when BGP neighbour is down, the route will be removed since it;s now inactive.

 

Here's the captured result from show route;

 

MX10.

========

[edit]
lanzailan@DC_SYMPHONY# run show route 192.168.2.0

inet.0: 40 destinations, 71 routes (40 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.2.0/24 *[BGP/2] 00:00:00, localpref 200
     AS path: 9534 9534 I
> to 10.185.117.1 via ge-1/0/0.0
[BGP/2] 00:00:00, localpref 150
AS path: 9534 9534 I
> to 10.185.117.9 via ge-1/0/1.0
[Static/5] 00:00:31
> to 10.10.14.1 via gr-1/0/10.4
[Static/25] 00:00:30
> to 10.10.15.1 via gr-1/0/10.5

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

J2320

======


[edit]
lanzailan@JLN_KLANG_LAMA# run show route 192.168.21.0

inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.21.0/24 *[Static/5] 00:02:51

> to 10.10.14.2 via gr-0/0/0.4
[Static/25] 00:02:49
> to 10.10.15.2 via gr-0/0/0.5

 

 

 

Thanks.

 

 

Recognized Expert
mhariry
Posts: 340
Registered: ‎06-01-2011
0

Re: How to make BGP preferred than static

Hi,

 

Yes you are right when the BGP neighbor went down the route should be removed from the routing table.

 

I notice the route is received by two bgp next-hop (10.185.117.1 & 10.185.117.9) and two AS path. Probably you still receiving the bgp update from another neighbors is any of these neighbors the J2320 peer IP address ?

 

If not you could solve the problem by change the preference only for this neighbor not all

 

#set protocols bgp group <group name> neighbor <J2320 peer IP> preference 2

 

Regards,

 

Mohamed Elhariry

 

JNCIE-M/T # 1059, CCNP & CCIP

 

----------------------------------------------------------------------------------------------------------------------------------------

If this post was helpful, please mark this post as an "Accepted Solution".Kudos are always appreciated!

Regards,
Mohamed Elhariry
2* JNCIE (SEC # 159, SP # 1059),JNCIP-ENT

[Click the "Star" for Kudos if you think I earned it!
If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]
Contributor
lanzailan
Posts: 50
Registered: ‎12-12-2009
0

Re: How to make BGP preferred than static

Hi Mohamed,

 

It turned out that the problem happened because it still receiving update from protocol static that I advertise to BGP.

Problem solved when I removed that policy. 

Anyway, thanks for your help.

 

Ma'assalama...

 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.