In Figure 1, the shared network segment is connected to the Internet. HostA and HostB want to receive multicast data from Source.
In this scenario, to avoid loops, ensure that all connected interfaces have STP disabled and connected interfaces are removed from VLAN 1. If STP is enabled and VLANIF interfaces of switches are used to construct a Layer 3 ring network, an interface on the network will be blocked. As a result, Layer 3 services on the network cannot run normally.
Switch |
VLANIF Interface |
IPv6 Address |
---|---|---|
SwitchA | VLANIF10 | FC00:0:0:2001::1/64 |
VLANIF20 | FC00:0:0:3001::1/64 | |
VLANIF30 | FC00:0:0:2002::1/64 | |
SwitchB | VLANIF40 | FC00:0:0:4001::1/64 |
VLANIF90 | FC00:0:0:2003::1/64 | |
SwitchC | VLANIF40 | FC00:0:0:4001::2/64 |
VLANIF50 | FC00:0:0:2004::1/64 | |
SwitchD | VLANIF30 | FC00:0:0:2002::2/64 |
VLANIF60 | FC00:0:0:2005::1/64 | |
VLANIF70 | FC00:0:0:6001::1/64 | |
VLANIF80 | FC00:0:0:5001::1/64 | |
SwitchE | VLANIF10 | FC00:0:0:2001::2/64 |
VLANIF50 | FC00:0:0:2004::2/64 | |
VLANIF60 | FC00:0:0:2005::2/64 | |
VLANIF90 | FC00:0:0:2003::2/64 |
Configure the IPv6 PIM-SM protocol on the switches to enable them to provide the any-source multicast (ASM) service for user hosts on the network. Then all the hosts in a multicast group can receive multicast data sent from any sources to this group.
Configure an IPv6 address for each interface and an IPv6 unicast routing protocol. IPv6 PIM is an intra-domain multicast routing protocol that depends on IPv6 unicast routing protocols.
Enable the IPv6 multicast function on all switches to provide IPv6 multicast services. Before configuring IPv6 PIM-SM, you must enable the IPv6 multicast function.
Enable IPv6 PIM-SM on all interfaces. You can configure other IPv6 PIM-SM functions only after IPv6 PIM-SM is enabled.
Enable Multicast Listener Discovery (MLD) on interfaces that connect the switch and hosts. A receiver joins and leaves a multicast group by sending MLD messages. The leaf switches maintain the multicast member relationship through MLD.
If both IPv6 PIM-SM and MLD need to be configured on interfaces that connect the switch and hosts, you must configure IPv6 PIM-SM first, and then configure MLD.
Enable IPv6 PIM silent on interfaces that connect the switch and hosts to prevent malicious hosts from sending forged Hello packets. In this manner, the security of IPv6 PIM-SM domain is ensured.
If the user host network segment connects to multiple switches, do not enable IPv6 PIM silent on interfaces that connect these switches and user hosts. For example, IPv6 PIM silent cannot be enabled on SwitchB and SwitchC in the figure.
Configure the rendezvous point (RP). In IPv6 PIM-SM domain, RP is essential in providing ASM services and helps forward multicast data. You are advised to configure RP on switches that have more multicast flows. For example, you can configure RP on SwitchE in the figure.
Configure the bootstrap router (BSR) boundary on interfaces connected to the Internet. The Bootstrap message cannot pass through the BSR boundary; therefore, the BSR serves only this IPv6 PIM-SM domain. In this manner, multicast services are controlled effectively.
# Configure the IPv6 address and mask for each interface shown in Figure 1, and configure Open Shortest Path First version 3 (OSPFv3) on each switch to ensure that switches can communicate at the network layer and dynamically update routes using the IPv6 unicast routing protocol. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA, and are not provided here.
[SwitchA] ipv6 [SwitchA] ospfv3 100 [SwitchA-ospfv3-100] router-id 1.1.1.1 [SwitchA-ospfv3-100] quit [SwitchA] vlan batch 10 20 30 [SwitchA] interface vlanif 10 [SwitchA-Vlanif10] ipv6 enable [SwitchA-Vlanif10] ipv6 address fc00:0:0:2001::1 64 [SwitchA-Vlanif10] ospfv3 100 area 0 [SwitchA-Vlanif10] quit [SwitchA] interface vlanif 20 [SwitchA-Vlanif20] ipv6 enable [SwitchA-Vlanif20] ipv6 address fc00:0:0:3001::1 64 [SwitchA-Vlanif20] ospfv3 100 area 0 [SwitchA-Vlanif20] quit [SwitchA] interface vlanif 30 [SwitchA-Vlanif30] ipv6 enable [SwitchA-Vlanif30] ipv6 address fc00:0:0:2002::1 64 [SwitchA-Vlanif30] ospfv3 100 area 0 [SwitchA-Vlanif30] quit [SwitchA] interface gigabitethernet0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type hybrid [SwitchA-GigabitEthernet0/0/2] port hybrid untagged vlan 20 [SwitchA-GigabitEthernet0/0/2] port hybrid pvid vlan 20 [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet0/0/3 [SwitchA-GigabitEthernet0/0/3] port link-type trunk [SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 30 [SwitchA-GigabitEthernet0/0/3] quit
# Enable IPv6 multicast on all switches and IPv6 PIM-SM on all interfaces. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA, and are not provided here.
[SwitchA] multicast ipv6 routing-enable [SwitchA] interface vlanif 10 [SwitchA-Vlanif10] pim ipv6 sm [SwitchA-Vlanif10] quit [SwitchA] interface vlanif 20 [SwitchA-Vlanif20] pim ipv6 sm [SwitchA-Vlanif20] quit [SwitchA] interface vlanif 30 [SwitchA-Vlanif30] pim ipv6 sm [SwitchA-Vlanif30] quit
# Enable MLD on interfaces that connect SwitchA and user hosts. The configuration of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not provided here.
[SwitchA] interface vlanif 20 [SwitchA-Vlanif20] mld enable
[SwitchA-Vlanif20] pim ipv6 silent
# Configure the C-RP on SwitchE and specify the group address range served by the C-RP.
[SwitchE] acl ipv6 number 2001 [SwitchE-acl6-basic-2001] rule permit source ff0e::1 64 [SwitchE-acl6-basic-2001] quit [SwitchE] pim-ipv6 [SwitchE-pim6] c-rp fc00:0:0:2005::2 group-policy 2001
# Configure a C-BSR on SwitchE.
[SwitchE-pim6] c-bsr fc00:0:0:2005::2 [SwitchE-pim6] quit
[SwitchD] interface vlanif 70 [SwitchD-Vlanif70] pim ipv6 bsr-boundary [SwitchD-Vlanif70] quit
# Run the display pim ipv6 interface command to check the IPv6 PIM configuration and status. In this example, the IPv6 PIM information on SwitchC is displayed as follows:
<SwitchC> display pim ipv6 interface VPN-Instance: public net Interface State NbrCnt HelloInt DR-Pri DR-Address Vlanif40 up 1 30 1 FE80::25C:FF:F205:32(local) Vlanif50 up 1 30 1 FE80::200:FF:FE00:10(local)
# Run the display pim ipv6 bsr-info command to check information about the BSR selection on the switch. For example, BSR information on SwitchA and SwitchE is displayed as follows (C-BSR information is also displayed on SwitchE).
<SwitchA> display pim ipv6 bsr-info VPN-Instance: public net Elected AdminScoped BSR Count: 0 Elected BSR Address: FC00:0:0:2005::2 Priority: 0 Hash mask length: 126 State: Accept Preferred Scope: Not scoped Uptime: 01:40:40 Expires: 00:01:42 C-RP Count: 1 <SwitchE> display pim ipv6 bsr-info VPN-Instance: public net Elected AdminScoped BSR Count: 0 Elected BSR Address: FC00:0:0:2005::2 Priority: 0 Hash mask length: 126 State: Elected Scope: Not scoped Uptime: 00:00:18 Next BSR message scheduled at :00:01:42 C-RP Count: 1 Candidate AdminScoped BSR Count: 0 Candidate BSR Address: FC00:0:0:2005::2 Priority: 0 Hash mask length: 126 State:Elected Scope: Not scoped Wait to be BSR: 0
# Run the display pim ipv6 rp-info command to check the RP information on SwitchA. In this example, the RP information on SwitchA is displayed as follows:
<SwitchA> display pim ipv6 rp-info VPN-Instance: public net PIM-SM BSR RP Number:1 Group/MaskLen: FF0E::/64 RP: FC00:0:0:2005::2 Priority: 192 Uptime: 00:05:19 Expires: 00:02:11
# Run the display pim ipv6 routing-table command to view the IPv6 PIM multicast routing table. Multicast source S (FC00:0:0:5001::5/64) sends multicast packets to multicast groups FF0E::1/64 and FF0E::2/64. HostA needs to receive data sent to group FF0E::1, and HostB needs to receive data sent to group FF0E::2.
By default, after the receiver's DR receives the first multicast data, an SPT switchover is performed and (S, G) routing entries are created. Therefore, (S, G) routing entries displayed on the switch are (S, G) entries after the SPT switchover.
<SwitchA> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, FF0E::1) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: Vlanif10 Upstream neighbor: FE80::9D62:0:FDC5:2 RPF prime neighbor: FE80::9D62:0:FDC5:2 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif20 Protocol: mld, UpTime: 00:02:15, Expires: - (FC00:0:0:5001::5, FF0E::1) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: SPT ACT UpTime: 00:00:11 Upstream interface: Vlanif30 Upstream neighbor: FE80::A01:10C:1 RPF prime neighbor: FE80::A01:10C:1 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif20 Protocol: pim-sm, UpTime: 00:00:11, Expires: -
<SwitchB> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entries (*, FF0E::2) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: WC UpTime: 00:14:44 Upstream interface: Vlanif90 Upstream neighbor: FE80::33FE:0:852C:2 RPF prime neighbor: FE80::33FE:0:852C:2 Downstream interface(s) information: None (FC00:0:0:5001::5, FF0E::2) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: ACT UpTime: 00:2:42 Upstream interface: Vlanif90 Upstream neighbor: FE80::A11:110C:11 RPF prime neighbor: FE80::A11:110C:11 Downstream interface(s) information: None
<SwitchC> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, FF0E::2) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: WC UpTime: 00:2:42 Upstream interface: Vlanif50 Upstream neighbor: FE80::71FE:11:21 RPF prime neighbor: FE80::71FE:11:21 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif40 Protocol: mld, UpTime: 00:13:46, Expires: - (FC00:0:0:5001::5, FF0E::2) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: SPT ACT UpTime: 00:2:42 Upstream interface: Vlanif50 Upstream neighbor: FE80::71FE:11:21 RPF prime neighbor: FE80::71FE:11:21 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif40 Protocol: pim-sm, UpTime: 00:13:46, Expires: -
<SwitchD> display pim ipv6 routing-table VPN-Instance: public net Total 0 (*, G) entry; 2 (S, G) entry (FC00:0:0:5001::5, FF0E::1) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: SPT LOC ACT UpTime: 00:16:56 Upstream interface: Vlanif80 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif30 Protocol: pim-sm, UpTime: 00:16:56, Expires: 00:02:34 (FC00:0:0:5001::5, FF0E::2) RP: FC00:0:0:2005::2 Protocol: pim-sm, Flag: SPT LOC ACT UpTime: 00:02:54 Upstream interface: Vlanif80 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif60 Protocol: pim-sm, UpTime: 00:02:54, Expires: 00:02:36
<SwitchE> display pim ipv6 routing-table VPN-Instance: public net Total 2 (*, G) entry; 2 (S, G) entry (*, FF0E::1) RP: FC00:0:0:2005::2(local) Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif10 Protocol: pim-sm, UpTime: 00:02:15, Expires: - (FC00:0:0:5001::5, FF0E::1) RP: FC00:0:0:2005::2(local) Protocol: pim-sm, Flag: RPT ACT UpTime: 00:16:56 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: NULL (*, FF0E::2) RP: FC00:0:0:2005::2(local) Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 2 1: Vlanif90 Protocol: pim-sm, UpTime: 00:02:15, Expires: - 2: Vlanif50 Protocol: pim-sm, UpTime: 00:02:15, Expires: - (FC00:0:0:5001::5, FF0E::2) RP: FC00:0:0:2004::2(local) Protocol: pim-sm, Flag: SPT ACT UpTime: 00:02:54 Upstream interface: Vlanif60 Upstream neighbor: FE80::659:10C:3 RPF prime neighbor: FE80::659:10C:3 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif90 Protocol: pim-sm, UpTime: 00:02:15, Expires: - 2: Vlanif50 Protocol: pim-sm, UpTime: 00:02:15, Expires: -
SwitchA configuration file
# sysname SwitchA # ipv6 # vlan batch 10 20 30 # multicast ipv6 routing-enable # ospfv3 100 router-id 1.1.1.1 # interface Vlanif10 ipv6 enable ipv6 address FC00:0:0:2001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif20 ipv6 enable ipv6 address FC00:0:0:3001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 silent pim ipv6 sm mld enable # interface Vlanif30 ipv6 enable ipv6 address FC00:0:0:2002::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 # return
SwitchB configuration file
# sysname SwitchB # ipv6 # vlan batch 40 90 # multicast ipv6 routing-enable # ospfv3 100 router-id 2.2.2.2 # interface Vlanif40 ipv6 enable ipv6 address FC00:0:0:4001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # interface Vlanif90 ipv6 enable ipv6 address FC00:0:0:2003::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 90 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 40 port hybrid untagged vlan 40 # return
SwitchC configuration file
# sysname SwitchC # ipv6 # vlan batch 40 50 # multicast ipv6 routing-enable # ospfv3 100 router-id 3.3.3.3 # interface Vlanif40 ipv6 enable ipv6 address FC00:0:0:4001::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # interface Vlanif50 ipv6 enable ipv6 address FC00:0:0:2004::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 50 # return
SwitchD configuration file
# sysname SwitchD # ipv6 # vlan batch 30 60 70 80 # multicast ipv6 routing-enable # ospfv3 100 router-id 4.4.4.4 # interface Vlanif30 ipv6 enable ipv6 address FC00:0:0:2002::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif60 ipv6 enable ipv6 address FC00:0:0:2005::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif70 ipv6 enable ipv6 address FC00:0:0:6001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 bsr-boundary pim ipv6 sm # interface Vlanif80 ipv6 enable ipv6 address FC00:0:0:5001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 80 port hybrid untagged vlan 80 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 70 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 30 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 60 # return
SwitchE configuration file
# sysname SwitchE # ipv6 # vlan batch 10 50 60 90 # multicast ipv6 routing-enable # acl ipv6 number 2001 rule 0 permit source FF0E::/64 # ospfv3 100 router-id 5.5.5.5 # interface Vlanif10 ipv6 enable ipv6 address FC00:0:0:2001::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif50 ipv6 enable ipv6 address FC00:0:0:2004::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif60 ipv6 enable ipv6 address FC00:0:0:2005::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif90 ipv6 enable ipv6 address FC00:0:0:2003::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 50 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 90 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 60 # pim-ipv6 c-bsr FC00:0:0:2005::2 c-rp FC00:0:0:2005::2 group-policy 2001 # return