已解决 ----lvs中的IPVSADM设置问题,ipvsadm中第一台realserver出问题非常急!!!!!

解决方法:
仔细检查一遍主控制机系统信息
如果echo 1 > /proc/sys/net/ipv4/ip_forward 不能生效,就手动更改/etc/sysctl.conf.
将所有点节和主控制机系统全部重启一下,如果是设置的自动启动IPVSADM的脚本,将自动运行关掉。
启动后的系统是未运行所有软件的全新系统,然后再重新依次运行负载,再运行节点上软件。

ipvsadm中第一台realserver出问题,本来可以正常轮发的,就改了个DNS..突然不行了。。。急啊》!!!!!

再加一句..
如果把第二台realserver2中的lo:0禁用,数据就能正常转发到realserver1
#ifconfig lo:0 202.99.59.110 netmask 255.255.255.255 broadcast 202.99.59.110 down

有高手给点指点~~~~~~~邮件地址:oafwang@hotmail.com

________
| |
| 客户端 | (互连网)
|________|
|
(router)
202.99.59.1(director GW)
|
__________ |
| | | DIP=202.99.59.109 (eth0)
| director |---| (控制器有一块网卡,且与realserver1和realserver2在同一网段)
|__________| | (VIP=202.99.59.110, eth0:110)
|
-----------------------------------
| |
RIP=202.99.59.108(eth0) RIP=202.99.59.107(eth0)
(VIP=202.99.59.110, lo:0) (VIP=202.99.59.110, lo:0)
____________ ____________
| | | |
|realserver1 | |realserver2 |
|____________| |____________|

loggin director
#ifconfig eth0:0 202.99.59.110 netmask 255.255.255.255 broadcast 202.99.59.110 up
#echo 1 > /proc/sys/net/ipv4/ip_forward
#ipvsadm -A -t 202.99.59.110:20000 -s wlc //add virtual service
#ipvsadm -a -t 202.99.59.110:20000 -r 202.99.59.108 -g // add Dlvs01 server
#ipvsadm -a -t 202.99.59.110:20000 -r 202.99.59.107 -g // add Dlvs02 server

loggin realserver
#ifconfig lo:0 202.99.59.110 netmask 255.255.255.255 broadcast 202.99.59.110 up
# route add -host 202.99.59.110 dev lo:0 //add LVS - app server to LVS - main server route

ipvsadm -l

[root@DoorlsM ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 202.99.59.110:dnp wlc
-> 202.99.59.107:dnp Route 1 0 0
-> 202.99.59.108:dnp Route 1 0 0

Forums: