Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
userdoc:tt_wan_failover [2018/06/18 14:24] abelbeck [Example: 4G/LTE Modem Failover] |
userdoc:tt_wan_failover [2019/10/13 21:00] abelbeck [Action Exit Script (optional)] |
||
---|---|---|---|
Line 48: | Line 48: | ||
The above network options define the " | The above network options define the " | ||
- | !!Tip ->!! Any changes to these External Failover Interface settings will require a system reboot to be applied. | + | !!Note ->!! Any changes to these External Failover Interface settings will require a system reboot to be applied. |
Line 94: | Line 94: | ||
| | ||
esac | esac | ||
+ | | ||
+ | exit 0 | ||
+ | |||
+ | ===== Action Exit Script (optional) ===== | ||
+ | |||
+ | !!Note: AstLinux 1.3.7 or later is required!! | ||
+ | |||
+ | Conditionally test when a Secondary -> Primary WAN link change is allowed to occur, by executing a script. | ||
+ | |||
+ | If this script has an exit value of '' | ||
+ | |||
+ | The script must be found at ''/ | ||
+ | |||
+ | chmod 755 / | ||
+ | |||
+ | Example: ''/ | ||
+ | |||
+ | #!/bin/sh | ||
+ | | ||
+ | ## | ||
+ | ## wan-failover-exit action script | ||
+ | ## | ||
+ | ## Automatically called before any Secondary -> Primary WAN link change | ||
+ | ## and the Primary WAN link is reachable. | ||
+ | ## | ||
+ | ## If this script has an exit value of 0 the link change occurs. | ||
+ | ## Else with any other exit value, the failover remains on the Secondary WAN. | ||
+ | ## | ||
+ | ## Note: Do not ' | ||
+ | ## | ||
+ | state=" | ||
+ | primary_if=" | ||
+ | primary_gw=" | ||
+ | secondary_if=" | ||
+ | secondary_gw=" | ||
+ | secondary_gw_ipv6=" | ||
+ | | ||
+ | ## Sanity check, ' | ||
+ | if [ " | ||
+ | exit 0 | ||
+ | fi | ||
+ | | ||
+ | . / | ||
+ | | ||
+ | ## | ||
+ | ## Allow Secondary -> Primary WAN link change ? | ||
+ | ## | ||
+ | | ||
+ | ## Custom user.conf variable, if " | ||
+ | if [ " | ||
+ | exit 1 | ||
+ | fi | ||
+ | | ||
+ | ## Check Asterisk active calls, remain on the Secondary WAN link until no active calls | ||
+ | active_calls=" | ||
+ | if [ -n " | ||
+ | exit 1 | ||
+ | fi | ||
| | ||
exit 0 | exit 0 | ||
Line 113: | Line 171: | ||
===== PPPoE on Failover Interface ===== | ===== PPPoE on Failover Interface ===== | ||
- | AstLinux supports at most one instance of PPPoE internally, | + | AstLinux supports at most one instance of PPPoE internally, |
+ | If you need PPPoE for the failover external interface, | ||
- | In this example, PPPoE is configured on the Failover interface using the interface '' | + | This can be achieved in two ways: |
- | + | * | |
- | | + | |
- | PPPOEPASS=" | + | !!Note ->!! If you are using half bridge mode, unless you have a static IP Address from your ISP the modem will not update the IP when it is changed until the next dhcp renewal. Due to this, most half-bridge |
- | PPPOEIF=" | + | |
- | EXT2IF=" | + | |
- | + | ||
- | As an alternative, | + | |
===== Example: 4G/LTE Modem Failover ===== | ===== Example: 4G/LTE Modem Failover ===== | ||
- | For an always-up backup solution using 4G/LTE, the Netgear LB1120 (LB1121 PoE support) 4G/LTE Modem using " | + | For an always-up backup solution using 4G/LTE, the Netgear LB1120 (LB1121 PoE support) 4G/LTE Modem may be a solution. |
- | !!Tip ->!! Be sure to upgrade the LB1120/1121 to the latest firmware before enabling " | + | !!Tip ->!! Be sure to upgrade the LB1120/1121 to the latest firmware before enabling " |
The Netgear LB1120, LB1121 was released at the end of 2017, and tested to work with AstLinux. | The Netgear LB1120, LB1121 was released at the end of 2017, and tested to work with AstLinux. | ||
Line 147: | Line 202: | ||
{{: | {{: | ||
+ | |||
+ | AstLinux " | ||
External Failover Interface: | External Failover Interface: | ||
Line 157: | Line 214: | ||
(empty) | (empty) | ||
- | No added route is needed for access to the web interface of the 4G/LTE Modem when in Router Mode. | + | When in Router Mode, no added route is needed for access to the web interface of the 4G/LTE Modem. |
But, there is another way ... | But, there is another way ... | ||
Line 214: | Line 271: | ||
| | ||
External Failover Interface: | External Failover Interface: | ||
- | Connection Type: [DHCP] | + | Connection Type: [Static IP] |
+ | Static IPv4: 192.168.5.5 | ||
+ | IPv4 NetMask: 255.255.255.0 | ||
+ | IPv4 Gateway: 192.168.5.1 | ||
| | ||
External Failover Destination Routes: | External Failover Destination Routes: | ||
- | IPv4 Routes: | + | IPv4 Routes: 1.2.3.4 |
Network tab -> Firewall Configuration: | Network tab -> Firewall Configuration: |