RE: Best regex for BGP path?

From: tan (tan@dia.janis.or.jp)
Date: Wed Feb 19 2003 - 23:55:52 GMT-3


When the requirement is shortest/least commands/most efficient, I always
wonder if it means a) based on just exactly what you are presented, or b)
anything possible. Kinda similar to ACL questions to filter on networks that
don't even exist anywhere on the pod, most efficient would be simply no ACL
at all. This is oversimplifying it, but what if some of those networks
exist, and they are all odd, and the requirement is filter out even, now it
is a bit grey if ACK is needed or not to satisfy.

Anyway, you list exactly what choices to filter from and filtering on just
exactly what is given and nothing else possible, all instances of 400-409
have one other thing in common, they start with 44. Filter on this with
permit ^44_, or can go shorter with permit ^44, and still shorter with just
permit 44

In this case it doesn't work, but I always look for deny efficient method as
well.
deny ^40?_ (matches beginning 4 or 40, but ignores 44). But then you
usually use more non-ACL commands to get permit functionality on the rest,
especially with route map. Then "least commands" may be more important than
"most efficient".

If going for anything possible option, then your permit _40._ seems right.
Remember a dot matches space too, so if there was 40 followed by two spaces
it would match, but I don't think that is possible in as_path so looks ok.

> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
> Marshall Stacks
> Sent: Wednesday, February 19, 2003 11:53 PM
> To: ccielab@groupstudy.com
> Subject: Best regex for BGP path?
>
>
> I am creating a lab and could use a little feedback. Given
> the following BGP
> path info excerpt:
>
> Paths
> 44 404 4 i
> 40 4004 4 i
> 44 405 4 i
> 4 i
>
> My question will be something like:
> "Configure a filter to only accept routes that contain any
> one instance of
> AS 400 through 409 in their paths. Be efficient in the way
> you choose the
> paths."
>
> My current best answer includes the regex: _40._
> Other, less "efficient" choices are:
> _40[0-9]_
> _40[0123456789]_
>
> I'm sure there are plenty of other "less efficient" choices,
> but my concern
> is whether my answer is the best answer according to my
> question. And does
> the question itself make sense to you?
>
> Thanks in advance
>
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail



This archive was generated by hypermail 2.1.4 : Sat Mar 01 2003 - 11:06:30 GMT-3