05-30-2018 09:19 AM - edited 03-05-2019 10:31 AM
Hi,
I have a EBGP neighbor. I am forming EBGP neighborship using local-as command, becuase I don't want to advertise my actual ASN.
config is as below.
router bgp 65111
vrf ABC
router-id 10.75.0.2
address-family ipv4 unicast
network A.B.C.D/32
neighbor 10.75.0.22
remote-as 64747
local-as 21112 no-prepend replace-as
description ** TO MY-NEIGHBOR **
address-family ipv4 unicast
I want to advertise my network A.B.C.D/32 with higher number of AS-PATH.
route-map ASP permit 10
set as-path prepend 21112 21112 11111
Route-map with AS-Prepend is configured for the same neighbor.
router bgp 65111
vrf ABC
network A.B.C.D/32
neighbor 10.75.0.22
local-as 21112 no-prepend replace-as
description ** TO MY-NEIGHBOR **
address-family ipv4 unicast
route-map ASP out
Will the BGP AS-PATH Prepend attribute works for the neighbor which have neighborship using "local-as <ASN> no-prepend replace-as" command enabled
05-30-2018 10:49 AM
Hi,
Yes, the command "local-as no-prepend replace-as" should replace your AS (65111) with 21112 21112 11111.
HTH
05-30-2018 11:00 AM
There are a couple of pieces to this.
First: Your route-map.
The route-map needs the matching conditions. So, you would create an access-list with the routes you want to prepend and then another to allow either all other routes or just the ones you want to use without being prepended.
An example for this:
router bgp 65100 network 172.16.0.0 network 172.17.0.0 neighbor 10.69.232.70 remote-as 65200 neighbor 10.69.232.70 route-map set-as-path out ! route-map set-as-path 10 permit match address 1 set as-path prepend 65100 65100 ! route-map set-as-path 20 permit match address 2 ! access-list 1 permit 172.16.0.0 0.0.255.255 access-list 1 permit 172.17.0.0 0.0.255.255 ! access-list 2 permit 0.0.0.0 255.255.255.255
So in this example, the route-map will only prepend 172.16.0.0/16 and 172.17.0.0/16 routes but still allows all routes.
Second: The no-prepend option in the local-as configuration does preclude any route-map prepending you do. It stops the routes received from the eBGP Neighbor from being prepended by your local ASN.
So, yes, you can still prepend with the route-map even with the no-prepend option in the local-as config.
Here are some references you can use for further research if you wish:
Cisco Guide for IP Route Filtering in BGP
Cisco Guide for DUAL AS Configuration
While these guides are not exactly for your equipment, the information about the commands, their usages and most syntax are still applicable.
I hope this helps!
--------------------------------
When you make the world a better place for someone else, you make the world a better place.
05-30-2018 11:13 AM
Hello,
with your config, the advertised will have the path in bold in the topology table of the neighbor:
Router#sh ip bgp topology *
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 192.168.12.1 0 0 21112 21112 21112 11111 i
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