Example: Configuring VLAN-based static ports

Network configuration

As shown in Figure 86:

Configure static ports to meet the following requirements:

Procedure

  1. Assign an IPv6 address and prefix length to each interface, as shown in Figure 86. (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/3 to the VLAN.

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

    # Enable MLD snooping for VLAN 100.

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

    # Configure HundredGigE 1/0/3 as a static router port.

    [SwitchA] interface hundredgige 1/0/3
    [SwitchA-HundredGigE1/0/3] mld-snooping static-router-port vlan 100
    [SwitchA-HundredGigE1/0/3] quit
    
  4. Configure Switch B:

    # Enable the MLD snooping feature.

    <SwitchB> system-view
    [SwitchB] mld-snooping
    [SwitchB-mld-snooping] quit
    

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

    [SwitchB] vlan 100
    [SwitchB-vlan100] port hundredgige 1/0/1 hundredgige 1/0/2
    

    # Enable MLD snooping for VLAN 100.

    [SwitchB-vlan100] mld-snooping enable
    [SwitchB-vlan100] quit
    
  5. Configure Switch C:

    # Enable the MLD snooping feature.

    <SwitchC> system-view
    [SwitchC] mld-snooping
    [SwitchC-mld-snooping] quit
    

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

    [SwitchC] vlan 100
    [SwitchC-vlan100] port hundredgige 1/0/1 to hundredgige 1/0/5
    

    # Enable MLD snooping for VLAN 100.

    [SwitchC-vlan100] mld-snooping enable
    [SwitchC-vlan100] quit
    

    # Configure HundredGigE 1/0/3 and HundredGigE 1/0/5 as static member ports for IPv6 multicast group FF1E::101.

    [SwitchC] interface hundredgige 1/0/3
    [SwitchC-HundredGigE1/0/3] mld-snooping static-group ff1e::101 vlan 100
    [SwitchC-HundredGigE1/0/3] quit
    [SwitchC] interface hundredgige 1/0/5
    [SwitchC-HundredGigE1/0/5] mld-snooping static-group ff1e::101 vlan 100
    [SwitchC-HundredGigE1/0/5] quit
    

Verifying the configuration

# Display static router port information for VLAN 100 on Switch A.

[SwitchA] display mld-snooping static-router-port vlan 100
VLAN 100:
  Router ports (1 in total):
    HGE1/0/3

The output shows that HundredGigE 1/0/3 on Switch A has become a static router port.

# Display static MLD snooping group entries in VLAN 100 on Switch C.

[SwitchC] display mld-snooping static-group vlan 100
Total 1 entries).

VLAN 100: Total 1 entries).
  (::, FF1E::101)
    Host ports (2 in total):
      HGE1/0/3
      HGE1/0/5

The output shows that HundredGigE 1/0/3 and HundredGigE 1/0/5 on Switch C have become static member ports of IPv6 multicast group FF1E::101.