cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
279
Views
0
Helpful
4
Replies

AS-path filter question

Ciderza99
Level 1
Level 1

We are directly connected AS 1. We would like to allow AS 1 and directly connected AS in as well as networks originated in 2 with its directly connected AS. We peer with 1 and 1 peers with us and 2. 

Will the below work?

ip as-path access-list 13 permit ^1_[0-9]*$

ip as-path access-list 13 permit ^1_2_[0-9]*$

1 Accepted Solution

Accepted Solutions

Hi,

Very interesting.

I tested it successfully on a route-server (it is not a recent version though).

Could you please test this one?

ip as-path access-list 13 permit ^(1)(_\1)*_([0-9]*)(_\1)*$

ip as-path access-list 13 permit ^(1)(_\1)*_(2)(_\1)*_([0-9]*)(_\1)*$

If it is not really supported, you will have to go with your original configuration.

Cheers.

View solution in original post

4 Replies 4

Leonardo Gama
Level 1
Level 1

Hello,

Yes, but there is a problem.

It will not permit as-path prepend...

I think this is a better option:

ip as-path access-list 13 permit ^(1)(_\1)+_([0-9]*)(_\1)+$

ip as-path access-list 13 permit ^(1)(_\1)+_(2)(_\1)+_([0-9]*)(_\1)+$

Cheers.

Hi Leonardo, 

I have tested this in VIRL on 15.6(2)T and receive "invalid back reference when trying to create these two ones you supplied. 

Hi,

Very interesting.

I tested it successfully on a route-server (it is not a recent version though).

Could you please test this one?

ip as-path access-list 13 permit ^(1)(_\1)*_([0-9]*)(_\1)*$

ip as-path access-list 13 permit ^(1)(_\1)*_(2)(_\1)*_([0-9]*)(_\1)*$

If it is not really supported, you will have to go with your original configuration.

Cheers.

Same issue. 

We will go with the first configuration. I will try and test your example on version 12. 

Thanks for your help and replies. 

Review Cisco Networking products for a $25 gift card