Example for Configuring IPv6 PIM-SM in the ASM Model
Networking Requirements
As shown in Figure 5-2, the shared network segment is connected to the Internet. HostA and HostB want to receive multicast data from Source.
Configuration Roadmap
Configure the IPv6 PIM-SM protocol on the routers to enable them to provide the 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 routers 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 MLD on interfaces that connect the router and hosts. A receiver can join and leave a multicast group by sending MLD messages. The leaf routers maintain the multicast member relationship through MLD.
If both IPv6 PIM-SM and MLD need to be configured on interfaces that connect the router and hosts, you must configure IPv6 PIM-SM first, and then configure MLD.
Enable IPv6 PIM silent on interfaces that connect the router and hosts to prevent malicious hosts from simulating sending Hello packets. In this manner, security of IPv6 PIM-SM domain is ensured.
If the user host network segment connects to multiple routers, do not enable IPv6 PIM silent on interfaces that connect these routers and user hosts. For example, IPv6 PIM silent cannot be enabled on RouterB and RouterC 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 routers that have more multicast flows. For example, you can configure RP on RouterE 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 can be controlled effectively.
Procedure
- Configure an IPv6 address for each interface and an IPv6 unicast routing protocol.
# Configure the IPv6 address and mask for each interface shown in Figure 5-2, and configure OSPFv3 on each router to ensure that routers can communicate at the network layer and can dynamically update routes through the IPv6 unicast routing protocol. The configuration of RouterB, RouterC, RouterD, and RouterE are similar to the configuration of RouterA, and are not provided here.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] ipv6 [RouterA] ospfv3 100 [RouterA-ospfv3-100] router-id 1.1.1.1 [RouterA-ospfv3-100] quit [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ipv6 enable [RouterA-GigabitEthernet1/0/0] ipv6 address 2001::1 64 [RouterA-GigabitEthernet1/0/0] ospfv3 100 area 0 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] ipv6 enable [RouterA-GigabitEthernet2/0/0] ipv6 address 3001::1 64 [RouterA-GigabitEthernet2/0/0] ospfv3 100 area 0 [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] ipv6 enable [RouterA-GigabitEthernet3/0/0] ipv6 address 2002::1 64 [RouterA-GigabitEthernet3/0/0] ospfv3 100 area 0 [RouterA-GigabitEthernet3/0/0] quit
- Enable IPv6 multicast function, and enable IPv6 PIM-SM on all interfaces.
# Enable IPv6 multicast function on all routers and IPv6 PIM-SM on all interfaces. The configuration of RouterB, RouterC, RouterD, and RouterE are similar to the configuration of RouterA, and are not provided here.
[RouterA] multicast ipv6 routing-enable [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] pim ipv6 sm [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] pim ipv6 sm [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] pim ipv6 sm [RouterA-GigabitEthernet3/0/0] quit
- Enable MLD on interfaces that connect the router and hosts.
# Enable MLD on interfaces that connect RouterA and user hosts. The configuration of RouterB and RouterC are similar to the configuration of RouterA, and are not provided here.
[RouterA] interface gigabitethernet 2/0/0 [RouterA-Gigabitethernet2/0/0] mld enable
- Enable IPv6 PIM silent on interface GE2/0/0 on RouterA.
[RouterA-Gigabitethernet2/0/0] pim ipv6 silent [RouterA-GigabitEthernet2/0/0] quit
- Configure the RP.
# Configure the C-RP on RouterE and specify the group address range served by the C-RP.
[RouterE] acl ipv6 number 2001 [RouterE-acl6-basic-2001] rule permit source ff1e:: 64 [RouterE-acl6-basic-2001] quit [RouterE] pim-ipv6 [RouterE-pim6] c-rp 2005::2 group-policy 2001
# Configure a C-BSR on RouterE.
[RouterE-pim6] c-bsr 2005::2 [RouterE-pim6] quit
- Configure the BSR boundary on interfaces that connect RouterD to the Internet.
[RouterD] interface gigabitethernet 2/0/0 [RouterD-Gigabitethernet2/0/0] pim ipv6 bsr-boundary [RouterD-Gigabitethernet2/0/0] quit
- Verify the configuration.
# Run the display pim ipv6 interface command to check the IPv6 PIM configuration and status. In this example, the IPv6 PIM information on RouterC is displayed as follows:
<RouterC> display pim ipv6 interface VPN-Instance: public net Interface State NbrCnt HelloInt DR-Pri DR-Address GE1/0/0 up 0 30 1 FE80::200:FF: (local) FE00:10 GE2/0/0 up 1 30 1 FE80::200:FF: (local) FE00:10
# Run the display pim ipv6 bsr-info command to check information about the BSR selection on the router. For example, BSR information on RouterA and RouterE is displayed as follows (C-BSR information is also displayed on RouterE).
<RouterA> display pim ipv6 bsr-info VPN-Instance: public net Elected AdminScoped BSR Count: 0 Elected BSR Address: 2005::2 Priority: 0 Hash mask length: 126 State: Accept Preferred Scope: Not scoped Uptime: 01:40:40 Expires: 00:01:31 C-RP Count: 1 <RouterE> display pim ipv6 bsr-info VPN-Instance: public net Elected AdminScoped BSR Count: 0 Elected BSR Address: 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: 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 routers. In this example, the RP information on RouterA is displayed as follows:
<RouterA> display pim ipv6 rp-info VPN-Instance: public net PIM-SM BSR RP Number:1 Group/MaskLen: FF1E::/64 RP: 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 (5001::5/64) sends multicast packets to multicast groups FF1E::1/64 and FF1E::2/64. HostA needs to receive data sent to group FF1E::1, and HostB needs to receive data sent to group FF1E::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 router are (S, G) entries after the SPT switchover.
<RouterA> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, FF1E::1) RP: 2005::2 Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: GigabitEthernet1/0/0 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: GigabitEthernet2/0/0 Protocol: mld, UpTime: 00:02:15, Expires: - (5001::5, FF1E::1) RP: 2005::2 Protocol: pim-sm, Flag: SPT LOC ACT UpTime: 00:00:11 Upstream interface: GigabitEthernet3/0/0 Upstream neighbor: FE80::A01:10C:1 RPF prime neighbor: FE80::A01:10C:1 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:00:11, Expires: -
<RouterB> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, FF1E::2) RP: 2005::2 Protocol: pim-sm, Flag: WC UpTime: 00:14:44 Upstream interface: GigabitEthernet1/0/0 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: GigabitEthernet2/0/0 Protocol: mld, UpTime: 00:14:44, Expires: - (5001::5, FF1E::2) RP: 2005::2 Protocol: pim-sm, Flag: SPT ACT UpTime: 00:2:42 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: FE80::A11:110C:11 RPF prime neighbor: FE80::A11:110C:11 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:14:44, Expires: -
<RouterC> display pim ipv6 routing-table VPN-Instance: public net Total 0 (*, G) entry; 1 (S, G) entry (5001::5, FF1E::2) RP: 2005::2 Protocol: pim-sm, Flag: UpTime: 00:2:42 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: FE80::71FE:11:21 RPF prime neighbor: FE80::71FE:11:21 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet1/0/0 Protocol: pim-sm, UpTime: 00:13:46, Expires: -
<RouterD> display pim ipv6 routing-table VPN-Instance: public net Total 0 (*, G) entry; 2 (S, G) entries (5001::5, FF1E::1) RP: 2005::2 Protocol: pim-sm, Flag: SPT ACT UpTime: 00:16:56 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:16:56, Expires: 00:02:34 (5001::5, FF1E::2) RP: 2005::2 Protocol: pim-sm, Flag: SPT ACT UpTime: 00:02:54 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet4/0/0 Protocol: pim-sm, UpTime: 00:02:54, Expires: 00:02:36
<RouterE> display pim ipv6 routing-table VPN-Instance: public net Total 2 (*, G) entries; 2 (S, G) entries (*, FF1E::1) RP: 2005::2(local) Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: Register 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: GigabitEthernet1/0/0 Protocol: pim-sm, UpTime: 00:02:15, Expires: - (5001::5, FF1E::1) RP: 2005::2(local) Protocol: pim-sm, Flag: SPT ACT UpTime: 00:16:56 Upstream interface: GigabitEthernet4/0/0 Upstream neighbor: FE80::659:10C:3 RPF prime neighbor: FE80::659:10C:3 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet1/0/0 Protocol: pim-sm, UpTime: 00:16:56, Expires: 00:02:34 (*, FF1E::2) RP: 2005::2(local) Protocol: pim-sm, Flag: WC UpTime: 00:02:15 Upstream interface: Register Upstream neighbor: FE80::659:10C:3 RPF prime neighbor: FE80::659:10C:3 Downstream interface(s) information: Total number of downstreams: 2 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:02:30, Expires: - 2: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:02:15, Expires: - (5001::5, FF1E::2) RP: 2004::2(local) Protocol: pim-sm, Flag: SPT ACT UpTime: 00:02:54 Upstream interface: GigabitEthernet4/0/0 Upstream neighbor: FE80::659:10C:3 RPF prime neighbor: FE80::659:10C:3 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:02:30, Expires: - 2: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:02:15, Expires: -
Configuration Files
RouterA configuration file
# sysname RouterA # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 1.1.1.1 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 2001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address 3001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 silent pim ipv6 sm mld enable # interface GigabitEthernet3/0/0 ipv6 enable ipv6 address 2002::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # return
RouterB configuration file
# sysname RouterB # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 2.2.2.2 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 2003::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address 4001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # return
RouterC configuration file
# sysname RouterC # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 3.3.3.3 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 4001::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address 2004::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # return
RouterD configuration file
# sysname RouterD # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 4.4.4.4 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 5001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address 6001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 bsr-boundary pim ipv6 sm # interface GigabitEthernet3/0/0 ipv6 enable ipv6 address 2002::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet4/0/0 ipv6 enable ipv6 address 2005::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # return
RouterE configuration file
# sysname RouterE # ipv6 # multicast ipv6 routing-enable # acl ipv6 number 2001 rule 0 permit source FF1E::1/64 # ospfv3 100 router-id 5.5.5.5 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 2001::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address 2004::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet3/0/0 ipv6 enable ipv6 address 2003::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet4/0/0 ipv6 enable ipv6 address 2005::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # pim-ipv6 c-bsr 2005::2 c-rp 2005::2 group-policy 2001 # return