6.5. Configuring IGMP Snooping
Overview
Function Introduction
Layer 2 switches can use IGMP snooping to constrain the flooding of multicast traffic by dynamically configuring Layer 2 interfaces so that multicast traffic is forwarded only to those interfaces associated with IP multicast devices. As the name implies, IGMP snooping requires the LAN switch to snoop on the IGMP transmissions between the host and the router and to keep track of multicast groups and member ports. When the switch receives an IGMP report from a host for a particular multicast group, the switch adds the host port number to the forwarding table entry; when it receives an IGMP Leave Group message from a host, it removes the host port from the table entry. It also deletes entries per entry if it does not receive IGMP membership reports from the multicast clients. The multicast router sends out periodic general queries to all VLANs. All hosts interested in this multicast traffic send report and are added to the forwarding table entry. The switch forwards only one report per IP multicast group to the multicast router. It creates one entry per VLAN in the Layer 2 forwarding table for each MAC group from which it receives an IGMP report.
Layer 2 multicast groups learned through IGMP snooping are dynamic. If you specify group membership for a multicast group address statically, your setting supersedes any automatic manipulation by IGMP snooping. Multicast group membership lists can consist of both user-defined and IGMP snooping-learned settings.
Limitations And Notice:
VRRP, RIP and OSPF used multicast IP address, so you need to avoid use such multicast IP addresses, which have same multicast MAC address with multicast IP address reserved by VRRP, RIP and OSPF.
VRRP used multicast group address 224.0.0.18, so when igmp snooping and VRRP are working, you need to avoid using multicast group address that matched same mac address with group address 224.0.0.18.
OSPF used multicast group address 224.0.0.5, so when igmp snooping and OSFP are working, you need to avoid using multicast group address that matched same mac address with group address 224.0.0.18.
RIP used multicast group address 224.0.0.9, so when igmp snooping and RIP are working, you need to avoid using multicast group address that matched same mac address with group address 224.0.0.9.
Principle Description
N/A
Configuration
Enable Globally Or Per Vlan
IGMP Snooping can be enabled globally or per vlan. If IGMP Snooping is disabled globally, it can’t be active on any vlan even it is enabled on the vlan. If IGMP snooping is enabled globally, it can be disabled on a vlan. On the other hand, the global configuration can overwrite the per vlan configuration. By default, IGMP snooping is enabled globally and per vlan.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable igmp snooping globally and per-vlan
Switch(config)# ip igmp snooping
Switch(config)# ip igmp snooping vlan 1
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Use the following command to display igmp snooping of a vlan:
Switch# show ip igmp snooping vlan 1
Global Igmp Snooping Configuration
-------------------------------------------------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Report-Suppression: Enabled Vlan 1
-----------
Igmp Snooping:Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Report-Suppression :Enabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Group Access-list :N/A
Igmp Snooping Mrouter Port :
Igmp Snooping Mrouter Port Aging Interval(sec) :255
Configuring Fast Leave
When IGMP Snooping fast leave is enabled, the igmp snooping group will be removed at once upon receiving a corresponding igmp report. Otherwise the switch will send out specified igmp specific query, if it doesn’t get response in specified period, it will remove the group. By default, igmp snooping fast-leave is disabled globally and per vlan.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable Fast Leave globally and per-vlan
Switch(config)# ip igmp snooping fast-leave
Switch(config)# ip igmp snooping vlan 1 fast-leave
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Switch# show ip igmp snooping vlan 1
Global Igmp Snooping Configuration
-------------------------------------------------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Enabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Report-Suppression :Enabled
Vlan 1
-----------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Enabled
Igmp Snooping Report-Suppression :Enabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Group Access-list :N/A
Igmp Snooping Mrouter Port :
Igmp Snooping Mrouter Port Aging Interval(sec) :255
Configuring Querier Parameters
In order for IGMP, and thus IGMP snooping, to function, an multicast router must exist on the network and generate IGMP queries. The tables created for snooping (holding the member ports for a each multicast group) are associated with the querier. Without a querier the tables are not created and snooping will not work.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Set the global attributes of igmp snooping
Switch(config)# ip igmp snooping query-interval 100
Switch(config)# ip igmp snooping query-max-response-time 5
Switch(config)# ip igmp snooping last-member-query-interval 2000
Switch(config)# ip igmp snooping discard-unknown
step 3 Set the per-vlan attributes of igmp snooping
Switch(config)# ip igmp snooping vlan 1 querier address 10.10.10.1
Switch(config)# ip igmp snooping vlan 1 querier
Switch(config)# ip igmp snooping vlan 1 query-interval 200
Switch(config)# ip igmp snooping vlan 1 query-max-response-time 5
Switch(config)# ip igmp snooping vlan 1 querier-timeout 100
Switch(config)# ip igmp snooping vlan 1 last-member-query-interval 2000
Switch(config)# ip igmp snooping vlan 1 discard-unknown
step 4 Exit the configure mode
Switch(config)# end
step 5 Validation
Switch# show ip igmp snooping querier
Global Igmp Snooping Querier Configuration
-------------------------------------------------
Version :2
Last-Member-Query-Interval (msec) :2000
Last-Member-Query-Count :2
Max-Query-Response-Time (sec) :5
Query-Interval (sec) :100
Global Source-Address :0.0.0.0
TCN Query Count :2
TCN Query Interval (sec) :10
TCN Query Max Respose Time (sec) :5
Vlan 1: IGMP snooping querier status
--------------------------------------------
Elected querier is : 0.0.0.0
--------------------------------------------
Admin state :Enabled
Admin version :2
Operational state :Non-Querier
Querier operational address :10.10.10.1
Querier configure address :10.10.10.1
Last-Member-Query-Interval (msec) :2000
Last-Member-Query-Count :2
Max-Query-Response-Time (sec) :5
Query-Interval (sec) :200
Querier-Timeout (sec) :100
Configuring Mrouter Port
An IGMP Snooping mrouter port is a switch port which is assumed to connect a multicast router. The mrouter port is configured on the vlan or learnt dynamic. When IGMP general query packet or PIMv2 hello packet is received on port of speficified VLAN, this port becomes mrouter port of this vlan. All the igmp queries received on this port will be flooded on the belonged vlan. All the igmp reports and leaves received on this vlan will be forwarded to the mrouter port, directly or aggregated, depending on the report-suppression configuration. In addition, all the multicast traffic on this vlan will be forwarded to this mrouter port.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable igmp snooping report suppression globally
Switch(config)# ip igmp snooping report-suppression
step 3 Configure mrouter port, Enable igmp snooping report suppression, and set igmp snooping dynamic mrouter port aging interval for a vlan
Switch(config)# ip igmp snooping vlan 1 mrouter interface eth-0-1
Switch(config)# ip igmp snooping vlan 1 report-suppression
Switch(config)# ip igmp snooping vlan 1 mrouter-aging-interval 200
step 4 Exit the configure mode
Switch(config)# end
step 5 Validation
Switch# show ip igmp snooping vlan 1
Global Igmp Snooping Configuration
-------------------------------------------------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Report-Suppression :Enabled Vlan 1
-----------
Igmp Snooping:Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Report-Suppression :Enabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Group Access-list :N/A
Igmp Snooping Mrouter Port :eth-0-1
Igmp Snooping Mrouter Port Aging Interval(sec) :200
Configuring Querier TCN
System supports to adapt the multicast router learning and updating after STP convergence by configuring the TCN querier count and querier interval.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Configuring the TCN querier count and querier interval
Switch(config)# ip igmp snooping querier tcn query-count 5
Switch(config)# ip igmp snooping querier tcn query-interval 20
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Switch# show ip igmp snooping querier
Global Igmp Snooping Querier Configuration
-------------------------------------------------
Version :2
Last-Member-Query-Interval (msec) :1000
Max-Query-Response-Time (sec) :10
Query-Interval (sec) :125
Global Source-Address :0.0.0.0
TCN Query Count :5
TCN Query Interval (sec) :20
Vlan 1: IGMP snooping querier status
--------------------------------------------
Elected querier is : 0.0.0.0
--------------------------------------------
Admin state :Disabled
Admin version :2
Operational state :Non-Querier
Querier operational address :0.0.0.0
Querier configure address :N/A
Last-Member-Query-Interval (msec) :1000
Max-Query-Response-Time (sec) :10
Query-Interval (sec) :125
Querier-Timeout (sec) :255
Configuring Report Suppression
The switch uses IGMP report suppression to forward only one IGMP report per multicast router query to multicast devices. When IGMP router suppression is enabled (the default), the switch sends the first IGMP report from all hosts for a group to all the multicast routers. The switch does not send the remaining IGMP reports for the group to the multicast routers. This feature prevents duplicate reports from being sent to the multicast devices.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable Report Suppression globally and per-vlan
Switch(config)# ip igmp snooping report-suppression
Switch(config)# ip igmp snooping vlan 1 report-suppression
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Switch# show ip igmp snooping
Global Igmp Snooping Configuration
-------------------------------------------------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Report-Suppression :Enabled Vlan 1
-----------
Igmp Snooping :Enabled
Igmp Snooping Fast-Leave :Disabled
Igmp Snooping Report-Suppression :Enabled
Igmp Snooping Version :2
Igmp Snooping Robustness Variable :2
Igmp Snooping Max-Member-Number :2048
Igmp Snooping Unknown Multicast Behavior :Flood
Igmp Snooping Group Access-list :N/A
Igmp Snooping Mrouter Port :
Igmp Snooping Mrouter Port Aging Interval(sec) :255
Configuring Static group
The switch can build IGMP Snooping Group when receiving IGMP report packet on Layer 2 port of specified VLAN. We also support configure static IGMP Snooping Group by specifying IGMP group, Layer 2 port and VLAN.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Configure static group
Switch(config)# ip igmp snooping vlan 1 static-group 229.1.1.1 interface
eth-0-2
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Switch# show ip igmp snooping groups
VLAN Interface Group-Address Uptime Expires-time
1 eth-0-2 229.1.1.1 00:01:08 stopped
Application cases
N/A