快速业务通道

linux cluster

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-16
­ 一、LVS--NAT configuration 1、ENV OS:RedHat AS3 Packeage:ipvsadm-1.21-9.ipvs108.i386.rpm 2、system architecture director server:10.64.20.112 eth0 VIP:10.64.20.113 eth1 or eth0:0 real server1:10.64.20.110 eth0 real server2:10.64.20.111 eth0 all netmask 255.255.255.0 3. director server configuration: #install ipvsadm rom -ivh ipvsadm-1.21-9.ipvs108.i386.rpm #confiigure ip forward and redirects echo "1" >/proc/sys/net/ipv4/ip_forward ifconfig eth0 10.64.20.112 #configure VIP address sbin/ifconfig eth1 10.64.20.113 ­ #configre ipvsadm ipvsadm -C ipvsadm -A -t 10.64.20.113:http -s rr ipvsadm -a -t 10.64.20.113:http -r 10.64.20.111 -m ipvsadm -a -t 10.64.20.113:http -r 10.64.20.110 -m 4. real server1 config #configure ip ifconfig eth0: 10.64.20.110 ifconfig gw:10.64.20.112 5. real server2 config #configure ip ifconfig eth0: 10.64.20.111 ifconfig gw:10.64.20.112 ­ ­ 二、LVS--DR 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 configuration: #install ipvsadm rom -ivh ipvsadm-1.21-9.ipvs108.i386.rpm ­ #confiigure ip forward and redirects
Empire CMS,phome.net
echo "0" >/proc/sys/net/ipv4/ip_forward echo "1" >/proc/sys/net/ipv4/conf/default/send_redirects echo "1" >/proc/sys/net/ipv4/conf/lo/send_redirects ­ #configure VIP address /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 ­ #configre ipvsadm ipvsadm -C ipvsadm -A -t 10.64.20.113:http -s rr ipvsadm -a -t 10.64.20.113:http -r 10.64.20.111 -g -w 1 ipvsadm -a -t 10.64.20.113:http -r 10.64.20.110 -g -w 1 ­ 4. real server1 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.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) Windows系统   对于Windows系统的服务器,只要添加一个Loopback的网卡,IP地址设置成虚拟IP(10.64.20.113),子网掩码设置成255.255.255.255,网关地址留空Windows子网掩码无法配置成255.255.255.255,我们可以先按默认的保存配置,然后从注册表修改子网掩码.    从注册表 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersInterfaces]下找到对应的网卡,将SubnetMask修改成255.255.255.255.然后禁用再启用该网卡即可.
Empire CMS,phome.net
&

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站: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号