Re: BGP Regular Expression - logic help

From: James (james@towardex.com)
Date: Mon Jul 12 2004 - 19:31:25 GMT-3


> You are right ! That's why you're probably a CCIE and i am not :-) (yet)

Err no :) I am definately not a CCIE, just one of those like you trying hard to
earn one.. I'm just mostly from service provider type of territory, so just a lil
getting used to BGP configurations a bit. I am not very acquainted with stuff not
related to routingprotocols/layer2 oriented (i.e. dlsw+).

>
> I wonder if cisco would also approve this mormel: ^7018(_[0-9]+)?$

As long as it works :)

>
> BTW: if you use the + sign, you have to do it like this...or it won't
> work
> So if they really, really, really want to be a p**n in the a**:
>
> "Match AS7018 and any directly connected AS without using the * sign in
> your regular expression :-)"

I heard a bit more challenging one the other day.. not ccie related but from a
buddy of mine faced in real-life situation:

We got AS4, which is a peering AS from you, directly connected. AS4 has downstream
BGP customers whose ASN's are: 5,6,101,109,204. Match routes from AS4 itself, and
all of its downstream BGP customer ASN's. Further match duplicated ASNs in the
path, otherwise known as AS prepending. Your regex must allow both AS4 itself or
any of its downstream ASN's to be prepended on the path. You may not use more than
1 line of expression to achieve this. No other ASN's other than AS4 and its
customer ASNs should be allowed.

The answer I came up with was:
 ^(_4)+(_(6|101|109|204))*$

That I *believe* should match AS4, the assumed downstreams of AS4, as well as
prepending of AS4 and its downstream ASN's prepended. For example:
 4 i
 4 4 4 i
 4 6 i
 4 4 6 i
 4 101 101 i
 etc.

-J

--
James Jun                                            TowardEX Technologies, Inc.
Technical Lead                        Network Design, Consulting, IT Outsourcing
james@towardex.com                  Boston-based Colocation & Bandwidth Services
cell: 1(978)-394-2867           web: http://www.towardex.com , noc: www.twdx.net


This archive was generated by hypermail 2.1.4 : Sun Aug 01 2004 - 10:11:53 GMT-3