Example: Configuring VLAN-based IGMP snooping proxying

Network configuration

As shown in Figure 17, Router A runs IGMPv2 and acts as the IGMP querier. Switch A runs IGMPv2 snooping. Configure IGMP snooping proxying so that Switch A can perform the following actions:

Figure 17: Network diagram

Procedure

  1. Assign an IP address and subnet mask to each interface, as shown in Figure 17. (Details not shown.)

  2. Configure Router A:

    # Enable IP multicast routing.

    <RouterA> system-view
    [RouterA] multicast routing
    [RouterA-mrib] quit
    

    # Enable IGMP and PIM-DM on HundredGigE 1/0/1.

    [RouterA] interface hundredgige 1/0/1
    [RouterA-HundredGigE1/0/1] igmp enable
    [RouterA-HundredGigE1/0/1] pim dm
    [RouterA-HundredGigE1/0/1] quit
    

    # Enable PIM-DM on HundredGigE 1/0/2.

    [RouterA] interface hundredgige 1/0/2
    [RouterA-HundredGigE1/0/2] pim dm
    [RouterA-HundredGigE1/0/2] quit
    
  3. Configure Switch A:

    # Enable the IGMP snooping feature.

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

    # Create VLAN 100, and assign HundredGigE 1/0/1 through HundredGigE 1/0/4 to the VLAN.

    [SwitchA] vlan 100
    [SwitchA-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/4
    

    # Enable IGMP snooping and IGMP snooping proxying for the VLAN.

    [SwitchA-vlan100] igmp-snooping enable
    [SwitchA-vlan100] igmp-snooping proxy enable
    [SwitchA-vlan100] quit
    

Verifying the configuration

# Send IGMP reports from Host A and Host B to join multicast groups 224.1.1.1 and 224.1.1.1. (Details not shown.)

# Display brief information about IGMP snooping group entries on Switch A.

[SwitchA] display igmp-snooping group
 Total 1 entries.

VLAN 100: Total 1 entries.
  (0.0.0.0, 224.1.1.1)
    Host ports (2 in total):
      HGE1/0/3                                     (00:04:00)
      HGE1/0/4                                     (00:04:04)

The output shows that HundredGigE 1/0/3 and HundredGigE 1/0/4 are member ports of multicast group 224.1.1.1. Host A and Host B become receivers of the group.

# Display IGMP group membership information on Router A.

[RouterA] display igmp group
IGMP groups in total: 1
 HundredGigE1/0/1(10.1.1.1):
  IGMP groups reported in total: 1
   Group address   Last reporter   Uptime      Expires
   224.1.1.1       0.0.0.0         00:00:31    00:02:03

# Send an IGMP leave message from Host A to leave multicast group 224.1.1.1. (Details not shown.)

# Display brief information about IGMP snooping group entries on Switch A.

[SwitchA] display igmp-snooping group
Total 1 entries.

VLAN 100: Total 1 entries.
  (0.0.0.0, 224.1.1.1)
    Host ports (1 in total):
      HGE1/0/3                                     ( 00:01:23 )

The output shows that HundredGigE 1/0/3 is the only member port of multicast group 224.1.1.1. Only Host B remains as the receiver of the group.