cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
301
Views
2
Helpful
5
Replies

AS Prepend Question

N3om
Level 1
Level 1

Hello

We currently peer with our ISP using BGP, In our BGP statement we are using route-map  the route-map calls an acl which contains our subnets this is working fine, If I want to AS  prepend one of our subnets would I need to remove it from the acl that the route-map refrences ? and also what should the route-map look like with an acl statement and an AS prepend statement please.??

 

Thanks

2 Accepted Solutions

Accepted Solutions

Harold Ritter
Spotlight
Spotlight

Hi @N3om ,

You would insert the AS path prepend instance before the current route-map instance:

route-map <route-map name> permit <instance number lower than the one currently in your route-map>

match ip address <new ACL number for the specific subnet(s)>

set as-path prepend xxx

route-map <route-map name> permit <current instance number>

match ip address <current ACL number> 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

@Harold Ritter Hi that worked I just tested in my lab thanks for your advise, looks like another user has accepted as solution so I cant do that.
Thankyou

 

View solution in original post

5 Replies 5

Harold Ritter
Spotlight
Spotlight

Hi @N3om ,

You would insert the AS path prepend instance before the current route-map instance:

route-map <route-map name> permit <instance number lower than the one currently in your route-map>

match ip address <new ACL number for the specific subnet(s)>

set as-path prepend xxx

route-map <route-map name> permit <current instance number>

match ip address <current ACL number> 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

@Harold Ritter Hi that worked I just tested in my lab thanks for your advise, looks like another user has accepted as solution so I cant do that.
Thankyou

 

You are very welcome @N3om and thanks for the feedback

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

M02@rt37
VIP
VIP

Hello @N3om 

You can achieve AS prepending by creating multiple route-map statements with different sequence numbers. In your case, you would create a specific route-map entry that matche the subnet you want to prepend and apply the set as-path prepend command there. Then, in a separate entry with a higher sequence number, you can match the other subnets that you do not wish to prepend and allow them through without modification.

So, the BGP process will evaluate the rout-map entries in order, and the first match will apply.

This approach gives you fine control over how each subnet is advertised to your ISP without removing or change existing ACL or prefix-lists entirely...

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.