RE: BGP Reg Exp

From: Curt Girardin (curt.girardin@chicos.com)
Date: Sun Sep 18 2005 - 10:20:11 GMT-3


Hi,

Without "labbing it up", my guess would be both of these lines together:

Ip as-path access-list 1 permit ^[0-9]+$
Ip as-path access-list 1 permit ^[0-9]+_[0-9]+$

The first line would allow in any prefix with a single AS in it's path,
the second would allow any prefix with exactly two ASes listedin it's
path.

http://www.cisco.com/univercd/cc/td/doc/product/atm/c8540/12_0/13_19/cmd
_ref/appc.htm

Curt

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Leigh Harrison
Sent: Sunday, September 18, 2005 3:40 AM
To: Cisco certification
Subject: BGP Reg Exp

All,

If I wanted to allow a neighboring AS(123) and his directly connected
AS's to be seen as routes to me, could this be written as:

ip as-path access-list 1 permit ^123_[0-9]*$ OR ip as-path access-list 1
permit ^123_.*$ OR ip as-path access-list 1 permit ^.+_[0-9]*$ OR ip
as-path access-list 1 permit ^.+_.*$ OR ip as-path access-list 1 permit
^[0-9]+_[0-9]*$ OR ip as-path access-list 1 permit ^[0-9]+_.*$

Could someone have a quick look and let me know if that would be the
same thing ? I think I'm getting there!! The only niggle in the back
of my mind is ^123_.*$ (for example), would I need a "+" after the 123 ?

Many thanks,
LH



This archive was generated by hypermail 2.1.4 : Sun Oct 02 2005 - 14:40:15 GMT-3