快速业务通道

linux cluster

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-16
shy; 5. real server2 config ­ #configure ip forward echo "0" >/proc/sys/net/ipv4/ip_forward ­ #configure VIP . realserver and route /sbin/ifconfig lo:0 10.64.20.113 broadcast 10.64.20.113 netmask 255.255.255.255 up /sbin/route add -host 10.64.20.113 dev lo:0 #hidden arp request arptables -A IN -d 10.64.20.113 -j DROP arptables -A OUT -o lo -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.113 arptables -A OUT -o eth0 -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.111 arptables -A OUT -o eth1 -d 10.64.20.113 -j mangle --mangle-ip-s <real_ip_on_eth1> (if you have eth1 connect to network) ­ 6. check with IE. on Director server check ipvsadm list: #ipvsadm -L ­ ­ 二、LVS--TUN configuration 1、ENV OS:RedHat AS3 Packeage:ipvsadm-1.21-9.ipvs108.i386.rpm 2、system architecture director server:10.64.20.112 real server1:10.64.20.110 real server2:10.64.20.111 VIP:10.64.20.113 real server1 and 2 Ip address are configured . eth0 we first assume all servers are finished installed. ­ 3. Director Server #!/bin/bash #set ip_forward . for vs-tun director(1 ., 0 off) echo "0" >/proc/sys/net/ipv4/ip_forward #add ethernet device and routing for VIP /sbin/ifconfig eth0:0 10.64.20.113 broadcast 10.64.20.113 netmask 255.255.255.255 up /sbin/route add -host 10.64.20.113 dev eth0:0 ipvsadm -C ipvsadm -A -t 10.64.20.113:http -s rr ipvsadm -a -t 10.64.20.113:http -r 10.64.20.110 -i -w 1 ipvsadm -a -t 10.64.20.113:http -r 10.64.20.111 -i -w 1
Empire CMS,phome.net
­ 4.real server 1 ­ #!/bin/bash #set_realserver_ip_forwarding to OFF(1 ., 0 off) echo "0" >/proc/sys/net/ipv4/ip_forward ­ #install_readserver_vip insmod ipip ifconfig tunl0 10.64.20.113 broadcast 10.64.20.113 netmask 255.255.255.255 up route add -host 10.64.20.113 dev tunl0 ­ #hiding interface tunl0, will not arp arptables -A IN -d 10.64.20.113 -j DROP arptables -A OUT -o tunl0 -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.113 arptables -A OUT -o eth0 -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.110 arptables -A OUT -o eth1 -d 10.64.20.113 -j mangle --mangle-ip-s <real_ip_on_eth1> (if you have eth1 connect to network) ­ 5.real server 2 ­ #!/bin/bash #set_realserver_ip_forwarding to OFF(1 ., 0 off) echo "0" >/proc/sys/net/ipv4/ip_forward ­ #install_readserver_vip insmod ipip ifconfig tunl0 10.64.20.113 broadcast 10.64.20.113 netmask 255.255.255.255 up route add -host 10.64.20.113 dev tunl0 ­ #hiding interface tunl0, will not arp arptables -A IN -d 10.64.20.113 -j DROP arptables -A OUT -o tunl0 -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.113 arptables -A OUT -o eth0 -d 10.64.20.113 -j mangle --mangle-ip-s 10.64.20.111 arptables -A OUT -o eth1 -d 10.64.20.113 -j mangle --mangle-ip-s <real_ip_on_eth1> (if you have eth1 connect to network) ­ 6. check with IE. on Director server check ipvsadm list: #i

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号