When using two Internet connections from the same ISP, both links cannot be active at the same time if they are connecting to the same remote network and using the same remote gateway IP address. Since it is not possible to have two default routes each using the same remote gateway, the backup uplink must be used in standby mode only and used if the primary connection goes down. A reachable IP is used to monitor the primary uplink. When the primary uplink becomes unavailable, a script is executed to activate the secondary uplink. Lowering the route metric of the secondary uplink ensures that the backup uplink is used. When the primary uplink becomes available again (probing is successful), a script will place the secondary uplink into standby again.
Step 1. Configure Two DHCP Connections
Configure two DHCP WAN connections. For more information, see How to Configure an ISP with Dynamic IP Addresses (DHCP).
For the primary and secondary DHCP uplink, use the following settings:
Setting | Primary DHCP Connection | Secondary DHCP Connection |
---|---|---|
Link Active | yes | yes |
Standby Mode | no | yes |
Route Metric | 100 | 99 |
Step 2. Configure Connection Monitoring
- Go to CONFIGURATION > Configuration Tree > Box > Network.
- In the left menu, select xDSL/DHCP.
- In the left Configuration menu, select Switch to Advanced.
- Click Lock.
- In the DHCPv4 Links table, perform the following steps for the primary DHCP uplink:
- Edit the entry.
- In the Reachable IPs table, add the IP address that has been assigned for the connection from your ISP.
- Select Increase-Metric + Command as the Unreachable Action.
- Enter the following scripts:
- Unreachable Command:
/epb/openxdhcp start DHCP02
Re-reachable Command:
/epb/openxdhcp stop DHCP02
- Unreachable Command:
- Click OK.
- Click Send Changes and Activate.
You can now see the active routes of the primary uplink and the pending route of the secondary uplink on the Control > Network page. If the primary uplink goes down, the first script is executed, thereby activating the secondary uplink. When the primary connection is available again, the second script is executed, which places the secondary link into standby mode again.