ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

High Availability: the active-passive cluster

Lesson 5.110 minIntermediateNovember 24, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • FGCP (FortiGate Clustering Protocol) joins two or more FortiGates into one cluster. To the network it looks like a single device.
  • In active-passive mode only the primary processes traffic. The secondary keeps the configuration and sessions in sync and takes over when the primary fails.
  • The devices check each other over heartbeat ports. If the heartbeat is lost, both devices may consider themselves primary (split brain), so there must be at least two heartbeat links.
  • Primary election (with override disabled): number of working monitored ports → HA uptime → priority → serial number.
  • Cluster members must be the same model, same firmware and same licences. The configuration is changed only on the primary and syncs by itself.

Why HA?

The firewall is at the entrance to the network: if it stops, so do the internet, the VPN and access to servers. Keeping a spare device on the shelf is no solution either: hours pass before it is connected and the configuration loaded.

In an HA cluster the second device is already connected, has the same configuration and takes over within a few seconds. Staff often notice nothing.

Requirements

RequirementWhy
Same modelPorts and hardware must match
Same firmware versionDifferent versions do not form a cluster
Same licencesIf they differ, the cluster works at the lowest level
Same HA settingsgroup-id, group-name, password, mode
At least one heartbeat linkRecommended: two separate ports

How active-passive works

Switch (WAN) FGT-HQ-1 · primaryprocesses traffic FGT-HQ-2 · secondarywaits ready Switch (LAN) heartbeat port3 · port4
Figure 1 · Both devices connect to the same switches. The two links between them are for the heartbeat
  • The primary processes all traffic.
  • The secondary receives the configuration and (if enabled) the session table from the primary.
  • The cluster's ports have virtual MAC addresses. During a failover the secondary takes over these MACs and notifies the switches (gratuitous ARP). The computers' gateway and ARP table do not change.

The heartbeat

The devices constantly send each other "I am alive" packets. The ports set aside for this are called heartbeat interfaces. The configuration and sessions are synchronised over the same ports.

  • Connect the heartbeat ports with a direct cable (or in a separate VLAN). Do not put traffic on them.
  • Use two heartbeat ports. If one fails, the other carries on.

Split brain: if all heartbeat links are cut, both devices are alive but cannot see each other. Both consider themselves primary, start working with the same IP and MAC, and the network is thrown into confusion. The only reliable protection is a redundant heartbeat link.

Building it

On the first device:

FGT-HQ-1
FGT-HQ-1 # config system ha
FGT-HQ-1 (ha) # set group-id 10
FGT-HQ-1 (ha) # set group-name "HQ-CLUSTER"
FGT-HQ-1 (ha) # set mode a-p
FGT-HQ-1 (ha) # set password <password>
FGT-HQ-1 (ha) # set hbdev "port3" 50 "port4" 50
FGT-HQ-1 (ha) # set session-pickup enable
FGT-HQ-1 (ha) # set override disable
FGT-HQ-1 (ha) # set priority 200
FGT-HQ-1 (ha) # set monitor "port1" "port2"
FGT-HQ-1 (ha) # end

On the second device the same settings, only set priority 100. GUI: System > HA.

SettingMeaning
group-id, group-name, passwordThe identity of the cluster. Must be the same on both devices
mode a-pActive-passive
hbdev "port3" 50 "port4" 50The heartbeat ports and their priorities
priorityA higher number is closer to becoming primary (default 128)
monitorIf one of these ports goes down, the device may lose the primary role
session-pickupSyncs sessions to the secondary

After entering the settings, connect the devices with the heartbeat cables. They find each other, elect a primary, and the secondary accepts the primary's configuration. The secondary's own configuration is erased.

Watch out on a real device: when you add a second device to a working one, make sure which of them will be primary. If a new device with an empty configuration is elected primary, it will erase the configuration of the working device and replace it with its own. Take a backup first, give the working device a high priority and only then connect the new one.

How the primary is elected

Override disabled (default):

  1. More working monitored ports.
  2. Longer HA uptime (if the difference is more than 5 minutes).
  3. Higher priority.
  4. Higher serial number.

Override enabled (set override enable): steps 2 and 3 swap places: priority comes before uptime.

The practical difference: with override disabled, the old primary does not take its role back when it returns, because the current primary has the longer uptime. This avoids a needless second failover. With override enabled, the device with the higher priority becomes primary again as soon as it returns: easy to predict, but every return means a failover.

What syncs and what does not

Almost all of the configuration syncs. What does not sync belongs to each device individually:

  • the hostname;
  • HA priority and override;
  • the settings of the reserved HA management interface.

So you change the configuration only on the primary. Give each device its own hostname (FGT-HQ-1, FGT-HQ-2), otherwise you will not know which one you are on.

There are two ways to log in to the secondary: execute ha manage <number> <admin name> from the primary's CLI, or a reserved management interface that gives each device its own management IP (set ha-mgmt-status enable).

Viewing the state

FGT-HQ-1
FGT-HQ-1 # get system ha status
HA Health Status: OK
Model: FortiGate-100F
Mode: HA A-P
Group Name: HQ-CLUSTER
Group ID: 10
Primary selected using:
    <2026/11/23 09:14:02> FG100FTK00000001 is selected as the primary because its uptime is larger than peer member FG100FTK00000002.
Configuration Status:
    FG100FTK00000001(updated 2 seconds ago): in-sync
    FG100FTK00000002(updated 4 seconds ago): in-sync
Primary     : FGT-HQ-1 , FG100FTK00000001, HA cluster index = 0
Secondary   : FGT-HQ-2 , FG100FTK00000002, HA cluster index = 1

Look at three things here: HA Health Status, who is primary and why it was chosen, and whether both devices are in-sync.

FGT-HQ-1
FGT-HQ-1 # diagnose sys ha checksum cluster

This command shows the configuration checksum of each device. If the numbers are the same, the configuration is in sync. If they differ, you can also see which section differs.

🧪 Hands-on lab · Topology: FGT1 (fortigate), FGT2 (fortigate)

HA: an active-passive cluster

Two FortiGates are joined on port3 and port4 (heartbeat). Write the same HA settings on both: mode a-p, group-name HQ-CLUSTER, group-id 10, a password, hbdev "port3" 50 "port4" 50, monitor port1 port2. Only the priority differs: FGT1 200, FGT2 100. Switch between the devices with the buttons above.

Checked:

  • FGT1: mode a-p
  • FGT1: group-name HQ-CLUSTER
  • FGT1: heartbeat port3, port4
  • FGT1: priority 200
  • FGT2: mode a-p
  • FGT2: group-name HQ-CLUSTER
  • FGT2: priority 100
  • FGT1: monitor port1, port2

▶ Start the lab

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1Who processes traffic in an active-passive cluster?

The secondary stays in sync and takes over only on a failover.

2When does split brain happen?

The devices cannot see each other and both start working with the same IP and MAC.

3Override is disabled and all monitored ports work on both devices. What is the next criterion in primary election?

Without override, uptime comes before priority (if the difference is more than 5 minutes).

4Where do you change the configuration in an HA cluster?

The primary passes the configuration to the secondary.

5Which of these does not sync between the devices?

The hostname and HA priority belong to each device individually.
Was this lesson useful?

Comments

Sign in to comment.