cisco.iosxr.iosxr_ospfv2 module – Resource module to configure OSPFv2.
Note
This module is part of the cisco.iosxr collection (version 3.3.1).
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_ospfv2
.
New in cisco.iosxr 1.0.0
Synopsis
This module manages global OSPFv2 configuration on devices running Cisco IOS-XR
Parameters
Parameter |
Comments |
---|---|
A list of OSPFv2 process configuration |
|
A list of OSPFv2 instances configuration |
|
Enable unicast topology for ipv4 address family Choices:
|
|
Stagger OSPFv2 adjacency bring up |
|
Disable stagger OSPFv2 adjacency Choices:
|
|
Maximum simultaneous neighbors to bring up |
|
Initial number of neighbors to bring up per area (default 2) |
|
Enable weights configured under interfaces for load sharing |
|
Reference bandwidth to use for calculation (Mbits/sec) |
|
Specify default weight value to use when it is not configured under interface |
|
Configure OSPFv2 areas’ properties |
|
Area ID as IP address or integer |
|
Enable authentication |
|
Specify keychain name |
|
Use message-digest authentication |
|
Specify keychain name |
|
Use no authentication Choices:
|
|
Used to mention authentication password (key) |
|
Specifies an UNENCRYPTED password (key) will follow |
|
Specifies an ENCRYPTED password (key) will follow |
|
The OSPFv2 password (key) |
|
Configure BFD parameters |
|
Configure fast detection |
|
Enable fast detection only Choices:
|
|
Hold down neighbor session until BFD session is up Choices:
|
|
Hello interval in milli-seconds |
|
Detect multiplier |
|
Interface cost |
|
Interval after which a neighbor is declared dead |
|
Set the summary default-cost of a NSSA/stub area. Stub’s advertised external route metric |
|
Time between HELLO packets |
|
Configure MPLS routing protocol parameters |
|
Configure LDP parameters |
|
Enable LDP IGP interface auto-configuration Choices:
|
|
Enable LDP IGP synchronization Choices:
|
|
LDP sync for igp-shortcut tunnels Choices:
|
|
Configure an ospf area to run MPLS Traffic Engineering Choices:
|
|
Enable/Disable ignoring of MTU in DBD packets Choices:
|
|
NSSA settings for the area |
|
Originate default Type 7 LSA |
|
OSPFv2 default metric |
|
Metric type for default routes |
|
Do not send redistributed LSAs into NSSA area Choices:
|
|
Do not send summary LSAs into NSSA area Choices:
|
|
Configure area as NSSA Choices:
|
|
Translate LSA |
|
Translate from Type 7 to Type 5 |
|
Always translate LSAs Choices:
|
|
Summarize routes matching address/mask (border routers only) |
|
IP in Prefix format (x.x.x.x/len) |
|
Advertise this range (default) Choices:
|
|
DoNotAdvertise this range Choices:
|
|
Specify the route-policy to filter type 3 LSAs (list can have one inbound and/or one outbound policy only) |
|
Specify inbound or outbound Choices:
|
|
Specify parameter values for the policy |
|
Settings for configuring the area as a stub |
|
Do not send summary LSA into stub area Choices:
|
|
Configure the area as a stub Choices:
|
|
Estimated time needed to send link-state update packet |
|
Define a virtual link |
|
Enable authentication |
|
Specify keychain name |
|
Use message-digest authentication |
|
Specify keychain name |
|
Use no authentication Choices:
|
|
Used to mention authentication password (key) |
|
Specifies an UNENCRYPTED password (key) will follow |
|
Specifies an ENCRYPTED password (key) will follow |
|
The OSPFv2 password (key) |
|
Interval after which a neighbor is declared dead |
|
Time between HELLO packets |
|
Router-ID of virtual link neighbor (A.B.C.D) |
|
Message digest authentication password (key) |
|
Key ID (1-255) |
|
Use MD5 Algorithm |
|
Specifies an UNENCRYPTED password (key) will follow Choices:
|
|
Specifies an ENCRYPTED password (key) will follow Choices:
|
|
The OSPFv2 password (key) |
|
Delay between LSA retransmissions |
|
Link state transmit delay |
|
Enable authentication |
|
Specify keychain name |
|
Use message-digest authentication |
|
Specify keychain name |
|
Specify message-digest selection Choices:
|
|
Use no authentication Choices:
|
|
Used to mention authentication password (key) |
|
Specifies an UNENCRYPTED password (key) will follow Choices:
|
|
Specifies an ENCRYPTED password (key) will follow Choices:
|
|
The OSPFv2 password (key) |
|
Calculate OSPFv2 interface cost according to bandwidth |
|
Assign OSPFv2 cost based on interface type Choices:
|
|
Specify reference bandwidth in megabits per sec |
|
Configure BFD parameters |
|
Configure fast detection |
|
Enable fast detection only Choices:
|
|
Hold down neighbor session until BFD session is up Choices:
|
|
Hello interval in milli-seconds |
|
Detect multiplier |
|
Enable specific OSPFv2 feature |
|
Configure opaque LSA |
|
Disable Opaque LSA capability Choices:
|
|
Enable opaque LSA Choices:
|
|
NSSA capability |
|
Interface cost (1-65535) |
|
Filter OSPFv2 LSA during synchronization and flooding (all outgoing LSA). Enable/Disable filtering Choices:
|
|
Interval after which a neighbor is declared dead |
|
Distribute default route |
|
Always advertise default route Choices:
|
|
OSPFv2 default metric |
|
OSPFv2 metric type for default routes |
|
Apply route-policy to default-information origination |
|
Enable distribution of default route Choices:
|
|
Set metric of redistributed routes |
|
Enable/Disable OSPFv2 demand circuit Choices:
|
|
Define an administrative distance |
|
Administrative distance |
|
Access list name |
|
Source IP address |
|
Distance value |
|
IP wild card bits (A.B.C.D) |
|
OSPFv2 administrative distance |
|
Distance for external routes |
|
Distance for inter-area routes |
|
Distance for intra-area routes |
|
Enable Distribution of LSAs to external services |
|
Set distribution process instance identifier |
|
Throttle time between successive LSA updates |
|
Enable Distribution of LSAs to external services |
|
Set distribution process instance identifier |
|
Throttle time between successive LSA updates |
|
Filter networks in routing updates (list can have one inbound and/or one outbound policy only) |
|
Inbound/outbound access-list |
|
Filter incoming/outgoing routing updates Choices:
|
|
Specify additional parameters for outgoing updates only |
|
For BGP, specify AS number. 2-byte AS number (or) 4-byte AS number in asdot (X.Y) format (or) 4-byte AS number in asplain format For OSPF, specify OSPFv2 instance name |
|
Type of routes Choices:
|
|
Route Policy to filter OSPFv2 prefixes (for incoming updates only) |
|
Enable/Disable advertisement of intra-area prefixes as external Choices:
|
|
Enable/Disable OSPFv2 Flood Reduction Choices:
|
|
Time between HELLO packets (<1-65535> seconds) |
|
Do not complain upon receiving MOSPFv2 Type 6 LSA Choices:
|
|
Enable fast or early detection of link-down events Choices:
|
|
Log adjacency state changes |
|
Log all state changes Choices:
|
|
Disable log adjacency changes Choices:
|
|
Set log adjacency Choices:
|
|
Advertise loopback as a stub network Choices:
|
|
Feature to limit the number of non-self-originated LSAs |
|
Set count on how many times adjacencies can be suppressed |
|
Set number of minutes during which all adjacencies are suppressed |
|
Set number of minutes after which ignore-count is reset to zero |
|
Threshold value (%) at which to generate a warning message |
|
Log a warning message when limit is exceeded Choices:
|
|
Set maximum metric |
|
Maximum metric in self-originated router-LSAs |
|
External LSA configuration |
|
Set max metric value for external LSAs |
|
Set external-lsa attribute Choices:
|
|
Advertise Max metric for Stub links as well Choices:
|
|
Effective only at startup |
|
Set on-startup attribute Choices:
|
|
ASN of BGP to wait for |
|
Wait period in seconds after startup |
|
Set router-lsa attribute Choices:
|
|
Summary LSAs configuration |
|
Max metric value for summary LSAs |
|
Set summary-lsa attribute Choices:
|
|
Message digest authentication password (key) |
|
Key ID |
|
Use MD5 Algorithm |
|
Specifies an UNENCRYPTED password (key) will follow Choices:
|
|
Specifies an ENCRYPTED password (key) will follow Choices:
|
|
The OSPFv2 password (key) |
|
Avoid microloops |
|
Avoid microloops for protected prefixes only) Choices:
|
|
Delay to introduce between SPF and RIB updates |
|
Enable segment routing microloop avoidance Choices:
|
|
Enables OSPFv2 route convergence monitoring |
|
Enables Individual Prefix Monitoring |
|
Enables Tracking External(Type-5/7) Prefix monitoring Choices:
|
|
Enables Tracking IP-Frr Convergence Choices:
|
|
Enables Tracking Summary(Inter-Area) Prefix monitoring Choices:
|
|
Configure MPLS routing protocol parameters |
|
Configure LDP parameters |
|
Enable LDP IGP interface auto-configuration Choices:
|
|
Enable LDP IGP synchronization Choices:
|
|
LDP sync for igp-shortcut tunnels Choices:
|
|
Routing protocol commands for MPLS Traffic Engineering |
|
Exclude IP address destinations from using TE tunnels |
|
Specify parameter values for the policy |
|
Policy name |
|
Retain one or more IPv4 nexthops with tunnel nexthops Choices:
|
|
Enable LDP sync induced metric propagation Choices:
|
|
Publish multicast-intact paths to RIB Choices:
|
|
Traffic Engineering stable IP address for system |
|
Enable/Disable ignoring of MTU in DBD packets Choices:
|
|
Network type |
|
Specify OSPFv2 broadcast multi-access network Choices:
|
|
Specify OSPFv2 NBMA network Choices:
|
|
Specify OSPFv2 point-to-multipoint network Choices:
|
|
Specify OSPFv2 point-to-point network Choices:
|
|
Non-stop forwarding |
|
Cisco Non-stop forwarding |
|
Cancel NSF restart when non-NSF-aware neighbors detected for the whole OSPFv2 process Choices:
|
|
Enable Cisco NSF Choices:
|
|
Maximum time allowed for external route learning |
|
IETF graceful restart |
|
Disable router’s helper support level Choices:
|
|
Only enable ietf option Choices:
|
|
Minimum interval between NSF restarts (<90-3600> seconds) |
|
Maximum route lifetime following restart (<90-1800> seconds) |
|
Enable NSR for all VRFs in this process. ‘False’ option to disable NSR for all VRFs in this process Choices:
|
|
Size of OSPFv2 packets to use. min=576 max=MTU bytes |
|
Enable/Disable passive Choices:
|
|
Suppress advertisement of the prefixes |
|
Enable/Disable secondary address suppression Choices:
|
|
Set the suppression option Choices:
|
|
Router priority |
|
The OSPFv2 Process ID |
|
Protocol specific configuration |
|
Only traffic destined for this box allowed(cisco-support) Choices:
|
|
High watermark for incoming priority events |
|
Hello events are dropped when incoming event queue exceeds this value |
|
DBD/LS Update/Req packets are dropped when incoming event queue exceeds this value |
|
LSA ACKs are dropped when incoming event queue exceeds this value |
|
Shutdown post reload only Choices:
|
|
Shutdown the OSPFv2 Protocol Choices:
|
|
Redistribute information from another routing Protocol |
|
OnePK application name for application routes (or) AS number for bgp and eigrp (or) instance name for isis and ospf |
|
ISIS levels Choices:
|
|
LSA type 3 for redistributed routes Choices:
|
|
Redistribution of routes. For OSPFv2 - external/internal/nssa-external 1/2. For EIGRP - external/internal |
|
Metric for redistributed routes |
|
OSPFv2 exterior metric type for redistributed routes Choices:
|
|
Redistribute to NSSA areas only Choices:
|
|
Preserve med of BGP routes Choices:
|
|
Apply route-policy to redistribution |
|
Name of the policy |
|
Specify parameter values for the policy |
|
Route type to redistribute Choices:
|
|
Set tag for routes redistributed into OSPFv2 |
|
Delay between LSA retransmissions |
|
OSPFv2 router-id in IPv4 address format (A.B.C.D) |
|
Enable security |
|
Maximum number of IP hops allowed <1-254> |
|
Enable ttl security Choices:
|
|
Enable/Disable advertisement of external prefixes as inter-area Choices:
|
|
Configure IP address summaries |
|
Suppress routes that match the specified prefix/mask pair Choices:
|
|
IP summary address/mask (A.B.C.D/prefix) |
|
Set tag |
|
Configure timer related constants |
|
Timers for graceful shutdown(cisco-support) |
|
Delay before starting graceful shutdown |
|
Time to keep routes active after graceful shutdown |
|
OSPFv2 global LSA timers |
|
OSPFv2 LSA group pacing timer. Interval between group of LSA being refreshed or maxaged |
|
OSPFv2 MinLSArrival timer. The minimum interval in millisec between accepting the same LSA |
|
OSPFv2 LSA refresh interval. How often self-originated LSAs should be refreshed, in seconds |
|
OSPFv2 flood pacing timer. Interval in msec to pace flooding on all interfaces |
|
OSPFv2 throttle timers |
|
Fast-reroute throttle timer. Delay between end of SPF and start of the fast-reroute computation in milliseconds |
|
LSA throttle timers for all types of OSPFv2 LSAs |
|
Delay to generate first occurance of LSA in milliseconds |
|
Maximum delay between originating the same LSA in milliseconds |
|
Minimum delay between originating the same LSA in milliseconds |
|
OSPFv2 SPF throttle timers |
|
Delay between receiving a change to SPF calculation in milliseconds |
|
Maximum wait time in milliseconds for SPF calculations |
|
Delay between first and second SPF calculation in milliseconds |
|
Estimated time needed to send link-state update packet |
|
Interface weight |
|
This option is used only with state parsed. The value of this option should be the output received from the IOS-XR device by executing the command show running-config router ospf. The state parsed reads the configuration from |
|
The state the configuration should be left in. Choices:
|
Notes
Note
This module works with connection
network_cli
. See the IOS-XR Platform Options
Examples
# Using merged
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 15:54:44.569 UTC
# % No such configuration item(s)
#
- name: Merge provided OSPFv2 configuration with the existing configuration
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: '27'
areas:
- area_id: '10'
hello_interval: 2
authentication:
keychain: ansi11393
- process_id: '26'
adjacency_stagger:
max_adjacency: 20
min_adjacency: 10
- process_id: '10'
authentication:
keychain: ansible_test1102
areas:
- area_id: '11'
default_cost: 5
cost: 11
- area_id: 22
default_cost: 6
- process_id: '30'
areas:
- area_id: 11
default_cost: 5
- area_id: 22
default_cost: 6
cost: 2
default_metric: 10
transmit_delay: 2
hello_interval: 1
dead_interval: 2
retransmit_interval: 2
weight: 2
packet_size: 577
priority: 1
router_id: 2.2.2.2
demand_circuit: enable
passive: disable
summary_in: enable
flood_reduction: disable
mtu_ignore: enable
external_out: disable
state: merged
#
#
# ------------------------
# Module Execution Result
# ------------------------
#
# "before": {}
#
# "commands": [
# "router ospf 30",
# "cost 2",
# "weight 2",
# "passive disable",
# "priority 1",
# "flood-reduction disable",
# "default-metric 10",
# "router-id 2.2.2.2",
# "demand-circuit enable",
# "packet-size 577",
# "transmit-delay 2",
# "summary-in enable",
# "external-out disable",
# "dead-interval 2",
# "hello-interval 1",
# "retransmit-interval 2",
# "mtu-ignore enable",
# "area 11 default-cost 5",
# "area 22 default-cost 6",
# "router ospf 26",
# "adjacency stagger 10 20",
# "authentication message-digest keychain ansible1101pass",
# "router ospf 27",
# "area 10 authentication keychain ansi11393",
# "area 10 hello-interval 2",
# "router ospf 10",
# "authentication keychain ansible_test1102",
# "area 11 default-cost 5",
# "area 11 cost 11",
# "area 22 default-cost 6"
# ]
#
# "after": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
#
#
# ------------
# After state
# ------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
# Using replaced
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Replace OSPFv2 routes configurations from the device
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
- area_id: 20
cost: 2
default_cost: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
state: replaced
#
#
# ------------------------
# Module Execution Result
# ------------------------
#
# "before": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
#
# "commands": [
# "router ospf 27",
# "no area 10 authentication keychain ansi11393",
# "area 20 authentication keychain ansi11393",
# "area 20 default-cost 2",
# "area 20 cost 2"
# ]
#
# "after": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "hello_interval": 2
# },
# {
# "area_id": "20",
# "authentication": {
# "keychain": "ansi11393"
# },
# "cost": 2,
# "default_cost": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton(config)#do show running-config router ospf
# Thu Jun 11 16:40:31.038 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
# Using overridden
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Override existing OSPFv2 configurations from the device
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
authentication:
keychain: ansi11393
- area_id: 20
cost: 2
default_cost: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
state: overridden
#
#
# ------------------------
# Module Execution Result
# ------------------------
#
# "before": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
#
# "commands": [
# "router ospf 10",
# "no authentication keychain ansible_test1102",
# "no area 11 default-cost 5",
# "no area 11 cost 11",
# "no area 22 default-cost 6",
# "router ospf 30",
# "no cost 2",
# "no weight 2",
# "no passive disable",
# "no priority 1",
# "no flood-reduction disable",
# "no default-metric 10",
# "no router-id 2.2.2.2",
# "no demand-circuit enable",
# "no packet-size 577",
# "no transmit-delay 2",
# "no summary-in enable",
# "no external-out disable",
# "no dead-interval 2",
# "no hello-interval 1",
# "no retransmit-interval 2",
# "no mtu-ignore enable",
# "no area 11 default-cost 5",
# "no area 22 default-cost 6",
# "router ospf 27",
# "area 20 authentication keychain ansi11393",
# "area 20 default-cost 2",
# "area 20 cost 2"
# ]
#
# "after": {
# "processes": [
# {
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# },
# {
# "area_id": "20",
# "authentication": {
# "keychain": "ansi11393"
# },
# "cost": 2,
# "default_cost": 2
# }
# ],
# "process_id": "27"
# },
# {
# "process_id": "30"
# }
# ]
# }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:50:36.332 UTC
# router ospf 10
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# !
#
# Using deleted
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Deleted existing OSPFv2 configurations from the device
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: '10'
- process_id: '26'
- process_id: '27'
- process_id: '30'
state: deleted
#
#
# ------------------------
# Module Execution Result
# ------------------------
#
# "before": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# },
#
# "commands": [
# "router ospf 10",
# "no authentication keychain ansible_test1102",
# "no area 11 default-cost 5",
# "no area 11 cost 11",
# "no area 22 default-cost 6",
# "router ospf 26",
# "no adjacency stagger 10 20",
# "no authentication message-digest keychain ansible1101pass",
# "router ospf 27",
# "no area 10 authentication keychain ansi11393",
# "no area 10 hello-interval 2",
# "router ospf 30",
# "no cost 2",
# "no weight 2",
# "no passive disable",
# "no priority 1",
# "no flood-reduction disable",
# "no default-metric 10",
# "no router-id 2.2.2.2",
# "no demand-circuit enable",
# "no packet-size 577",
# "no transmit-delay 2",
# "no summary-in enable",
# "no external-out disable",
# "no dead-interval 2",
# "no hello-interval 1",
# "no retransmit-interval 2",
# "no mtu-ignore enable",
# "no area 11 default-cost 5",
# "no area 22 default-cost 6"
# ]
#
# "after": {
# "processes": [
# {
# "process_id": "10"
# },
# {
# "process_id": "26"
# },
# {
# "process_id": "27"
# },
# {
# "process_id": "30"
# }
# ]
# }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton(config)#show running-config router ospf
# Thu Jun 11 17:07:34.218 UTC
# router ospf 10
# !
# router ospf 26
# !
# router ospf 27
# !
# router ospf 30
# !
# Using parsed
# parsed.cfg
# ------------
# Thu Jun 11 17:28:51.918 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
- name: Parsed the device configuration to get output commands
cisco.iosxr.iosxr_ospfv2:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
#
#
# -------------------------
# Module Execution Result
# -------------------------
#
#
# "parsed": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
# Using rendered
#
#
- name: Render the commands for provided configuration
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
- process_id: 10
authentication:
keychain: ansible_test1102
areas:
- area_id: 11
default_cost: 5
cost: 11
- area_id: 22
default_cost: 6
- process_id: 30
areas:
- area_id: 11
default_cost: 5
- area_id: 22
default_cost: 6
cost: 2
default_metric: 10
transmit_delay: 2
hello_interval: 1
dead_interval: 2
retransmit_interval: 2
weight: 2
packet_size: 577
priority: 1
router_id: 2.2.2.2
demand_circuit: enable
passive: disable
summary_in: enable
flood_reduction: disable
mtu_ignore: enable
external_out: disable
state: rendered
#
#
# -------------------------
# Module Execution Result
# -------------------------
#
#
# "rendered": [
# "router ospf 27",
# "area 10 authentication keychain ansi11393",
# "area 10 hello-interval 2",
# "router ospf 26",
# "adjacency stagger 10 20",
# "authentication message-digest keychain ansible1101pass",
# "router ospf 10",
# "authentication keychain ansible_test1102",
# "area 11 default-cost 5",
# "area 11 cost 11",
# "area 22 default-cost 6",
# "router ospf 30",
# "cost 2",
# "weight 2",
# "passive disable",
# "priority 1",
# "flood-reduction disable",
# "default-metric 10",
# "router-id 2.2.2.2",
# "demand-circuit enable",
# "packet-size 577",
# "transmit-delay 2",
# "summary-in enable",
# "external-out disable",
# "dead-interval 2",
# "hello-interval 1",
# "retransmit-interval 2",
# "mtu-ignore enable",
# "area 11 default-cost 5",
# "area 22 default-cost 6"
# ]
# Using gathered
#
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Gather ospfv2 routes configuration
cisco.iosxr.iosxr_ospfv2:
state: gathered
#
#
# -------------------------
# Module Execution Result
# -------------------------
#
# "gathered": {
# "processes": [
# {
# "areas": [
# {
# "area_id": "11",
# "cost": 11,
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "authentication": {
# "keychain": "ansible_test1102"
# },
# "process_id": "10"
# },
# {
# "adjacency_stagger": {
# "max_adjacency": 20,
# "min_adjacency": 10
# },
# "authentication": {
# "message_digest": {
# "keychain": "ansible1101pass"
# }
# },
# "process_id": "26"
# },
# {
# "areas": [
# {
# "area_id": "10",
# "authentication": {
# "keychain": "ansi11393"
# },
# "hello_interval": 2
# }
# ],
# "process_id": "27"
# },
# {
# "areas": [
# {
# "area_id": "11",
# "default_cost": 5
# },
# {
# "area_id": "22",
# "default_cost": 6
# }
# ],
# "cost": 2,
# "dead_interval": 2,
# "default_metric": 10,
# "demand_circuit": "enable",
# "external_out": "disable",
# "flood_reduction": "disable",
# "hello_interval": 1,
# "mtu_ignore": "enable",
# "packet_size": 577,
# "passive": "disable",
# "priority": 1,
# "process_id": "30",
# "retransmit_interval": 2,
# "router_id": "2.2.2.2",
# "summary_in": "enable",
# "transmit_delay": 2,
# "weight": 2
# }
# ]
# }
#
# After state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration model invocation. Returned: when changed Sample: |
|
The configuration prior to the model invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |