As-path regular expression examples – Cabletron Systems SmartSwitch Router 9032578-02 User Manual

Page 76

Advertising
background image

Chapter 6: BGP Configuration Guide

76

SmartSwitch Router User Reference Manual

aspath_term {m}

A regular expression followed by {m} (where m is a positive integer) means exactly
m repetitions.

aspath_term {m,}

A regular expression followed by {m,} (where m is a positive integer) means m or
more repetitions.

aspath_term *

An AS path term followed by * means zero or more repetitions. This is shorthand
for {0,}.

aspath_term +

A regular expression followed by + means one or more repetitions. This is
shorthand for {1,}.

aspath_term ?

A regular expression followed by ? means zero or one repetition. This is shorthand
for {0,1}.

aspath_term | aspath_term

Matches the AS term on the left, or the AS term on the right.

For example:

(4250 .*)

Means anything beginning with 4250

(.* 6301 .*) Means anything with 6301.

(.* 4250)

Means anything ending with 4250.

(. * 1104|1125|1888|1135 .*)

Means anything containing 1104 or 1125 or 1888 or 1135.

AS-path regular expressions are used as one of the parameters for determining which
routes are accepted and which routes are advertised.

AS-Path Regular Expression Examples

To import MCI routes with a preference of 165:

ip-router policy create bgp-import-source mciRoutes aspath-regular-

expression "(.* 3561 .*)" origin any sequence-number 10

ip-router policy import source mciRoutes network all preference 165

Advertising