I am trying to configure WAN load balancing for two connections: one wired (eth0) connection and a failover wwan connection. The idea is that failover should occur any time the primary wired connection is not available.
This works fine in a lost-link scenario - eth0 is quickly marked as “failed” and traffic changes over to the wwan0 interface. However, failover never occurs when the link itself stays up, but when the internet is not available. I am simulating a failure where, for example, a cable modem link stays online but the upstream connection is lost (I am doing this in VMware by simply changing the vnic network to something that goes nowhere).
In both cases, the failure is detected by wan-load-balance (status changes to failed
for eth0), however only when the link itself is lost do the downstream (eth1) clients actually failover to the wwan0 interface for outbound traffic. I also noticed that in the case where eth0 stays up, the default route out eth0 remains in the routing table.
Am I doing something wrong? Config below.
Thanks!
interfaces {
ethernet eth0 {
address dhcp
hw-id 00:0c:29:03:37:de
}
ethernet eth1 {
address 192.168.2.1/24
hw-id 00:0c:29:03:37:e8
}
loopback lo {
}
wwan wwan0 {
address 167.20.XXX.XXX/32
apn b2b.static
}
}
load-balancing {
wan {
flush-connections
interface-health eth0 {
nexthop 1.1.1.1
}
interface-health wwan0 {
nexthop 8.8.8.8
}
rule 1 {
failover
inbound-interface eth1
interface eth0 {
weight 100
}
interface wwan0 {
weight 1
}
}
}
}
protocols {
static {
interface-route 0.0.0.0/0 {
next-hop-interface wwan0 {
distance 250
}
}
route 0.0.0.0/0 {
dhcp-interface eth0
}
}
}
service {
ssh {
}
}
system {
config-management {
commit-revisions 100
}
conntrack {
modules {
ftp
h323
nfs
pptp
sip
sqlnet
tftp
}
}
console {
device ttyS0 {
speed 115200
}
}
host-name vyos
login {
user vyos {
authentication {
encrypted-password ...
plaintext-password ""
}
}
}
ntp {
server time1.vyos.net {
}
server time2.vyos.net {
}
server time3.vyos.net {
}
}
syslog {
global {
facility all {
level info
}
facility protocols {
level debug
}
}
}
}