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 [2019/03/31 17:08] mknill [PPPoE on Failover Interface] |
userdoc:tt_wan_failover [2019/10/13 20:55] abelbeck |
||
---|---|---|---|
Line 94: | Line 94: | ||
| | ||
esac | esac | ||
+ | | ||
+ | exit 0 | ||
+ | |||
+ | ===== Action Exit Script (optional) ===== | ||
+ | |||
+ | Conditionally test when a Secondary -> Primary WAN link change occurs, by executing a script. | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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 117: | Line 173: | ||
This can be achieved in two ways: | This can be achieved in two ways: | ||
- | 1) Terminating the WAN connection with a PPPoE capable router. In this scenario both Astlinux and the router will perform NAT which can be problematic for some traffic types such as voice. If voice traffic is being tunnelled through a VPN however, this should not be an issue. | + | * Terminating the WAN connection with a PPPoE capable router. In this scenario both Astlinux and the router will perform NAT which can be problematic for some traffic types such as voice. If voice traffic is being tunnelled through a VPN however, this should not be an issue. |
- | + | | |
- | 2) Terminating the WAN connection with a PPPoE capable modem configured into half bridge mode. In this scenario, the modem authenticates via PPPoE but bridges the Public IP Address to the Astlinux failover external interface via DHCP. This may be a better solution as an extra NAT is not added to the network path. | + | !!Note -> |
- | !!Note -> | + | |
===== Example: 4G/LTE Modem Failover ===== | ===== Example: 4G/LTE Modem Failover ===== |