章博士 LVS/DR +RealServer(Win2003)问题?为何总指向director

我是刚刚接触LVS的,请各位帮忙!谢了!
我要搭建的框架为:
LVS/DR +RealServer(Win2003)
只有一台服务器做均衡测试。

1。我的内核为2.6.10
director的真实IP为192.168.0.123

director端的配置脚本内容如下:

#!/bin/sh
VIP=192.168.0.200
/sbin/ifconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 up
###/sbin/route add -host $VIP dev eth0:0
echo 1 >/proc/sys/net/ipv4/conf/all/send_redirects
echo 1 >/proc/sys/net/ipv4/conf/default/send_redirects
echo 1 >/proc/sys/net/ipv4/conf/eth0/send_redirects
echo 1 >/proc/sys/net/ipv4/conf/lo/send_redirects
echo 0 > /proc/sys/net/ipv4/ip_forward
/sbin/ipvsadm -C
/sbin/ipvsadm -A -t $VIP:80
/sbin/ipvsadm -a -t $VIP:80 -r 192.168.0.73:80 -g

2。RealServer的操作系统为win server 2003 sp1
windows 自带的防火墙已经关掉!
按照章博士的说明要求设RealServer的VIP,netmask 255.255.255.255
章博士的说明要求(http://kb.linuxvirtualserver.org/wiki/Windows_Servers_in_LVS/DR_and_LVS/TUN_Clusters)
3。在Client的操作系统为win server 2003 ,win xp的IE上键入:http://192.168.0.200/
总是指向directord的网页。

4.director端键入命令ipvsadm -Ln,获取用以下信息:
IP Virtual Server version 1.2.1 (size=65536)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.200:80 wlc
-> 192.168.0.73:80 Route 1 0 0

5。director端键入命令route,获取用以下信息:

eth0 Link encap:Ethernet HWaddr 00:E0:60:A0:06:1F
inet addr:192.168.0.123 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:60ff:fea0:61f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:39370 errors:0 dropped:0 overruns:0 frame:0
TX packets:8864 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3572786 (3.4 Mb) TX bytes:1618559 (1.5 Mb)
Interrupt:11 Base address:0xa000

eth0:0 Link encap:Ethernet HWaddr 00:E0:60:A0:06:1F
inet addr:192.168.0.200 Bcast:192.168.0.200 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2824 errors:0 dropped:0 overruns:0 frame:0
TX packets:2824 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1930252 (1.8 Mb) TX bytes:1930252 (1.8 Mb)

lo:0 Link encap:Local Loopback
inet addr:192.168.0.200 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

6。RealServer端键入命令ipconfig /all,获取用以下信息:

Windows IP Configuration

Host Name . . . . . . . . . . . . : WANGZHI

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 本地连接 3:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Loopback Adapter

Physical Address. . . . . . . . . : 02-00-4C-4F-4F-50

DHCP Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 192.168.0.200

Subnet Mask . . . . . . . . . . . : 255.255.255.255

Default Gateway . . . . . . . . . :

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC

Physical Address. . . . . . . . . : 66-28-4C-77-13-77

DHCP Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 192.168.0.73

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.0.1

DNS Servers . . . . . . . . . . . : 210.21.4.130

61.28.10.68

7 :请问问题产生的原因,如何解决?

Forums:

我用tcpdump在director跟踪arp已经能解析到VIP上了。
但是客户端连接到192.168.0.200时,还是连接到director,
director没有把客户端连接负载到RealServer(Win2003)上

等待高手解答啊!!!

http://zh.linuxvirtualserver.org/node/98

同样,看说明,win2003 安装loopback,修改注册表255.255.255.255,关闭防火墙。
还是不成功。

在director用tcpdump host 192.168.0.200获取信息如下:
16:48:00.197583 arp who-has 192.168.0.200 tell 192.168.0.202
16:48:00.197601 arp reply 192.168.0.200 is-at 0:e0:60:a0:6:1f
16:48:11.101787 arp who-has 192.168.0.200 tell 192.168.0.202
16:48:11.101801 arp reply 192.168.0.200 is-at 0:e0:60:a0:6:1f
16:48:11.101813 arp who-has 192.168.0.200 tell 192.168.0.202
16:48:11.101831 arp reply 192.168.0.200 is-at 0:e0:60:a0:6:1f

其中192.168.0.200为VIP
0:e0:60:a0:6:1f为director上的网卡MAC地址,director上只有一张网卡。
那么可以说ipvs直接把director的MAC地址返回Client

director端键入命令ipvsadm -Ln,永远获取相同的结果,以下信息:
IP Virtual Server version 1.2.1 (size=65536)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.200:80 wlc
-> 192.168.0.73:80 Route 1 0 0

这样ipvs不正常工作????

原因在哪啊?
请章博士,各位帮忙查找一下原因。

我顶

DR方式中RIP不能是WINDOWS主机

randomness