01-16-2024 05:15 AM
Hello There,
I have a Cisco Catalyst 8500 Router. I run BGP on this router. I have a neighborship with my datacenter and i get the full route from they.
I Want to replace the as-path to some networks/as paths by regex/static.
How can i do that?
What i want;
In my route table when i want to go 1.0.128.0/24 i must use the 0 42xxx 6939 4651 23969
*> 1.0.128.0/24 77.92.xxx.xx 200 0 42xxx 6939 4651 23969
But i want to use this path for going to 1.0.128.0/24 0 42xxx 159xx
Can i do that?
When i tried the prepend it does 42xxx 159xx 42xxx 6939 4651 23969
This is my bgp configuration;
this is my bgp configuration;
router bgp xxxx
bgp log-neighbor-changes
neighbor 77.92.xxx.xx remote-as 42xxx
neighbor 77.92.xxx.xx log-neighbor-changes
neighbor 77.92.xxx.xx ebgp-multihop 255
neighbor 77.92.xxx.xx transport connection-mode active
neighbor 77.92.xxx.xx update-source TenGigabitEthernet0/1/0
!
address-family ipv4
network 77.92.xxx.xx mask 255.255.255.224
neighbor 77.92.xxx.xx activate
neighbor 77.92.xxx.xx soft-reconfiguration inbound
neighbor 77.92.xxx.xx route-map PDC_IN in
neighbor 77.92.xxx.xx route-map PDC_OUT out
exit-address-family
route-map PDC_IN permit 10
set local-preference 200
!
route-map PDC_OUT permit 10
match ip address prefix-list announces
01-16-2024 05:26 AM - edited 01-16-2024 06:10 AM
Hello @hopak
You want replace all AS-PATH in inbound ?
01-16-2024 05:46 AM
When i do it i will check from show ip bgp x.x.x.x
it shows me those path 42xxx 159xx 42xxx 6939 4651 23969
I apply this policy to in may i use this to out policy?
I want to specify also inbound and outbound as-path for some ip/asns
01-16-2024 06:10 AM - edited 01-16-2024 06:13 AM
Modify full path is impossible. You could delete private ASN, replace-as with your ASN, prepend the AS-PATH in order to influence ingress flow.
01-16-2024 06:18 AM - edited 01-16-2024 06:54 AM
I think You can try
Use route-map
And set as-path replace
Note:- please note that even if this work you maybe see routing loop since you change attribute bgp use to detect loop.
Thanks
MHM
01-16-2024 06:53 AM
Hello @hopak ,
you can use local preference in a route-map to prefer a path over another
By the way you likely have a local preference set to 200 on the current best path
*> 1.0.128.0/24 77.92.xxx.xx 200 0 42xxx 6939 4651 23969
But i want to use this path for going to 1.0.128.0/24 0 42xxx 159xx
The route-map has to be applied inbound on the neighbor that you want to increase the local preference using prefix-lists you can do this in a selective way.
Hope to help
Giuseppe
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