Hi Lonnie I guess I wanted to highlight the gotcha that if you are using PPPoE, any ip route commands will fail in the wan-failover.script when it is down.
For example, my script initially was used to force my provider out the Primary interface only so it would be UNREACHABLE and the backup trunk was used: -------------------- state="$1" primary_if="$2" primary_gw="$3" secondary_if="$4" secondary_gw="$5" secondary_gw_ipv6="$6" primary_only_routes="125.213.160.0/22" case $state in SECONDARY) ## Switched to Failover using secondary WAN link for x in $primary_only_routes; do ip route add $x ${primary_gw:+via $primary_gw} dev $primary_if done ;; PRIMARY) ## Switched back to normal using primary WAN link for x in $primary_only_routes; do ip route delete $x ${primary_gw:+via $primary_gw} dev $primary_if done ;; esac exit 0 -------------------- But as ppp0 no longer existed during failure, the ip route command failed and the trunk did not become UNREACHABLE. I will just blackhole my route instead. Regards Michael Knill On 3/10/18, 12:08 am, "Lonnie Abelbeck" <li...@lonnie.abelbeck.com> wrote: > On Oct 1, 2018, at 10:38 PM, Michael Knill <michael.kn...@ipcsolutions.com.au> wrote: > > Hi all > > Just a bit of a problem I would like to highlight with the Wan Failover script. > The passed interface parameters assume a fixed interface rather than a dynamic one e.g. ppp0 so it fails. > > So when the primary has failed: > wan-failover.script SECONDARY ppp0 115.187.183.76 eth2 10.101.194.1 > Cannot find device "ppp0" > > I assume the only option is to override the passed parameters in the script? What do you mean by "ppp0 so it fails" ? Looking at the wan-failover script, the /mnt/kd/wan-failover.script is called via... -- $SCRIPTFILE "$SECONDARY_STR" "$EXTIF" "$PRIMARY_GW" "$EXT2IF" "$SECONDARY_GW" "$SECONDARY_GWIPV6" -- The "$EXTIF" implies your system is setup with the external interface using PPPoE. If "$EXTIF" = "ppp0" you may want "$PPPOEIF" to use the associated ethernet interface. Lonnie _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org. _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.