Chapter 9 High Availability for FortiOS 5.0 : Configuring and connecting HA clusters : Example: HA and redundant interfaces : Configuring active-passive HA cluster that includes redundant interfaces - CLI
  
Configuring active-passive HA cluster that includes redundant interfaces - CLI
These procedures assume you are starting with two FortiGate-620B units with factory default settings.
To configure the FortiGate-620B units for HA operation
1. Power on the first FortiGate-620B unit and log into the CLI.
2. Change the host name for this FortiGate unit:
config system global
set hostname 620_ha_1
end
3. Configure HA settings.
config system ha
set mode a-p
set group-name example6.com
set password HA_pass_6
set hbdev port5 50 port6 50
end
Since port3 and port4 will be used for a redundant interface, you must change the HA heartbeat configuration.
The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see “Cluster virtual MAC addresses”). The MAC addresses of the FortiGate‑620B interfaces change to the following virtual MAC addresses:
port1 interface virtual MAC: 00-09-0f-09-00-00
port10 interface virtual MAC: 00-09-0f-09-00-01
port11 interface virtual MAC: 00-09-0f-09-00-02
port12 interface virtual MAC: 00-09-0f-09-00-03
port13 interface virtual MAC: 00-09-0f-09-00-04
port14 interface virtual MAC: 00-09-0f-09-00-05
port15 interface virtual MAC: 00-09-0f-09-00-06
port16 interface virtual MAC: 00-09-0f-09-00-07
port17 interface virtual MAC: 00-09-0f-09-00-08
port18 interface virtual MAC: 00-09-0f-09-00-09
port19 interface virtual MAC: 00-09-0f-09-00-0a
port2 interface virtual MAC: 00-09-0f-09-00-0b
port20 interface virtual MAC: 00-09-0f-09-00-0c
port3 interface virtual MAC: 00-09-0f-09-00-0d
port4 interface virtual MAC: 00-09-0f-09-00-0e
port5 interface virtual MAC: 00-09-0f-09-00-0f
port6 interface virtual MAC: 00-09-0f-09-00-10
port7 interface virtual MAC: 00-09-0f-09-00-11
port8 interface virtual MAC: 00-09-0f-09-00-12
port9 interface virtual MAC: 00-09-0f-09-00-13
To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d.
You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr):
get hardware nic port1
.
.
.
MAC: 00:09:0f:09:00:00
Permanent_HWaddr: 02:09:0f:78:18:c9
.
.
.
4. Display the HA configuration (optional).
get system ha
group-id : 0
group-name : example6.com
mode : a-p
password : *
hbdev : "port5" 50 "port6" 50
session-sync-dev    :
route-ttl : 10
route-wait : 0
route-hold : 10
sync-config : enable
encryption : disable
authentication : disable
hb-interval : 2
hb-lost-threshold : 20
helo-holddown : 20
arps : 5
arps-interval : 8
session-pickup : disable
link-failed-signal : disable
uninterruptible-upgrade: enable
ha-mgmt-status : disable
ha-eth-type : 8890
hc-eth-type : 8891
l2ep-eth-type : 8893
subsecond : disable
vcluster2 : disable
vcluster-id : 1
override : disable
priority : 128
monitor :
pingserver-monitor-interface:
pingserver-failover-threshold: 0
pingserver-flip-timeout: 60
vdom : "root"
5. Repeat these steps for the other FortiGate unit.
Set the other FortiGate unit host name to:
config system global
set hostname 620_ha_2
end
To connect the cluster to the network
1. Connect the port1 and port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet.
Configure the switch so that the port1 and port2 of 620_ha_1 make up a redundant interface and port1 and port2 of 620_ha_2 make up another redundant interface.
2. Connect the port3 and port4 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network.
Configure the switch so that the port3 and port4 of 620_ha_1 make up a redundant interface and port3 and port4 of 620_ha_2 make up another redundant interface.
3. Connect the port5 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch.
4. Connect the port5 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch.
5. Power on the cluster units.
The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute.
When negotiation is complete the cluster is ready to be configured for your network.
To view cluster status
Use the following steps to view cluster status from the CLI.
1. Log into the CLI.
2. Enter get system status to verify the HA status of the cluster unit that you logged into.Look for the following information in the command output.
Current HA mode: a-a, master
The cluster units are operating as a cluster and you have connected to the primary unit.
Current HA mode: a-a, backup
The cluster units are operating as a cluster and you have connected to a subordinate unit.
Current HA mode: standalone
The cluster unit is not operating in HA mode
3. Enter the following command to confirm the HA configuration of the cluster:
get system ha status
Model: 620
Mode: a-a
Group: 0
Debug: 0
ses_pickup: disable
Master:128 620_ha_2 FG600B3908600825 0
Slave :128 620_ha_1 FG600B3908600705 1
number of vcluster: 1
vcluster 1: work 169.254.0.1
Master:0 FG600B3908600825
Slave :1 FG600B3908600705
The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason.
To troubleshoot the cluster configuration
If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See “Troubleshooting HA clusters” to troubleshoot the cluster.
To add basic configuration settings and the redundant interfaces
Use the following steps to add a few basic configuration settings and the redundant interfaces.
1. Add a password for the admin administrative account.
config system admin
edit admin
set password <psswrd>
end
2. Temporarily delete the default route.
You cannot add an interface to a redundant interface if any settings (such as the default route) are configured for it. In this example the index of the default route is 1.
config router static
delete 1
end
3. Add the redundant interfaces:
config system interface
edit Port1_Port2
set type redundant
set member port1 port2
set ip 172.20.120.141/24
set vdom root
next
edit Port3_Port4
set type redundant
set member port3 port4
set ip 10.11.101.100/24
set vdom root
end
The virtual MAC addresses of the FortiGate‑620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address:
port1 interface virtual MAC: 00-09-0f-09-00-00
port10 interface virtual MAC: 00-09-0f-09-00-01
port11 interface virtual MAC: 00-09-0f-09-00-02
port12 interface virtual MAC: 00-09-0f-09-00-03
port13 interface virtual MAC: 00-09-0f-09-00-04
port14 interface virtual MAC: 00-09-0f-09-00-05
port15 interface virtual MAC: 00-09-0f-09-00-06
port16 interface virtual MAC: 00-09-0f-09-00-07
port17 interface virtual MAC: 00-09-0f-09-00-08
port18 interface virtual MAC: 00-09-0f-09-00-09
port19 interface virtual MAC: 00-09-0f-09-00-0a
port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1)
port20 interface virtual MAC: 00-09-0f-09-00-0c
port3 interface virtual MAC: 00-09-0f-09-00-0d
port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3)
port5 interface virtual MAC: 00-09-0f-09-00-0f
port6 interface virtual MAC: 00-09-0f-09-00-10
port7 interface virtual MAC: 00-09-0f-09-00-11
port8 interface virtual MAC: 00-09-0f-09-00-12
port9 interface virtual MAC: 00-09-0f-09-00-13
4. Add the default route.
config router static
edit 1
set dst 0.0.0.0 0.0.0.0
set gateway 172.20.120.2
set device Port1_Port2
end
To configure HA port monitoring for the redundant interfaces
1. Configure HA port monitoring for the redundant interfaces.
config system ha
set monitor Port1_Port2 Port3_Port4
end