dellemc.enterprise_sonic.sonic_ecmp_load_share module – IP ECMP load share mode configuration handling for 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_ecmp_load_share.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
This module provides configuration management for IP ECMP load share mode on
devices running SONiC.
Parameters
Parameter |
Comments |
|---|---|
IP ECMP load share mode configuration. |
|
Load share hash algorithm. Choices:
|
|
Include the ingress port in the load share hash calculation. Choices:
|
|
Load share hash offset. |
|
Enable flow-based IP ECMP hashing. If this option is set to true, the configured ‘offset’ value is ignored. Choices:
|
|
IP ECMP hash offset value. The range of values is from 0 to 15. |
|
Include the ROCE Queue-Pair Number in the load share hash calculation. Choices:
|
|
IP ECMP hash seed value. The range of values is from 0 to 16777215. |
|
IPv4 ECMP Load share hash parameters. |
|
Include the IPv4 destination IP address in the load share hash calculation. Choices:
|
|
Include the IPv4 protocol value in the load share hash calculation. Choices:
|
|
Include the IPv4 L4 source port in the load share hash calculation. Choices:
|
|
IPv4 L4 source port. Choices:
|
|
Include the IPv4 source IP address in the load share hash calculation. Choices:
|
|
IPv4 symmetric hash mode. Choices:
|
|
IPv6 ECMP Load share hash parameters. |
|
Include the IPv6 destination IP address in the load share hash calculation. Choices:
|
|
Include the IPv6 L4 destination port in the load share hash calculation. Choices:
|
|
Include the IPv6 L4 source port in the load share hash calculation. Choices:
|
|
Include the IPv6 “next header” value (usually the Transport Layer protocol type) in the load share hash calculation. Choices:
|
|
Include the IPv6 source IP address in the load share hash calculation. Choices:
|
|
IPv6 symmetric hash mode. Choices:
|
|
The state of the configuration after module completion. Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode.
Examples
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash offset flow-based
# ip load-share hash seed 8888
# ip load-share hash ipv4 ipv4-dst-ip
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash ipv4 ipv4-ip-proto
# ip load-share hash ipv4 ipv4-l4-src-port
# ip load-share hash ipv4 ipv4-l4-dst-port
# ip load-share hash algorithm CRC
# ip load-share hash ingress-port
# ip load-share hash roce qpn
- name: Delete some configuration
sonic_ecmp_load_share:
config:
hash_algorithm: CRC
hash_offset:
flow_based: true
hash_roce_qpn: true
hash_seed: 8888
ipv4:
ipv4_l4_dst_port: true
ipv4_l4_src_port: true
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash ipv4 ipv4-dst-ip
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash ipv4 ipv4-ip-proto
# ip load-share hash ingress-port
# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash seed 8888
# ip load-share hash ipv4 ipv4-dst-ip
# ip load-share hash algorithm CRC
- name: Merge some configuration
sonic_ecmp_load_share:
config:
hash_algorithm: CRC_32LO
hash_ingress_port: true
hash_offset:
offset: 12
flow_based: true
hash_roce_qpn: true
hash_seed: 9999
ipv4:
ipv4_src_ip: true
ipv4_ip_proto: true
ipv4_l4_dst_port: true
ipv4_l4_src_port: true
state: merged
# After state:
# ------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash seed 9999
# ip load-share hash ipv4 ipv4-dst-ip
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash ipv4 ipv4-ip-proto
# ip load-share hash ipv4 ipv4-l4-src-port
# ip load-share hash ipv4 ipv4-l4-dst-port
# ip load-share hash algorithm CRC_32LO
# ip load-share hash ingress-port
# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash offset flow-based
# ip load-share hash seed 8888
# ip load-share hash ipv4 ipv4-dst-ip
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash algorithm CRC
# ip load-share hash ingress-port
- name: Replace some configuration
sonic_ecmp_load_share:
config:
hash_algorithm: XOR
hash_ingress_port: true
hash_offset:
flow_based: true
hash_seed: 7777
ipv4:
ipv4_src_ip: true
state: replaced
# After state:
# ------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash offset flow-based
# ip load-share hash seed 7777
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash algorithm XOR
# ip load-share hash ingress-port
# Using overridden
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash offset flow-based
# ip load-share hash seed 9999
# ip load-share hash ipv4 ipv4-src-ip
# ip load-share hash ipv4 ipv4-ip-proto
# ip load-share hash ipv4 ipv4-l4-src-port
# ip load-share hash ipv4 ipv4-l4-dst-port
# ip load-share hash algorithm XOR
# ip load-share hash ingress-port
- name: Override some configuration
sonic_ecmp_load_share:
config:
hash_algorithm: CRC_32LO
hash_ingress_port: true
hash_offset:
flow_based: true
hash_seed: 1234
ipv4:
ipv4_l4_dst_port: true
ipv4_l4_src_port: true
state: overridden
# After state:
# ------------
#
# sonic# show running-configuration | grep load-share
# ip load-share hash offset flow-based
# ip load-share hash seed 1234
# ip load-share hash ipv4 ipv4-l4-src-port
# ip load-share hash ipv4 ipv4-l4-dst-port
# ip load-share hash algorithm CRC_32LO
# ip load-share hash ingress-port
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 |
|
The configuration that would result from non-check-mode module invocation. Returned: when |
|
The configuration prior to the module invocation. Returned: always |
|
The set of commands pushed to the remote device. In Returned: always Sample: |
Authors
Zhang (@mingjunzhang2019)