Highlighted
Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60
Accepted Solution

Show Load Balance Status - automatic weight change when one link is not active?

I am running tests on my Load-Balancing setup, and have decided the change weighting from 50/50 between the two links to 60/40, favouring the more reliable link.

Running the show load-balance status today, having made the change I see the following:

admin@CambuiGate:~$ show load-balance status
Group WLB
interface : eth0
carrier : up
status : active
gateway : 192.168.2.1
weight : 100
flows
WAN Out : 1247
WAN In : 0
Local Out : 366

interface : eth1
carrier : up
status : inactive
gateway : 177.72.113.193
weight : 0
flows
WAN Out : 0
WAN In : 0
Local Out : 99


Am I right to assume that the weighting will show as 100 on eth0 because the eth1 link is currently inactive, and when eth1 comes back, it will show the changed 60/40 weighting I set today? Looking at watchdog, the eth1 link does seem to be down (although in reality it is just with such high latency that it's timing out on the ping to ubnt.com I think, as I am connected in on it)

admin@CambuiGate:~$ show load-balance watchdog
Group WLB
eth0
status: Running
pings: 78
fails: 0
run fails: 0/3
route drops: 1
ping gateway: ping.ubnt.com - REACHABLE
last route drop : Wed Jun 1 18:36:53 2011
last route recover: Wed Jun 1 18:40:41 2011

eth1
status: Waiting on recovery (0/3)
pings: 13
fails: 3
run fails: 3/3
route drops: 45
ping gateway: ping.ubnt.com - DOWN
last route drop : Thu Jun 2 06:06:01 2011
last route recover: Thu Jun 2 06:02:42 2011

 Given the distance between Sao Paulo and ubnt.com, would you advise that I change this address to a more local domain here in Brazil? If I can't ping ubnt.com it might be due to high latency between Brazil and the US and therefore forces traffic onto the other link, when that might not be necessary?


Accepted Solutions
Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3142
Solutions: 945
Contributions: 16

Re: Show Load Balance Status - automatic weight change when one link is not active?

Yes, if eth1 is down then it shifts the weight to 100% on the up interface.

Then reason we default to pinging ubnt.com is so to minimize the things you have to configure, but of course you can over ride it with:

set load-balance group FOO interface eth0 route-test type ping target ?
Possible completions:
  <x.x.x.x>	IPv4 address to ping
  <h:h:h:h:h:h:h:h>
  		Ipv6 address to ping
      

 Actually I think it's a good idea to ping a specific ping target and use an address instead of a hostname.  That way dns lookups don't get in the way.

EdgeMAX Router Software Development

View solution in original post

Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60

Re: Show Load Balance Status - automatic weight change when one link is not active?

Fixed:

I needed to change the GUI back to manual Time Zone:

TimeZone.jpg

Then with the following command it works:

admin@CambuiGate:~$ set date ntp 0.ubnt.pool.ntp.org 

When I show date now, it is correct:

admin@CambuiGate:~$ show date

Thu Mar 27 18:15:31 BRT 2014

 

View solution in original post


All Replies
Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3142
Solutions: 945
Contributions: 16

Re: Show Load Balance Status - automatic weight change when one link is not active?

Yes, if eth1 is down then it shifts the weight to 100% on the up interface.

Then reason we default to pinging ubnt.com is so to minimize the things you have to configure, but of course you can over ride it with:

set load-balance group FOO interface eth0 route-test type ping target ?
Possible completions:
  <x.x.x.x>	IPv4 address to ping
  <h:h:h:h:h:h:h:h>
  		Ipv6 address to ping
      

 Actually I think it's a good idea to ping a specific ping target and use an address instead of a hostname.  That way dns lookups don't get in the way.

EdgeMAX Router Software Development
Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60

Re: Show Load Balance Status - automatic weight change when one link is not active?

[ Edited ]

That works well - now looks like this:

admin@CambuiGate:~$ show load-balance watchdog

Group WLB

  eth0

  status: Running 

  pings: 0

  fails: 0

  run fails: 0/3

  route drops: 0

  ping gateway: 8.8.8.8 - REACHABLE

 

  eth1

  status: Running 

  pings: 0

  fails: 0

  run fails: 0/3

  route drops: 8

  ping gateway: 8.8.8.8 - REACHABLE

  last route drop   : Wed Jun  1 11:28:28 2011

  last route recover: Wed Jun  1 11:29:44 2011

Any idea why my time and date is so out? I have set time zone to South America, Brazil, Sao Paulo via the GUI, but clearly it's not right:

admin@CambuiGate:~$ show date

Wed Jun  1 11:32:48 BRT 2011


Should be reading Mar 27 17:14:42 BRT 2014 or something I guess?

I did the following, which gives me the correct date, but I guess this doesn't give me the local time for Sao Paulo:

admin@CambuiGate:~$ set date ntp 0.ubnt.pool.ntp.org 

27 Mar 20:20:46 ntpdate[8686]: adjust time server 97.107.128.58 offset 0.254759 sec

admin@CambuiGate:~$ show date

Thu Mar 27 20:20:54 UTC 2014

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3142
Solutions: 945
Contributions: 16

Re: Show Load Balance Status - automatic weight change when one link is not active?

What does "show ntp" show?  Can you "ping 0.ubnt.pool.ntp.org"

EdgeMAX Router Software Development
Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60

Re: Show Load Balance Status - automatic weight change when one link is not active?


I get the following

admin@CambuiGate:~$ show ntp

     remote           local      st poll reach  delay   offset    disp

=======================================================================

=200.192.112.8   177.72.113.xxx  16 1024    0 0.00000  0.000000 3.99217

=187.49.33.13    177.72.113.xxx 16 1024    0 0.00000  0.000000 3.99217

=200.160.7.193   177.72.113.xxx  16 1024    0 0.00000  0.000000 3.99217

=189.2.200.90    177.72.113.xxx  16 1024    0 0.00000  0.000000 3.99217

admin@CambuiGate:~$ ping 0.ubnt.pool.ntp.org

PING 0.ubnt.pool.ntp.org (69.167.160.102) 56(84) bytes of data.

64 bytes from host2.kingrst.com (69.167.160.102): icmp_req=1 ttl=52 time=3256 ms

64 bytes from host2.kingrst.com (69.167.160.102): icmp_req=2 ttl=52 time=2557 ms

64 bytes from host2.kingrst.com (69.167.160.102): icmp_req=3 ttl=52 time=1906 ms

64 bytes from host2.kingrst.com (69.167.160.102): icmp_req=4 ttl=52 time=3364 ms

^C

--- 0.ubnt.pool.ntp.org ping statistics ---

9 packets transmitted, 4 received, 55% packet loss, time 23657ms

rtt min/avg/max/mdev = 1906.458/2771.073/3364.326/587.545 ms, pipe 4


The date is now correct, but the timezone doesn't seem to work. Not critical. 

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3142
Solutions: 945
Contributions: 16

Re: Show Load Balance Status - automatic weight change when one link is not active?

Hmm strange to see reach/delay/offset as 0

ubnt@ISP-B:~$ show ntp
     remote           local      st poll reach  delay   offset    disp
=======================================================================
*199.102.46.72   172.16.3.21      1  512  373 0.06242  0.002132 0.13449
=206.209.110.2   172.16.3.21      2  512  237 0.05762  0.001251 0.10173
=70.33.227.188   172.16.3.21      3  512  373 0.08134  0.014076 0.10727
=85.214.230.247  172.16.3.21      2  512  373 0.17422 -0.002951 0.10715

Shouldn't be necessary, but try:

ubnt@ISP-B:~$ set date ntp
27 Mar 13:35:31 ntpdate[10001]: adjust time server 198.60.22.240 offset -0.010609 sec

ubnt@ISP-B:~$ date
Thu Mar 27 13:35:35 PDT 2014

 

EdgeMAX Router Software Development
Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3142
Solutions: 945
Contributions: 16

Re: Show Load Balance Status - automatic weight change when one link is not active?

For time-zone you might try:

ubnt@ISP-B:~$ sudo setsystz
GMT offset=-25200s
setting system time zone to tz_minuteswest=420

 

EdgeMAX Router Software Development
Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60

Re: Show Load Balance Status - automatic weight change when one link is not active?

Thanks Stig - can you explain the command to change the GMT offset more for me please?

admin@CambuiGate:~$ configure

[edit]

admin@CambuiGate# sudo setsystz 

GMT offset=0s

setting system time zone to tz_minuteswest=0


So I tried this:

admin@CambuiGate# sudo setsystz GMT offset=-25200s

wrong number or arguments

[edit]

admin@CambuiGate# set systz GM offset=-25200s

The specified configuration node is not valid

Set failed

[edit]


and it didn't like it..

Established Member
Posts: 1,700
Registered: ‎02-24-2012
Kudos: 437
Solutions: 60

Re: Show Load Balance Status - automatic weight change when one link is not active?

Fixed:

I needed to change the GUI back to manual Time Zone:

TimeZone.jpg

Then with the following command it works:

admin@CambuiGate:~$ set date ntp 0.ubnt.pool.ntp.org 

When I show date now, it is correct:

admin@CambuiGate:~$ show date

Thu Mar 27 18:15:31 BRT 2014