RE: Regular Expressions

From: asadovnikov (asadovnikov@comcast.net)
Date: Wed Jul 16 2003 - 20:32:52 GMT-3


I do not think your regexp would have filtered 40 immidiately followed by
500.
If this meets your requirements it is fine and can not be simplified.

Now, if it was not what you tried... Only easy way I could come up right
away
with to do "all path which wen via 500 first but then went via 40 as well"
(assuming this is what you want) is as follows:

show ip bgp regexp (_40_.*_500_)|(_40_500_)

This will do both one immidiately after another, as well as some in between.

If you want to get real creative this will work as well, but I find it
difficult to explain:

show ip bgp regexp _40(_[0-9]+)*_500_

If confederation is present, then you need to allow for patentees to be
present as well.

Best regards,
Alexei

> Is there a better way of doing this ? SHO IP BGP regexp _40_.+_500_
>
> Network Next Hop Metric LocPrf Weight Path
> *> 30.30.30.0/24 172.31.80.254 0 0 1000 30 40
100
> 200 500 600 700 i
> *> 50.0.0.0 172.31.80.254 0 0 1000 1000 30
40
> 200 100 500 600 900 2000 i
> *> 60.0.0.0 172.31.80.254 0 0 1000 900 900
> 900 900 100 900 2000 i
> *> 70.0.0.0 172.31.80.254 0 0 1000 1000 30
40
> 900 900 900 900 2000 i
>
> r8>SHO IP BGP regexp _40_.+_500_
> BGP table version is 10, local router ID is 210.8.8.8
> 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
> *> 30.30.30.0/24 172.31.80.254 0 0 1000 30 40
100
> 200 500 600 700 i
> *> 50.0.0.0 172.31.80.254 0 0 1000 1000 30
40

> 200 100 500 600 900 2000 i
>
> Jim Phillipo, CCNP, CCDP
> Sr. Internetworking Engineer
> W: 401.456.1821 F: 401.456.0599 M: 508.982.8923
> 90 Royal Little Drive, Providence, RI 02904
> www.guardent.com _____________________________________________________
> G U A R D E N T
> Security | Privacy | Data Protection
>
>
> ______________________________________________________________________
> _
> You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Wed Aug 06 2003 - 06:52:42 GMT-3