Quick LVS HOWTO
Director server
Enable routing:
sysctl net.ipv4.ip_forward = 1
Mangle TFTP packets for LVS:
iptables -t mangle -A PREROUTING -i eth0 -p udp -s 0.0.0.0/0 -d $VIP --dport 69 -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -i eth0 -p udp -s 0.0.0.0/0 -d $VIP --dport 1024:65535 -j MARK --set-mark 1
keepalived.conf
! Configuration File for keepalived global_defs { router_id LVS1 } vrrp_instance VI_1 { interface eth0 virtual_router_id 50 nopreempt priority 100 advert_int 1 virtual_ipaddress { $VIP } } virtual_server fwmark 1 { delay_loop 6 lb_algo wlc lb_kind TUN persistence_timeout 50 protocol UDP real_server $RIP 69 { weight 1 } # real_server $RIP 69 { # weight 1 # } }
Real server
Enable loopback for VIP
ifconfig lo0 alias $VIP netmask 255.255.255.255 sysctl net.inet.ip.forwarding=1
Last modified
14 years ago
Last modified on Jul 22, 2010, 10:11:48 AM
Note:
See TracWiki
for help on using the wiki.