In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article deploys Anycast on a single site and does not introduce too much about Anycast-related technologies. If necessary, please search for other documents.
When deploying a single site, you may need to involve the LVS DR pattern to implement two types of business: Anycast and Unicast, in which Anycast is used to provide business services and unicast is used for management and data synchronization. The specific design scheme is as follows:
1. Topology introduction:
Client ip address: 192.168.100.100Comp24
Lvs physical address: 192.168.100.3, Vip 24, 10.0.0.1
RS1 physical address: 192.168.100.2 Vip 24 Vip 10.0.0.1 Universe 24
RS2 physical address: 192.168.100.4 Vip 24 Vip 10.0.0.1 max 24
Because the above picture is a logical topology, the client in the test environment is still a centos6.5 server, so you need to refer back to a
Route add-net 10.0.0.0 Universe 24 dev eth0
- -
II. LVS implementation steps:
1) LVS installation steps:
# uname-r View the kernel of centos system
2.6.32-431.el6.x86_64
# ln-s 2.6.32-573.18.1.el6.x86_64 / usr/src/linux
If you don't have a kernel, you need to install yum install-y kernel-devel.
# 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
Solution:
# yum install-y libnl* libpopt*
# yum install-y popt-static
After installing the above packages:
# make clean
# make
# make install
# lsmod | grep ip_vs
# modeprobe ip_vs adds ip_vs to 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
So far, LVS has been installed!
2) LVS configuration
Because if you want to implement Anycast to provide services, of course you need to have anycast to provide services, as well as unicast to do management and data synchronization and so on.
The specific configuration is as follows:
# ifconfig lo:0 10.0.0.1 up 24 up configuration anycast address
# ipvsadm-C clear all lvs configurations
# ipvsadm-A-t 10.0.0.1 80-s wrr-p 20
# ipvsadm-a-t 10.0.0.1 VR 80-r 192.168.100.2 VR 80-g-w 1
# ipvsadm-a-t 10.0.0.1 VR 80-r 192.168.100.4 VR 80-g-w 1
At this point, the LVS is configured. - -
III. RS configuration
It is preferred to install a test environment for apache:
# yum install-y httpd
# service httpd start
# ps-ef | grep httpd
After the installation is complete:
# cat / etc/httpd/conf/httpd.conf | grep DocumentRoot looks up the system site directory
# echo "RS1" > / var/www/html/index.html
# ifconfig lo:0 10.0.0.1 up
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
At this step, the RS configuration is complete.
Test results:
After configuring the 10.0.0.0 anycast 24 static route on the client side, the anycast address can be ping, the unicast can be ping, and the 80 service will switch to another machine after 20 seconds.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.