wan load-balance failover trouble with dhcp


#1

We are having trouble getting wan load-balance failover to work with DHCP, especially when one of the interfaces uses pppoe. WLB works fine for us with static interfaces. The problem with DHCP seems to be the default gateway routes that get set up automatically. In that case, we don’t have control over the “distance” parameters for the gateways. Also, pppoe DHCP adds routes to the kernel routing table while ethernet dhcp adds routes to the static routing table.

We have found a work-around to get it working in the case of a DHCP ethernet primary interface and a DHCP pppoe failover, but only if the failover has a static gateway, which of course we can never expect to be the case. The workaround consists of (1) setting a static default gateway for the pppoe interface with a distance parameter that is greater than the default gateway route distance chosen by DHCP on the primary interface; and (2) setting up a separate task on a one-minute timer that pings the “interface health” test addresses over the appropriate interfaces.

Here is a cleansed config that I was expecting to work in the first place. Any suggestions would be most welcome, especially if they have been tried and are known to work.

[code]firewall {
all-ping enable
broadcast-ping disable
config-trap disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name wan-in {
default-action drop
rule 10 {
action accept
state {
established enable
related enable
}
}
}
name wan-local {
default-action drop
rule 10 {
action accept
state {
established enable
related enable
}
}
rule 20 {
action accept
protocol icmp
}
rule 30 {
action accept
destination {
port ssh
}
protocol tcp
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
twa-hazards-protection disable
}
interfaces {
ethernet eth0 {
address 10.xx.0.1/24
duplex auto
hw-id xx:xx:xx:xx:xx:xx
smp_affinity auto
speed auto
}
ethernet eth1 {
duplex auto
hw-id xx:xx:xx:xx:xx:xx
smp_affinity auto
speed auto
}
ethernet eth2 {
duplex auto
hw-id xx:xx:xx:xx:xx:xx
pppoe 2 {
access-concentrator XXXX
default-route auto
mtu 1492
name-server auto
password 1234
user-id xxxx
}
smp_affinity auto
speed auto
}
ethernet eth3 {
address dhcp
duplex auto
firewall {
in {
name wan-in
}
local {
name wan-local
}
}
hw-id xx:xx:xx:xx:xx:xx
smp_affinity auto
speed auto
}
loopback lo {
}
}
load-balancing {
wan {
enable-local-traffic
flush-connections
interface-health eth3 {
failure-count 2
nexthop dhcp
success-count 1
test 10 {
resp-time 5
target 8.8.8.8
ttl-limit 1
}
test 20 {
resp-time 5
target 205.171.2.25
ttl-limit 1
}
}
interface-health pppoe2 {
failure-count 2
nexthop dhcp
success-count 1
test 10 {
resp-time 5
target 8.8.4.4
ttl-limit 1
}
test 20 {
resp-time 5
target 205.171.3.25
ttl-limit 1
}
}
rule 100 {
failover
inbound-interface eth0
interface eth3 {
weight 10
}
interface pppoe2 {
weight 1
}
protocol all
}
}
}
nat {
source {
rule 10 {
outbound-interface eth3
translation {
address masquerade
}
}
rule 20 {
outbound-interface pppoe2
translation {
address masquerade
}
}
}
}
service {
dhcp-server {
disabled false
shared-network-name LAN_POOL {
authoritative enable
subnet 10.xx.0.0/24 {
default-router 10.42.0.1
dns-server 10.42.0.1
domain-name xx.lan
lease 86400
start 10.xx.0.32 {
stop 10.xx.0.250
}
}
}
}
dns {
forwarding {
cache-size 150
listen-on eth0
}
}
ssh {
port 22
}
}
system {
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 19200
}
}
domain-name xx.lan
host-name xxrouter
name-server 4.2.2.1
name-server 4.2.2.2
ntp {
}
package {
auto-sync 1
repository community {
components main
distribution helium
password “”
url http://packages.vyos.net/vyos
username “”
}
}
time-zone America/Denver
}

/* Warning: Do not remove the following line. /
/
=== vyatta-config-version: “cluster@1:config-management@1:conntrack-sync@1:conntrack@1:cron@1:dhcp-relay@1:dhcp-server@4:firewall@5:ipsec@4:nat@4:qos@1:quagga@2:system@6:vrrp@1:wanloadbalance@3:webgui@1:webproxy@1:zone-policy@1” === /
/
Release version: VyOS 1.1.7 */[/code]


#2

This is my issue also.


#3

Thais is known issues, and unfortunately, we will work on fix in 1.2.x only