FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.



This article describes the Equal cost multi-path (ECMP) which is a mechanism that allows a FortiGate to load-balance routed traffic over multiple gateways.
Just like routes in a routing table, ECMP is considered after policy routing, so any matching policy routes will take precedence over ECMP.

When ECMP paths are exceeded, this can cause problems with all routing when a new route is added into the ECMP path.


All Fortigate devices running FortiOS version 6.0 and above.



ECMP pre-requisites are as follows:

- Routes must have the same destination and costs. In the case of static routes, costs include distance and priority.
- Routes are sourced from the same routing protocol. Supported protocols include static routing, OSPF, and BGP.

The default setting for the number of max ECMP paths allowed by a FortiGate is 255.


# config system settings
    set ecmp-max-paths <number of paths> <- Default is 255.


Note that setting ecmp-max-paths to the lowest value of 1 is equivalent to disabling ECMP.

To configure the ECMP algorithm from the CLI:


# config system settings
    set v4-ecmp-mode {source-ip-based* | weight-based | usage-based | source-dest-ip-based}


Note that ECMP mode can be adjusted for each VDOM.

The following table summarizes the different load-balancing algorithms supported by each:

Related Articles:

Technical Note: Configuring link redundancy - Traffic load-balancing / load-sharing - ECMP (Equal Co...

Technical Tip: ECMP – Load balancing algorithms for IPv4 and IPv6