/
Example for Configuring SPT Switchover in PIM-SM Domain

Example for Configuring SPT Switchover in PIM-SM Domain


Networking Requirements

Receiver could receive the Video-on-Demand information in multicast mode. By default, when SPT switchover function is enabled, the receiver-side DR initiates SPT switchover to the source immediately after receiving the first multicast packet and find the best path to receive the multicast packets from the source. You can also use SPT switchover configuration to set the rate threshold of the multicast packets in a measurement interval to initiate SPT switchover.

As shown in Figure 1, it is required that the Receiver can receive multicast data properly through the path Source->SwitchC->SwitchB->SwitchA->Receiver. When the rate of multicast data reaches 120000 bytes within 10s, SwitchA performs SPT switchover after which the receiving path of Receiver changes to Source->SwitchC->SwitchA->Receiver.

Figure 1. SPT Switchover in PIM-SM Domain

Configuration Roadmap

Follow the roadmap below to configure SPT switchover in PIM-SM domain:

  1. Configure an IP address for each interface and a unicast routing protocol.
  2. Enable all the VLAN interfaces as multicast interface, enable PIM-SM on all interfaces and enable IGMP on the interface that connects to the Receiver.
  3. Configure C-BSR and C-RPs on loopback interface.
  4. Configure the SPT switching condition to the multicast packets reached 120000 bytes in 10s.

Procedure

SwitchA

Step1       Configure VLAN.

admin@XorPlus# set vlans vlan-id 20 l3-interface vlan20
admin@XorPlus# set vlans vlan-id 60 l3-interface vlan60
admin@XorPlus# set vlans vlan-id 100 l3-interface vlan100
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 100
admin@XorPlus# set interface gigabit-ethernet ge-1/1/25 family ethernet-switching native-vlan-id 20
admin@XorPlus# set interface gigabit-ethernet ge-1/1/26 family ethernet-switching native-vlan-id 60
admin@XorPlus# set vlan-interface loopback address 1.1.1.1 prefix-length 32
admin@XorPlus# set vlan-interface interface vlan20 vif vlan20 address 20.0.0.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan60 vif vlan60 address 60.0.0.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan100 vif vlan100 address 100.0.0.1 prefix-length 24

Step2       Enable IP routing.

admin@Xorplus# set ip routing enable true

Step3       Enable the VLAN interfaces as multicast interface.

admin@XorPlus# set multicast-interface interface vlan20 vif vlan20 disable false
admin@XorPlus# set multicast-interface interface vlan60 vif vlan60 disable false
admin@XorPlus# set multicast-interface interface vlan100 vif vlan100 disable false

Step4       Enable IGMP on the L3 VLAN interfaces of the PIM router connected to the receiver.

admin@XorPlus# set protocols igmp interface vlan100 vif vlan100

Step5       Enable PIM-SM on the L3 VLAN interfaces.

admin@XorPlus# set protocols pimsm4 interface vlan20 vif vlan20 disable false
admin@XorPlus# set protocols pimsm4 interface vlan60 vif vlan60 disable false
admin@XorPlus# set protocols pimsm4 interface vlan100 vif vlan100 disable false
admin@XorPlus# set protocols pimsm4 interface loopback vif loopback disable false

Step6       Configure OSPF routes to other switches.

admin@XorPlus# set protocols ospf4 router-id 1.1.1.1
admin@XorPlus# set protocols ospf4 traceoptions flag all disable false
admin@XorPlus# set protocols ospf4 area 0.0.0.0 loopback address 1.1.1.1
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan20 vif vlan20 address 20.0.0.1
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan60 vif vlan60 address 60.0.0.1
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan100 vif vlan100 address 100.0.0.1

Step7       Configure C-BSR on loopback interface for scope zone 224.0.0.0/4.

admin@XorPlus# set protocols pimsm4 bootstrap cand-bsr scope-zone 224.0.0.0/4 cand-bsr-by-vif-name loopback

Step8      Configure the SPT switching condition to the multicast packets reached 120000 bytes in 10s.

admin@Xorplus# set protocols pimsm4 switch-to-spt-threshold interval 10
admin@Xorplus# set protocols pimsm4 switch-to-spt-threshold bytes 120000

Step9      Commit the configuration.

admin@Xorplus# commit

Step10      Verify the configuration.

  • Run run show pim interface command to show information about all interfaces on which PIM-SM is enabled.
admin@Xorplus# run show pim interface
Interface    State      Mode     V  PIMstate  Priority  DRaddr    Neighbors
----------   --------   ------   -   --------  --------   ---------------   ---------
loopback     UP         Sparse   2   DR         1   1.1.1.1      0    
vlan20       UP         Sparse   2   NotDR      1   20.0.0.2          1       
vlan60       UP         Sparse   2   NotDR      1   60.0.0.3          1       
vlan100      UP         Sparse   2   DR         1   100.0.0.1         0 
  • Run run show pim neighbors command to show information about about PIM neighbors.
admin@Xorplus# run show pim neighbors
Interface    DRpriority NeighborAddr    V   Mode   Holdtime   Timeout
----------   ---------- -------------   -   ----   --------   -------
vlan20       1          20.0.0.2        2   Sparse 105        84  
vlan60       1          60.0.0.3        2   Sparse 105        83 
  • Run run show pim mfc command to show information about PIM multicast forwarding entries.
admin@Xorplus# commit
admin@Xorplus# run show pim mfc
Group           Source          RP          
-------------   -------------   ------------- 
225.0.0.1       200.0.0.2       2.2.2.2       
    Incoming interface :      vlan20
    Outgoing interfaces:      vlan100
225.0.0.1       200.0.0.3       2.2.2.2       
    Incoming interface :      vlan60
    Outgoing interfaces:      vlan100
  • Run run show pim mrib command to show information about the Multicast Routing Information Base (MRIB) that is used by PIM.
admin@Xorplus# run show pim mrib
DestPrefix         NextHopRouter   VifName   VifIndex   MetricPref   Metric
----------------   -------------   -------   --------   ----------   ------
1.1.1.1/32         1.1.1.1         loopback  0          0            0    
2.2.2.2/32         20.0.0.2        vlan20    1          110          1     
3.3.3.3/32         60.0.0.3        vlan60    2          110          1    
20.0.0.0/24        20.0.0.1        vlan20    1          0            0    
30.0.0.0/24        60.0.0.3        vlan60    2          110          2    
60.0.0.0/24        60.0.0.1        vlan60    2          0            0    
100.0.0.0/24       100.0.0.1       vlan100   3          0            0    
200.0.0.0/24       60.0.0.3        vlan60    2          110          2 
  • Run run show pim rps and run show pim rps mapping commands to show information about the RPs and the group-to-RP mapping.
admin@Xorplus# run show pim rps
Group           RP              Type      Pri   Holdtime   Timeout 
-------------   -------------   -------   ---   --------   ------- 
225.0.0.1       2.2.2.2         bootstrap 192   150        90      

admin@Xorplus# run show pim rps mapping
RP              Type    Pri  Holdtime Timeout ActiveGroups   GroupPrefix      
-------------   -------   ---   --------   -------   ------------   ---------------- 
2.2.2.2         bootstrap 192   150        136       1        225.0.0.0/8      
2.2.2.2         bootstrap 192   150        136       0        239.0.0.0/8
  • Run run show pim join command to show information about PIM multicast routing state.
admin@Xorplus# run show pim join
Group           Source          RP              Flags
------------   -------------   -------------   -----
238.0.0.1       0.0.0.0         50.0.1.1        WC
    Upstream interface (RP):   vlan20
    Upstream MRIB next hop (RP): 20.0.1.2
    Upstream RPF'(*,G):        20.0.1.3
    Upstream state:            Joined
    Join timer:                18
    Local receiver include WC: vlan10
    Joins RP:                  None
    Joins WC:                  None
    Join state:                None
    Prune state:               None
    Prune pending state:       None
    I am assert winner state:  None
    I am assert loser state:   vlan20
    Assert winner WC:          None
    Assert lost WC:            None
    Assert tracking WC:        vlan10,vlan20
    Could assert WC:           vlan10
    I am DR:                   vlan10,register_vif
    Immediate olist RP:        None
    Immediate olist WC:        vlan10
    Inherited olist SG:        vlan10
    Inherited olist SG_RPT:    vlan10
    PIM include WC:            vlan10


SwitchB

Step1       Configure VLAN.

admin@XorPlus# set vlans vlan-id 20 l3-interface vlan20
admin@XorPlus# set vlans vlan-id 30 l3-interface vlan30
admin@XorPlus# set interface gigabit-ethernet ge-1/1/49 family ethernet-switching native-vlan-id 20
admin@XorPlus# set interface gigabit-ethernet ge-1/1/50 family ethernet-switching native-vlan-id 30
admin@XorPlus# set vlan-interface loopback address 2.2.2.2 prefix-length 32
admin@XorPlus# set vlan-interface interface vlan20 vif vlan20 address 20.0.0.2 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan30 vif vlan30 address 30.0.0.2 prefix-length 24

Step2       Enable IP routing.

admin@Xorplus# set ip routing enable true

Step3       Enable the VLAN interfaces as multicast interface.

admin@XorPlus# set multicast-interface interface vlan20 vif vlan20 disable false
admin@XorPlus# set multicast-interface interface vlan30 vif vlan30 disable false

Step4       Enable PIM-SM on the L3 VLAN interfaces.

admin@XorPlus# set protocols pimsm4 interface vlan20 vif vlan20 disable false
admin@XorPlus# set protocols pimsm4 interface vlan30 vif vlan30 disable false
admin@XorPlus# set protocols pimsm4 interface loopback vif loopback disable false

Step5       Configure OSPF routes to other switches.

admin@XorPlus# set protocols ospf4 router-id 2.2.2.2
admin@XorPlus# set protocols ospf4 traceoptions flag all disable false
admin@XorPlus# set protocols ospf4 area 0.0.0.0 loopback address 2.2.2.2
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan20 vif vlan20 address 20.0.0.2
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan30 vif vlan30 address 30.0.0.2

Step6       Configure C-BSR on loopback interface for scope zone 224.0.0.0/4.

admin@XorPlus# set protocols pimsm4 bootstrap cand-bsr scope-zone 224.0.0.0/4 cand-bsr-by-vif-name loopback           
admin@XorPlus# set protocols pimsm4 bootstrap cand-rp group-prefix 225.0.0.0/8 cand-rp-by-vif-name loopback
admin@XorPlus# set protocols pimsm4 bootstrap cand-rp group-prefix 239.0.0.0/8 cand-rp-by-vif-name loopback

Step7      Commit the configuration.

admin@Xorplus# commit

Step8      Verify the configuration.

  • Run run show pim interface command to show information about all interfaces on which PIM-SM is enabled.
admin@Xorplus#  run show pim interface
Interface    State    Mode    V  PIMstate  Priority DRaddr  Neighbors
----------   --------   ------   -   --------   --------   ---------------   ---------
loopback     UP         Sparse   2   DR         1  2.2.2.2    0       
vlan20       UP         Sparse   2   DR         1  20.0.0.2   1       
vlan30       UP         Sparse   2   NotDR      1  30.0.0.3   1 
  • Run run show pim neighbors command to show information about about PIM neighbors.
admin@Xorplus# run show pim neighbors
Interface    DRpriority NeighborAddr    V   Mode   Holdtime   Timeout
----------   ---------- -------------   -   ----   --------   -------
vlan20       1          20.0.0.1        2   Sparse 105        84    
vlan30       1          30.0.0.3        2   Sparse 105        81 
  • Run run show pim mfc command to show information about PIM multicast forwarding entries.
admin@Xorplus# run show pim mfc
Group           Source          RP            
-------------   -------------   ------------- 
225.0.0.1       200.0.0.2       2.2.2.2        
    Incoming interface :      vlan30
    Outgoing interfaces:      vlan20
225.0.0.1       200.0.0.3       2.2.2.2       
    Incoming interface :      register_vif
Outgoing interfaces:      None
  • Run run show pim mrib command to show information about the Multicast Routing Information Base (MRIB) that is used by PIM.
admin@Xorplus# run show pim mrib
DestPrefix         NextHopRouter   VifName   VifIndex   MetricPref   Metric
----------------   -------------   -------   --------   ----------   ------
1.1.1.1/32         20.0.0.1        vlan20    1          110          1    
2.2.2.2/32         2.2.2.2         loopback  0          0            0    
3.3.3.3/32         30.0.0.3        vlan30    2          110          1    
20.0.0.0/24        20.0.0.2        vlan20    1          0            0    
30.0.0.0/24        30.0.0.2        vlan30    2          0            0    
60.0.0.0/24        20.0.0.1        vlan20    1          110          2    
100.0.0.0/24       20.0.0.1        vlan20    1          110          2    
150.0.0.0/24       20.0.0.3        vlan20    1          1            1    
200.0.0.0/24       30.0.0.3        vlan30    2          110          2 
  • Run run show pim rps and run show pim rps mapping commands to show information about the RPs and the group-to-RP mapping.
admin@Xorplus# run show pim rps
Group           RP              Type      Pri   Holdtime   Timeout 
-------------   -------------   -------   ---   --------   ------- 
225.0.0.1       2.2.2.2         bootstrap 192   150        91
    

admin@Xorplus# run show pim rps mapping
RP         Type      Pri   Holdtime  Timeout  ActiveGroups  GroupPrefix      
------------   -------   ---   --------   -------   ------------   ---------------- 
2.2.2.2         bootstrap 192   150        145       1         225.0.0.0/8      
2.2.2.2         bootstrap 192   150        145       0         239.0.0.0/8


SwitchC

Step1       Configure VLAN.

admin@XorPlus# set vlans vlan-id 30 l3-interface vlan30
admin@XorPlus# set vlans vlan-id 60 l3-interface vlan60
admin@XorPlus# set vlans vlan-id 200 l3-interface vlan200
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 200
admin@XorPlus# set interface gigabit-ethernet ge-1/1/25 family ethernet-switching native-vlan-id 30
admin@XorPlus# set interface gigabit-ethernet ge-1/1/26 family ethernet-switching native-vlan-id 60
admin@XorPlus# set vlan-interface loopback address 3.3.3.3 prefix-length 32
admin@XorPlus# set vlan-interface interface vlan30 vif vlan30 address 30.0.0.3 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan60 vif vlan60 address 60.0.0.3 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan200 vif vlan200 address 200.0.0.1 prefix-length 24

Step2       Enable IP routing.

admin@Xorplus# set ip routing enable true

Step3       Enable the VLAN interfaces as multicast interface.

admin@XorPlus# set multicast-interface interface vlan30 vif vlan30 disable false
admin@XorPlus# set multicast-interface interface vlan60 vif vlan60 disable false
admin@XorPlus# set multicast-interface interface vlan200 vif vlan200 disable false

Step4       Enable PIM-SM on the L3 VLAN interfaces.

admin@XorPlus# set protocols pimsm4 interface vlan30 vif vlan30 disable false
admin@XorPlus# set protocols pimsm4 interface vlan60 vif vlan60 disable false
admin@XorPlus# set protocols pimsm4 interface vlan200 vif vlan200 disable false
admin@XorPlus# set protocols pimsm4 interface loopback vif loopback disable false

Step5       Configure OSPF routes to other switches.

admin@XorPlus# set protocols ospf4 router-id 3.3.3.3
admin@XorPlus# set protocols ospf4 traceoptions flag all disable false
admin@XorPlus# set protocols ospf4 area 0.0.0.0 loopback address 3.3.3.3
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan20 vif vlan20 address 30.0.0.3
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan60 vif vlan60 address 60.0.0.3
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan100 vif vlan100 address 200.0.0.1

Step6      Commit the configuration.

admin@Xorplus# commit

Step7     Verify the configuration.

  • Run run show pim interface command to show information about all interfaces on which PIM-SM is enabled.
admin@Xorplus# run show pim interface
Interface    State   Mode     V   PIMstate   Priority DRaddr    Neighbors
----------   --------   ------   -   --------   --------   ---------------   ---------
vlan30       UP    Sparse   2   DR         1     30.0.0.3          1       
vlan60       UP    Sparse   2   DR         1     60.0.0.3          1       
vlan200      UP    Sparse   2   DR         1     200.0.0.1         0  
  • Run run show pim neighbors command to show information about about PIM neighbors.
admin@Xorplus# run show pim neighbors
Interface    DRpriority NeighborAddr    V   Mode   Holdtime   Timeout
----------   ---------- -------------   -   ----   --------   -------
vlan30       1          30.0.0.2        2   Sparse 105        87    
vlan60       1          60.0.0.1        2   Sparse 105        93
  • Run run show pim mfc command to show information about PIM multicast forwarding entries.      
admin@Xorplus# run show pim mfc
Group           Source          RP            
-------------   -------------   ------------- 
225.0.0.1       200.0.0.2       2.2.2.2       
    Incoming interface :      vlan200
    Outgoing interfaces:      vlan30
225.0.0.1       200.0.0.3       2.2.2.2       
    Incoming interface :      vlan200
Outgoing interfaces:      vlan60
  • Run run show pim mrib command to show information about the Multicast Routing Information Base (MRIB) that is used by PIM.
admin@Xorplus#  run show pim mrib
DestPrefix         NextHopRouter   VifName   VifIndex   MetricPref   Metric
----------------   -------------   -------   --------   ----------   ------
1.1.1.1/32         60.0.0.1        vlan60    2          110          1    
2.2.2.2/32         30.0.0.2        vlan30    1          110          1    
3.3.3.3/32         3.3.3.3         loopback  0          0            0    
20.0.0.0/24        60.0.0.1        vlan60    2          110          2    
30.0.0.0/24        30.0.0.3        vlan30    1          0            0    
60.0.0.0/24        60.0.0.3        vlan60    2          0            0    
100.0.0.0/24       60.0.0.1        vlan60    2          110          2    
150.0.0.0/24       0.0.0.0         vlan200   3          1            1    
200.0.0.0/24       200.0.0.1       vlan200   3          0            0 
  • Run run show pim rps and run show pim rps mapping commands to show information about the RPs and the group-to-RP mapping.
admin@Xorplus# run show pim rps
Group           RP              Type      Pri   Holdtime   Timeout 
------------   -------------   -------   ---   --------   ------- 
225.0.0.1       2.2.2.2         bootstrap 192   150        102      
225.0.0.1       2.2.2.2         bootstrap 192   150        102 
 

admin@Xorplus# run show pim rps mapping
RP         Type    Pri   Holdtime   Timeout   ActiveGroups   GroupPrefix      
-------------   -------   ---   --------   -------   ------------   ---------------- 
2.2.2.2      bootstrap 192   150        98        0              225.0.0.0/8      
2.2.2.2      bootstrap 192   150        98        0              239.0.0.0/8
  • Run run show pim join command to show information about PIM multicast routing state.
admin@Xorplus# run show pim join
Group           Source          RP              Flags
-------------   -------------   -------------   -----
238.0.0.1       0.0.0.0         50.0.1.1        WC
    Upstream interface (RP):   vlan40
    Upstream MRIB next hop (RP): 40.0.1.2
    Upstream RPF'(*,G):        40.0.1.2
    Upstream state:            Joined
    Join timer:                16
    Local receiver include WC: vlan20
    Joins RP:                  None
    Joins WC:                  vlan20
    Join state:                vlan20
    Prune state:               None
    Prune pending state:       None
    I am assert winner state:  vlan20
    I am assert loser state:   None
    Assert winner WC:          vlan20
    Assert lost WC:            None
    Assert tracking WC:        vlan20,vlan40
    Could assert WC:           vlan20
    I am DR:                   vlan20,register_vif
    Immediate olist RP:        None
    Immediate olist WC:        vlan20
    Inherited olist SG:        vlan20
    Inherited olist SG_RPT:    vlan20
PIM include WC:            vlan20
  • Run run show pim traffic command to show the traffic statistic information about the multicast group.
admin@Xorplus# run show pim traffic
PIM Traffic Counters
                          Received                Sent
Hello                          172                 118
Join-Prune                      27                  30
Graft                            0                   0
Graft Ack.                       0                   0
Data Register                    0                   0
Register Stop                    0                   0
Assert                           2                  10
BSR Message                      0                   0
Candidate-RP Adv.                0                   0
 

Errors:
Malformed Packets                                    0
Bad Checksums                                        0
Packets received on PIM-disabled Interface           0
Packets received with Unknown PIM Version            0
Packets received with Unknown PIM Type               0
Packets received from Unknown PIM Neighbor           1

Copyright © 2025 Pica8 Inc. All Rights Reserved.