cisco.iosxr.iosxr_route_maps module – Resource module to configure route maps.

Note

This module is part of the cisco.iosxr collection (version 10.2.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install cisco.iosxr.

To use it in a playbook, specify: cisco.iosxr.iosxr_route_maps.

New in cisco.iosxr 10.2.0

Synopsis

  • This module configures and manages the attributes of Route maps on Cisco IOSXR.

Parameters

Parameter

Comments

config

list / elements=dictionary

A list of configurations for route policy.

else_section

dictionary

A dictionary of configurations that would be considered in the else block

else_section

dictionary

A dictionary of configurations for nested else, does not support if/ elseif

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

elseif_section

list / elements=dictionary

A list of elif configurations that would follow along with the top level if

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

condition

string

the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don’t add then at end)

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

global

dictionary

A dictionary of configurations for route policy without any conditions

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

if_section

dictionary

A dictionary of configurations for route policy for the nested if condition, under top level else

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

condition

string

the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don’t add then at end)

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

elseif_section

list / elements=dictionary

A list of elif configurations that would follow along with the top level if

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

condition

string

the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don’t add then at end)

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

global

dictionary

A dictionary of configurations for route policy without any conditions

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

if_section

dictionary

A dictionary of configurations for route policy for the top level if condition for the policy

add

dictionary

Add offset to the existing value

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

rip_metric

integer

<0-16> RIP metric attribute

apply

list / elements=dictionary

Apply a route policy

route_policy

string

Apply a specific route policy

route_policy_input

string

ipv4/ ipv6 / name-string

condition

string

the condition string, eg - aigp-metric eq 23 and as-path in tmp1 and community is-empty and community matches-any test1 (don’t add then at end)

drop

boolean

Reject this route with no further processing

Choices:

  • false

  • true

pass

boolean

Pass this route for further processing

Choices:

  • false

  • true

prepend

dictionary

Prepend to BGP AS-path

as_path

integer

<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path

most_recent

boolean

Most recent Autonomous System Number

Choices:

  • false

  • true

number_of_times

integer

number of times to prepend

own_as

boolean

Local Autonomous System Number

Choices:

  • false

  • true

remove

dictionary

Remove all private-as entries

entire_aspath

boolean

Remove private-AS from entire aspath

Choices:

  • false

  • true

set

boolean

Remove all private-as entries (remove as-path private-as)

Choices:

  • false

  • true

set

dictionary

Set a route attribute

administrative_distance

integer

Administrative Distance of the prefix, <1-255> 8 bit decimal numbe

aigp_metric

dictionary

AIGP metric attribute

decrement

boolean

  • Decrement the attribute by specified value

Choices:

  • false

  • true

icrement

boolean

  • Increment the attribute with specified value

Choices:

  • false

  • true

igp_cost

boolean

Internal routing protocol cost

Choices:

  • false

  • true

metric_number

integer

<0-4294967295> 32-bit decimal number

attribute_set

string

TE attribute-set name <0-4294967295> 32-bit decimal number

c_multicast_routing

dictionary

Multicast Customer routing type

bgp

boolean

BGP customer-multicast routing

Choices:

  • false

  • true

pim

boolean

PIM customer-multicast routing

Choices:

  • false

  • true

community

dictionary

BGP community attribute

additive

boolean

Add to the existing community

Choices:

  • false

  • true

community_name

string

Community set name

core_tree

dictionary

Multicast Distribution Tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

ingress_replication_default

boolean

Ingress Replication Default MDT core

Choices:

  • false

  • true

ingress_replication_partitioned

boolean

Ingress Replication Partitioned MDT core

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

mldp_default

boolean

MLDP Default MDT core

Choices:

  • false

  • true

mldp_inband

boolean

MLDP Inband core

Choices:

  • false

  • true

mldp_partitioned_mp2mp

boolean

MLDP Partitioned MP2MP MDT core

Choices:

  • false

  • true

mldp_partitioned_p2mp

boolean

MLDP Partitioned P2MP MDT core

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

p2mp_te_default

boolean

P2MP TE Default MDT core

Choices:

  • false

  • true

p2mp_te_partitioned

boolean

P2MP TE Partitioned MDT core

Choices:

  • false

  • true

pim_default

boolean

PIM Default MDT core

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

dampening

dictionary

BGP route flap dampening parameters

halflife

integer

Dampening penalty half-life, <1-45> Half-life time for penalty, default 15

max_suppress

integer

Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60

reuse

integer

Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750

suppress

integer

Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000

downstream_core_tree

dictionary

BGP I-PMSI/S-PMSI core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

eigrp_metric

dictionary

EIGRP metric attribute

bandwidth

integer

<0-4294967295> Bandwidth in Kbits per second

delay

integer

<0-4294967295> Delay metric in 10 microsecond units

effective_bandwith

integer

<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded

max_transmission

integer

<0-65535> Maximum Transmission Unit metric of the path

reliability

integer

<0-255> Reliability metric where 255 is 100% reliable

fallback_vrf_lookup

boolean

fallback vrf look-up

Choices:

  • false

  • true

flow_tag

integer

flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1

forward_class

integer

Forward class (default value 0), <1-7> 3 bit decimal number starting from 1

ip_precedence

integer

IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1

isis_metric

integer

IS-IS metric attribute, <0-16777215> 24 bit decimal number

label

integer

Set BGP label value, <0-1048575> 20 bit decimal number

label_index

integer

Set Segment Routing label-index value, <0-1048575> 20 bit decimal number

label_mode

dictionary

Set BGP label-mode value

per_ce

boolean

Set the label mode to per-ce

Choices:

  • false

  • true

per_prefix

boolean

Set the label mode to per-prefix

Choices:

  • false

  • true

per_vrf

boolean

Set the label mode to per-vrf

Choices:

  • false

  • true

large_community

string

BGP large community attribute

level

dictionary

Where to import route

level_1

boolean

IS-IS level-1 routes

Choices:

  • false

  • true

level_1_2

boolean

IS-IS level-1 and level-2 routes

Choices:

  • false

  • true

level_2

boolean

IS-IS level-2 routes

Choices:

  • false

  • true

load_balance

boolean

Load-balance for ECMP ecmp-consistent

Choices:

  • false

  • true

lsm_root

string

Label Switched Multicast Root address

metric_type

dictionary

Type of metric for destination routing protocol

external

boolean

ISIS external metric-type

Choices:

  • false

  • true

internal

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rib_metric_as_external

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

rib_metric_as_internal

boolean

Use RIB metric and set ISIS internal metric-type

Choices:

  • false

  • true

type_1

boolean

OSPF type-1 route

Choices:

  • false

  • true

type_2

boolean

OSPF type-2 route

Choices:

  • false

  • true

mpls

string

MPLS traffic-eng attributeset name-string

next_hop

dictionary

Next hop address specified in this route

address

string

next hop address

origin

dictionary

BGP origin code

egp

boolean

ISIS external metric-type

Choices:

  • false

  • true

igp

boolean

ISIS internal metric-type

Choices:

  • false

  • true

rincomplete

boolean

Use RIB metric and set ISIS external metric-type

Choices:

  • false

  • true

ospf_metric

integer

OSPF metric attribute

path_color

boolean

BGP Path Color for RIB (path-color external-reach)

Choices:

  • false

  • true

path_selection

dictionary

BGP path selection

all

boolean

BGP all advertise

Choices:

  • false

  • true

backup

dictionary

BGP backup

advertise

boolean

Advertise the path

Choices:

  • false

  • true

backup_decimal

integer

<1>, decimal number 1

install

boolean

Install the path

Choices:

  • false

  • true

best_path

boolean

BGP best path

Choices:

  • false

  • true

group_best

boolean

BGP group-best advertise

Choices:

  • false

  • true

multiplath

boolean

BGP multipath advertise

Choices:

  • false

  • true

qos_group

integer

QoS Group to classify packets

rib_metric

integer

RIB metric for table-policy

rip_metric

integer

RIP metric attribute

rip_tag

integer

RIP Route tag attribute

rt_set

integer

Limit on routes with paths with an RT-set

s_pmsi

boolean

S-PMSI Advertisement type (star-g)

Choices:

  • false

  • true

spf_priority

dictionary

OSPF SPF priority

critical

boolean

Critical priority

Choices:

  • false

  • true

high

boolean

High priority

Choices:

  • false

  • true

medium

boolean

Medium priority

Choices:

  • false

  • true

static_p2mp_te

string

Static P2MP-TE tunnel

tag

integer

Route tag attribute

traffic_index

dictionary

Traffic-index for BGP policy accounting

ignore

boolean

Remove any traffic-index setting

Choices:

  • false

  • true

index_number

integer

6 bit decimal number starting from 1 <1-63>

upstream_core_tree

dictionary

BGP Leaf AD core tree type

ingress_replication

boolean

Ingress Replication core segment

Choices:

  • false

  • true

mldp

boolean

MLDP core segment

Choices:

  • false

  • true

p2mp_te

boolean

P2MP TE core segment

Choices:

  • false

  • true

sr_p2mp

boolean

Segment-Routing P2MP core

Choices:

  • false

  • true

vpn_distinguisher

integer

BGP VPN distinguisher (VD) attribute

weight

integer

Weight attribute for route selection

suppress_route

boolean

Suppress specific routes when aggregating

Choices:

  • false

  • true

unsuppress_route

boolean

Unsuppress specific aggregated routes

Choices:

  • false

  • true

name

string

Name of the route policy.

running_config

string

This option is used only with state parsed.

The value of this option should be and aggregate of the output received from the IOS XR device by executing the command show running-config route-policy <policy_name> for per route-policy.

The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module’s argspec and the value is then returned in the parsed key within the result.

state

string

The state the configuration should be left in

The states rendered, gathered and parsed does not perform any change on the device.

The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.

The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result.

The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the aggregate of the output of command show running-config route-policy <policy_name> that gives individual route-policy details and executed on device. For state parsed active connection to remote host is not required.

Choices:

  • "merged" ← (default)

  • "replaced"

  • "overridden"

  • "purged"

  • "rendered"

  • "gathered"

  • "parsed"

Notes

Note

  • Tested against Cisco IOS-XR 7.2.2.

  • This module works with connection network_cli.

Examples

# Using merged

# Before state:
# -------------
#
# viosxr#show running-config | include route-policy
#

- name: Merge route-policy configuration
  cisco.iosxr.iosxr_route_maps:
    state: merged
    config:
      - global:
          apply:
            - route_policy: A_NEW_ROUTE_POLICY
          set:
            community:
              additive: true
              community_name: (11011:1001)
            weight: 20000
        name: SIMPLE_GLOBAL_ROUTE_POLICY
      - else_section:
          global:
            drop: true
        if_section:
          condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
          pass: true
        name: SIMPLE_CONDITION_ROUTE_POLICY
      - else_section:
          else_section:
            drop: true
          if_section:
            condition: destination in A_RANDOM_POLICY
            pass: true
            set:
              community:
                additive: true
                community_name: (101010:1)
        if_section:
          condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
          drop: true
        name: COMPLEX_ROUTE_POLICY
      - else_section:
          global:
            pass: true
        if_section:
          condition: community matches-any (9119:1001) or community matches-any (11100:1001)
          drop: true
        name: COMPLEX_CONDITION_ROUTE_POLICY

# Task Output
# -----------
#
# before:
# - {}
# commands:
# - route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# - apply A_NEW_ROUTE_POLICY
# - set community (11011:1001) additive
# - set weight 20000
# - end-policy
# - route-policy SIMPLE_CONDITION_ROUTE_POLICY
# - if destination in SIMPLE_CONDITION_ROUTE_POLICY then
# - pass
# - else
# - drop
# - endif
# - end-policy
# - route-policy COMPLEX_ROUTE_POLICY
# - if as-path in (ios-regex '_3117_', ios-regex '_600_') then
# - drop
# - else
# - if destination in A_RANDOM_POLICY then
# - pass
# - set community (101010:1) additive
# - else
# - drop
# - endif
# - endif
# - end-policy
# - route-policy COMPLEX_CONDITION_ROUTE_POLICY
# - if community matches-any (9119:1001) or community matches-any (11100:1001) then
# - drop
# - else
# - pass
# - endif
# - end-policy
# after:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# - else_section:
#     global:
#       pass: true
#   if_section:
#     condition: community matches-any (9119:1001) or community matches-any (11100:1001)
#     drop: true
#   name: COMPLEX_CONDITION_ROUTE_POLICY

# After state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#   if community matches-any (9119:1001) or community matches-any (11100:1001) then
#     drop
#   else
#     pass
#   endif
# end-policy

# Using replaced

# Before state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#   if community matches-any (9119:1001) or community matches-any (11100:1001) then
#     drop
#   else
#     pass
#   endif
# end-policy

- name: Replace the route-policy configuration
  cisco.iosxr.iosxr_route_maps:
    state: replaced
    config:
      - global:
          apply:
            - route_policy: A_NEW_ROUTE_POLICY
          set:
            community:
              additive: true
              community_name: (11011:1001)
            weight: 20000
        name: SIMPLE_GLOBAL_ROUTE_POLICY
      - else_section:
          global:
            drop: true
        if_section:
          condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
          pass: true
        name: VERY_SIMPLE_CONDITION_ROUTE_POLICY

# Task Output
# -----------
#
# before:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# - else_section:
#     global:
#       pass: true
#   if_section:
#     condition: community matches-any (9119:1001) or community matches-any (11100:1001)
#     drop: true
#   name: COMPLEX_CONDITION_ROUTE_POLICY
# commands:
# - route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
# - if destination in SIMPLE_CONDITION_ROUTE_POLICY then
# - pass
# - else
# - drop
# - endif
# - end-policy
# after:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# - else_section:
#     global:
#       pass: true
#   if_section:
#     condition: community matches-any (9119:1001) or community matches-any (11100:1001)
#     drop: true
#   name: COMPLEX_CONDITION_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: VERY_SIMPLE_CONDITION_ROUTE_POLICY

# After state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
# route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#   if community matches-any (9119:1001) or community matches-any (11100:1001) then
#     drop
#   else
#     pass
#   endif
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy

# Using overridden

# Before state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#   if community matches-any (9119:1001) or community matches-any (11100:1001) then
#     drop
#   else
#     pass
#   endif
# end-policy

- name: Override the route-policy configuration
  cisco.iosxr.iosxr_route_maps:
    state: overridden
    config:
      - global:
          apply:
            - route_policy: A_NEW_ROUTE_POLICY
          set:
            community:
              additive: true
              community_name: (11011:1001)
            weight: 20000
        name: SIMPLE_GLOBAL_ROUTE_POLICY
      - else_section:
          global:
            drop: true
        if_section:
          condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
          pass: true
        name: VERY_SIMPLE_CONDITION_ROUTE_POLICY

# Task Output
# -----------
#
# before:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# - else_section:
#     global:
#       pass: true
#   if_section:
#     condition: community matches-any (9119:1001) or community matches-any (11100:1001)
#     drop: true
#   name: COMPLEX_CONDITION_ROUTE_POLICY
# commands:
# - route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
# - if destination in SIMPLE_CONDITION_ROUTE_POLICY then
# - pass
# - else
# - drop
# - endif
# - end-policy
# - no route-policy SIMPLE_CONDITION_ROUTE_POLICY
# - no route-policy COMPLEX_ROUTE_POLICY
# - no route-policy COMPLEX_CONDITION_ROUTE_POLICY
# after:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: VERY_SIMPLE_CONDITION_ROUTE_POLICY

# After state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy VERY_SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy

# Using purged

# Before state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# viosxr#show running-config route-policy COMPLEX_ROUTE_POLICY
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy

- name: Purge or remove route-policy configuration
  cisco.iosxr.iosxr_route_maps:
    state: purged
    config:
      - name: COMPLEX_ROUTE_POLICY_NO_EXIST
      - name: COMPLEX_ROUTE_POLICY

# Task Output
# -----------
#
# before:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# commands:
# - no route-policy COMPLEX_CONDITION_ROUTE_POLICY
# after:
# - global:
#     apply:
#       - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY

# After state:
# -------------
#
# viosxr#show running-config | include route-policy
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#
# viosxr#show running-config route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# viosxr#show running-config route-policy SIMPLE_CONDITION_ROUTE_POLICY
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy

# Using rendered

- name: Render route-policy configuration
  cisco.iosxr.iosxr_route_maps:
    state: rendered
    config:
      - global:
          apply:
            - route_policy: A_NEW_ROUTE_POLICY
          set:
            community:
              additive: true
              community_name: (11011:1001)
            weight: 20000
        name: SIMPLE_GLOBAL_ROUTE_POLICY
      - else_section:
          global:
            drop: true
        if_section:
          condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
          pass: true
        name: SIMPLE_CONDITION_ROUTE_POLICY
      - else_section:
          else_section:
            drop: true
          if_section:
            condition: destination in A_RANDOM_POLICY
            pass: true
            set:
              community:
                additive: true
                community_name: (101010:1)
        if_section:
          condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
          drop: true
        name: COMPLEX_ROUTE_POLICY
      - else_section:
          global:
            pass: true
        if_section:
          condition: community matches-any (9119:1001) or community matches-any (11100:1001)
          drop: true
        name: COMPLEX_CONDITION_ROUTE_POLICY

# Task Output
# -----------
#
# rendered:
# - route-policy SIMPLE_GLOBAL_ROUTE_POLICY
# - apply A_NEW_ROUTE_POLICY
# - set community (11011:1001) additive
# - set weight 20000
# - end-policy
# - route-policy SIMPLE_CONDITION_ROUTE_POLICY
# - if destination in SIMPLE_CONDITION_ROUTE_POLICY then
# - pass
# - else
# - drop
# - endif
# - end-policy
# - route-policy COMPLEX_ROUTE_POLICY
# - if as-path in (ios-regex '_3117_', ios-regex '_600_') then
# - drop
# - else
# - if destination in A_RANDOM_POLICY then
# - pass
# - set community (101010:1) additive
# - else
# - drop
# - endif
# - endif
# - end-policy
# - route-policy COMPLEX_CONDITION_ROUTE_POLICY
# - if community matches-any (9119:1001) or community matches-any (11100:1001) then
# - drop
# - else
# - pass
# - endif
# - end-policy

# Using parsed

# File: parsed.cfg
# ----------------
#
# route-policy SIMPLE_GLOBAL_ROUTE_POLICY
#   set weight 20000
#   set local-preference 200
#   set community (11011:1001) additive
#   apply A_NEW_ROUTE_POLICY
# end-policy
# !
# route-policy SIMPLE_CONDITION_ROUTE_POLICY
#   if destination in SIMPLE_CONDITION_ROUTE_POLICY then
#     pass
#   else
#     drop
#   endif
# end-policy
# !
# route-policy COMPLEX_ROUTE_POLICY
#   if as-path in (ios-regex '_3117_', ios-regex '_600_') then
#     drop
#   else
#     if destination in A_RANDOM_POLICY then
#       pass
#       set community (101010:1) additive
#       set local-preference 200
#     else
#       drop
#     endif
#   endif
# end-policy
# !
# route-policy COMPLEX_CONDITION_ROUTE_POLICY
#   if community matches-any (9119:1001) or community matches-any (11100:1001) then
#     drop
#   else
#     pass
#   endif
# end-policy

- name: Parse the provided configuration
  cisco.iosxr.iosxr_route_maps:
    running_config: "{{ lookup('file', 'iosxr_route_maps_conf.cfg') }}"
    state: parsed

# Task Output
# -----------
#
# parsed:
# - global:
#     apply:
#     - route_policy: A_NEW_ROUTE_POLICY
#     set:
#       community:
#         additive: true
#         community_name: (11011:1001)
#       weight: 20000
#   name: SIMPLE_GLOBAL_ROUTE_POLICY
# - else_section:
#     global:
#       drop: true
#   if_section:
#     condition: destination in SIMPLE_CONDITION_ROUTE_POLICY
#     pass: true
#   name: SIMPLE_CONDITION_ROUTE_POLICY
# - else_section:
#     else_section:
#       drop: true
#     if_section:
#       condition: destination in A_RANDOM_POLICY
#       pass: true
#       set:
#         community:
#           additive: true
#           community_name: (101010:1)
#   if_section:
#     condition: as-path in (ios-regex '_3117_', ios-regex '_600_')
#     drop: true
#   name: COMPLEX_ROUTE_POLICY
# - else_section:
#     global:
#       pass: true
#   if_section:
#     condition: community matches-any (9119:1001) or community matches-any (11100:1001)
#     drop: true
#   name: COMPLEX_CONDITION_ROUTE_POLICY

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

after

dictionary

The resulting configuration after module execution.

Returned: when changed

Sample: "This output will always be in the same format as the module argspec.\n"

before

dictionary

The configuration prior to the module execution.

Returned: when state is merged, replaced, overridden, purged or purged

Sample: "This output will always be in the same format as the module argspec.\n"

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: when state is merged, replaced, overridden, purged or purged

Sample: ["route-policy APPLY_TEST_ROUTE_POLICY_COMPLEX", "if destination in DEFAULT then", "pass"]

gathered

list / elements=string

Facts about the network resource gathered from the remote device as structured data.

Returned: when state is gathered

Sample: ["This output will always be in the same format as the module argspec.\n"]

parsed

list / elements=string

The device native config provided in running_config option parsed into structured data as per module argspec.

Returned: when state is parsed

Sample: ["This output will always be in the same format as the module argspec.\n"]

rendered

list / elements=string

The provided configuration in the task rendered in device-native format (offline).

Returned: when state is rendered

Sample: ["route-policy APPLY_TEST_ROUTE_POLICY_COMPLEX", "if destination in DEFAULT then", "pass"]

Authors

  • Sagar Paul (@KB-perByte)