Parameterization At Attach Points; Global Parameterization - Cisco NCS 5500 Series Configuration Manuals

Routing configuration ios xr release 6.3.x
Hide thumbs Also See for NCS 5500 Series:
Table of Contents

Advertisement

Parameterization at Attach Points

Parameterization at Attach Points
In addition to supporting parameterization using the apply statement, policies can also be defined that allow
for parameterization the attributes at attach points. Parameterization is supported at all attach points.
In the following example, we define a parameterized policy "param-example". In this example, the policy
takes two parameters "$mymed" and "$prefixset". Parameters always begin with a dollar sign, and consist
otherwise of any alphanumeric characters. Parameters can be substituted into any attribute that takes a parameter.
In this example we are passing a MED value and prefix set name as parameters.
route-policy param-example ($mymed, $prefixset)
end-policy
This parameterized policy can then be reused with different parameterizations as shown in the example below.
In this manner, policies that share a common structure but use different values in some of their individual
statements can be modularized. For details on which attributes can be parameterized, see the individual
attributes for each protocol.
router bgp 2
The parameterized policy param-example provides a policy definition that is expanded with the values provided
as the parameters in the neighbor route-policy in and out statement.

Global Parameterization

RPL supports the definition of systemwide global parameters that can be used inside policy definition. Global
parameters can be configured as follows:
Policy-global
end-global
The global parameter values can be used directly inside a policy definition similar to the local parameters of
parameterized policy. In the following example, the globalparam argument, which makes use of the global
parameters gbpathtype and glbtag, is defined for a nonparameterized policy.
route-policy globalparam
end-policy
Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 6.3.x
146
if destination in $prefixset then
set med $mymed
endif
neighbor 10.1.1.1
remote-as 3
address-family ipv4 unicast
route-policy param-example(10, prefix_set1)
route-policy param-example(20, prefix_set2)
glbpathtype 'ebgp'
glbtag '100'
if path-type is $glbpathtype then
set tag $glbtag
endif
Implementing Routing Policy

Advertisement

Table of Contents
loading

Table of Contents