dellemc.enterprise_sonic.sonic_ospfv3 module – Configure global OSPFv3 protocol settings on SONiC.
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.2.0).
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 dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_ospfv3.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
This module provides configuration management of global OSPFv3 parameters on devices running SONiC.
Configure VRF instance before configuring OSPFv3 in a VRF.
Parameters
Parameter |
Comments |
|---|---|
Specifies the OSPFv3 related configuration. |
|
Configure interface auto cost reference bandwidth (1 to 4294967). |
|
Configure route administrative distance. |
|
Distance value for all type of routes (1 to 255). |
|
External routes (1 to 255). |
|
Inter area routes (1 to 255). |
|
Intra area routes (1 to 255). |
|
OSPFv3 non stop forwarding (NSF) also known as OSPFv3 Graceful Restart. |
|
Enable graceful restart. Choices:
|
|
Maximum length of the grace period (1 to 1800). |
|
OSPFv3 GR Helper. |
|
Advertising Router ID. |
|
Enable Helper support. Choices:
|
|
Supported only planned restart. Choices:
|
|
Enable strict LSA check. Choices:
|
|
Supported grace interval (10 to 1800). |
|
Enable OSPFv3 adjacency state logs. Choices:
|
|
Configure maximum number of multiple paths for ECMP support (1 to 256). |
|
Configure route redistribution into OSPFv3 router. |
|
Enable default route redistribution into OSPFv3 always. Only available for protocol=default_route. Choices:
|
|
Metric value for redistributed routes (0 to 16777214). |
|
Metric type for redistributed routes. Choices:
|
|
Configure the type of protocol to redistribute into OSPFv3. Deleting protocol alone will also delete all the other configuration under redistribute.
Choices:
|
|
Route map to filter redistributed routes. Configure route map before. |
|
Configure OSPFv3 router identifier (A.B.C.D). |
|
Configures router timers. |
|
LSA minimum arrival timer (0 to 600000). |
|
OSPFv3 SPF timers. delay_time, initial_hold_time and maximum_hold_time are required together. |
|
SPF delay time in milliseconds (0 to 600000). |
|
SPF initial hold time in milliseconds (0 to 600000). |
|
SPF maximum hold time in milliseconds (0 to 600000). |
|
Specifies the vrf name. Default: |
|
Configure write multiplier (1 to 100). Maximum number of interfaces serviced per write. |
|
Specifies the operation to be performed on the OSPFv3 process configured on the device. In case of merged, the input configuration will be merged with the existing OSPFv3 configuration on the device. In case of deleted, the specified existing OSPFv3 configuration will be removed from the device. In case of overridden, all the existing OSPFv3 configuration will be deleted and the specified input configuration will be installed. In case of replaced, the existing OSPFv3 configuration on the device will be replaced by the configuration in the playbook for each VRF group configured by the playbook. Choices:
|
Notes
Note
Supports
check_mode.Tested against Enterprise SONiC Distribution by Dell Technologies.
Examples
# Using deleted
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 1000
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 30
# distance ospfv3 external 20
# write-multiplier 20
# !
# sonic#
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/64
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/64
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# sonic#
- name: Delete the OSPFv3 configurations
sonic_ospfv3:
config:
- vrf_name: 'default'
router_id: "20.20.20.20"
distance:
external: 20
- vrf_name: "Vrf_1"
timers:
throttle_spf:
delay_time: 50
initial_hold_time: 20
maximum_hold_time: 1000
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# distance 30
# write-multiplier 20
# !
# sonic#
# Using deleted
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 1000
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# distance 30
# write-multiplier 20
# !
# sonic#
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/24
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/24
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# sonic#
- name: Delete the OSPFv3 configurations
sonic_ospfv3:
config:
- vrf_name: "Vrf_1"
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3
# distance 30
# write-multiplier 20
# !
# sonic#
# Using merged
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# (No ospfv3 configuration present)
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/24
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/24
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# sonic#
- name: Add the OSPFv3 configurations
sonic_ospfv3:
config:
- vrf_name: 'default'
router_id: "10.10.10.10"
distance:
external: 20
- vrf_name: "Vrf_1"
timers:
throttle_spf:
delay_time: 10
initial_hold_time: 20
maximum_hold_time: 50
redistribute:
- protocol: "bgp"
metric: 15
metric_type: 2
route_map: "RMAP"
state: merged
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 10 20 50
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 10.10.10.10
# distance ospfv3 external 20
# !
# sonic#
# Using merged
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 10 20 50
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 10.10.10.10
# distance ospfv3 external 20
# !
# sonic#
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/24
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/24
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# sonic#
- name: Add the OSPFv3 configurations
sonic_ospfv3:
config:
- vrf_name: 'default'
write_multiplier: 20
router_id: "20.20.20.20"
distance:
all: 30
- vrf_name: "Vrf_1"
timers:
throttle_spf:
delay_time: 50
initial_hold_time: 20
maximum_hold_time: 100
state: merged
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 100
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 30
# distance ospfv3 external 20
# write-multiplier 20
# !
# sonic#
# Using replaced
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 10
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 30
# distance ospfv3 external 20
# write-multiplier 20
# !
# sonic#
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/24
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/24
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# route-map RMAP2 permit 2
# sonic#
- name: Replace the OSPFv3 vrf default configurations
sonic_ospfv3:
config:
- vrf_name: 'default'
router_id: "20.20.20.20"
redistribute:
- protocol: "connected"
metric: 15
metric_type: 2
route_map: "RMAP2"
distance:
all: 20
state: replaced
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 10
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 20
# redistribute connected metric 15 metric-type 2 route-map RMAP2
# !
# Using overridden
# Before state:
# -------------
#
# sonic# show running-configuration ospfv3
# router ospfv3 vrf Vrf_1
# timers throttle spf 50 20 10
# redistribute bgp metric 15 metric-type 2 route-map RMAP
# !
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 30
# distance ospfv3 external 20
# write-multiplier 20
# !
# sonic#
# sonic# show running-configuration vrf Vrf_1
# !
# ip vrf Vrf_1
# sonic# show running-configuration ipv6 prefix-list
# !
# ipv6 prefix-list PRF_LIST seq 1 permit 1::1/24
# ipv6 prefix-list PRF_LIST2 seq 1 permit 2::1/24
# sonic# show running-configuration route-map
# !
# route-map RMAP permit 1
# route-map RMAP2 permit 2
# sonic#
- name: Override the OSPFv3 configurations
sonic_ospfv3:
config:
- vrf_name: 'default'
router_id: "20.20.20.20"
redistribute:
- protocol: "connected"
metric: 15
metric_type: 2
route_map: "RMAP2"
distance:
all: 20
state: replaced
# After state:
# ------------
#
# sonic# show running-configuration ospfv3
# router ospfv3
# ospfv3 router-id 20.20.20.20
# distance 20
# redistribute connected metric 15 metric-type 2 route-map RMAP2
# !
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The configuration resulting from module invocation. Returned: when changed Sample: |
|
The generated (calculated) configuration that would be applied by module invocation. Returned: when Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |