BGP Regular expression

could you help explain the Regular expression filter below ?
ip as-path access-list 5 permit ^(123_)+$
what the result after apply ?

Comments

  • JoeMJoeM ✭✭✭

    ip as-path access-list 5 permit ^(123_)+$

    Hello @titya,
    This as-path access-list will need to be matched in a route-map.
    match as-path access-list 5

    The result will select prefixes that...

    • ^(123_) means the path begins with AS 123 and a following space
    • + means this AS repeats at least once more, but could be more.
    • $ means the as-path ends. No other AS in path.

    123 123
    123 123 123
    123 123 123 123
    123 123 123 123 123

  • tityatitya
    edited September 2017

    Thanks JoeM,
    i got it now.

Sign In or Register to comment.