The internal network parameters are 10.11.12.0/24, the balancer network parameters 172.17.2.0/24. VRRP advertisements should be sent out on both networks, a separate address space 10.11.12.0/24 is used for that purpose.
The default route of all clients and also of the optional internal router shown on the left is the “network virt” address of the internal network (10.11.12.71 in this example).
The ipforwarding parameter has to be enabled for Link Load Balancing (“set ipforwarding 1”).
The module chaing “vrrp,arp,ping,hc,master,llb” activates the Link Load-Balancing functionality.
The IPv4 default route on hosts in network 10.11.12.0/24 should point to 10.11.12.56, which is represented by VRRP.
// configuration taken ... // BalanceNG ... hostname LB1 modules vrrp,arp,ping,hc,master,llb set { ipforwarding 1 vrrppreempt 1 vrrppreemptts 8 } interface 1 { name eth1 access raw } interface 2 { name eth2 access raw trackval 10 } interface 3 { name eth3 access raw trackval 10 } register interfaces 1,2,3 vrrp { vrid 64 priority 200 network 2 tracking enable } network 1 { addr 172.17.2.0 mask 255.255.255.0 real 172.17.2.55 virt 172.17.2.56 nat outside interface 3 } network 2 { addr 10.11.12.0 mask 255.255.255.0 real 10.11.12.55 virt 10.11.12.56 nat inside interfaces 1,2 } register networks 1,2 enable networks 1,2 server 1 { name "BalanceNG LLB Router" ipaddr any method session targets 1,2,3,4 } register server 1 enable server 1 target 1 { name "Link 1" ipaddr 172.17.2.1 ping 10.11.12.1,5,20 } target 2 { name "Link 2" ipaddr 172.17.2.2 ping 10.11.12.2,5,20 } target 3 { name "Link 3" ipaddr 172.17.2.3 ping 10.11.12.3,5,20 } target 4 { name "Link 4" ipaddr 172.17.2.4 ping 10.11.12.4,5,20 } register targets 1,2,3,4 enable targets 1,2,3,4 // end of configuration
// configuration taken ... // BalanceNG ... hostname LB2 modules vrrp,arp,ping,hc,master,llb set { ipforwarding 1 vrrppreempt 1 vrrppreemptts 8 } interface 1 { name eth1 access raw } interface 2 { name eth2 access raw trackval 10 } interface 3 { name eth3 access raw trackval 10 } register interfaces 1,2,3 vrrp { vrid 64 priority 200 network 2 tracking enable } network 1 { addr 172.17.2.0 mask 255.255.255.0 real 172.17.2.57 virt 172.17.2.56 nat outside interface 3 } network 2 { addr 10.11.12.0 mask 255.255.255.0 real 10.11.12.57 virt 10.11.12.56 nat inside interfaces 1,2 } register networks 1,2 enable networks 1,2 server 1 { name "BalanceNG LLB Router" ipaddr any method session targets 1,2,3,4 } register server 1 enable server 1 target 1 { name "Link 1" ipaddr 172.17.2.1 ping 10.11.12.1,5,20 } target 2 { name "Link 2" ipaddr 172.17.2.2 ping 10.11.12.2,5,20 } target 3 { name "Link 3" ipaddr 172.17.2.3 ping 10.11.12.3,5,20 } target 4 { name "Link 4" ipaddr 172.17.2.4 ping 10.11.12.4,5,20 } register targets 1,2,3,4 enable targets 1,2,3,4 // end of configuration