Load the IPVS kernel module.

sudo -i
modprobe ip_vs
lsmod | grep ip_vs

Install the IPVS administration utility package.

yum -y install ipvsadm

Enable packet forwarding and non-local IP address binding.

vim /etc/sysctl.conf

net.ipv4.ip_forward = 1
net.ipv4.ip_nonlocal_bind = 1

sysctl -p

Start up the ipvsadm service and ensure that it persists through reboot.

touch /etc/sysconfig/ipvsadm
systemctl enable ipvsadm
systemctl start ipvsadm

Configure the virtual service and specify the scheduling algorithm.

ipvsadm -A -t -s rr

Add the real servers to the virtual service and specify a packet forwarding method.

ipvsadm -a -t -r -m
ipvsadm -a -t -r -m

ipvsadm -l -n