Direct Server Return Example with Two Single Legged Nodes and VRRP-HA
1. The Network Setup
Figure 1: Network Setup
This example is similar to example 3, but shows the following more advanced techniques:
Dual node HA setup with session table synchronization,
Dual port setup which associates ports 80 and 443 to the same session,
Health check with external http.monitor script,
Session creation based on system load feedback retrieved with the BalanceNG agent "bngagent".
The configuration files in this example are complete and
are meant to be a reference ready for production use.
This example requires licensing to enable VRRP. Please contact us for test licenses if needed.
2. Establishing the Loopback Aliases
Use the following commands to establish the Loopback-alias on the Targets (as in example 3):
ifconfig lo:0 <IP-address> netmask 255.255.255.255 -arp up
ifconfig lo0:1 plumb
ifconfig lo0:1 <IP-address> netmask 255.255.255.255 up
In our example this would be the following command line (assuming a Linux operating system)
executed on both Target 1 and Target 2:
# ifconfig lo:0 172.16.1.10 netmask 255.255.255.255 -arp up
Additionally it is necessary to disable invalid ARP replies (Linux 2.6 kernel,
take a look at the FAQ question Q2.09):
# echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
# echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
If the target is a Windows system, please follow the steps in the FAQ
3. Starting "bngagent" on both Targets
The BalanceNG feedback agent has to be started on reboot on both targets
listening on port 439 like this:
# /usr/local/bin/bngagent 439
4. The Master and Backup Configuration Files
The default parameter settings of "vrrppreempt" and "sessionssync" are unchanged in order to
enable session table synchronization together with a master priority not equal to 255.
The server definition contains two ports 80 and 443, which declares connections to either
of them to be related to the same session. If two ports are specified in a server, the
target definitions of the associated targets must not contain any specific
port or protocol settings.
Please contact us in case of further questions, errors or suggestions