cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2932
Views
5
Helpful
4
Replies

Manipulate BGP AS path

rknutsen
Level 1
Level 1

I need to remove an AS # in the path before passing the route on to our provider. I know the "set as-path prepend" command can add AS #s to the path, but is there a way to remove the current AS# before sending it on to our provider.

Example.

Router is learning routes from router in AS 65100. Need to pass these route to provider, but they will only accept routes with AS 65417 in the path.

These commands prepended 64517, but path still contained 65100 in it.

router bgp 64517

neighbor 1.2.3.4 route-map prepend-routes out

route-map prepend-routes permit 10

set as-path prepend 64517 64517 64517

1 Accepted Solution

Accepted Solutions

rais
Level 7
Level 7

You can use: neighbor a.b.c.d remove-private-as.

I dont think the ASN for router peering with ISP will be removed.

Thanks.

View solution in original post

4 Replies 4

rais
Level 7
Level 7

You can use: neighbor a.b.c.d remove-private-as.

I dont think the ASN for router peering with ISP will be removed.

Thanks.

Use the following command

router bgp 64517

neighbor 1.2.3.4 remove-private-AS

regards

Narayan

I tested "remove-private-as" on our Internet router and it did the trick. It removed our internal ASN of 65100, but still kept 64517.

Thanks for the help.

Richard,

The fact that 64517 is still there is normal behavior as IOS applies the remove-private-AS before it inserts the local AS and prepends additional ASes.

Hope this helps,

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 products for a $25 gift card