Routing
Reply
Contributor
GustavO
Posts: 72
Registered: ‎04-29-2009
0
Accepted Solution

local-preference under protocols bgp group not modifying received-prefixes

Hi!

 

I currently have to almost identical bgp groups but for various reasons I would like to have a higher localpref on routes received from one group than the other.

I want to use the same import policy on the groups so for that reason I would like to set the local-preference outside of this. When i set localpref via policy-statement, I can see from show route x.x.x.x/y all that it's set according to the rule in the policy-statement. However, when I remove the term setting the local-preference from the policy-statement and include it on the group-level instead, it's not set, show route x.x.x.x/y all shows it's just set to default. When set on group-level, show bgp neighbor shows the correct Localpref. Am I missing something here? This is on a mx80 running 10.4R3.4.

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

Re: local-preference under protocols bgp group not modifying received-prefixes

Dear

 

Just to make sure you have to apply it in the group level at the sender (the router export the network x.x.x.x/y). Please confirm

 

Thanks,

Mohamed Elhariry

JNCIE-M/T#1059, CCNP & CCIP

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
GustavO
Posts: 72
Registered: ‎04-29-2009
0

Re: local-preference under protocols bgp group not modifying received-prefixes

Hi Mohamed,

 

This is the relevant configuration:

gustav@sto1-ro01> show configuration protocols bgp group xxx-route-servers 
type external;
description "xxx Route Servers";
local-preference 110;
local-address y.y.y.y;
export bgp-peer-export-xxx-rs;
neighbor y.y.y.x {
    description "xxx RS#1";
    peer-as xyz;
}
neighbor y.y.y.z {
    description "xxx RS#2";
    peer-as xyz;
}

 Thanks!

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

Re: local-preference under protocols bgp group not modifying received-prefixes

Hi,

 

Kindly check this link

 

http://www.juniper.net/techpubs/software/junos/junos94/swconfig-routing/configuring-the-bgp-local-pr...

 

The LOCAL_PREF path attribute is always advertised to internal BGP peers and to neighboring confederations. It is never advertised to external BGP peers.

 

When using policy and apply it as import policy, it will work as you do action modification and modified the LP attribute from 100 to another value and re-advertise it to your internal neighbor.

 

Thanks,

Mohamed Elhariry

JNCIE-M/T#1059, CCNP & CCIP

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
GustavO
Posts: 72
Registered: ‎04-29-2009
0

Re: local-preference under protocols bgp group not modifying received-prefixes

Thanks Mohamed, that explains it.

 

I expected local pref to be changed for imports but see now that it's only applied to exports when used in this way.

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