Riverstone Networks WICT1-12 User Manual

Page 263

Advertising
background image

Riverstone Networks RS Switch Router User Guide Release 8.0 16-5

BGP Configuration Guide

Basic BGP Tasks

For example:

“.”

Matches any single AS number as the AS path.

“700.*”

Matches all AS paths coming from an AS that starts with 700.

“.* [^700 800]”

Matches all paths that do not end with AS numbers 700 and 800 and have at least one AS.

“[1-64999]*”

Matches a path that has only valid exterior AS numbers.

“700 800 [^100]”

Matches AS numbers 700 and 800 and any other AS number except 100.

“700 800 [^100]?”

Matches AS numbers 700 and 800 and any other AS number except 100, or no additional AS
numbers in the path.

“700|800”

Matches either 700 or 800 with no additional AS numbers in the path.

AS Path Regular Expression Examples

In the following example, routes from AS 61972 and 61678 that have traversed AS 3561 are imported. The first
command creates an AS path regular expression with the identifer ‘mciAspath’ to match AS paths that include AS
3561. The next two commands specify the AS path regular expression identifier to match routes imported from AS
61972 and 61678.

To import all routes (.* matches all AS paths) with the default preference:

ip-router policy create aspath-regular-expression mciAspath ".* 3561 .*"
ip-router policy create bgp-import-source bisrc61972 aspath-regular-expression

mciAspath autonomous-system 61972 origin any

ip-router policy create bgp-import-source bisrc61678 aspath-regular-expression

mciAspath autonomous-system 61678 origin any

ip-router policy import source bisrc61972 network all preference 160
ip-router policy import source bisrc61678 network all preference 170

ip-router policy create aspath-regular-expression allAspaths “.*”
ip-router policy create bgp-import-source allOthers aspath-regular-expression

allAspaths origin any sequence-number 20

ip-router policy import source allOthers network all

Advertising