The per bandwidth/round robin method is commonly used in multicast load balancing. However, the interface in an ECMP set can also be used for a channel to be predictable without any knowledge of the other channels using the ECMP set.
The mc-ecmp-hashing-enabled command enables PIM joins to be distributed over multiple ECMP paths based on a hash of S and G. When a link in the ECMP set is removed, the multicast streams using the link are redistributed 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, but existing multicast streams using the other ECMP links stay on those links until they are pruned.
The default is no mc-ecmp-hashing-enabled, which means that the use of multiple ECMP paths (if enabled in 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 are mutually exclusive in the same context.
The following procedure is used to achieve distribution of streams across the ECMP links.
For a specific S, G get all possible nHops.
Sort these nHops based on nHop addresses.
xor S and G addresses.
Hash the xor address over a number of PIM next hops.
Use the hash value obtained in step 4, and get that element, in the sorted list obtained in step 2, as the preferred nHop.
If this element is not available or it is not a PIM nHop (PIM neighbor), the next available next hop is chosen.
*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 toward 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
*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
===============================================================================