Commonly used multicast load-balancing method is per bandwidth/round robin, but the interface in an ECMP set can also be used for a particular channel to be predictable without knowing anything about the other channels using the ECMP set.
The mc-ecmp-hashing-enabled command enables PIM joins to be distributed over the multiple ECMP paths based on a hash of S and G. When a link in the ECMP set is removed, the multicast streams that were using that link are re-distributed over the remaining ECMP links using the same hash algorithm. When a link is added to the ECMP set, new joins may be allocated to the new link based on the hash algorithm. Existing multicast streams using the other ECMP links stay on those links until they are pruned, unless the rebalance option is specified.
The default is no mc-ecmp-hashing-enabled, which means that the use of multiple ECMP paths (if enabled at the config>service>vprn context) is controlled by the existing implementation and CLI commands, that is, mc-ecmp-balance.
The mc-ecmp-hashing-enabled command and the mc-ecmp-balance command cannot be used together in the same context.
To achieve distribution of streams across the ECMP links, the hashing steps are as follows:
For a specific (S,G) get all possible next hops.
Sort these next hops based on next hop’s address.
XOR S and G addresses.
Hash the XORed address over the number of PIM next hops.
Use the hash value obtained in step 4, and set that element in the sorted list that was obtained in step 2 as the preferred next hop.
If this element is not available or is not a PIM next hop (PIM neighbor), the next available next hop is chosen.
The following example displays PIM status indicating ECMP hashing is disabled:
*B:BB# show router 100 pim status
===============================================================================
PIM Status ipv4
===============================================================================
Admin State : Up
Oper State : Up
IPv4 Admin State : Up
IPv4 Oper State : Up
BSR State : Accept Any
Elected BSR
Address : None
Expiry Time : N/A
Priority : N/A
Hash Mask Length : 30
Up Time : N/A
RPF Intf towards E-BSR : N/A
Candidate BSR
Admin State : Down
Oper State : Down
Address : None
Priority : 0
Hash Mask Length : 30
Candidate RP
Admin State : Down
Oper State : Down
Address : 0.0.0.0
Priority : 192
Holdtime : 150
SSM-Default-Range : Enabled
SSM-Group-Range
None
MC-ECMP-Hashing : Disabled
Policy : None
RPF Table : rtable-u
Non-DR-Attract-Traffic : Disabled
===============================================================================
----------------------------------------------
*B:BB>config>service>vprn>pim# no mc-ecmp-balance mc-ecmp-balance mc-ecmp-balance-
hold
*B:BB>config>service>vprn>pim# no mc-ecmp-balance
*B:BB>config>service>vprn>pim# mc-ecmp-mc-ecmp-balance mc-ecmp-balance-hold mc-ecmp-
hashing-enabled
*B:BB>config>service>vprn>pim# mc-ecmp-hashing-enabled
*B:BB>config>service>vprn>pim# info
----------------------------------------------
apply-to all
rp
static
address 10.3.3.3
group-prefix 224.0.0.0/4
exit
exit
bsr-candidate
shutdown
exit
rp-candidate
shutdown
exit
exit
no mc-ecmp-balance
mc-ecmp-hashing-enabled
----------------------------------------------
*B:BB>config>service>vprn>pim#
apply-to - Create/remove interfaces in PIM
[no] import - Configure import policies
[no] interface + Configure PIM interface
[no] mc-ecmp-balance - Enable/
Disable multicast balancing of traffic over ECMP links
[no] mc-ecmp-balanc* - Configure hold time for multicast balancing over ECMP links
[no] mc-ecmp-hashin* - Enable/
Disable hash based multicast balancing of traffic over ECMP links
[no] non-dr-attract* - Enable/disable attracting traffic when not DR
rp + Configure the router as static or Candidate-RP
[no] shutdown - Administratively enable or disable the operation of PIM
[no] spt-switchover* -
Configure shortest path tree (spt tree) switchover threshold for a group prefix
[no] ssm-default-ra* - Enable the disabling of SSM Default Range
[no] ssm-groups + Configure the SSM group ranges
The following example shows distribution of PIM joins over multiple ECMP paths.
*A:BA# show router 100 pim group
===============================================================================
PIM Groups ipv4
===============================================================================
Group Address Type Spt Bit Inc Intf No.Oifs
Source Address RP
-------------------------------------------------------------------------------
239.1.1.1 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.1.1.2 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.1.1.3 (S,G) spt to_C2 1
172.0.100.33 10.20.1.6
239.1.1.4 (S,G) spt to_C1 1
172.0.100.33 10.20.1.6
239.1.1.5 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.1.1.6 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.2.1.1 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.2.1.2 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.2.1.3 (S,G) spt to_C2 1
172.0.100.33 10.20.1.6
239.2.1.4 (S,G) spt to_C1 1
172.0.100.33 10.20.1.6
239.2.1.5 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.2.1.6 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.3.1.1 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.3.1.2 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.3.1.3 (S,G) spt to_C2 1
172.0.100.33 10.20.1.6
239.3.1.4 (S,G) spt to_C1 1
172.0.100.33 10.20.1.6
239.3.1.5 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.3.1.6 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.4.1.1 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.4.1.2 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
239.4.1.3 (S,G) spt to_C2 1
172.0.100.33 10.20.1.6
239.4.1.4 (S,G) spt to_C1 1
172.0.100.33 10.20.1.6
239.4.1.5 (S,G) spt to_C0 1
172.0.100.33 10.20.1.6
239.4.1.6 (S,G) spt to_C3 1
172.0.100.33 10.20.1.6
-------------------------------------------------------------------------------
Groups : 24
===============================================================================