Example: Configuring VLAN-based IPv6 group policy and simulated joining

Network configuration

As shown in Figure 85, Router A runs MLDv1 and acts as the MLD querier, and Switch A runs MLDv1 snooping.

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

Figure 85: Network diagram

Procedure

  1. Assign an IPv6 address and prefix length to each interface, as shown in Figure 85. (Details not shown.)

  2. Configure Router A:

    # Enable IPv6 multicast routing.

    <RouterA> system-view
    [RouterA] ipv6 multicast routing
    [RouterA-mrib6] quit
    

    # Enable MLD on HundredGigE 1/0/1.

    [RouterA] interface hundredgige 1/0/1
    [RouterA-HundredGigE1/0/1] mld enable
    [RouterA-HundredGigE1/0/1] quit
    

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

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

    # Enable the MLD snooping feature.

    <SwitchA> system-view
    [SwitchA] mld-snooping
    [SwitchA-mld-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 MLD snooping, and enable dropping IPv6 unknown multicast data for VLAN 100.

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

    # Configure an IPv6 multicast group policy so that hosts in VLAN 100 can join only IPv6 multicast group FF1E::101.

    [SwitchA] acl ipv6 basic 2001
    [SwitchA-acl-ipv6-basic-2001] rule permit source ff1e::101 128
    [SwitchA-acl-ipv6-basic-2001] quit
    [SwitchA] mld-snooping
    [SwitchA–mld-snooping] group-policy 2001 vlan 100
    [SwitchA–mld-snooping] quit
    

    # Configure HundredGigE 1/0/3 and HundredGigE 1/0/4 as simulated member hosts to join IPv6 multicast group FF1E::101.

    [SwitchA] interface hundredgige 1/0/3
    [SwitchA-HundredGigE1/0/3] mld-snooping host-join ff1e::101 vlan 100
    [SwitchA-HundredGigE1/0/3] quit
    [SwitchA] interface hundredgige 1/0/4
    [SwitchA-HundredGigE1/0/4] mld-snooping host-join ff1e::101 vlan 100
    [SwitchA-HundredGigE1/0/4] quit
    

Verifying the configuration

# Send MLD reports from Host A and Host B to join IPv6 multicast groups FF1E::101 and FF1E::202. (Details not shown.)

# Display dynamic MLD snooping group entries for VLAN 100 on Switch A.

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

VLAN 100: Total 1 entries.
  (::, FF1E::101)
    Host ports (2 in total):
      HGE1/0/3                              (00:03:23)
      HGE1/0/4                              (00:04:10)

The output shows the following information: