Default route is always wlan0?

I managed to find a way-might be a bit cack-handed but works for me:

#change default route on boot up (using /etc/init.d/rc.local)
ip route change default via 192.168.50.1 dev eth0.2
(change 192.168.50.1 to your default gateway)

Use the following script to sense if the WAN connection has gone down (will be eth0.2 by default because of step 1-put it in as a cronjob/under scheduled tasks in Luci)

root@Nexx-LEDE:~# cat /etc/check_internet.sh 
#! /bin/sh
# Checks if the connection to the Internet is up.  If not, it tries to restart all interfaces.  If that fails, then reboot.

if ping -c 3 bbc.co.uk > /dev/null
then
  echo check WAN is a sucesss > /dev/null
else
  /etc/init.d/network restart
#Moves onto 2nd part, to try for a 2nd time! 
sleep 15
  if ping -c 3 www.google.com > /dev/null
  then
    echo nothing > /dev/null
  else
    date >> /etc/reboot.log
    reboot -f
 fi
fi
root@Nexx-LEDE:~#

There seems to be a bonus point :slight_smile: in that when the eth0.2 comes back up/is reconnected, the default route swaps back to eth0.2. It does for me when you disconnected it physically anyway.

cheers

cabs