FortiGate
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.
kyoneda1
Staff
Staff
Article Id 404490
Description This article explains the reason why route updates may fail when the gateway IP is not specified in the Link Monitor configuration.
Scope FortiOS.
Solution

Link Monitor has a route update function. When polling by the Link Monitor fails, the specified route is removed.

 

In the example diagram below, the FortiGate has a route to 10.0.0.0/24 and monitors connectivity by pinging 172.16.0.1.
If the Link Monitor fails, only the specified route using interface port1 and gateway 192.168.0.254 is removed.

 

linkmonitor1.png

 

config system link-monitor
    edit “1"
        set srcintf “port1"
        set server "172.16.0.1"
        set gateway-ip 192.168.0.254
        set route “10.0.0.0/24“
        set update-static-route enable
    next
end

 

get router info routing-table all
Routing table for VRF=0
S      10.0.0.0/24 [10/0] via 192.168.0.254, port1, [1/0]
B      172.16.0.0/24 [20/0] via 192.168.0.254 (recursive is directly connected, port1), 2d22h42m, [1/0]
C      192.168.0.0/24 is directly connected, port1

 

In this configuration, even if the FortiGate retains a route to Server1, the route update may fail if the gateway-ip is not explicitly specified in the Link Monitor settings.

 

This is due to a difference in how routes are learned for polling versus route updates.
The polling function refers to BGP routes to reach Server1.


However, the route update function checks the gateway IP to reach Server1, which is not learned from BGP.
As a result, the route update may fail if the gateway IP is not explicitly specified.

 

Note:
As an exception, if a static route is configured, the route update will work even without a gateway-ip.
However, to maintain consistent policy across Link Monitor configurations, it is recommended to explicitly specify the gateway-ip.

 

Related document:

Link monitor with route updates | FortiOS 7.6.4