cisco.nxos.nxos_igmp_snooping module – IGMP snooping resource module.
Note
This module is part of the cisco.nxos collection (version 14.0.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 cisco.nxos.
To use it in a playbook, specify: cisco.nxos.nxos_igmp_snooping.
New in cisco.nxos 1.0.0
Synopsis
This module manages the global IGMP snooping configuration and the IGMP snooping settings of the per-VLAN context (
vlan configuration <id>), including static groups, multicast router ports, the querier and report policies, on devices running Cisco NX-OS.
Note
This module has a corresponding action plugin.
Aliases: igmp_snooping
Parameters
Parameter |
Comments |
|---|---|
IGMP snooping configuration. |
|
Do not include the NVE interface as a static router port in the VXLAN VLANs ( Defaults to Choices:
|
|
Group membership timeout for all VLANs on the device ( Accepted values are an integer in the range 1-10080 (minutes) and It is removed by state |
|
Hold-down timer in seconds ( Defaults to |
|
Global link-local groups suppression ( Defaults to Choices:
|
|
Number of general queries without an answer after which the mrouter port is removed ( Defaults to |
|
IGMP snooping proxy for general queries ( Removed by state |
|
Enables ( Required when mrt is given. Choices:
|
|
Maximum response time in seconds ( |
|
Global IGMPv1/IGMPv2 report suppression ( Defaults to Choices:
|
|
Enables or disables IGMP snooping on the switch ( Defaults to Choices:
|
|
Percentage of the multicast table size at which a syslog message is raised ( Defaults to |
|
Global IGMPv3 report suppression and proxy reporting ( Defaults to Choices:
|
|
The VLANs with a With state With state |
|
Group access filters ( Without interface the line is |
|
The interface the policy applies to. Required for a |
|
The 1-63 character route-map or prefix-list name. It does not have to exist. |
|
The kind of policy. Choices:
|
|
Explicit host tracking for IGMPv3 ( Choices:
|
|
Fast leave ( Choices:
|
|
Group membership timeout of the VLAN ( |
|
Last member query interval in seconds ( |
|
Link-local groups suppression of the VLAN. Defaults to Choices:
|
|
Static multicast router ports ( Accepts NX-OS Ethernet, VLAN, loopback, port-channel and NVE interface names. |
|
IGMP snooping proxy for general queries of the VLAN ( |
|
Enables ( Choices:
|
|
Maximum response time in seconds, in the range 1-25. |
|
Use the group address in proxy leaves ( Choices:
|
|
The IPv4 source address of the IGMP snooping querier ( The querier with the lowest address wins the election. |
|
Querier timeout in seconds ( |
|
Query interval in seconds ( |
|
Maximum query response time in seconds ( |
|
Floods the reports ( |
|
Flood the reports to all ports ( Choices:
|
|
Flood the reports to these interfaces ( |
|
Report filters ( |
|
The interface the policy applies to. |
|
The 1-63 character route-map or prefix-list name. It does not have to exist. |
|
The kind of policy. Choices:
|
|
IGMPv1/IGMPv2 report suppression of the VLAN. Defaults to Choices:
|
|
Robustness variable ( |
|
Enables or disables IGMP snooping for the VLAN ( Choices:
|
|
Number of queries sent at startup ( |
|
Interval of the startup queries in seconds ( |
|
Static multicast groups of the VLAN ( |
|
The IPv4 multicast group address. |
|
The interfaces on which the group is statically joined. One |
|
The IPv4 source address of the group, for IGMPv3. |
|
IGMPv3 report suppression of the VLAN. Defaults to Choices:
|
|
IGMP version used by the snooping process ( |
|
The VLAN ID, in the range 1-4094. |
|
Enables IGMP snooping for VXLAN VLANs ( Defaults to Choices:
|
|
This option is used only with state parsed. The value of this option should be the output received from the NX-OS device by executing the commands show running-config | section “^vlan configuration” and show running-config | include “^ip igmp snooping|^no ip igmp snooping”, or the full running configuration. The state parsed reads the configuration from |
|
The state the configuration should be left in. The states and the call shape changed in 14.0.0. Only the resource module states exist, the former With merged what is given is added to the device, nothing is removed. A setting that is not given is not touched. With replaced the global settings that are not given are reset to their default, the listed VLANs are made identical to the given ones and the other VLANs are not touched. With overridden the same applies and the VLANs that are not listed are removed. With deleted and without config all global settings are reset to their default and all With gathered the configuration is read from the device. With rendered the commands for config are returned without connecting to the device. With parsed running_config is returned as structured data. Choices:
|
Notes
Note
Tested against NX-OS 10.6(4) on N9K-C93180YC-FX.
Unsupported for Cisco MDS.
The module was rewritten as a resource module, the former flat parameters and the
presentanddefaultstates are replaced by config with the statemergedordeleted.NX-OS does not display a setting that has its default value. The global settings are therefore gathered with their effective value, a setting of a VLAN that is equal to its default counts as not set, and an option that is given with its default value removes its line.
A
vlan configurationblock is managed completely. With statereplacedoroverriddena listed VLAN gets exactly the given settings. statedeletedwithout config and stateoverriddenalso remove the blocks that are not listed, also those created by other tools, so run the task in check mode first.The device keeps one policy per interface, so an interface can only be used once in report_policy and access_group.
The proxy with mrt
5, the default, is not stored by the device, omit mrt instead.IGMP snooping over VXLAN needs BGP EVPN and the global vxlan setting, and the configuration must be identical on both vPC peers.
This module works with connection
network_cliandhttpapi. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_nxos.htmlThe parsed state reads configuration from running_config and does not connect to the device.
Examples
# Using merged
# Before state:
# -------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# (nothing is shown, the device has the default configuration)
- name: Merge the provided configuration with the existing running configuration
cisco.nxos.nxos_igmp_snooping:
config:
vxlan: true
v3_report_suppression: true
group_timeout: "300"
vlans:
- vlan_id: 100
static_groups:
- group: 233.252.0.10
interfaces:
- Eth1/10
- Po20
- group: 233.252.0.11
source: 192.0.2.10
interfaces:
- Ethernet1/10
state: merged
# Task output:
# ------------
# before:
# snooping: true
# link_local_groups_suppression: true
# report_suppression: true
# v3_report_suppression: false
# vxlan: false
# disable_nve_static_router_port: false
# max_gq_miss: 3
# syslog_threshold: 90
# holddown_timer: 210
# commands:
# - ip igmp snooping v3-report-suppression
# - ip igmp snooping vxlan
# - ip igmp snooping group-timeout 300
# - vlan configuration 100
# - ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# - ip igmp snooping static-group 233.252.0.10 interface port-channel20
# - ip igmp snooping static-group 233.252.0.11 source 192.0.2.10 interface Ethernet1/10
# after:
# snooping: true
# link_local_groups_suppression: true
# report_suppression: true
# v3_report_suppression: true
# vxlan: true
# disable_nve_static_router_port: false
# max_gq_miss: 3
# syslog_threshold: 90
# holddown_timer: 210
# group_timeout: "300"
# vlans:
# - vlan_id: 100
# static_groups:
# - group: 233.252.0.10
# interfaces:
# - Ethernet1/10
# - port-channel20
# - group: 233.252.0.11
# source: 192.0.2.10
# interfaces:
# - Ethernet1/10
# After state:
# ------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# ip igmp snooping v3-report-suppression
# ip igmp snooping group-timeout 300
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# ip igmp snooping static-group 233.252.0.10 interface port-channel20
# ip igmp snooping static-group 233.252.0.11 source 192.0.2.10 interface Ethernet1/10
# Using merged with the per-VLAN settings
- name: Configure the querier, the router ports and the filters of a VLAN
cisco.nxos.nxos_igmp_snooping:
config:
max_gq_miss: 4
proxy:
general_queries: true
mrt: 8
vlans:
- vlan_id: 100
querier: 192.0.2.1
query_interval: 200
version: 2
fast_leave: true
mrouter_interfaces:
- Po20
report_flood:
interfaces:
- Po20
report_policy:
- policy_type: route_map
name: RM_REPORTS
interface: Po20
access_group:
- policy_type: route_map
name: RM_GROUPS
state: merged
# Task output:
# ------------
# commands:
# - ip igmp snooping max-gq-miss 4
# - ip igmp snooping proxy general-queries mrt 8
# - vlan configuration 100
# - ip igmp snooping mrouter interface port-channel20
# - ip igmp snooping report-flood interface port-channel20
# - ip igmp snooping report-policy route-map RM_REPORTS interface port-channel20
# - ip igmp snooping access-group RM_GROUPS
# - ip igmp snooping fast-leave
# - ip igmp snooping query-interval 200
# - ip igmp snooping version 2
# - ip igmp snooping querier 192.0.2.1
# Using replaced
# Before state:
# -------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# ip igmp snooping v3-report-suppression
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# ip igmp snooping static-group 233.252.0.10 interface port-channel20
# vlan configuration 200
# ip igmp snooping static-group 233.252.0.20 interface Ethernet1/20
- name: Replace the global settings and the listed VLANs
cisco.nxos.nxos_igmp_snooping:
config:
vxlan: true
vlans:
- vlan_id: 100
static_groups:
- group: 233.252.0.10
interfaces:
- Ethernet1/10
state: replaced
# Task output:
# ------------
# commands:
# - no ip igmp snooping v3-report-suppression
# - vlan configuration 100
# - no ip igmp snooping static-group 233.252.0.10 interface port-channel20
# After state:
# ------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# vlan configuration 200
# ip igmp snooping static-group 233.252.0.20 interface Ethernet1/20
# Using overridden
# Before state:
# -------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# vlan configuration 200
# ip igmp snooping static-group 233.252.0.20 interface Ethernet1/20
# WARNING: every vlan configuration block that is not listed is removed, also the ones
# created by other tools or roles. Run it with check_mode first.
- name: Override the IGMP snooping configuration
cisco.nxos.nxos_igmp_snooping:
config:
vxlan: true
vlans:
- vlan_id: 100
static_groups:
- group: 233.252.0.10
interfaces:
- Ethernet1/10
state: overridden
# Task output:
# ------------
# commands:
# - no vlan configuration 200
# After state:
# ------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# Using deleted
# Before state:
# -------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# ip igmp snooping group-timeout 300
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# vlan configuration 200
# ip igmp snooping static-group 233.252.0.20 interface Ethernet1/20
- name: Delete the VLAN 200 configuration only
cisco.nxos.nxos_igmp_snooping:
config:
vlans:
- vlan_id: 200
state: deleted
# Task output:
# ------------
# commands:
# - no vlan configuration 200
# Using deleted without config
# Before state:
# -------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# ip igmp snooping vxlan
# ip igmp snooping group-timeout 300
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# WARNING: this removes EVERY vlan configuration block on the switch, also the ones
# created by other tools or roles. Run it with check_mode first.
- name: Reset all global settings and remove all vlan configuration blocks
cisco.nxos.nxos_igmp_snooping:
state: deleted
# Task output:
# ------------
# commands:
# - no ip igmp snooping vxlan
# - no ip igmp snooping group-timeout 300
# - no vlan configuration 100
# After state:
# ------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# (nothing is shown, the device has the default configuration)
# Using rendered
- name: Render platform specific configuration lines (without connecting to the device)
cisco.nxos.nxos_igmp_snooping:
config:
snooping: true
report_suppression: false
vlans:
- vlan_id: 100
static_groups:
- group: 233.252.0.10
source: 192.0.2.10
interfaces:
- Po20
state: rendered
# Task Output:
# ------------
# rendered:
# - ip igmp snooping
# - no ip igmp snooping report-suppression
# - vlan configuration 100
# - ip igmp snooping static-group 233.252.0.10 source 192.0.2.10 interface port-channel20
# Using parsed
# parsed.cfg
# ----------
# ip igmp snooping vxlan
# ip igmp snooping group-timeout 300
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.10 interface Ethernet1/10
# ip igmp snooping static-group 233.252.0.10 interface port-channel20
- name: Parse the provided configuration
cisco.nxos.nxos_igmp_snooping:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task output:
# ------------
# parsed:
# snooping: true
# link_local_groups_suppression: true
# report_suppression: true
# v3_report_suppression: false
# vxlan: true
# disable_nve_static_router_port: false
# max_gq_miss: 3
# syslog_threshold: 90
# holddown_timer: 210
# group_timeout: "300"
# vlans:
# - vlan_id: 100
# static_groups:
# - group: 233.252.0.10
# interfaces:
# - Ethernet1/10
# - port-channel20
# Using gathered
# Existing device config:
# -----------------------
# nxos# show running-config | section "^vlan configuration|^ip igmp snooping"
# no ip igmp snooping link-local-groups-suppression
# vlan configuration 100
# ip igmp snooping static-group 233.252.0.11 source 192.0.2.10 interface Ethernet1/10
- name: Gather the IGMP snooping configuration from the device
cisco.nxos.nxos_igmp_snooping:
state: gathered
# Task output:
# ------------
# gathered:
# snooping: true
# link_local_groups_suppression: false
# report_suppression: true
# v3_report_suppression: false
# vxlan: false
# disable_nve_static_router_port: false
# max_gq_miss: 3
# syslog_threshold: 90
# holddown_timer: 210
# vlans:
# - vlan_id: 100
# static_groups:
# - group: 233.252.0.11
# source: 192.0.2.10
# interfaces:
# - Ethernet1/10
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. Returned: when state is Sample: |
|
The provided configuration in the device-native format (offline). Returned: when state is Sample: |