11-21-2022 07:58 AM
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
11-21-2022 08:11 AM
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.
11-21-2022 08:31 AM
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).
11-21-2022 08:48 AM
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.
11-21-2022 08:11 AM - edited 11-21-2022 08:16 AM
can you share the config of prefix-list and as-path
11-21-2022 08:36 AM
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
11-21-2022 08:52 AM
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.
11-21-2022 10:26 AM
Hi @Louey ,
You definitely need to change the route-policy condition from "source" to "destination".
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide