Routing Policy Language Structure; Names; Sets - Cisco ASR 9000 Series Routing Configuration Manual

Aggregation services router
Hide thumbs Also See for ASR 9000 Series:
Table of Contents

Advertisement

Routing Policy Language Overview

Routing Policy Language Structure

This section describes the basic structure of RPL.

Names

The policy language provides two kinds of persistent, namable objects: sets and policies. Definition of these
objects is bracketed by beginning and ending command lines. For example, to define a policy named test, the
configuration syntax would look similar to the following:
route-policy test
[ . . . policy statements . . . ]
end-policy
Legal names for policy objects can be any sequence of the upper- and lowercase alphabetic characters; the
numerals 0 to 9; and the punctuation characters period, hyphen, and underscore. A name must begin with a
letter or numeral.

Sets

In this context, the term set is used in its mathematical sense to mean an unordered collection of unique
elements. The policy language provides sets as a container for groups of values for matching purposes. Sets
are used in conditional expressions. The elements of the set are separated by commas. Null (empty) sets are
allowed.
In the following example:
prefix-set backup-routes
# currently no backup routes are defined
end-set
a condition such as:
if destination in backup-routes then
evaluates as FALSE for every route, because there is no match-condition in the prefix set that it satisfies.
Five kinds of sets exist:
547,
prefix-set, on page
number of elements, such as two or three community values, for example. To allow for these comparisons,
the user can enumerate these values directly. These enumerations are referred to as inline sets. Functionally,
inline sets are equivalent to named sets, but allow for simple tests to be inline. Thus, comparisons do not
require that a separate named set be maintained when only one or two elements are being compared. See the
set types described in the following sections for the syntax. In general, the syntax for an inline set is a
comma-separated list surrounded by parentheses as follows: (element-entry, element-entry, element-entry,
...element-entry), where element-entry is an entry of an item appropriate to the type of usage such as a prefix
or a community value.
The following is an example using an inline community set:
route-policy sample-inline
if community matches-any ([10..15]:100) then
set local-preference 100
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.3.x
544
as-path-set, on page
545,
community-set, on page
550, and
rd-set, on page
552. You may want to perform comparisons against a small
Implementing Routing Policy
546,
extcommunity-set, on page

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents