LVS-DR model with placed
650) this.width=650; "height=" 231 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 6sggek03v34b7f8vyowsczwg39ue.2nqhqodflwuh*k!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgloaaaaaaadaou! &su=0265905921&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgloaaaaa "/>
OS |
Ip |
Subnet mask |
Routing gateways |
Centos6.5 (Directory) |
eth0:192.168.25.209 (DIP) |
255.255.252.0 |
|
eth0:0:192.168.26.210 (VIP) |
255.255.255.255 |
eth0:0 |
OS |
Rs |
Subnet mask |
Routing gateways |
Centos6.6 (RS1) |
eth0:192.168.25.210 (RIP) |
255.255.252.0 |
192.168.25.3 |
lo:0:192.168.26.210 (VIP) |
255.255.255.255 |
lo:0 |
Centos6.6 (RS2) |
eth0:192.168.25.211 (RIP) |
255.255.252.0 |
192.168.25.3 |
lo:0:192.168.26.210 (VIP) |
255.255.255.255 |
lo:0 |
Centos6.6 (RS3) |
eth0:192.168.25.212 (RIP) |
255.255.252.0 |
192.168.25.3 |
lo:0:192.168.26.210 (VIP) |
255.255.255.255 |
lo:0 |
Win7 |
ip:192.168.25.159 (CIP) |
255.255.252.0 |
192.168.25.3 |
Configure directory:
Ifconfig eth0 192.168.25.209/22 up
Ifconfig eth0:0 192.168.26.210 netmask 255.255.255.255 broadcast 192.168.26.210 up
Route add-host 192.168.26.210 Dev eth0:0
Route-n
650) this.width=650; "height=" 323 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ ykyqqpp2cdc2phqrnjupzbyon5bm2rngmle*0ioa5aw!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=lajeaqaaaaadae4! &su=0166439009&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 555 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Lajeaqaaa "/>
RS1:
Ifconfig eth0 192.168.25.210/22 up
Route add default GW 192.168.25.3 #指定自己网关
#配置系统内核参数:
Echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore
Echo 1 >/proc/sys/net/ipv4/conf/eth0/arp_ignore
Echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce
Echo 2 >/proc/sys/net/ipv4/conf/eth0/arp_announce
Ifconfig lo:0 192.168.26.210 netmask 255.255.255.255 broadcast 192.168.26.210 up
Route add-host 192.168.26.210 Dev lo:0
Curl 192.168.26.210
Curl 192.168.25.210
650) this.width=650; "height=" 492 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ dbnkh7db4rxdzoe.8ke6l0sedvpa02sq6psjgsisa98!/b/daybaaaaaaaa&ek=1&kp=1&pt=0&bo=sgltaqaaaaadaie! &su=0187059841&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" daybaaaaaaaa&ek=1&kp=1&pt=0&bo= Sgltaqaaa "/>
650) this.width=650; "height=" "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 6cdzez.cmgwykpc8emuzi6qm5jtbuc37v9lg*ma.lm8!/b/daybaaaaaaaa&ek=1&kp=1&pt=0&bo=igj0aaaaaaadahe! &su=044662401&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 545 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" daybaaaaaaaa&ek=1&kp=1&pt=0&bo= Igj0aaaaa "/>
650) this.width=650; "height=" 394 "src=" http://a1.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ szqiyq9cejekjrbpko5ihhnrwvnvvu0u2qijgxt6flo!/b/daqbaaaaaaaa&ek=1&kp=1&pt=0&bo=ogklaqaaaaadajc! &su=0156047873&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 569 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" daqbaaaaaaaa&ek=1&kp=1&pt=0&bo= Ogklaqaaa "/>
RS2 configuration:
Ifconfig eth0 192.168.25.211/22 up
Route add default GW 192.168.25.3
Echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore
Echo 1 >/proc/sys/net/ipv4/conf/eth0/arp_ignore
Echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce
Echo 2 >/proc/sys/net/ipv4/conf/eth0/arp_announce
Ifconfig lo:0 192.168.26.210 netmask 255.255.255.255 broadcast 192.168.26.210 up
Route add-host 192.168.26.210 Dev lo:0
Curl 192.168.26.210
650) this.width=650; "height=" 427 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ mrh9jimcntkzgc7c0cyjig4nopo8tjc3hlxhwj5qxzi!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=zaksaqaaaaadao4! &su=0133169761&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 611 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo= Zaksaqaaa "/>curl 192.168.25.211
RS3 configuration:
Ifconfig eth0 192.168.25.212/22 up
Route add default GW 192.168.25.3
Echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore
Echo 1 >/proc/sys/net/ipv4/conf/eth0/arp_ignore
Echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce
Echo 2 >/proc/sys/net/ipv4/conf/eth0/arp_announce
Ifconfig lo:0 192.168.26.210 netmask 255.255.255.255 broadcast 192.168.26.210 up
Route add-host 192.168.26.210 Dev lo:0
Curl 192.168.26.210
650) this.width=650; "height=" 441 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ le3oje1uiibqqjwhcooyyiwdjod8hb5j98behqh8fuy!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=dqk6aqaaaaadaok! &su=0110562481&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 628 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Dqk6aqaaa "/>curl 192.168.25.212
Back to directory for LVS configuration:
Ipvsadm-a-T 192.168.26.210:80-s RR
Ipvsadm-a-T 192.168.26.210:80-s 192.168.25.210-g
Ipvsadm-a-T 192.168.26.210:80-s 192.168.25.211-g
Ipvsadm-a-T 192.168.26.210:80-s 192.168.25.212-g
Ipvsadm-l-N #查看LVS配置信息
650) this.width=650; "height=" 339 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ xzpp75jdvnfgkxwwmwtokzelpo.l2it9exsscrajo2y!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgjuaqaaaaadafg! &su=027261841&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgjuaqaaa "/>
650) this.width=650, "height=" src= "http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ wr6zekdsk8ysnr8j1iudh2dkwxy*yhibc2x72a3ik*i!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=mgkzaaaaaaadaiw! &su=080548881&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 561 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Mgkzaaaaa "/> To test if the VIP is available.
Access testing: Observe changes with multiple refreshes.
650) this.width=650; "height=" 189 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 6vxm.fsciffunxtapqbb95jxh6mkwcs*ljfzc3pno5w!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=uak. Aaaaaaadamk!&su=045872321&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px; padding:0px;border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt= 0&bo=uak. AAAAA "/>
650) this.width=650; "height=" 142 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ whmmi1bcbrwyfmrfv8b. utmfon*zfo55ntpl2x2yxg!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=twkpaaaaaaadaoc!&su=0186638001 &tm=1481868000&sce=0-12-12&rf=2-9 "width=" 590 "style=" margin:0px;padding:0px;border-width:0px; border-style:none;vertical-align:top; "alt=" Dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=twkpaaaaa "/>
650) this.width=650; "height=" 145 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/gdqduqob* gtmzaf2ayzdeqrphtn4lk89sronbj7eoga!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=xaksaaaaaaadaok!&su= 0195559777&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 603 "style=" margin:0px;padding:0px;border-width : 0px;border-style:none;vertical-align:top; "alt=" Dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=xaksaaaaa "/>
To view the post-access LVS status:
650) this.width=650; "height=" 145 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/jkg. ll72iopmhngjxbzu0.vksks4hnf8ilj49gvmrfu!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=cqksaaaaaaadalw! &su=046983889&tm=1481868000&sce=0-12-12&rf=2-9 "Width=" 520 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Cqksaaaaa "/>
650) this.width=650; "height=" 126 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ta07u9* Ps2rl2z49ja19l1aalfihplajw*fikkuogy4!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=eqj*aaaaaaadaek!&su =0210196401&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 528 "style=" margin:0px;padding:0px;border-width : 0px;border-style:none;vertical-align:top; "alt=" Dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=eqj*aaaaa "/>
650) this.width=650, height= "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/cui* 4thd5a57ydmrh4dqwjiqjzkxvvzfzklm125dn28!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=fgltaaaaaaadaoi! &su=0156131665&tm=1481868000&sce=0-12-12&rf=2-9 "width=" 533 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo= Fgltaaaaa "/>
This article is from the "on the Road" blog, please be sure to keep this source http://jdonghong.blog.51cto.com/3473478/1883343
LVS-DR model Configuration