For LVS persistent connections, there are three types of PCC,PPC and persistent connections based on firewall tags
1.PCC is used to enable all accesses of a user to be directed to the same realserver within the timeout period
2.PPC is used to redirect a user's access to the same service within the timeout period to the same srealserver
3. Persistent connections based on the firewall tag
The topology map is as follows:
A PCC is used to enable all accesses of a user to be directed to the same realserver within the timeout period.
The steps are as follows:
1. Correct configuration of real server1 and real Server2 IP and
Install the HTTPD service and test the Web pages for Test1 and Test2 respectively.
2. Use command sysctl-a |grep arp to view arp_announce and Arp_ignore values
[Root@localhost ~]# sysctl-a |grep ARP
Net.ipv4.conf.eth0.arp_ignore = 0
net.ipv4.conf.eth0.arp_announce = 0
Change the value of the Arp_announce to 2 and change the Arp_ignore value to 1,/etc/sysctl.conf
[Root@localhost ~]# echo "net.ipv4.conf.eth0.arp_announce = 2" >>/etc/sysctl.conf
[Root@localhost ~]# echo "net.ipv4.conf.all.arp_announce = 2" >>/etc/sysctl.conf
[Root@localhost ~]# echo "Net.ipv4.conf.eth0.arp_ignore = 1" >>/etc/sysctl.conf
[Root@localhost ~]# echo "Net.ipv4.conf.all.arp_ignore = 1" >>/etc/sysctl.conf
[Root@localhost ~]# sysctl-p #使服务生效
5.net.ipv4.conf.eth0.arp_announce = 2
6.net.ipv4.conf.all.arp_announce = 2
7.net.ipv4.conf.eth0.arp_ignore = 1
8.net.ipv4.conf.all.arp_ignore = 1
3. Configure the IP address of the Realserver1 loopback0:0, with a subnet mask of 4 255
Set the IP for Lo