From: Brian Dennis (brian@5g.net)
Date: Sun Sep 01 2002 - 01:32:49 GMT-3
Ted,
With regular expressions, '(' and ')' have special meaning. They are
used for grouping so you will need to "escape" them by putting a '\' in
front of them if you want to capture them in the regular expression.
R3#sho ip bgp
BGP table version is 3, local router ID is 10.1.34.3
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
*> 10.1.34.0/24 10.1.34.4 0 100 0 (100) i
*> 192.168.1.0 10.1.1.2 0 0 500 i
R3#sho ip bgp reg ^\(100\)
BGP table version is 3, local router ID is 10.1.34.3
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
*> 10.1.34.0/24 10.1.34.4 0 100 0 (100) i
R3#
Brian Dennis, CCIE #2210 (R&S/ISP Dial)
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Ted Richmond
Sent: Saturday, August 31, 2002 7:35 PM
To: ccielab@groupstudy.com
Subject: BGP regexp for confed routes
Hi,
How to construch a regexp string that would match the
ntks advertised by a particular confederation peer?
Here is my BGP table:
BGP table version is 20, local router ID is 150.10.6.6
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
*> 198.5.51.0 150.10.60.13 0
1000 130 i
*> 198.5.52.0 150.10.60.13 0
1000 130 i
*> 198.5.53.0 150.10.60.13 0
1000 130 i
*> 198.5.54.0 150.10.60.13 0
1000 130 i
*> 198.6.48.0/21 150.10.2.2 100
0 (250 8) 1000 i
*> 198.6.53.0 150.10.2.2 0 100
0 (250 8) 1000 i
R6#
As you can see this R6 is in AS 6 where 8,250,6 belong
to confed 22. Now I would like to get all routes
learnt from AS 250. I would like to know what regexp
to use. Here is what I've tried:
R6#
R6#sh ip bgp reg
R6#sh ip bgp regexp ^250
R6#sh ip bgp regexp ^(250
% unmatched ()
% Invalid regular expression
R6#sh ip bgp regexp ^(250)
R6#sh ip bgp regexp ^_250
R6#
TIA,
Ted
This archive was generated by hypermail 2.1.4 : Mon Oct 07 2002 - 07:43:40 GMT-3