ECMP load balancing not working as expected
340
Created On 06/16/26 04:12 AM - Last Modified 11/20/26 16:17 PM
Symptom
- One of the ISP interfaces is heavily utilized compared to the other ISP interface part of ECMP.
- The other ISP interface is barely getting utilized
- The routes attributes parameter, like total AS path, weight, etc., except next hop, are also the same through both the next hops
Environment
-
PA-3400/5400f/1400/400
- PAN-OS 11.x
- BGP
- Peer same AS
- Total next hop to reach the route prefix is 2 or 4
- ECMP method- IP Modulo
Cause
Site A PA 5420 (172.30.0.20)eth1/1 -- isp1 -- bgp peer ---- (172.30.0.21) Site B
(172.30.0.24)eth1/2 -- isp2 -- bgp peer ---- (172.30.0.25)
Here hit count is very high for next hop 172.30.0.21 (via isp link1) as compared to 172.30.0.25(isp link 2). For 3400/5400f/1400/400 platform using 2 or 4 ECMP next hop , the next hop selection will affect by first Octet of the IP address, which is Network part of address. In the fib output above, since the destination is all to 10.x.x.x, it will modulo to same NH index.
> show routing fib ecmp yes
destination nexthop flags interface mtu weight hit nh_id/mask
10.0.0.0/24 172.30.0.21 uge eth1/1 8900 100 9722 0/4
172.30.0.25 uge* eth1/2 8900 100 2 4/4
10.15.37.0/24 172.30.0.21 uge eth1/1 8900 100 98424 0/4
172.30.0.25 uge* eth1/2 8900 100 0 4/4
Resolution
Use Load Balance = IP HASH
Additional Information
For platforms such as 52xx, 7k platform, the NH selection will be affected by last Octet of the IP address, which is the host part of address. for ECMP 3 NH, the selection will be affected by the entire ip address.