Example: Configuring basic MLD features

Network configuration

As shown in Figure 103:

Configure the switches to meet the following requirements:

Figure 103: Network diagram

Procedure

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

  2. Configure OSPFv3 on the switches in the IPv6 PIM-DM domain. (Details not shown.)

  3. Enable the IPv6 multicast routing, MLD, and IPv6 PIM-DM:

    # On Switch A, enable IPv6 multicast routing.

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

    # Enable MLD on VLAN-interface 100.

    [SwitchA] interface vlan-interface 100
    [SwitchA-Vlan-interface100] mld enable
    [SwitchA-Vlan-interface100] quit
    

    # Enable IPv6 PIM-DM on VLAN-interface 101.

    [SwitchA] interface vlan-interface 101
    [SwitchA-Vlan-interface101] ipv6 pim dm
    [SwitchA-Vlan-interface101] quit
    

    # On Switch B, enable IPv6 multicast routing.

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

    # Enable MLD on VLAN-interface 200.

    [SwitchB] interface vlan-interface 200
    [SwitchB-Vlan-interface200] mld enable
    [SwitchB-Vlan-interface200] quit
    

    # Enable IPv6 PIM-DM on VLAN-interface 201.

    [SwitchB] interface vlan-interface 201
    [SwitchB-Vlan-interface201] ipv6 pim dm
    [SwitchB-Vlan-interface201] quit
    

    # On Switch C, enable IPv6 multicast routing.

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

    # Enable MLD on VLAN-interface 200.

    [SwitchC] interface vlan-interface 200
    [SwitchC-Vlan-interface200] mld enable
    [SwitchC-Vlan-interface200] quit
    

    # Enable IPv6 PIM-DM on VLAN-interface 202.

    [SwitchC] interface vlan-interface 202
    [SwitchC-Vlan-interface202] ipv6 pim dm
    [SwitchC-Vlan-interface202] quit
    
  4. Configure an IPv6 multicast group policy on Switch A so that the hosts connected to VLAN-interface 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] interface vlan-interface 100
    [SwitchA-Vlan-interface100] mld group-policy 2001
    [SwitchA-Vlan-interface100] quit
    

Verifying the configuration

# Display MLD information for VLAN-interface 200 on Switch B.

[SwitchB] display mld interface vlan-interface 200
 Vlan-interface200(FE80::200:5EFF:FE66:5100):
   MLD is enabled.
   MLD version: 1
   Query interval for MLD: 125s
   Other querier present time for MLD: 255s
   Maximum query response time for MLD: 10s
   Querier for MLD: FE80::200:5EFF:FE66:5100 (This router)
  MLD groups reported in total: 1