Cluster LVS-NAT mode configuration

Source: Internet
Author: User

LVS clusters are commonly used in three modes, LVS-DR is the most commonly used one, but sometimes LVS-NAT mode is also used; this experiment is configured for NAT Mode

Server Load balancer only, high availability is not configured

Three servers:

Director server:

Eth0: 192.168.70.135

Eth1: 192.168.132.130

 

Real server1: eth0: 192.168.132.128

Real server2: eth0: 192.168.132.129

1. Configure Realserver1

 

[Root @ zhu4 ~] # Nl/var/www/jiang/zhu.html 1 

 

2. Configure Realserver2

 

[root@zhu3 ~]# nl /var/www/jiang/zhu.html1  

3. Configure Director server

 

[root@zhu2 ~]# ifconfig eth0:0 192.168.70.99[root@zhu2 ~]# ipvsadm -A -t 192.168.70.99:80  -s rr[root@zhu2 ~]# ipvsadm -a -t 192.168.70.99:80 -r 192.168.132.128 -m[root@zhu2 ~]# ipvsadm -a -t 192.168.70.99:80 -r 192.168.132.129 -m[root@zhu2 ~]# ipvsadm -L -nIP Virtual Server version 1.2.1 (size=4096)Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port           Forward Weight ActiveConn InActConnTCP  192.168.70.99:80 rr-> 192.168.132.129:80           Masq    1      0          0-> 192.168.132.128:80           Masq    1      0          0

 

4. Access test:

650) this. width = 650; "title =" 2013-09-11_161_2.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/061KJ1L-0.jpg "width =" 614 "height =" 123 "/>

 

650) this. width = 650; "style =" width: 684px; height: 111px "title =" 2013-09-11_164552.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/061KM127-1.jpg "width =" 681 "height =" 81 "/>

 

Load Balancing completed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.