In Figure 1, HostA wants to receive multicast data from S1 and S2, while HostB wants to receive multicast data from S2.
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:2005::1/64 |
VLANIF20 | FC00:0:0:3001::1/64 | |
VLANIF30 | FC00:0:0:2001::1/64 | |
SwitchB | VLANIF40 | FC00:0:0:4001::1/64 |
VLANIF90 | FC00:0:0:2002::1/64 | |
SwitchC | VLANIF40 | FC00:0:0:4001::2/64 |
VLANIF50 | FC00:0:0:2003::1/64 | |
SwitchD | VLANIF60 | FC00:0:0:2004::1/64 |
VLANIF80 | FC00:0:0:5001::1/64 | |
SwitchE | VLANIF10 | FC00:0:0:2005::2/64 |
VLANIF50 | FC00:0:0:2003::2/64 | |
VLANIF60 | FC00:0:0:2004::2/64 | |
VLANIF90 | FC00:0:0:2002::2/64 | |
SwitchF | VLANIF30 | FC00:0:0:2001::2/64 |
VLANIF70 | FC00:0:0:6001::1/64 |
Configure the IPv6 PIM-SM protocol on the switches to enable them to provide the SSM service for user hosts on the network. Then hosts in a multicast group can receive multicast data sent from specified 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 switches providing 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 MLD on interfaces that connect the switch and hosts. A receiver joins and leaves a multicast group of a specified source 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 Switch C.
Configure the address range for SSM groups on each switch. Ensure that switches in the IPv6 PIM-SM domain provide services only for multicast groups in the range of SSM group addresses.
SSM group address range configured on each switch must be the same.
# Configure the IPv6 address and mask for each interface shown in Figure 1, and configure 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 configuration details are not provided here. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA, and are not provided here.
[SwitchA] vlan batch 10 20 30 [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 trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 30 [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet0/0/3 [SwitchA-GigabitEthernet0/0/3] port link-type hybrid [SwitchA-GigabitEthernet0/0/3] port hybrid pvid vlan 20 [SwitchA-GigabitEthernet0/0/3] port hybrid untagged vlan 20 [SwitchA-GigabitEthernet0/0/3] quit [SwitchA] ipv6 [SwitchA] ospfv3 100 [SwitchA-ospfv3-100] router-id 1.1.1.1 [SwitchA-ospfv3-100] quit [SwitchA] interface vlanif 10 [SwitchA-Vlanif10] ipv6 enable [SwitchA-Vlanif10] ipv6 address fc00:0:0:2005::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:2001::1 64 [SwitchA-Vlanif30] ospfv3 100 area 0 [SwitchA-Vlanif30] 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 [SwitchA-Vlanif20] quit
# Set the range of SSM group addresses to ff3e::/64 on all the switches. The configurations of SwitchB, SwitchC, SwitchD, and SwitchE are similar to the configuration of SwitchA, and are not provided here.
[SwitchA] acl ipv6 number 2000 [SwitchA-acl6-basic-2000] rule permit source ff3e:: 64 [SwitchA-acl6-basic-2000] quit [SwitchA] pim-ipv6 [SwitchA-pim6] ssm-policy 2000 [SwitchA-pim6] quit
# Run the display pim ipv6 interface command to check the IPv6 PIM configuration and status. 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::200:FF:FE00:10(local) Vlanif50 up 1 30 1 FE80::200:FF:FE00:10(local)
# Run the display pim ipv6 routing-table command to view the IPv6 PIM routing table. HostA receives information sent from multicast source FC00:0:0:5001::100/64 and FC00:0:0:6001::100/64 to the multicast group FF3e::1/64. HostB receives information sent from multicast source FC00:0:0:5001::100/64 to multicast group FF3E::1/64. The following information is displayed.
[SwitchA] display pim ipv6 routing-table VPN-Instance: public net Total 2 (S, G) entries (FC00:0:0:5001::100, FF3E::1) Protocol: pim-ssm, Flag: SG_RCVR UpTime: 00:13:46 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:13:46, Expires:- (FC00:0:0:6001::100, FF3E::1) Protocol: pim-ssm, Flag: SG_RCVR UpTime: 00:00:42 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: mld, UpTime: 00:00:42, Expires:- [SwitchB] display pim ipv6 routing-table VPN-Instance: public net Total 1 (S, G) entry (FC00:0:0:5001::100, FF3E::1) Protocol: pim-ssm, Flag: SG_RCVR UpTime: 00:10:12 Upstream interface: Vlanif90 Upstream neighbor: FE80::33FE:0:852C:2 RPF prime neighbor: FE80::33FE:0:852C:2 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif40 Protocol: mld, UpTime: 00:10:12, Expires:- [SwitchC] display pim ipv6 routing-table VPN-Instance: public net Total 1 (S, G) entry (FC00:0:0:5001::100, FF3E::1) Protocol: pim-ssm, Flag: SG_RCVR UpTime: 00:01:25 Upstream interface: Vlanif50 Upstream neighbor: FE80::A11:110C:11 RPF prime neighbor: FE80::A11:110C:11 Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif40 Protocol: mld, UpTime: 00:01:25, Expires:- [SwitchD] display pim ipv6 routing-table VPN-Instance: public net Total 1 (S, G) entry (FC00:0:0:5001::100, FF3E::1) Protocol: pim-ssm, Flag: LOC UpTime: 00:00:42 Upstream interface: Vlanif80 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif60 Protocol: pim-ssm, UpTime: 00:00:42, Expires: 00:02:16 [SwitchE] display pim ipv6 routing-table VPN-Instance: public net Total 3 (S, G) entries (FC00:0:0:5001::100, FF3E::1) Protocol: pim-ssm, Flag: UpTime: 00:13:16 Upstream interface: Vlanif60 Upstream neighbor: FE80::9D62:0:FDC5:2 RPF prime neighbor: FE80::9D62:0:FDC5:21 Downstream interface(s) information: Total number of downstreams: 3 1: Vlanif10 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:22 1: Vlanif50 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:22 1: Vlanif90 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:22 [SwitchF] display pim ipv6 routing-table VPN-Instance: public net Total 1 (S, G) entry (FC00:0:0:6001::100, FF3E::1) Protocol: pim-ssm, Flag: LOC UpTime: 00:13:16 Upstream interface: Vlanif70 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlanif30 Protocol: pim-ssm, UpTime: 00:15:28, Expires: 00:05:21
SwitchA configuration file
# sysname SwitchA # ipv6 # vlan batch 10 20 30 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # ospfv3 100 router-id 1.1.1.1 # interface Vlanif10 ipv6 enable ipv6 address FC00:0:0:2005::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:2001::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 trunk port trunk allow-pass vlan 30 # interface GigabitEthernet0/0/3 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # pim-ipv6 ssm-policy 2000 # return
SwitchB configuration file
# sysname SwitchB # ipv6 # vlan batch 40 90 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # 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: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 90 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 40 port hybrid untagged vlan 40 # pim-ipv6 ssm-policy 2000 # return
SwitchC configuration file
# sysname SwitchC # ipv6 # vlan batch 40 50 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # 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:2003::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 # pim-ipv6 ssm-policy 2000 # return
SwitchD configuration file
# sysname SwitchD # ipv6 # vlan batch 60 80 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # ospfv3 100 router-id 4.4.4.4 # interface Vlanif60 ipv6 enable ipv6 address FC00:0:0:2004::1/64 ospfv3 100 area 0.0.0.0 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/4 port link-type trunk port trunk allow-pass vlan 60 # pim-ipv6 ssm-policy 2000 # return
SwitchE configuration file
# sysname SwitchE # ipv6 # vlan batch 10 50 60 90 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # ospfv3 100 router-id 5.5.5.5 # interface Vlanif10 ipv6 enable ipv6 address FC00:0:0:2005::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif50 ipv6 enable ipv6 address FC00:0:0:2003::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif60 ipv6 enable ipv6 address FC00:0:0:2004::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface Vlanif90 ipv6 enable ipv6 address FC00:0:0:2002::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 ssm-policy 2000 # return
SwitchF configuration file
# sysname SwitchF # ipv6 # vlan batch 30 70 # multicast ipv6 routing-enable # acl ipv6 number 2000 rule 0 permit source FF3E::/64 # ospfv3 100 router-id 6.6.6.6 # interface Vlanif30 ipv6 enable ipv6 address FC00:0:0:2001::2/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 sm # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 70 port hybrid untagged vlan 70 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 30 # pim-ipv6 ssm-policy 2000 # return