From: D. J. Jones (meganac@xxxxxxxxx)
Date: Fri Mar 29 2002 - 00:06:59 GMT-3
I dont believe the two statements are equivalent. My read of Halabi on page
187 2nd edition shows
that the question mark (?) mateches zero or one occurences of the pattern
while the underscore (_)
supposedly matches a comma (,), left brace ({), right brace (}), left
parenthesis, right parenthesis, the
beginning of the input string, the end of the input string, or a space.
Here is a sample:
ner-routes>sh ip b regexp ^701?[0-9]*$
BGP table version is 14143336, local router ID is 10.0.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i3.18.135.0/24 192.205.32.113 1000 50 0 7018 i
*>i9.2.0.0/16 4.0.6.142 1000 50 0 701 i
*>i12.0.0.0/23 192.205.32.113 1000 50 0 7018 i
*>i12.0.0.0 192.205.32.153 1000 50 0 7018 i
*>i12.144.64.0/21 4.0.6.142 1000 50 0 701 i
*>i17.255.232.0/24 4.0.6.142 1000 50 0 701 i
*>i24.121.0.0/24 192.205.32.113 1000 50 0 7018 i
*>i24.142.40.0/21 192.205.32.113 1000 50 0 7018 i
*>i24.142.160.0/19 192.205.32.113 1000 50 0 7018 i
*>i24.142.192.0/18 192.205.32.113 1000 50 0 7018 i
*>i24.143.0.0/19 4.0.6.142 1000 50 0 701 i
*>i24.143.6.0/24 4.0.6.142 1000 50 0 701 i
*>i24.143.24.0/21 4.0.6.142 1000 50 0 701 i
*>i24.154.0.0/18 4.0.6.142 1000 50 0 701 i
*>i24.158.240.0/20 192.205.32.113 1000 50 0 7018 i
*>i24.159.0.0/20 192.205.32.113 1000 50 0 7018 i
*>i24.159.128.0/20 192.205.32.113 1000 50 0 7018 i
*>i24.159.164.0/22 192.205.32.113 1000 50 0 7018 i
ner-routes>sh ip b regexp ^701_[0-9]*$
BGP table version is 14143376, local router ID is 10.0.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i3.0.0.0 4.0.6.142 1000 50 0 701 80 i
*>i9.2.0.0/16 4.0.6.142 1000 50 0 701 i
*>i9.184.112.0/20 4.0.6.142 1000 50 0 701 3786 i
*>i9.186.144.0/20 4.0.6.142 1000 50 0 701 3786 i
*>i12.0.252.0/23 4.0.6.142 1000 50 0 701 16927 i
*>i12.3.80.0/22 4.0.6.142 1000 50 0 701 10998 i
*>i12.3.194.0/24 4.0.6.142 1000 50 0 701 6347 i
*>i12.3.217.0/24 4.0.6.142 1000 50 0 701 16666 i
*>i12.4.126.0/23 4.0.6.142 1000 50 0 701 17024 i
*>i12.5.201.0/24 4.0.6.142 1000 50 0 701 23060 i
*>i12.6.171.0/24 4.0.6.142 1000 50 0 701 10851 i
*>i12.8.9.0/24 4.0.6.142 1000 50 0 701 18627 i
*>i12.8.12.0/24 4.0.6.142 1000 50 0 701 15114 i
*>i12.8.188.0/24 4.0.6.142 1000 50 0 701 8143 i
*>i12.10.20.0/23 4.0.6.142 1000 50 0 701 11560 i
*>i12.11.162.0/24 4.0.6.142 1000 50 0 701 15051 i
*>i12.15.150.0/23 4.0.6.142 1000 50 0 701 11847 i
*>i12.17.202.0/23 4.0.6.142 1000 50 0 701 12170 i
dj
----- Original Message -----
From: "Bob Sinclair" <bsin@erols.com>
To: "Tim O'Brien" <tobrien@cinci.rr.com>
Cc: <ccielab@groupstudy.com>
Sent: Thursday, March 28, 2002 5:07 PM
Subject: Re: AS-path access-list
> Tim,
>
> As you suggested, I did a telnet to:
> ner-routes.bbnplanet.net
>
> and entered:
>
> ner-routes>sh ip b regexp ^701_[0-9]*$
>
> Works like a charm, and has the advantage of not having to remember Ctl-V
in order to enter the "?"
>
> Thanks!
>
> PS: One might also try: http://the.groovy.org/BGP/
> for links to mirrors, telnet access.
>
> ----- Original Message -----
> From: "Tim O'Brien" <tobrien@cinci.rr.com>
> To: "Bob Sinclair" <bsin@erols.com>
> Cc: <ccielab@groupstudy.com>
> Sent: Thursday, March 28, 2002 7:48 PM
> Subject: RE: AS-path access-list
>
>
> > You can test it at ner-routes.bbnplanet.net
> >
> > Tim
> > 9015
> >
> >
> > -----Original Message-----
> > From: Bob Sinclair [mailto:bsin@erols.com]
> > Sent: Thursday, March 28, 2002 7:43 PM
> > To: Tim O'Brien
> > Cc: ccielab@groupstudy.com
> > Subject: Re: AS-path access-list
> >
> >
> > Tim,
> >
> > Based on my reading or Halabi, the two statements seem equivalent:
> >
> > ip as-path access-list 4 permit ^200_[0-9]*$
> >
> > and
> >
> > ip as-path access-list 4 permit ^200 ?[0-9]*$
> >
> > The underscore can mean most anything, including end of string. So it
would
> > match ^200$ to identify routes from the immediate neighbor.
> >
> > The underscore can also be a space, then [0-9]*$ should match any
number
> > (including zero) of consecutive numerals. Looks to me like both would
work.
> > The first example may be easier to remember, but I would want to test it
> > before betting $1,250 on it! I know Halabi's works.
> >
> > -Bob
> >
> >
> > ----- Original Message -----
> > From: "Tim O'Brien" <tobrien@cinci.rr.com>
> > To: "Bob Sinclair" <bsin@erols.com>; "Hongtu Wang"
<hwang1073@rogers.com>
> > Cc: <ccielab@groupstudy.com>
> > Sent: Thursday, March 28, 2002 7:29 PM
> > Subject: RE: AS-path access-list
> >
> >
> > > I found this one on the Cisco site. What do you think?
> > >
> > > ip as-path access-list 4 permit ^200_[0-9]*$
> > >
> > > http://www.cisco.com/warp/public/459/41.shtml#2
> > >
> > > Tim
> > > 9015
> > >
> > >
> > > -----Original Message-----
> > > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
> > > Bob Sinclair
> > > Sent: Thursday, March 28, 2002 6:37 PM
> > > To: Hongtu Wang
> > > Cc: ccielab@groupstudy.com
> > > Subject: Re: AS-path access-list
> > >
> > >
> > > Hongtu,
> > >
> > > I believe you will find that the following expression will work with
the
> > > fewest number of statements to define "routes from AS 200 and its
> > > neighbors":
> > >
> > > ip as-path access-list 4 permit ^200 ?[0-9]*$
> > >
> > > It is discussed in detail in Halabi's book "Internet Routing
> > Architectures",
> > > on page 376. The meaning of regular expression characters is
explained on
> > > page 187.
> > >
> > > -Bob
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Hongtu Wang" <hwang1073@rogers.com>
> > > To: <ccielab@groupstudy.com>
> > > Sent: Monday, March 25, 2002 10:29 PM
> > > Subject: AS-path access-list
> > >
> > >
> > > > Hi,
> > > >
> > > > My topology is:
> > > >
> > > > R1(AS100)----R2(AS200)----AS50---AS250
> > > >
> > > > If I only want to accept routes come from AS200 and all AS directly
> > > connect to AS200 (AS50 in my topology), how to write as-path
access-list
> > on
> > > R1?
> > > >
> > > > Thanks
> > > >
> > > > Hongtu Wang
This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:57:25 GMT-3