Protecting against unwanted ARP replies on Linux targets is not necessary for IPv6. The VRRP mastership is left unspecified with both nodes having the same VRRP priority below 255. This example is a variation of Example 15 and adds agent feedback based loadbalancing. The differences are shown in bold below.
The BalanceNG agent “bngagent” needs to be started on both target servers before as follows:
# bngagent -6 10000
The IPv6 configuration and loopback alias is setup in /etc/network/interfaces on the Debian based target servers as follows:
iface eth0 inet6 static address 2001:DB8::1:1 netmask 32 iface lo inet6 static address 2001:db8::2:4 netmask 128
iface eth0 inet6 static address 2001:DB8::1:2 netmask 32 iface lo inet6 static address 2001:db8::2:4 netmask 128
// configuration taken ...
// BalanceNG ...
modules vrrp,arp,ping,hc,master,slb
interface 1 {
name eth0
}
register interface 1
enable interface 1
vrrp {
vrid 40
priority 200
network 1
}
network 1 {
addr 10.1.0.0
mask 255.255.0.0
real 10.1.0.1
mask6 32
real6 2001:db8::2:1
virt6 2001:db8::2:3
interface 1
}
register network 1
enable network 1
server 1 {
ipaddr6 2001:db8::2:4
sessionid src+port
port 80
protocol tcp
method rndagent
targets 1,2
}
register server 1
enable server 1
target 1 {
ipaddr6 2001:db8::1:1
port 80
protocol tcp
ping6 3,10
agent6 10000,3,10
dsr enable
}
target 2 {
ipaddr6 2001:db8::1:2
port 80
protocol tcp
ping6 3,10
agent6 10000,3,10
dsr enable
}
register targets 1,2
enable targets 1,2
// end of configuration
// configuration taken ...
// BalanceNG ...
modules vrrp,arp,ping,hc,master,slb
interface 1 {
name eth0
}
register interface 1
enable interface 1
vrrp {
vrid 40
priority 200
network 1
}
network 1 {
addr 10.1.0.0
mask 255.255.0.0
real 10.1.0.2
mask6 32
real6 2001:db8::2:2
virt6 2001:db8::2:3
interface 1
}
register network 1
enable network 1
server 1 {
ipaddr6 2001:db8::2:4
sessionid src+port
port 80
protocol tcp
method rndagent
targets 1,2
}
register server 1
enable server 1
target 1 {
ipaddr6 2001:db8::1:1
port 80
protocol tcp
ping6 3,10
agent6 10000,3,10
dsr enable
}
target 2 {
ipaddr6 2001:db8::1:2
port 80
protocol tcp
ping6 3,10
agent6 10000,3,10
dsr enable
}
register targets 1,2
enable targets 1,2
// end of configuration
bng# sh vrrp
state MASTER
vrid 40
priority 200
ipaddr0 2001:db8::2:3
ipaddr1 2001:db8::2:4
bng# sh sessions
7 sessions
srv tgt age timeout session-id
--- --- ---- ------- ------------------
1 1 7 600 2001:db8::1:6.46354
1 2 8 600 2001:db8::1:6.46353
1 1 9 600 2001:db8::1:6.46352
1 2 11 600 2001:db8::1:6.46351
1 1 12 600 2001:db8::1:6.46350
1 2 26 600 2001:db8::1:6.46349
1 1 57 600 2001:db8::1:6.46341
bng# show targets
# ipaddr ipaddr6 port prt net net6 srv sessions status info
--- ------ ----------------- --- --- ---- --- -------- ----------- ------------------------
1 n.a. 2001:db8::1:1 80 tcp 0 1 1 0 operational nd6:up,ping6:up,agent6:1
2 n.a. 2001:db8::1:2 80 tcp 0 1 1 0 operational nd6:up,ping6:up,agent6:1