[c-nsp] confed as-path length preservatopm
Tim Durack
tdurack at gmail.com
Fri May 21 11:35:24 EDT 2010
On Fri, May 21, 2010 at 10:55 AM, David Freedman
<david.freedman at uk.clara.net> wrote:
> Not that I know of, you should really be using MED for this kind of
> inter-subconfederation BGP TE, but if you must use the path, you can
> always count it on ingress (and then set attributes based on it),
> i.e:
>
> ip as-path access-list X permit \([0-9]+\)
>
> (this will match one subconfederation traversed)
I eventually came up with this:
ip as-path access-list CONFED-0 permit ^$
ip as-path access-list CONFED-1 permit ^\((65[0-9]+\ ?){1}\)$
ip as-path access-list CONFED-2 permit ^\((65[0-9]+\ ?){2}\)$
ip as-path access-list CONFED-3 permit ^\((65[0-9]+\ ?){3}\)$
ip as-path access-list CONFED-4 permit ^\((65[0-9]+\ ?){4}\)$
ip as-path access-list CONFED-5 permit ^\((65[0-9]+\ ?){5}\)$
ip as-path access-list LOCAL permit ^$
route-map CORE-OUT permit 5
match as-path LOCAL
!
route-map CORE-OUT permit 10
match as-path CONFED-1
set as-path prepend <AS>
!
route-map CORE-OUT permit 20
match as-path CONFED-2
set as-path prepend <AS> <AS>
!
route-map CORE-OUT permit 30
match as-path CONFED-3
set as-path prepend <AS> <AS> <AS>
!
route-map CORE-OUT permit 40
match as-path CONFED-4
set as-path prepend <AS> <AS> <AS> <AS>
!
route-map CORE-OUT permit 50
match as-path CONFED-5
set as-path prepend <AS> <AS> <AS> <AS> <AS>
!
Seems to work okay.
--
Tim:>
More information about the cisco-nsp
mailing list