- 07 Jun 2024
- 6 Minutes to read
- Print
- DarkLight
- PDF
Configuring Network Failover on Nodegrid Device
- Updated on 07 Jun 2024
- 6 Minutes to read
- Print
- DarkLight
- PDF
Configuring Nodegrid Network Failover
When a network failover is active, the connection in the network failover tree switches to the next active connection when the previous one fails providing network availability and stability to the system. Network failover facilitates actively changing the network connections' route metrics. Note that you must configure at least two network connections for the failover to be active. To configure connections for a network failover on the Nodegrid device:
- Log in to the Nodegrid UI.
- Navigate to the path Network:: Failover.
- Click Connections and then click Add.
- Select the connection for the failover.
- Select Yes to enable the connection. Selecting No disables the connection and triggers on the selected interface will not be active as well.
- Select the Order in which you want the failover to occur. In a Nodegrid device, you can configure multiple failover connections. This facilitates multiple backup devices during a failover. However, if the failover connection is the last one, their trigger is not used for failover.
- Enter the number of failed trigger retires that a connection should attempt before failover to the next connection on failure. This applies to the connections with ping and strength triggers.
- Enter the number of successful trigger retires that a connection should attempt to failback to the previous connection. This applies to the connections with ping and strength triggers.
- Enter the time interval the network failover should wait before testing the triggers again. This applies to the connections with ping and strength triggers.
- Select the checkbox Failover by Ping to send ICMP requests (ping) to the configured destination to test the connection. Upon failover, the connection initiates a failover process with the next connection to ensure service continuity. You could ping:
- the IPv4 default gateway or
- a custom IP address or Domain.
- For the cellular connection, you could trigger the failover to the next connection depending on:
- signal strength: Failover is triggered when the signal strength drops below a user-defined percentage.
- data usage: Failover is triggered when the SIM card data usage consumption limit is exceeded: Carrier limit, Warning Limit, or a Custom data value.
- schedule:
- scheduled trigger: If a connection is configured with this trigger, the connection triggers a failover when the input cron expression schedule is triggered. After the configured amount of hours elapses, the connection triggers a failback.
- scheduled failback: trigger occurs when two SIM cards of the same GSM (cellular) are configured (under Failover::Connections). The trigger is associated with the first SIM card, with a lower order. When the input cron expression schedule is triggered, a failback is triggered if the second SIM card with a higher order is active.
- Click Save.Failover retries conditions:
- Failed retries to failover: Applies to Ping Trigger and Signal Strength triggers.
- Successful retries to recover: Applies to Ping Trigger and Signal Strength triggers.
- All the other triggers do not have retries: Only one failure or success will trigger the Failover or Failback.
Cellular modem behavior with two SIM cards configured for Failover:- When two SIM cards of the same connection are configured, only one can be active at a time. Ping and Signal Strength triggers are applicable on the active SIM card only.
- In a Circular SIM swap, if the two SIM cards are below (lower order) the currently active failover connection, the modem continuously swaps to the other SIM when the selected SIM fails.
- When one of the SIM cards is the last connection on the failover, the Ping and Signal Strength triggers from the first SIM to the last SIM until the first SIM is active again. This is also a Circular SIM swap, however, the difference is that it can also change the active failover connection (failback).
CLI Configuration ExampleActionScript[admin@nodegrid /]# cd /settings/network_failover/connections/ [admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 CELLULAR-A(SIM1) yes data usage, failback schedule 2 SFP0 yes ping 3 ETH0 yes ping 4 SFP1 yes ping 5 ETH1 yes ping 6 CELLULAR-A(SIM2) yes [admin@nodegrid connections]# add [admin@nodegrid {connections}]# show connection = CELLULAR-A sim_card = 1 enabled = yes order = 7 failed_retries_to_failover = 2 successful_retries_to_recover = 1 interval_between_retries = 5 enable_failover_by_ping = yes ping_destination = ipv4_default_gateway enable_failover_by_signal_strength = no enable_failover_by_data_usage = no enable_failover_by_schedule = no enable_failback_by_schedule = no [admin@nodegrid {connections}]# set connection=ETH2 [admin@nodegrid {connections}]# set ping_destination=custom_ip_address_or_domain [admin@nodegrid {connections}]# set ping_custom_address=api.zpesystems.com [admin@nodegrid {connections}]# set failed_retries_to_failover=3 [admin@nodegrid {connections}]# set successful_retries_to_recover=2 [admin@nodegrid {connections}]# set interval_between_retries=4 [admin@nodegrid {connections}]# set order=5 [admin@nodegrid {connections}]# commit
Managing Failover Connections
After you have configured a failover connection you can perform the following operations:
- Delete: Select the failover connection and click Delete.
- Enable: If not already enabled, select the failover connection and click Enable. Enabling the connection makes the failover connection active.
- Disable: If you want to disable a failover connection, select the failover connection and click Disable. If disabled, although the failover connection is configured, it will not be active. Therefore, this connection automatically gets eliminated from the failover connection list.
- Up and Down: You can increase or decrease the order of the failover connection by clicking on the Up and Down buttons respectively.
- CLI Configuration Example
[admin@nodegrid /]# cd /settings/network_failover/connections/ [admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 CELLULAR-A(SIM1) yes data usage, failback schedule 2 SFP0 yes ping 3 ETH0 yes ping 4 SFP1 yes ping 5 ETH1 yes ping 6 CELLULAR-A(SIM2) yes [admin@nodegrid connections]# delete 4 [+admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 CELLULAR-A(SIM1) yes data usage, failback schedule 2 SFP0 yes ping 3 ETH0 yes ping 4 ETH1 yes ping 5 CELLULAR-A(SIM2) yes [+admin@nodegrid connections]# up 3 [+admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 CELLULAR-A(SIM1) yes data usage, failback schedule 2 ETH0 yes ping 3 SFP0 yes ping 4 ETH1 yes ping 5 CELLULAR-A(SIM2) yes [+admin@nodegrid connections]# down 1 [+admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 ETH0 yes ping 2 CELLULAR-A(SIM1) yes data usage, failback schedule 3 SFP0 yes ping 4 ETH1 yes ping 5 CELLULAR-A(SIM2) yes [+admin@nodegrid connections]# disable 1,3 [+admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 ETH0 no 2 CELLULAR-A(SIM1) yes data usage, failback schedule 3 SFP0 no 4 ETH1 yes ping 5 CELLULAR-A(SIM2) yes [+admin@nodegrid connections]# enable 3 [+admin@nodegrid connections]# show order connection enabled active triggers ===== ================ ======= ============================= 1 ETH0 no 2 CELLULAR-A(SIM1) yes data usage, failback schedule 3 SFP0 yes ping 4 ETH1 yes ping 5 CELLULAR-A(SIM2) yes
Configuring DDNS
Configuring Dynamic DNS (DDNS) in a failover scenario ensures that there is continuity in services by automatically updating the DNS records to redirect the traffic to the next connection when the current connection has failed. Before you configure the DDNS ensure that there are at least two failover connections configured. The Nodegrid device interfaces should be able to reach the DDNS server and need to have two network connections with public IPs, for example, ETH0 and ETH1. To configure DDNS:
1. Log in to the Nodegrid UI.
2. Navigate to the path Network:: Failover.
3. Click DDNS.
4. Select the checkbox Enable Dynamic DNS.
5. Enter the DDNS server name. The server name allows the Nodegrid device to update the IP addresses associated with this name.
6. Enter the DDNS server TCP port number.
7. Enter the zone name.
8. Enter the Failover Hostname (FQDN) of the Nodegrid device.
9. Enter the username of the DDNS server.
10. To secure the connection between the DDNS server and the Nodegrid device, select the required algorithm and enter the key size.
11. Click Save.
CLI Configuration Example
[admin@nodegrid /]# cd /settings/network_failover/ddns/ [admin@nodegrid ddns]# set enable_dynamic_dns=yes [+admin@nodegrid ddns]# set ddns_server_name=dns.testing.com [+admin@nodegrid ddns]# set ddns_server_tcp_port=53 [+admin@nodegrid ddns]# set zone=testing.com [+admin@nodegrid ddns]# set failover_hostname=hostname.testing.com [+admin@nodegrid ddns]# set username=test [+admin@nodegrid ddns]# set algorithm=HMAC-SHA512 [+admin@nodegrid ddns]# set key_size=512 [admin@nodegrid ddns]# commit
Tracking Failover
When a failover occurs you can track the status of the failover history of devices by navigating to Tracking :: Network :: Failover. For more information, see Tracking Network Failover.