LVS-DR Configuration

Source: Internet
Author: User

Arp_ignore: the response level when an ARP request is received

Level 0 (default): responds as long as the local configuration has a corresponding address

Level 1: responds only when the target address of the request is configured on the interface to which the request arrives.

Configuration method: Echo 1>/proc/sys/NET/IPv4/CONF/eth0/arp_ignore

Arp_announce: defines the level of announcement when an address is advertised.

Level 0 (default): advertise any address on the local Interface

Level 1: an attempt is made to only notify the target network of the address that matches the network.

Level 2: Only networks that match the addresses on the local interface are advertised.

Configuration method: Echo 2>/proc/sys/NET/IPv4/CONF/eth0/arp_announce

Planning: Director: VIP: 172.16.168.200 dip: 172.16.168.10

Realserver1: Rip: 172.16.168.20

Realserver2: Rip: 172.16.168.30

Diretor

Configure the network adapter eth0: ifconfig eth0 172.16.168.10

Eth0: 0: ifconfig eth0: 0 172.16.168.200 up

Configure a special route: Route add-host 172.16.168.200 Dev eth0: 0

Ipvsadm configuration: ipvsadm-a-t 172.16.168.200: 80-s rr

Ipvsadm-a-t 172.16.168.200: 80-r 172.16.168.20-G

Ipvsadm-a-t 172.16.168.200: 80-r 172.16.168.30-G

RealServer

Adjust/proc response parameters: Echo "1">/proc/sys/NET/IPv4/CONF/All/arp_ignore

Echo "2">/proc/sys/NET/IPv4/CONF/All/arp_announce

Echo "1">/proc/sys/NET/IPv4/CONF/eth0/arp_ignore

Echo "2">/proc/sys/NET/IPv4/CONF/eth0/arp_announce

Configure the network adapter eth0: ifconfig eth0 172.16.168.20

Lo: 0: ifconfig lo: 0 172.16.168.200 broadcast 172.16.168.200 netmask fixed 255.255.255 up (so that Lo: 0 is only in the same network as itself)

Configure a special route: Route add-host 172.16.168.200 Dev lo: 0 (to make the destination address lo: 0 and use the Lo: 0 address as the source address in the response, otherwise, the eth0 address will be used as the source address)

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