Created on 07-10-2009 02:09 PM Edited on 03-13-2023 11:46 PM By Jean-Philippe_P
Description
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.
Scope
Solution
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.
end
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}
end
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 Tip: ECMP – Load balancing algorithms for IPv4 and IPv6
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.