I've got a keepalived + LVS set up I'm trying to get to work
Clients, LB and real servers are all on the same subnet.
Keepalived config:
global_defs {
notification_email {
admin@example.com
}
notification_email_from admin@example.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id ukld5p500x
}
vrrp_instance some_service {
state MASTER
interface em1
virtual_router_id 100
priority 100
virtual_ipaddress {
10.0.0.75
}
track_script {
chk_fail
}
}
virtual_server 10.0.0.75 58563 {
delay_loop 10
lb_algo rr
lb_kind DR
protocol TCP
real_server 10.0.0.70 58563 {
weight 1
TCP_CHECK {
connect_timeout 3
connect_port 58563
}
}
... more real_servers ...
}
So if I set lb_type to nat then I can connect from the LB itself to the VIP/port and stuff goes through, but not from an external host (client). If I set lb_type to DR then neither the LB connecting to itself nor an external client can connect.
sys.net.ipv4.ip_forward is set to 1 and there is only one LB configured atm.