Reply To: Multiple WAN interfaces and Dynamic DNS

Home Page Forums Network Management ZeroShell Multiple WAN interfaces and Dynamic DNS Reply To: Multiple WAN interfaces and Dynamic DNS

#50504

aviegas
Member

It’s fuzzy because there is a bug in ZS when turning the netbalancer on with a DHCP Ethernet address.
Let me try to explain. This is the routing info as I turn the interfaces on, then turn nb on.

1) No interfaces up (except for the internal one):

root@rhea root> ip route show
192.168.250.0/24 dev VPN99 proto kernel scope link src 192.168.250.254
10.10.10.0/24 dev ETH00 proto kernel scope link src 10.10.10.254

2) After PPPoE is up. PPPoE is defined not to be the default route:

root@rhea root> ip route show
200.222.117.78 dev ppp0 proto kernel scope link src 201.29.251.73
192.168.250.0/24 dev VPN99 proto kernel scope link src 192.168.250.254
10.10.10.0/24 dev ETH00 proto kernel scope link src 10.10.10.254

As expected, no default route was defined.

3) After I bring the ETH01 (DHCP) up:

root@rhea root> ip route show
200.222.117.78 dev ppp0 proto kernel scope link src 201.29.166.4
192.168.250.0/24 dev VPN99 proto kernel scope link src 192.168.250.254
10.10.10.0/24 dev ETH00 proto kernel scope link src 10.10.10.254
189.122.192.0/20 dev ETH01 proto kernel scope link src 189.122.198.49
default via 189.122.192.1 dev ETH01

As you can see, the DHCP supplied default gateway is indeed set.

4) Now, time to turn netbalancer on.

root@rhea root> ip ro sh
200.222.117.78 dev ppp0 proto kernel scope link src 201.29.225.70
192.168.250.0/24 dev VPN99 proto kernel scope link src 192.168.250.254
10.10.10.0/24 dev ETH00 proto kernel scope link src 10.10.10.254
189.122.192.0/20 dev ETH01 proto kernel scope link src 189.122.198.49
default
nexthop dev ETH01 weight 6
nexthop dev ppp0 weight 8

Aha! See that the nexthop line for ETH01 is missing the default gw. As soon as the Failover
code runs, there is no way to send a ping packet thru the ETH01 path, thus the interace is
marked as in “Fault” and the routing table reverts to:

root@rhea root> ip route show
200.222.117.78 dev ppp0 proto kernel scope link src 201.29.166.4
192.168.250.0/24 dev VPN99 proto kernel scope link src 192.168.250.254
10.10.10.0/24 dev ETH00 proto kernel scope link src 10.10.10.254
189.122.192.0/20 dev ETH01 proto kernel scope link src 189.122.198.49
default dev ppp0 realm 102

I have been sifting thru the myriad of ZS scripts trying to figure out what’s
going on and if a simple fix is possible.

My undestanding is that the correct output for the “ip show route” when the nb is up should
change the “nexthop” line for ETH01 to read:

nexthop 189.122.192.1 dev ETH01 weight 6

I’ve done several tests and it points out that SZ is not properly handling ethernet interaces with
DHCP addresses when part of a netbalance scheme. It seems that it expect the ethernet interface to have
a default gw defined in the neebalance settings, but in this case it has only the name of the interface.
The result is that the routing table become incorrect and the interface is marked as being at fault.

I can try help fixing the scripts if I can get some clue of the sequence executed when the netbalance is
turned on.