Group policy configuration example

Network requirements

As shown in Figure 12, Router A runs IGMPv2 and acts as the IGMP querier. Switch A runs IGMPv2 snooping.

Configure a multicast group policy and simulate joining to meet the following requirements:

Figure 12: Network diagram

Configuration procedure

  1. Assign an IP address and subnet mask to each interface according to Figure 12. (Details not shown.)

  2. On Router A:

    # Enable IP multicast routing.

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

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

    [RouterA] interface fortygige 1/0/1
    [RouterA-FortyGigE1/0/1] igmp enable
    [RouterA-FortyGigE1/0/1] pim dm
    [RouterA-FortyGigE1/0/1] quit
    

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

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

    # Enable IGMP snooping globally.

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

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

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

    # Enable IGMP snooping, and enable dropping unknown multicast data for VLAN 100.

    [SwitchA-vlan100] igmp-snooping enable
    [SwitchA-vlan100] igmp-snooping drop-unknown
    [SwitchA-vlan100] quit
    

    # Configure a multicast group policy so that the hosts in VLAN 100 can join only multicast group 224.1.1.1.

    [SwitchA] acl number 2001
    [SwitchA-acl-basic-2001] rule permit source 224.1.1.1 0
    [SwitchA-acl-basic-2001] quit
    [SwitchA] igmp-snooping
    [SwitchA-igmp-snooping] group-policy 2001 vlan 100
    [SwitchA-igmp-snooping] quit
    

Verifying the configuration

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

# Display information about dynamic IGMP snooping forwarding entries in VLAN 100 on Switch A.

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

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

The output shows the following information: