From: Privat\ ("Erling)
Date: Sat Nov 09 2002 - 17:00:13 GMT-3
The * means any occurence of the char including none.
The + means at least one occurence of the char should be present.
This means that [0-9]*  also cover routes orginated from this AS.  
See following printout:
rA#sh ip bgp
BGP table version is 6, local router ID is 172.16.10.1
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
*> 172.16.1.0/24    10.0.0.2                 0             0 2 i
*> 172.16.2.0/24    10.0.0.2                 0             0 2 100 i
*> 172.16.3.0/24    10.0.0.2                 0             0 2 200 100 i
*> 172.16.4.0/24    10.0.0.2                 0             0 2 300 200 100 i
*> 192.168.1.0      0.0.0.0                  0         32768 i
rA#sh ip bgp regexp .*
BGP table version is 6, local router ID is 172.16.10.1
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
*> 172.16.1.0/24    10.0.0.2                 0             0 2 i
*> 172.16.2.0/24    10.0.0.2                 0             0 2 100 i
*> 172.16.3.0/24    10.0.0.2                 0             0 2 200 100 i
*> 172.16.4.0/24    10.0.0.2                 0             0 2 300 200 100 i
*> 192.168.1.0      0.0.0.0                  0         32768 i
rA#sh ip bgp regexp ^[0-9]*$
BGP table version is 6, local router ID is 172.16.10.1
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
*> 172.16.1.0/24    10.0.0.2                 0             0 2 i
*> 192.168.1.0      0.0.0.0                  0         32768 i
rA#sh ip bgp regexp ^[0-9]+$
BGP table version is 6, local router ID is 172.16.10.1
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
*> 172.16.1.0/24    10.0.0.2                 0             0 2 i
rA#sh ip bgp regexp ^$
BGP table version is 6, local router ID is 172.16.10.1
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
*> 192.168.1.0      0.0.0.0                  0         32768 i
rA#sh ip bgp regexp [0-9]*
BGP table version is 6, local router ID is 172.16.10.1
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
*> 172.16.1.0/24    10.0.0.2                 0             0 2 i
*> 172.16.2.0/24    10.0.0.2                 0             0 2 100 i
*> 172.16.3.0/24    10.0.0.2                 0             0 2 200 100 i
*> 172.16.4.0/24    10.0.0.2                 0             0 2 300 200 100 i
*> 192.168.1.0      0.0.0.0                  0         32768 i
rA#
Regards
Erling Bjontegard
----- Original Message ----- 
From: "syv" <syv@911networks.com>
To: "Franck ccie" <cciefrank@hotmail.com>
Cc: <ccielab@groupstudy.com>
Sent: Saturday, November 09, 2002 6:09 PM
Subject: Re: Regular expression for BGP
> On Saturday, November 09, 2002, Franck ccie wrote:
> 
> -----Original Message-----
> Fc> I'm looking for a good site giving a good explanation of
> Fc> regular expression for BGP ..
> 
> [0-9]*      Matches any single AS number.  This is the wild card for an AS
> _.*         Matches everything [permit any/all]
> _100_       Any route going through AS100
> _100 200_   Passed through 100 and 200 in that order
> _100$       Any route originated in AS100
> ^100$       Only routes originated in AS100 that did not pass through any other AS
> ^100_       Only routes received from AS100, anything else behind
> ^100 .*     Only routes received from AS100, anything else behind [alternative]
> ^$          Originated from this AS
> ( .*)       matches a space plus a AS.
> ( .*)*      matches a space plus a AS or a null string.
> ?           To type ?: either Ctrl-V or Esq-Q
> 
> 
> -- 
> Thanks
> syv@911networks.com
This archive was generated by hypermail 2.1.4 : Tue Dec 03 2002 - 07:22:55 GMT-3