Example: Configuring IPv6 PIM snooping

Network configuration

As shown in Figure 90:

Configure MLD snooping and IPv6 PIM snooping on Switch A. Then, Switch A forwards IPv6 PIM protocol packets and IPv6 multicast data packets only to routers that are connected to receivers.

Figure 90: Network diagram

Procedure

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

  2. Configure OSPFv3 on the routers. (Details not shown.)

  3. Configure Router A:

    # Enable IPv6 multicast routing.

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

    # Enable IPv6 PIM-SM on each interface.

    [RouterA] interface hundredgige 1/0/1
    [RouterA-HundredGigE1/0/1] ipv6 pim sm
    [RouterA-HundredGigE1/0/1] quit
    [RouterA] interface hundredgige 1/0/2
    [RouterA-HundredGigE1/0/2] ipv6 pim sm
    [RouterA-HundredGigE1/0/2] quit
    

    # Configure HundredGigE 1/0/2 as a C-BSR and a C-RP.

    [RouterA] ipv6 pim
    [RouterA-pim6] c-bsr 1001::1
    [RouterA-pim6] c-rp 1001::1
    [RouterA-pim6] quit
    
  4. Configure Router B:

    # Enable IPv6 multicast routing.

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

    # Enable IPv6 PIM-SM on each interface.

    [RouterB] interface hundredgige 1/0/1
    [RouterB-HundredGigE1/0/1] ipv6 pim sm
    [RouterB-HundredGigE1/0/1] quit
    [RouterB] interface hundredgige 1/0/2
    [RouterB-HundredGigE1/0/2] ipv6 pim sm
    [RouterB-HundredGigE1/0/2] quit
    
  5. Configure Router C:

    # Enable IPv6 multicast routing.

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

    # Enable MLD on HundredGigE 1/0/1.

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

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

    [RouterC] interface hundredgige 1/0/2
    [RouterC-HundredGigE1/0/2] ipv6 pim sm
    [RouterC-HundredGigE1/0/2] quit
    
  6. Configure Router D:

    # Enable IPv6 multicast routing.

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

    # Enable MLD on HundredGigE 1/0/1.

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

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

    [RouterD] interface hundredgige 1/0/2
    [RouterD-HundredGigE1/0/2] ipv6 pim sm
    [RouterD-HundredGigE1/0/2] quit
    
  7. 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 IPv6 PIM snooping for VLAN 100.

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

Verifying the configuration

# On Switch A, display IPv6 PIM snooping neighbor information for VLAN 100.

[SwitchA] display ipv6 pim-snooping neighbor vlan 100
Total 4 neighbors.

VLAN 100: Total 4 neighbors.
  FE80::1
    Ports (1 in total):
      HGE1/0/1                  (00:32:43)
  FE80::2
   Ports (1 in total):
      HGE1/0/2                  (00:32:43)
  FE80::3
    Ports (1 in total):
      HGE1/0/3                  (00:32:43)
  FE80::4
    Ports (1 in total):
      HGE1/0/4                  (00:32:43)

The output shows that Router A, Router B, Router C, and Router D are IPv6 PIM snooping neighbors.

# On Switch A, display IPv6 PIM snooping routing entries for VLAN 100.

[SwitchA] display ipv6 pim-snooping routing-table vlan 100
Total 2 entries.
FSM flag: NI-no info, J-join, PP-prune pending

VLAN 100: Total 2 entries.
  (*, FF1E::101)
    Upstream neighbor: FE80::1
      Upstream ports (1 in total):
        HGE1/0/1
      Downstream ports (1 in total):
        HGE1/0/3
          Expires: 00:03:01, FSM: J
  (*, FF2E::101)
    Upstream neighbor: FE80::2
      Upstream ports (1 in total):
        HGE1/0/2
      Downstream ports (1 in total):
        HGE1/0/4
          Expires: 00:03:01, FSM: J

The output shows the following information: