lvs / nat mode
VIP: 192.168.199.155
RIP1: 192.168.1.110
RIP2: 192.168.1.120
add a NIC NAT mode
CIP: windows client IP
VIP: director external IP here with bridging mode
DIP: director within IP network and in realserver the same network segment, attention realserver gateway address to be configured as a DIP
RIP1: realserver of a network segment ip and DIP
RIP2
director配置:
yum -y install ipvsadm
Then edit the script vim /usr/local/sbin/lvs_nat.sh
Then execute the script to see if the success
ipvsadm -ln view
to configure a static ip
because the newly added NIC configuration file does not copy files directly to the ens33 modified to the following figure
vim / etc / sysconfig / network- scripts / ifcfg-ens37
Two realserver Action:
Configure a static ip
vim / etc / sysconfig / Network-scripts / ens33 the ifcfg-
download web server to view
individual download nginx
another one realserver
Download web server to view
individual downloads nginx
开启两台realserver的nginx
关闭防火墙
可以修改在nginx的访问页面写上ip
![](https://s1.51cto.com/images/blog/201907/24/96969ea4cd574b64871c5dc02f3d4a6d.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
![](https://s1.51cto.com/images/blog/201907/24/34f4e5bcc2a5b317aa15069d94b96ba9.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
This success