Parameterization At Attach Points - Cisco NCS 6000 Series Configuration Manual

Ios xr release 6.4.x
Hide thumbs Also See for NCS 6000 Series:
Table of Contents

Advertisement

Parameterization at Attach Points

The parameterized policy param-example provides a policy definition that is expanded with the values provided
as the parameters in the apply statement. Note that the policy hierarchy is always maintained, Thus, if the
definition of param-example changes, then the behavior of origin_10 and origin_20 changes to match.
The effect of the origin-10 policy is that it adds the community 1234:10 to all routes that pass through this
policy and have an AS path indicating the route originated from autonomous system 10. The origin-20 policy
is similar except that it adds to community 1234:20 for routes originating from autonomous system 20.
Parameterization at Attach Points
In addition to supporting parameterization using the apply statement described in the
page
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
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
396
395, policies can also be defined that allow for parameterization the attributes at attach points.
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'
Implementing Routing Policy
Parameterization, on

Advertisement

Table of Contents
loading

Table of Contents