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.
calink
Staff
Staff
Article Id 341997
Description This article describes how to resolve the error 'Gateway is not unique for the same interface' when creating a link-monitor in the CLI.
Scope FortiGate.
Solution

When creating a new link-monitor in the CLI and entering the gateway IP, the following error might appear: 'Gateway is not unique for the same interface'.

 

This happens if there is an already existing link-monitor for the same interface with the same gateway.

 

For example, the following is already configured in the CLI:

 

config system link-monitor
    edit "wan1"
        set srcintf "wan1"
        set server "8.8.8.8"
        set gateway-ip 1.1.1.1
        set protocol ping
    next
end
 
When creating a new link-monitor, if the same interface and gateway are used, then the error will appear.

 

The following output is an example:

 

config system link-monitor

(link-monitor) # edit "wan1-failover"
new entry 'wan1-failover' added

(wan1-failover) # set srcintf "wan1"

(wan1-failover) # set server 8.8.4.4

(wan1-failover) # set gateway-ip 1.1.1.1

(wan1-failover) # next
Gateway is not unique for the same interface.
object set operator error, -7 discard the setting
Command fail. Return code 1

(link-monitor) # end

 

To resolve this, look for existing link-monitor configurations.
 
config system link-monitor
(link-monitor) # show
config system link-monitor
    edit "wan1"
        set srcintf "wan1"
        set server "8.8.8.8"
        set gateway-ip 1.1.1.1
    next
end
(link-monitor) #
 
The entry can be modified, or deleted as needed. To delete the existing entry from this example, enter the following:
 
config system link-monitor
delete wan1
end