| Description | This article describes how to set up an ISP Failover using static routing and link-health monitor |
| Scope | FortiGate V7.x. |
| Solution |
Note1: After enabling 'Multiple Interface Policies', add multiple interfaces to a single policy.
Note 2: It is important to note that when distances are equal, both routes will be included in the routing table. However, the route with the lower priority will be preferred. The s* symbol indicates that this route is the primary route to the internet.
If assigning a higher distance to WAN2, it will be removed from the routing table and will no longer be usable. If the goal is to keep WAN2 available for specific routes, port forwarding (VIP), or management access, it is better to use the configuration option mentioned above.
The WAN2 default route has been removed and is no longer available for use.
To keep one of the interfaces as a DHCP client, to achieve ISP Failover, assign a higher distance to the other interface.
Alternatively, to keep both WAN1 and WAN2 active with WAN1 as the primary and a WAN2 DHCP client as the secondary, configure the Administrative Distance to the same as the primary and keep the priority value higher to make the WAN2 DHCP the secondary. Changes to the priority can only be made under the interface via the CLI.
config system interface
Another option to set the distance and priority of the DHCP interface is by using the static route. To achieve this, disable the 'Retrieve default gateway from server' option from the GUI or disable 'defaultgw' from the CLI on the WAN DHCP interface, and configure the static route with 'dynamic-gateway' from the CLI or enable the 'Dynamic' option from the GUI.
CLI:
config router static
GUI:
In the GUI, the 'Dynamic' option under static route will show up when the DHCP interface is selected under interfaces. Selecting the Dynamic option will make sure the default gateway is updated by itself whenever there is a change to the default gateway of the DHCP interface.
The routing table will look like the following:
The steps mentioned will work as an ISP failover if a physical or logical shutdown of any of the WAN interfaces occurs. This is the basic configuration of the ISP failover.
However, if internet service is lost on the ISP modem, failover may not complete. To complete failover when the ISP goes down, it is necessary to configure a link health monitor. To do this, see Technical Tip: Link-Monitor Explained.
For further assistance, reach out to the TAC support team.
Related article: Technical Tip: Override default route settings (default route received from DHCP) Technical Tip: Static route for DHCP/PPPoE interfaces with dynamic gateway Technical Tip: How to configure a FortiGate interface to use DHCP |
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 2025 Fortinet, Inc. All Rights Reserved.