Laboratorio 14
Laboratorio 14
Laboratorio 14
FortiGate HA uses FGCP, which uses a heartbeat link for HA-related communications to
discover other FortiGate devices in the same HA group, elect a primary device,
synchronize configuration, and detect failed devices in an HA cluster.
In this exercise, you will examine how to configure HA settings on both FortiGate devices.
You will observe the HA synchronization status, and use diagnose commands to verify that
the configuration is in sync on both FortiGate devices.
Unless instructed
otherwise, always
use the console
connection of
Local-FortiGate and
Remote-FortiGate
to access the CLI.
This ensures that
you can access the
CLI of the device
regardless of the
HA role.
2. Click System > HA, and then configure the following HA settings:
Field Value
Mode Active-Passive
Device 200
priority
Group ID 5
Group Training
name
Field Value
Password Fortinet
Session <enable>
pickup
config system ha
end
The checksums for all cluster members must match for the FortiGate devices to be
synchronized.
After the FortiGate devices are synchronized, the Remote-FortiGate device logs out all
admin users.
7. Alternatively, you can run the following CLI command on any member to view the
checksums of all members:
2. On both FortiGate devices, view the Current HA mode line, and then write down the
device serial number (Serial-Number).
3. On the Local-FortiGate CLI , enter the following command to confirm the reason for
the primary election:
4. In the output, look for the Primary selected using section to identify the reason
for the latest primary election event.
Unless instructed
otherwise, always
use the console
connection of
Local-FortiGate
and Remote-
FortiGate to access
the CLI. This
ensures that you
can access the
device CLI
regardless of the
HA role.
2. On the Local-FortiGate
CLI, reboot Local-
FortiGate.
1. On the Local-Client VM, open a browser, and then visit the following URL:
https://www.youtube.com
3. While the video is playing, open a terminal, and then enter the following command
to run a continuous ping to a public IP address:
ping 4.2.2.2
execute reboot
1. On the Local-Client VM, check the video and terminal that you started earlier.
Because of the failover, Remote-FortiGate is now the primary processor of traffic. Your ping
and video should still be running.
2. Close the browser tab with the video.
3. Return to the terminal, and then press Ctrl+C to stop the ping.
4. On the Remote-FortiGate CLI, enter the following command to verify that Remote-
FortiGate is acting as the primary device in the HA cluster :
5. On any FortiGate in the cluster, enter the following command to see the status of all
cluster members:
You should see that Local-FortiGate rejoins the cluster as a secondary device. It lost its
role as the primary device.
Local-FortiGate
becomes the
secondary device
in the cluster
because it has a
lower HA uptime
than Remote-
FortiGate. In
addition, the HA
uptime difference
between the
members is more
than 5 minutes.
The diagnose
debug application
hatalk
0 command stops
the debug. You
will use this
command later.
execute reboot
4. On the Local-FortiGate CLI, view the output while the secondary device reboots
and starts communicating with the cluster.
The sanitized output shows that the current primary FortiGate is sending heartbeat packets
and trying to synchronize its configuration with the configuration of the secondary
FortiGate.
5. Press the up arrow key twice, select the second-last command (in this
case, diagnose debug application hatalk 0 ), and then press Enter to stop the
debug output on Local-FortiGate.
If you don't configure a reserved HA management interface, the primary FortiGate handles
your cluster management connections. However, you can access the CLI of the secondary
FortiGate from the primary FortiGate CLI, or by using the console connection of the
secondary FortiGate.
You can also configure an in-band HA management interface, which is an alternative to the
reserved HA management interface, and does not require reserving an interface that is only
for management access.
Unless instructed
otherwise, always
use the console
connection of
Local-FortiGate
and Remote-
FortiGate to access
the CLI. This
ensures that you
can access the
device CLI
regardless of the
HA role.
To access the secondary FortiGate CLI through the primary FortiGate CLI
2. Enter the following command to access the secondary FortiGate CLI through the
primary FortiGate heartbeat interface:
4. Enter the following command to get the status of the secondary FortiGate:
exit
1. On the Local-Client VM, open a browser, and then log in to the Local-FortiGate GUI
at 10.0.1.254 with the username admin and password password.
5. Click OK.
port7 connects to
the same LAN
segment as port3.
To configure and verify access to the primary FortiGate using the reserved
HA management interface
edit port7
set ip 10.0.1.253/24
end
show system ha
2. On the Local-Client
VM, log in to the
Remote-FortiGate GUI
(admin/password) using
the port7 IP address to
verify connectivity.
1. On the Remote-FortiGate CLI, enter the following command to verify that the
reserved HA management interface is synchronized with the secondary device:
show system ha
Look for ha-mgmt-status and config ha-mgmt-interfaces. These should already be set.
edit port7
set ip 10.0.1.252/24
next
end
4. On the Local-Client VM, open a browser, and then log in to the Remote-FortiGate
GUI at 10.0.1.252 (note the IP address) with the username admin and
password password.
1. On the Local-Client VM, open a browser, and then log in to the Local-FortiGate GUI
at 10.0.1.254 with the username admin and password password.
Field Value
Interface port3
IP/Netmask 10.0.1.251/24
5. Click OK.
Failure to perform
these steps will
prevent you from
doing the next
exercises.
1. On the Local-Client VM, open a browser, and then log in to the Remote-FortiGate
GUI at 10.0.1.251 with the username admin and password password.
2. In the upper-right corner, click admin, and then click Configuration > Revisions.
4. Select the configuration with the comment initial, and then click Revert.
5. Click OK to reboot.
Failure to perform
these steps will
prevent you from
doing the next
exercises.