12-10-2005 08:08 AM - edited 03-03-2019 11:11 AM
All,
I am a tad confused with the doc http://www.cisco.com/warp/public/459/26.html
Now, I have the following AS-Path Lists
network 10.0.0.0/8 is in AS 444
The prefix ASP is 222 333 444
I am in AS111.
Now if I want to stop all routes including the 10.0.0.0/8 from being advertised into my AS, do I use the following :-
ip as-path access-list 1 permit ^444$
router bgp 111
neighbor x.x.x.x remote-as 222
neighbor x.x.x.x route-map foo in
route-map foo deny 10
match as-path 1
route-map foo permit 20
---------------OR------------------
ip as-path access-list 1 permit _444$
router bgp 111
neighbor x.x.x.x remote-as 222
neighbor x.x.x.x route-map foo in
route-map foo deny 10
match as-path 1
route-map foo permit 20
What is the difference?
Many thx,
Ken
12-10-2005 08:26 AM
Ken,
The first one would deny as-path containing 444 only (ie: 444 would be denied but 222 333 444 would not)
The second one would deny any as-path ending with 444 (ie: 222 333 444 would be denied)
Hope this helps,
12-10-2005 10:29 AM
ta dude
12-10-2005 08:49 AM
Just a few remarks to what Harold wrote:
With regular expressions the router treats the AS path like a text string.
_ (underscore) searches for space, begin of string, end of string ... anything except numbers
^ means begin of string, so ^4 means an AS path starting with 4 (this includes 4 or 4123)
$ means end of string, so 1$ means f.e. "4321" or "3123 1"
When writing filters keep in mind that the originating AS will be at the end of the AS path and the AS you learn a prefix from will be the first in the AS path. Another thing to keep in mind is that due to AS path prepending any AS number could occur more than once.
Regards
Martin
12-10-2005 10:29 AM
Thx fella, for the extra comments on from Mr H.
Much apprciated
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide