Question about AS Path Access Lists

Answered Question
Mar 11th, 2008

If I have the following AS Path access list:

ip as-path access-list 100 permit ^1234_[0-9]*$

Will this match all AS's with a path through AS 1234, or just AS's adjacent to AS 1234?

I have this problem too.
0 votes
Correct Answer by guruprasadr about 8 years 8 months ago

HI Johnny, [Pls Rate if HELPS]

ip as-path access-list 100 permit ^1234_[0-9]*$

The above As-Path List will match the AS's only adjacent to AS1234.

To match more AS's with a path through AS 1234 means, Configure as below:

ip as-path access-list 100 permit ^1234_[0-9]*_[0-9]*_[0-9]*$

Hope i am Informative.

Pls Rate if HELPS

Best Regards,

Guru Prasad R

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
Danilo Dy Tue, 03/11/2008 - 20:14

Hi,

This means to match any network originated from AS1234 and directly attached to AS1234.

Regards,

Dandy

Correct Answer
guruprasadr Wed, 03/12/2008 - 00:46

HI Johnny, [Pls Rate if HELPS]

ip as-path access-list 100 permit ^1234_[0-9]*$

The above As-Path List will match the AS's only adjacent to AS1234.

To match more AS's with a path through AS 1234 means, Configure as below:

ip as-path access-list 100 permit ^1234_[0-9]*_[0-9]*_[0-9]*$

Hope i am Informative.

Pls Rate if HELPS

Best Regards,

Guru Prasad R

Richard Burts Wed, 03/12/2008 - 04:51

John

I think we should be clear about Dandy's answer and what he meant about originate. If he meant originate in terms of this is the neighbor that passed the update to you then his explanation is correct that the regular expression would identify your neighbor AS and ASes directly connected to that AS. If he meant originate in the sense of the AS where the prefix is actually located then he got it backward. To identify the AS where the prefix is actually located the1234 would be next to the $ and not next to the ^.

HTH

Rick

mheusing Wed, 03/12/2008 - 05:03

Hi,

To match all prefixes received through AS 1234 irrespective of originating AS and path length use

ip as-path access-list 101 permit ^1234_

As already mentioned by the other posts the given AS Path ACL will match pathes received through 1234 and with a total path length of two ASes.

As a short reminder, an AS Path ACL with regular expressions treats the AS path as a text string with:

^ denotes begin of string

$ denotes end of string

_ denotes a delimiter like a space

* denotes one or more

Hope this helps! Please use the rating system.

Regards, Martin

Actions

This Discussion