Technical Tip: FortiSwitch VRRP failover based on destination route monitor
Description
This article explains the steps to configure FortiSwitch to automatically trigger VRRP failover based on the status of the monitored destination IP.
Scope
FortiSwitch version 7.6 and above.
Solution
The Virtual Router Redundancy Protocol (VRRP) provides redundancy without user intervention. A VRRP group consists of a master router and one or more backup routers that share a virtual IP address. In this article, the example includes the configuration involving two FortiSwitches forming VRRP.
FortiSwitch-1:
VRRP interface configuration:
config system interface
edit "CORE"
set ip 10.10.1.2 255.255.255.0
set allowaccess ping
set vrrp-virtual-mac enable
config vrrp
edit 110
set priority 200
set vrgrp 10
set vrip 10.10.1.1
next
end
set vlanid 11
set interface "internal"
next
end
VRRP Status:
get router info vrrp
Interface: CORE, primary IP address: 10.10.1.2
UseVMAC: 1
VRID: 110 version: 2
vrip: 10.10.1.1, priority: 200, state: MASTER
adv_interval: 1, preempt: 1, start_time: 3
master_adv_interval: 100, accept: 1
vrmac: <removed>
vrdst:
vrgrp: 10
FortiSwitch-2:
VRRP interface configuration:
config system interface
edit "CORE"
set ip 10.10.1.3 255.255.255.0
set allowaccess ping
set vrrp-virtual-mac enable
config vrrp
edit 110
set priority 100
set vrgrp 10
set vrip 10.10.1.1
next
end
set vlanid 11
set interface "internal"
next
end
VRRP Status:
get router info vrrp
vrrp_ctx_dump_status: icl_tr: icl_trid:-1
Interface: CORE, primary IP address: 10.10.1.3
UseVMAC: 1
VRID: 110 version: 2
vrip: 10.10.1.1, priority: 100, state: BACKUP
adv_interval: 1, preempt: 1, start_time: 3
master_adv_interval: 100, accept: 1
vrmac: <removed>
vrdst:
vrgrp: 10
With this configuration, VRRP provides redundancy without user intervention. If the master router fails, VRRP automatically promotes a backup router to master, ensuring network traffic continues with minimal disruption.
However, VRRP failover will not be triggered if the master router loses route reachability to a critical destination. To address this, configure route monitoring by specifying the destination IP address using 'vrdst'. If the monitored route becomes unreachable, VRRP will trigger a failover to a backup router.
FortiSwitch-1:
Adding 'vrdst' to FortiSwitch-1:
config system interface
edit CORE
config vrrp
edit 110
set vrdst 1.1.1.1
end
end
Note:
In this example, IP 1.1.1.1 is added as a monitored destination to trigger a failover. No route exists on the FortiSwitch to this destination. In a real-world scenario, this IP address should represent a critical destination whose loss of reachability should trigger a VRRP failover.
Updated VRRP Status:
get router info vrrp
Interface: CORE, primary IP address: 10.10.1.2
UseVMAC: 1
VRID: 110 version: 2
vrip: 10.10.1.1, priority: 0, state: BACKUP
adv_interval: 1, preempt: 1, start_time: 3
master_adv_interval: 100, accept: 1
vrmac: <removed>
vrdst: 1.1.1.1
vrgrp: 10
Note:
The VRRP status of FortiSwitch-1 is changed to BACKUP.
FortiSwitch-2:
Updated VRRP Status:
get router info vrrp
vrrp_ctx_dump_status: icl_tr: icl_trid:-1
Interface: CORE, primary IP address: 10.10.1.4
UseVMAC: 1
VRID: 110 version: 2
vrip: 10.10.1.1, priority: 100, state: MASTER
adv_interval: 1, preempt: 1, start_time: 3
master_adv_interval: 100, accept: 1
vrmac: <removed>
vrdst:
vrgrp: 10
Note:
The VRRP status of FortiSwitch-1 is changed to BACKUP.
In this example, in FortiSwitch-2, the 'vrdst'value is not set intentionally to simplify the configuration. In this scenario, if FortiSwitch-1 recovers the route to the configured 'vrdst' IP, VRRP will trigger a failback, and FortiSwitch-1 will take over the VRRP Master role.
