everything is down for a couple of days due to job related travel, so I
can't check.

in my case, I wanted to filter any route whose AS path began with 5555.

so: 5555 2222 3333 1111, or 5555 9999, or 5555 would all be filtered.

however: 7171 5555 304, or 1234 2223 1991 5555 would not be filtered

so I needed  a regular expression that looked at the beginning of the
string.

^5555_ does not match any of the kinds of cases above. it should work ONLY
is 5555 is the ONLY AS in the AS Path.

as Julian so rightly pointed out, you have to include something to cover all
the other entries in the AS Path list. this means the .*

HTH

Chuck

-----Original Message-----
From: John Neiberger [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 30, 2001 7:12 PM
To: Chuck Larrieu; [EMAIL PROTECTED]
Subject: RE: Second opinion on Regular Expression [7:24460]


This is interesting.  I was wondering about the addition of the .* to the
access list.  When I tested this using "show ip bgp regexp" I got the same
set of results whether or not I used the ".*".  So, does this mean that in
the show command it's not specific but when used in the access list it is an
exact match?

In my case I tested "show ip bgp regexp ^1239_"  and "show ip bgp regexp
^1239 .*" and I seemed to get the exact same results.  However, I wonder if
I were to configure an as-path access list would the first form not match
anything?

Maybe I should make that my lab study tonight.  I'm having trouble getting
motivated again.  :-)  I keep getting distracted by doing things like
checking my email.

John


On Tue, 30 Oct 2001 19:54:01 -0500, Chuck Larrieu wrote:

|  sorry to take so long to get back to you.
|
|  DOH!
|
|  you are correct. I was looking only at the first part of the path, and so
I
|  was not filtering what I thought I was filtering.
|
|  the ip as-path access-list deny ^5555_.* will deny any AS Path that
begins
|  with 5555, no matter what follows.
|
|  ip as-path access-list deny ^5555_ appears to filter nothing because my
AS
|  paths contain more than just the one AS/
|
|  Appreciate the review.
|
|  Chuck
|
|  -----Original Message-----
|  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
|  Sent: Sunday, October 28, 2001 11:40 PM
|  To: [EMAIL PROTECTED]
|  Subject: Re: Second opinion on Regular Expression [7:24460]
|
|
|  Chuck,
|
|  You need to make the deny '^5555 .*'.  Assuming you are putting this on
an
|  EBGP router peering with AS5555.
|
|  "ip as-path access-list 55 deny ^5555 .*"
|
|  The '^' is an anchor in regex and forces a match at the beginning of the
|  input string you are comparing.  IE:  Whatever is after the '^' must
start
|  at the beginning of the string being compared to match and make the
|  epxression true.
|
|  To see if you are getting anything from AS5555 try:
|
|  "show ip bgp regexp ^5555 .*"
|
|  Good way to test your regexp as well.
|
|
|  -Julian
|
|  ""Chuck Larrieu""  wrote in message
|  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
|  > for an as-path filter, here is what I want to accomplish:
|  >
|  > from one particular router to another particular router I want to
filter
|  any
|  > AS path whose most recent AS was 5555
|  >
|  > so if the BGP route has a path in the BGP table as 5555 1111 4444 ? or
|  5555
|  > 9999 ? etc
|  > then I want that route to be filtered to a particular neighbor
|  >
|  > routes such as 3333 5555 ? or 7777 2222 5555 3333, for example are OK
to
|  > pass
|  >
|  > my access-list is:
|  >
|  > ip as-path access-list 55 deny ^5555_
|  > ip as-path access-list 55 permit .*
|  > !
|  > and my neighbor statement is neighbor a.b.c.d filter-list 55 out
|  >
|  > does the ^ character really mean what I think it is supposed to mean?
I.e
|  > does it filter any AS path that BEGINS with 5555, or is it doing
something
|  > unexpected?
|  >
|  > I have a complex mesh ( mess too ;-> ) of BGP neighbors, and it is a
bit
|  > hard to tell if I am accomplishing what I think I am accomplishing.
|  >
|  > thanks.
|  >
|  > Chuck
|
|
|
|
_______________________________________________________
http://inbox.excite.com




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=24745&t=24460
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to