EasyManuals Logo

Cisco A9K-SIP-700 Routing Configuration Guide

Cisco A9K-SIP-700
702 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #574 background imageLoading...
Page #574 background image
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: as-path-set, on page 545, community-set, on page 546, extcommunity-set, on page
547, prefix-set, on page 550, and rd-set, on page 552. You may want to perform comparisons against a small
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
Implementing Routing Policy
Routing Policy Language Overview

Table of Contents

Other manuals for Cisco A9K-SIP-700

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco A9K-SIP-700 and is the answer not in the manual?

Cisco A9K-SIP-700 Specifications

General IconGeneral
BrandCisco
ModelA9K-SIP-700
CategoryNetwork Router
LanguageEnglish

Related product manuals