Table of Contents

IGMP Snooping / Forwarding Behaviour

Port states

Forwarding cases (igmp snooping enabled on vlan)

Other notes

When changing access vlan, with mrouter already configured (in new vlan):

5w0d: IGMPSN: mgt: Vlan 15, port Fa0/5 port_id 7 in non-fwd mode
5w0d: IGMPSN: mgt: received pmvlan_linkchange down event on vlan 15 
5w0d: IGMPSN: Adding router port Fa0/5 to all GCEs in Vlan 18
5w0d: L2MM: added rport Fa0/5 on Vlan 18
5w0d: %SYS-5-CONFIG_I: Configured from console by vty0 (10.0.0.2)

Implementation Approach

Analyzing the forwarding cases, it turns out that when incoming packets are forwarded to more than one port at the same time, they are forwarded to either all ports in a specific igmp group or all mrouter ports (but not a mix of the two). In other words, depending on the igmp snooping logic, either an igmp group or a list of mrouter ports is sufficient to determine which ports to forward to.

Forwarding to ports in an igmp group

The following changes need to be made to existing code:

Forwarding to mrouter ports

Whether a port is mrouter or not is a function of the port and vlan. In other words, mrouter can be stored as a flag (bit) depending on the port and vlan. Since vlan number is limited and relatively small (4096), mrouter information can be stored as a per-port vlan-indexed bitmap. The data structure would be similar to vlan membership for trunk ports.

Flooding to all mrouter ports in a specific vlan becomes very simple:

Algorithm can be easily cloned from sw_flood().

CLI Commands

exec#

sh ip igmp snooping [vlan x]
sh ip igmp snooping groups [vlan x] [dynamic|user] [count] etc
sh ip igmp snooping mrouter [vlan x]

config#

[no] ip igmp snooping vlan x mrouter interface y
[no] ip igmp snooping vlan x static a.b.c.d interface y

Useful links