LVS Load Balancer Dr Mode deployment

Source: Internet
Author: User

Directory:

1. Topology diagram

2. Build the Environment

3. LVS Server Deployment

4. Testing

1. Topology map the IP address of the LVS-DR mode is all external IP.   In this example, the IP settings are all used to temporarily set the IP, the restart will be invalidated. The user requests the VIP, will be the LVS server response, assigns to the Real-server server, the real server finishes processing to return directly to the user, no longer passes through the LVS server.

2. Build the environment (System for Centon 6.4) (1), Lvs-server ip:192.168.36.101 (2), real-server1 ip:192.168.36.102 Install Web server prepare test Site content (3), real-s Erver2 ip:192.168.36.103 Install Web server prepare test Site content test machine: XP/WINDOW7/8 can, as long as you can ping 192.168.36.* 3. LVS Server Deployment (1), lvs-server configuration A. VIP settings: [[email protected]~]# ifconfig eth0:0 192.168.36.100 netmask 255.255.255.255
[[email protected]~]# Route add-host 192.168.36.100 Dev eth0:0b. Install ipvsadm[[email protected]~]# yum-y Install ipvsadm* C.LVS configuration: [[email protected]~]# ipvsadm-c[[email protected]~]# Ipvsadm-at 192.168.36.100:80-s rr[[email protected]~]# Ipvsadm-at 192.168.36.100:80-r 192.168.36.102:80-g[[email protected]~]# Ipvsadm-at 192.168.36.100:80-r 192.168.36.103:80-g[[email protected]~]# ipvsadm-l-N (2), real-server1 configuration [[email protected]~]# ifconfig lo:0 192.168.36.100 netmask 255.255.255.255[[email protected]~]# Route add-host 192.168.36.100 Dev lo:0[[email protected]~]# echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore [[email protected]~]# echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce [[email protected]~]# echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore [[email protected]~]# echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce (3), real-server2 configuration same as Real-server1. 4. Test now through the test machine, direct access to the LVS VIP http://192.168.36.100 Normal, you can access to the prepared test site. Configuring LVS uses round robin mode. The first time is access to Real-server1, after the refresh is access to Real-server2, and then after the refresh access Real-server1

LVS Load Balancer Dr Mode deployment

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.