Example for Configuring SPT Switchover in PIM-SM Domain
Networking Requirements
Receivers can receive the multicast data in multicast mode. The entire PIM network adopts a single bootstrap router (BSR) administrative domain. By default, after receiving the first multicast data packet, the rendezvous point (RP) and the designated router (DR) on the receiver side perform the SPT switchover, searching for an optimal path to receive the multicast information from the multicast source. If receivers require that the SPT switchover be performed after the traffic reaches the threshold, you need to configure the SPT switchover.
As shown in Figure 4-21, you need to configure the routers properly, so that HostA on the leaf network can receive multicast data from the RP (GE1/0/0 of RouterA). When the transmission rate of multicast data packets reaches 1024 kbit/s, the SPT switchover is performed. After the SPT switchover, the path through which HostA receives multicast packets is Source-RouterB-RouterC-HostA.
Configuration Roadmap
The configuration roadmap is as follows:
Configure an IP address for each interface on routers and a unicast routing protocol.
Enable the multicast function on all routers, enable PIM-SM on all interfaces, and enable IGMP on the interface connected to user hosts.
Configure the same static RP on each router.
Configure the SPT switchover on RouterC.
Procedure
- Configure an IP address for each interface on routers and a unicast routing protocol.
# Configure an IP address and mask for each interface according to Figure 4-21. Configure OSPF on RouterA, RouterB, and RouterC to ensure IP connectivity between them, and enable them to dynamically update routing information. The configuration of RouterA and RouterB are similar to the configuration of RouterC, and are not mentioned here.
<Huawei> system-view [Huawei] sysname RouterC [RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] ip address 192.168.1.2 24 [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] ip address 10.110.2.1 24 [RouterC-GigabitEthernet2/0/0] quit [RouterC] interface gigabitethernet 3/0/0 [RouterC-GigabitEthernet3/0/0] ip address 192.168.2.2 24 [RouterC-GigabitEthernet3/0/0] quit [RouterCA] ospf [RouterC-ospf-1] area 0 [RouterC-ospf-1-area-0.0.0.0] network 10.110.2.0 0.0.0.255 [RouterC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [RouterC-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255 [RouterC-ospf-1-area-0.0.0.0] quit [RouterC-ospf-1] quit
- Enable the multicast function on all routers, enable PIM-SM on all interfaces, and enable IGMP on the interface connected to user hosts.
# Enable the multicast function on all routers, PIM-SM on all interfaces, and IGMP on the interface that connects RouterC to the leaf network. The configurations of RouterA and RouterB are similar to the configuration of RouterC, and are not mentioned here.
[RouterC] multicast routing-enable [RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] pim sm [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] pim sm [RouterC-GigabitEthernet2/0/0] igmp enable [RouterC-GigabitEthernet2/0/0] quit [RouterC] interface gigabitethernet 3/0/0 [RouterC-GigabitEthernet3/0/0] pim sm [RouterC-GigabitEthernet3/0/0] quit
- Configure a static RP.
# Configure a static RP on RouterA, RouterB, and RouterC. The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.
[RouterA] pim [RouterA-pim] static-rp 192.168.1.1
- Configure the threshold for an SPT switchover.
# Configure RouterC to perform an SPT switchover when the transmission rate of multicast packets reaches 1024 kbit/s.
[RouterC] pim [RouterC-pim] spt-switch-threshold 1024 [RouterC-pim] quit
- Verify the configuration.
# The multicast source begins to send data to the multicast group, and HostA can receive the data from the source. When the rate is smaller than 1024 kbit/s, run the display pim routing-table command to view the PIM multicast routing table on RouterC. You can find that the upstream neighbor is RouterA. The command output is as follows:
<RouterC> display pim routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, 225.1.1.1) RP: 192.168.1.1 Protocol: pim-sm, Flag: WC UpTime: 00:13:46 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 192.168.1.1 RPF prime neighbor: 192.168.1.1 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: igmp, UpTime: 00:13:46, Expires:- (10.110.5.100, 225.1.1.1) RP: 192.168.1.1 Protocol: pim-sm, Flag: ACT UpTime: 00:00:42 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 192.168.1.1 RPF prime neighbor: 192.168.1.1 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:00:42, Expires:-
# When the rate is higher than 1024 kbit/s, run the display pim routing-table command to view the PIM multicast routing table on RouterC. You can find that the upstream neighbor is RouterB. The command output is as follows:
<RouterC> display pim routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, 225.1.1.1) RP: 192.168.1.1 Protocol: pim-sm, Flag: WC UpTime: 00:13:46 Upstream interface: GigabitEthernet3/0/0 Upstream neighbor: 192.168.2.1 RPF prime neighbor: 192.168.2.1 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0, Protocol: igmp, UpTime: 00:13:46, Expires:- (10.110.5.100, 225.1.1.1) RP: 192.168.1.1 Protocol: pim-sm, Flag:RPT SPT ACT UpTime: 00:00:42 Upstream interface: GigabitEthernet3/0/0 Upstream neighbor: 192.168.2.1 RPF prime neighbor: 192.168.2.1 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:00:42, Expires:-
Configuration Files
RouterA configuration file
# sysname RouterA # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.1.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.3.1 255.255.255.0 pim sm # pim static-rp 192.168.1.1 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # return
RouterB configuration file
# sysname RouterB # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.2.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.3.2 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 10.110.5.1 255.255.255.0 pim sm # pim static-rp 192.168.1.1 # ospf 1 area 0.0.0.0 network 10.110.5.0 0.0.0.255 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # return
RouterC configuration file
# sysname RouterC # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.1.2 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.2.1 255.255.255.0 pim sm igmp enable # interface GigabitEthernet3/0/0 ip address 192.168.2.2 255.255.255.0 pim sm # pim spt-switch-threshold 1024 static-rp 192.168.1.1 # ospf 1 area 0.0.0.0 network 10.110.2.0 0.0.0.255 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return