Ip anycast Technology single site design scheme

Source: Internet
Author: User
Tags anycast

This article on the Anycast single site deployment, not to anycast related technologies do too much introduction, if necessary, please search the other documents.

When deploying a single site, it may be necessary to involve the LVS Dr Mode to implement business anycast and unicast two types, where anycast is used as a service for providing business services, unicast as a management and data synchronization. Specific design options are as follows:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7D/15/wKiom1bfyA_jCQPbAAA5o_ikhDs410.png "title=" QQ picture 20160309145141.png "alt=" Wkiom1bfya_jcqpbaaa5o_ikhds410.png "/>

First, Topology Introduction:

Client IP Address: 192.168.100.100/24

LVS Physical Address: 192.168.100.3/24 Vip 10.0.0.1/24

RS1 Physical Address: 192.168.100.2/24 Vip 10.0.0.1/24

RS2 Physical Address: 192.168.100.4/24 Vip 10.0.0.1/24

Because the chip is a logical topology, the client in the test environment is a centos6.5 server, so you need to refer back to a

Route add-net 10.0.0.0/24 Dev eth0

--------------------------------------------------------------------------------------------------------------- --------------------------

Ii. implementation steps of LVS:

1) LVS Installation steps:

#uname-R to view the CentOS system kernel

2.6.32-431.el6.x86_64

#ln-S 2.6.32-573.18.1.el6.x86_64/usr/src/linux

If there is no kernel, you need yum install-y kernel-devel to install

#wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz

#tar-ZXVF ipvsadm-1.26.tar.gz

#cd ipvsadm-1.26

#make

The following error was encountered during installation:

Libipvs.c:1072:error:too many arguments to function ' ipvs_nl_send_message '

MAKE[1]: * * * [LIBIPVS.O] Error 1

MAKE[1]: Leaving directory '/home/hongfei/ipvsadm-1.26/libipvs '

Make: * * * [libs] Error 2

Workaround:

#yum install-y libnl* libpopt*

#yum install-y popt-static

After the installation has completed the above package:

#make Clean

#make

#make Install

#Lsmod |grep ip_vs

#modeprobe Ip_vs the Ip_vs into the kernel.

#lsmod |grep Ip_vs

Ip_vs 125220 0

LIBCRC32C 1246 2 Ip_vs,dm_persistent_data

IPv6 317340 226 Ip_vs,ip6t_reject,nf_conntrack_ipv6,nf_defrag_ipv6

The LVS has been installed!

2) LVS Configuration

Because the implementation of anycast external services, of course, need to have anycast to provide services, the same needs unicast do management and data synchronization and so on.

The specific configuration is as follows:

#ifconfig lo:0 10.0.0.1/24 up configuration anycast Address

#ipvsadm-C empties all LVS configurations

#ipvsadm-A-t 10.0.0.1:80-s wrr-p 20

#ipvsadm-T 10.0.0.1:80-r 192.168.100.2-g-W 1

#ipvsadm-T 10.0.0.1:80-r 192.168.100.4-g-W 1

The LVS configuration is complete. --------------------------------------------------------------------------------------------------------------- --------------------------

Three, RS Configuration

Prefer an Apache test environment:

#yum install-y httpd

#service httpd Start

#ps-ef|grep httpd

After the installation is complete:

# cat/etc/httpd/conf/httpd.conf|grep DocumentRoot Find system Site Directory

# echo "RS1" >/var/www/html/index.html

#ifconfig lo:0 10.0.0.1 up

To configure ARP suppression:

# 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

This step RS configuration is complete.

Test results:

After configuring the 10.0.0.0/24 static route on the client side, the anycast address can be ping, unicast can ping, and 80 service will switch to another machine after 20 seconds.






This article is from the "It is not a thing" blog, please make sure to keep this source http://imccie.blog.51cto.com/4710872/1749163

Ip anycast Technology single site design scheme

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.