Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Manipulate BGP AS path

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

  • WAN Routing and Switching
1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Re: Manipulate BGP AS path

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.

4 REPLIES
Silver

Re: Manipulate BGP AS path

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.

Re: Manipulate BGP AS path

Use the following command

router bgp 64517

neighbor 1.2.3.4 remove-private-AS

regards

Narayan

New Member

Re: Manipulate BGP AS path

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.

Cisco Employee

Re: Manipulate BGP AS path

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,

825
Views
5
Helpful
4
Replies