cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
915
Views
10
Helpful
7
Replies

Prefer a BGP destination for a specific source networks ASR9001 XR

Louey
Level 1
Level 1

Hi guys

We have a BGP connection and we want it to be the prefered exit for two /28 specific source networks.

The used equipment is a Cisco ASR9001 XR OS. I have found some commands but I am not sure this works.

****************************************************************

route-policy best-exit-for-networks

if source in prefix-list-networks and as-path in AS-destination-list then

set local-preference 110

else

set local-preference 90

endif

end-policy

*******************************************************************

The "source" command is defined as this :

source -> Advertising source address of route

So I think that the policy is wrong because source command define the advertising router of a route.

Do you have any idea how could we achieve this please ?

Regards

 

7 Replies 7

Richard Burts
Hall of Fame
Hall of Fame

We do not know anything about your environment and that makes it difficult to give good advice. When you say you want something to be the preferred exit that implies that there is more than one exit. Is that the case here? 

I am not clear about this statement "we want it to be the prefered exit for two /28 specific source networks" Are the two networks the source address in the outbound packet or are they the destination address in the outbound packet? If the networks are the destination address then setting Local Preference would be an appropriate approach, and if the networks are the source address then I would expect to use something like Policy Based Routing.

HTH

Rick

Thanks Richard.

We are a service provier, so we do have multiple BGP exit and same routes from several transit.

I am talking about source address in the outboud packet (two prefixes need to go out from that transit so they can be accepted).

 

Thanks for clarifying that there are multiple exit paths. If you are talking about source address in the outbound packet then I do not believe that modifying Local Preference will be the solution. Local Preference affects forwarding decisions based on destination address. I believe that you need something like PBR which can make forwarding decisions based on source address.

HTH

Rick

can you share the config of prefix-list and as-path 

yes.

prefix-set prefix-list-networks
  x.x.x.x/28
y.y.y.y/28 end-set
as-path-set AS-destination-list
  originates-from 'ASn'
  
end-set
 

 

as I guess, 
you have many neighbor and you want specific neighbor which get prefix from specific AS will have LP so you use 

Update from Neighbor have prefix with as-path originate-from AS-X
the source will filter the neighbor from where this update come 
the prefix will then filter by as-path that have path originate from AS-X 

so according to your require I dont think this is wrong. 

Harold Ritter
Level 12
Level 12

Hi @Louey ,

You definitely need to change the route-policy condition from "source" to "destination".

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking for a $25 gift card