LVS/DR Configuration

Source: Internet
Author: User

LVS/DR Configuration

Three machines:
director (eth0192.168.31.166, VIP eth0:0:
Real Server1 (eth0 rip:192.168 31.100, VIP lo:0:
Real Server2 (eth0 rip:, VIP lo:0:

Director on vim/usr/local/sbin/

echo 1 >/proc/sys/net/ipv4/ip_forward


Ifconfig eth0:0 down-----After modifying the parameters, you need to join this

ifconfig eth0:0 $VIP broadcast $VIP netmask up
Route add-host $vip Dev eth0:0
$IPV-A-T $VIP: 80-s RR
$IPV-A- t $vip: 80-r $rs 1:80-g-W 1
$IPV-A- t $vip: 80-r $rs 2:80-g-W 1

two RS on: vim/usr/local/sbin/
ifconfig lo:0 $VIP broadcast $VIP netmask up
Route add-host $vip lo:0
echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore

echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce

LVS/DR Configuration

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: 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.