IGMP snooping proxying configuration example

Network requirements

As shown in Figure 16, Router A connects to a multicast source through port GigabitEthernet 1/0/2, and to Switch A through port GigabitEthernet 1/0/1. Router A runs IGMPv2 and Switch A runs IGMPv2 snooping. Router A serves as an IGMP querier.

Configure IGMP snooping proxying on Switch A, enabling the switch to forward IGMP reports and leave messages on behalf of attached hosts and to respond to IGMP queries from Router A and forward the queries to the hosts on behalf of Router A.

Figure 16: Network diagram for IGMP snooping proxying configuration

Configuration procedure

  1. Configure IP addresses for interfaces

Configure an IP address and subnet mask for each interface according to Figure 16. The configuration steps are omitted here.

  1. Configure Router A

# Enable IP multicast routing, enable PIM-DM on each interface, and enable IGMP on GigabitEthernet 1/0/1.

<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] igmp enable
[RouterA-GigabitEthernet1/0/1] pim dm
[RouterA-GigabitEthernet1/0/1] quit
[RouterA] interface gigabitethernet 1/0/2
[RouterA-GigabitEthernet1/0/2] pim dm
[RouterA-GigabitEthernet1/0/2] quit
  1. Configure Switch A

# Enable IGMP snooping globally.

<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit

# Create VLAN 100, assign ports GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 to this VLAN, and enable IGMP snooping and IGMP snooping proxying in the VLAN.

[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] igmp-snooping proxying enable
[SwitchA-vlan100] quit
  1. Verify the configuration

After the configuration is completed, Host A and Host B send IGMP join messages for group 224.1.1.1. Receiving the messages, Switch A sends a join message for the group out port GigabitEthernet 1/0/1—a router port—to Router A.

Use the display igmp-snooping group command and the display igmp group command to display information about IGMP snooping groups and IGMP multicast groups. For example:

# Display information about IGMP snooping groups on Switch A.

[SwitchA] display igmp-snooping group
  Total 1 IP Group(s).
  Total 1 IP Source(s).
  Total 1 MAC Group(s).

  Port flags: D-Dynamic port, S-Static port, C-Copy port
  Subvlan flags: R-Real VLAN, C-Copy VLAN
  Vlan(id):100.
    Total 1 IP Group(s).
    Total 1 IP Source(s).
    Total 1 MAC Group(s).
    Router port(s):total 1 port.
            GE1/0/1                (D)
    IP group(s):the following ip group(s) match to one mac group.
      IP group address:224.1.1.1
        (0.0.0.0, 224.1.1.1):
          Host port(s):total 2 port.
            GE1/0/3                (D)
            GE1/0/4                (D)
    MAC group(s):
      MAC group address:0100-5e01-0101
          Host port(s):total 2 port.
            GE1/0/3
            GE1/0/4

# Display information about IGMP multicast groups on Router A.

[RouterA] display igmp group
Total 1 IGMP Group(s).
Interface group report information
 GigabitEthernet1/0/1(10.1.1.1):
   Total 1 IGMP Group reported
    Group Address    Last Reporter    Uptime    Expires
    224.1.1.1        0.0.0.0          00:00:06  00:02:04

When Host A leaves the multicast group, it sends an IGMP leave message to Switch A. Receiving the message, Switch A removes port GigabitEthernet 1/0/3 from the member port list of the forwarding entry for the group; however, it does not remove the group or forward the leave message to Router A because Host B is still in the group. Use the display igmp-snooping group command to display information about IGMP snooping groups. For example:

# Display information about IGMP snooping groups on Switch A.

[SwitchA] display igmp-snooping group
  Total 1 IP Group(s).
  Total 1 IP Source(s).
  Total 1 MAC Group(s).

  Port flags: D-Dynamic port, S-Static port, C-Copy port
  Subvlan flags: R-Real VLAN, C-Copy VLAN
  Vlan(id):100.
    Total 1 IP Group(s).
    Total 1 IP Source(s).
    Total 1 MAC Group(s).
    Router port(s):total 1 port.
            GE1/0/1                (D)
    IP group(s):the following ip group(s) match to one mac group.
      IP group address:224.1.1.1
        (0.0.0.0, 224.1.1.1):
          Host port(s):total 1 port.
            GE1/0/4                (D)
    MAC group(s):
      MAC group address:0100-5e01-0101
          Host port(s):total 1 port.
            GE1/0/4