Configured load-balancing:
set load-balancing wan flush-connections set load-balancing wan interface-health eth0 failure-count '3' set load-balancing wan interface-health eth0 nexthop '10.88.89.254' set load-balancing wan interface-health eth0 success-count '5' set load-balancing wan interface-health eth0 test 1 target '1.1.1.1' set load-balancing wan interface-health eth0 test 2 target '8.8.8.8' set load-balancing wan interface-health eth3 failure-count '10' set load-balancing wan interface-health eth3 nexthop 'dhcp' set load-balancing wan interface-health eth3 success-count '10' set load-balancing wan interface-health eth3 test 1 target '1.1.1.1' set load-balancing wan interface-health eth3 test 2 target '8.8.8.8' set load-balancing wan rule 1 failover set load-balancing wan rule 1 inbound-interface 'eth1.10' set load-balancing wan rule 1 interface eth0 weight '100' set load-balancing wan rule 1 interface eth3 weight '10'
After commit:
danhusan@vyos:~$ show wan-load-balance Interface: eth0 Status: active Last Status Change: Mon May 22 16:01:35 2023 +Test: ping Target: 1.1.1.1 Test: Last Interface Success: 0s Last Interface Failure: n/a # Interface Failure(s): 0 Interface: eth3 Status: active Last Status Change: Mon May 22 16:01:35 2023 +Test: ping Target: 1.1.1.1 Test: Last Interface Success: 0s Last Interface Failure: n/a # Interface Failure(s): 0
After rebooting show command stops working - however failover still occurs as it should.
danhusan@vyos:~$ show wan-load-balance WAN load balancing is not configured danhusan@vyos:~$ ps ax|grep lb 3500 ? Ss 0:00 /opt/vyatta/sbin/wan_lb -f /run/load-balance/wlb.conf -d -i /var/run/vyatta/wlb.pid 3501 ? S 0:00 /opt/vyatta/sbin/wan_lb -f /run/load-balance/wlb.conf -d -i /var/run/vyatta/wlb.pid 3655 pts/0 S+ 0:00 grep lb