16.7.2 Configuring Back-End Server Routing for Keepalived NAT-Mode Load Balancing

On each back-end real servers that you intend to use with the Keepalived load balancer, ensure that the routing table contains a default route for the virtual IP address of the load balancer's internal network interface.

For example, if the virtual IP address is, you can use the ip command to examine the routing table and to set the default route:

# ip route show dev eth0  proto kernel  scope link  src 
# ip route add default via dev eth0
# ip route show
default via dev eth0 dev eth0  proto kernel  scope link  src 

To make the default route for eth0 persist across reboots, create the file /etc/sysconfig/network-scripts/route-eth0:

# echo "default via dev eth0" > /etc/sysconfig/network-scripts/route-eth0