User Tools

Site Tools


igmp_snooping

This is an old revision of the document!


IGMP Snooping / Forwarding Behaviour

Port states

  • mrouter (router port)
  • subscriber (port belongs to established multicast group)
  • none

Forwarding cases (igmp snooping enabled on vlan)

  • multicast traffic received on “none” port
    • if no mrouter present, flood to all ports
    • otherwise flood to mrouter ports
  • igmp received on “none” port
    • if no mrouter present, ignore frame (no group is created)
    • otherwise
      • creates multicast group
      • forwards to mrouter ports only
      • port becomes “subscriber”
  • multicast traffic received on “mrouter” port
    • send to established group members only
  • igmp received on “mrouter” port
    • creates multicast group
    • forwards to mrouter ports only

Other notes

  • if igmp snooping is disabled, multicast traffic is flooded to all ports in vlan, regardless of frame nature (i.e. it is igmp or not); static multicast fdb entries are ignored;
  • mrouters can be statically configured while igmp snooping is disabled on vlan, but they are ignored until igmp snooping is enabled; when igmp snooping is enabled, the rules listed above apply;

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

  • igmp group membership is stored as special fdb entry
  • is_static field in struct net_switch_fdb_entry is change to a bitwise field:
    • b0 tells if entry is dynamic or static
    • b1 tells if entry is regular fdb entry or igmp membership entry
    • for igmp membership entries, a b0 value corresponding to “static” means user-configured group membership
  • all igmp membership entries have a virtual MAC address formed as 01-00 plus the group address (4 bytes)
  • when flooding to all ports in a group, the following actions are taken:
    • first the virtual mac corresponding to the packet destination is build;
    • the fdb bucket corresponding to the virtual mac is determined;
    • the fdb bucket is walked to determine the ports to forward to:
      • virtual mac must be equal (between fdb entry and packet)
      • vlan must be equal (between fdb entry and packet)

The following changes need to be made to existing code:

  • fdb queries from userspace need to filter out igmp membership entries;
  • standard (non-multicast) packet fdb lookup needs to ignore igmp membership entries;

Forwarding to mrouter ports

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

igmp_snooping.1240774940.txt.gz · Last modified: by blade