[c-nsp] regular expression notation for as-path representation

joshua sahala jejs+lists at sahala.org
Fri Mar 17 18:04:12 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On (2006-03-17 17:35), Greg Boehnlein wrote:
> 
> On Fri, 17 Mar 2006, Scott Granados wrote:
>  
> > I know this is a really basic question but this is something until
> > recently I never had to be that familiar with.  Could someone if it's
> > simpleenough explain the language for expressing things like as-paths or
> > better provide a pointer to a web site.  I tried some googling but
> > nothing really obvious.
> >  
> > For example if I want to prefer all the routes I learn via level3 from
> > uunet and it's customers how could I express that?

http://www.cisco.com/warp/public/459/bgp-toc.html#asregexp is a start.  there
are other pages linked from it, but no complex examples

if I am reading your question correctly, something like this should get you
started:

    ip as-path access-list 10 permit ^(3356)+(_701)+(_([0-9]+)?)$

    route-map prefer-l3-mci permit 10
      match as-path 10
      set local-preference 105
 
that as-path regex should permit level3 + mci + zero or one downstream ASNs

> You just peaked my interest on something, and I too would love to see some 
> examples of this. I assume that Cisco has implemented standard Regular 
> Expressions, no?

sort of - see the link above.  "Routing TCP/IP Vol 2" has more/better
examples as well

hth

/joshua
- -- 
A common mistake that people make when trying to design something 
completely foolproof is to underestimate the ingenuity of complete
fools.
	- Douglas Adams -

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEG0BsJr8VjiIHVH0RAu3iAJ9SXxhN6eel8gvZXKXfMnTgJurEzACgzvlH
hp9Qd2a58oqE6XQbjsU4lnk=
=AbIu
-----END PGP SIGNATURE-----


More information about the cisco-nsp mailing list