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 |
---|---|
A list of configurations for route policy. |
|
A dictionary of configurations that would be considered in the else block |
|
A dictionary of configurations for nested else, does not support if/ elseif |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-string |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A list of elif configurations that would follow along with the top level if |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-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) |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A dictionary of configurations for route policy without any conditions |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-string |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A dictionary of configurations for route policy for the nested if condition, under top level else |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-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) |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A list of elif configurations that would follow along with the top level if |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-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) |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A dictionary of configurations for route policy without any conditions |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-string |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
A dictionary of configurations for route policy for the top level if condition for the policy |
|
Add offset to the existing value |
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
<0-16> RIP metric attribute |
|
Apply a route policy |
|
Apply a specific route policy |
|
ipv4/ ipv6 / name-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) |
|
Reject this route with no further processing Choices:
|
|
Pass this route for further processing Choices:
|
|
Prepend to BGP AS-path |
|
<1-4294967295> 32-bit decimal number/ 16-bit decimal number as-path |
|
Most recent Autonomous System Number Choices:
|
|
number of times to prepend |
|
Local Autonomous System Number Choices:
|
|
Remove all private-as entries |
|
Remove private-AS from entire aspath Choices:
|
|
Remove all private-as entries (remove as-path private-as) Choices:
|
|
Set a route attribute |
|
Administrative Distance of the prefix, <1-255> 8 bit decimal numbe |
|
AIGP metric attribute |
|
Choices:
|
|
Choices:
|
|
Internal routing protocol cost Choices:
|
|
<0-4294967295> 32-bit decimal number |
|
TE attribute-set name <0-4294967295> 32-bit decimal number |
|
Multicast Customer routing type |
|
BGP customer-multicast routing Choices:
|
|
PIM customer-multicast routing Choices:
|
|
BGP community attribute |
|
Add to the existing community Choices:
|
|
Community set name |
|
Multicast Distribution Tree type |
|
Ingress Replication core segment Choices:
|
|
Ingress Replication Default MDT core Choices:
|
|
Ingress Replication Partitioned MDT core Choices:
|
|
MLDP core segment Choices:
|
|
MLDP Default MDT core Choices:
|
|
MLDP Inband core Choices:
|
|
MLDP Partitioned MP2MP MDT core Choices:
|
|
MLDP Partitioned P2MP MDT core Choices:
|
|
P2MP TE core segment Choices:
|
|
P2MP TE Default MDT core Choices:
|
|
P2MP TE Partitioned MDT core Choices:
|
|
PIM Default MDT core Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP route flap dampening parameters |
|
Dampening penalty half-life, <1-45> Half-life time for penalty, default 15 |
|
Maximum dampening penalty, <1-255> Maximum dampening penalty time, default 60 |
|
Penalty before reusing suppressed route, <1-20000> Dampening reuse threshold, default 750 |
|
Dampening penalty to start suppressing a route, <1-20000> Suppress penalty threshold, default 2000 |
|
BGP I-PMSI/S-PMSI core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
EIGRP metric attribute |
|
<0-4294967295> Bandwidth in Kbits per second |
|
<0-4294967295> Delay metric in 10 microsecond units |
|
<0-255> Effective bandwidth metric (Loading) where 255 is 100% loaded |
|
<0-65535> Maximum Transmission Unit metric of the path |
|
<0-255> Reliability metric where 255 is 100% reliable |
|
fallback vrf look-up Choices:
|
|
flow tag value for PBR BGP flow-tag, <1-63> 6 bit decimal number starting from 1 |
|
Forward class (default value 0), <1-7> 3 bit decimal number starting from 1 |
|
IP Precedence to classify packets, <1-7> 3 bit decimal number starting from 1 |
|
IS-IS metric attribute, <0-16777215> 24 bit decimal number |
|
Set BGP label value, <0-1048575> 20 bit decimal number |
|
Set Segment Routing label-index value, <0-1048575> 20 bit decimal number |
|
Set BGP label-mode value |
|
Set the label mode to per-ce Choices:
|
|
Set the label mode to per-prefix Choices:
|
|
Set the label mode to per-vrf Choices:
|
|
BGP large community attribute |
|
Where to import route |
|
IS-IS level-1 routes Choices:
|
|
IS-IS level-1 and level-2 routes Choices:
|
|
IS-IS level-2 routes Choices:
|
|
Load-balance for ECMP ecmp-consistent Choices:
|
|
Label Switched Multicast Root address |
|
Type of metric for destination routing protocol |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
Use RIB metric and set ISIS internal metric-type Choices:
|
|
OSPF type-1 route Choices:
|
|
OSPF type-2 route Choices:
|
|
MPLS traffic-eng attributeset name-string |
|
Next hop address specified in this route |
|
next hop address |
|
BGP origin code |
|
ISIS external metric-type Choices:
|
|
ISIS internal metric-type Choices:
|
|
Use RIB metric and set ISIS external metric-type Choices:
|
|
OSPF metric attribute |
|
BGP Path Color for RIB (path-color external-reach) Choices:
|
|
BGP path selection |
|
BGP all advertise Choices:
|
|
BGP backup |
|
Advertise the path Choices:
|
|
<1>, decimal number 1 |
|
Install the path Choices:
|
|
BGP best path Choices:
|
|
BGP group-best advertise Choices:
|
|
BGP multipath advertise Choices:
|
|
QoS Group to classify packets |
|
RIB metric for table-policy |
|
RIP metric attribute |
|
RIP Route tag attribute |
|
Limit on routes with paths with an RT-set |
|
S-PMSI Advertisement type (star-g) Choices:
|
|
OSPF SPF priority |
|
Critical priority Choices:
|
|
High priority Choices:
|
|
Medium priority Choices:
|
|
Static P2MP-TE tunnel |
|
Route tag attribute |
|
Traffic-index for BGP policy accounting |
|
Remove any traffic-index setting Choices:
|
|
6 bit decimal number starting from 1 <1-63> |
|
BGP Leaf AD core tree type |
|
Ingress Replication core segment Choices:
|
|
MLDP core segment Choices:
|
|
P2MP TE core segment Choices:
|
|
Segment-Routing P2MP core Choices:
|
|
BGP VPN distinguisher (VD) attribute |
|
Weight attribute for route selection |
|
Suppress specific routes when aggregating Choices:
|
|
Unsuppress specific aggregated routes Choices:
|
|
Name of the route policy. |
|
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 |
|
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 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 Choices:
|
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 |
---|---|
The resulting configuration after module execution. Returned: when changed Sample: |
|
The configuration prior to the module execution. Returned: when state is Sample: |
|
The set of commands pushed to the remote device. Returned: when state is Sample: |
|
Facts about the network resource gathered from the remote device as structured data. Returned: when state is Sample: |
|
The device native config provided in running_config option parsed into structured data as per module argspec. Returned: when state is Sample: |
|
The provided configuration in the task rendered in device-native format (offline). Returned: when state is Sample: |