All -
I'm working on getting a simple director->realserver DR setup under linux
2.4.17 [rh6.2] and ran into some trouble. I had very little trouble getting
this same setup working under 2.2 a few months ago. Both boxes are on the
same segment and network, so I'm not using the director as the realservers'
gateway.
I applied the following against a vanilla kernel:
hidden-2.4.5-1.diff from http://www.linuxvirtualserver.org/~julian
linux-2.4.17-ipvs-0.9.9.patch
# ipvsadm -v
ipvsadm v1.20 2001/11/04 (compiled with popt and IPVS v0.9.8)
I'm using the same kernel on both the director and realserver.
Legend -
Realserver: 192.168.0.166
Virtual IP: 192.168.0.190
Director: 192.168.0.167
Client: 192.168.10.211
- realserver config -
dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.0.190 Bcast:192.168.0.255 Mask:255.255.255.255
UP BROADCAST RUNNING NOARP 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:0
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.190 0.0.0.0 255.255.255.255 UH 0 0 0 dummy0
192.168.0.166 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.0.160 0.0.0.0 255.255.255.224 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.161 0.0.0.0 UG 1 0 0 eth0
# cat /proc/sys/net/ipv4/conf/dummy0/hidden
1
# cat /proc/sys/net/ipv4/conf/all/hidden
1
# cat /proc/sys/net/ipv4/ip_forward
1
- director config -
eth0:0 Link encap:Ethernet
inet addr:192.168.0.190 Bcast:192.168.0.191 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xa000
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.190 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.0.167 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.0.160 0.0.0.0 255.255.255.224 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.161 0.0.0.0 UG 1 0 0 eth0
# cat /proc/sys/net/ipv4/ip_forward
1
# cat /proc/sys/net/ipv4/conf/all/hidden
0
# ipvsadm -A -t 192.168.0.190:80 -s wlc
# ipvsadm -a -t 192.168.0.190:80 -r 192.168.0.166:80 -g
# ipvsadm
IP Virtual Server version 0.9.9 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.190:www wlc
-> 192.168.0.166:www Route 1 0 0
-------
When I attempt to initiate a 'telnet [VIP] 80', the following shows up in
the debug logs (I'm not familiar with interpreting this) -
Feb 5 14:19:25 director last message repeated 64 times
Feb 5 14:19:28 director kernel: IPVS: lookup/in TCP
192.168.10.211:3180->192.168.0.190:80 not hit
Feb 5 14:19:28 director kernel: IPVS: lookup service: fwm 0 TCP
192.168.0.190:80 hit
Feb 5 14:19:28 director kernel: IPVS: ip_vs_wlc_schedule(): Scheduling...
Feb 5 14:19:28 director kernel: IPVS: WLC: server 192.168.0.166:80
activeconns 0 refcnt 1 weight 1 overhead 0
Feb 5 14:19:28 director kernel: IPVS: Bind-dest TCP c:192.168.10.211:3180
v:192.168.0.190:80 d:192.168.0.166:80 fwd:R s:NONE flg:183 cnt:0 destcnt:2
Feb 5 14:19:28 director kernel: IPVS: Schedule fwd:R s:NONE
c:192.168.10.211:3180 v:192.168.0.190:80 d:192.168.0.166:80 flg:1C3 cnt:2
Feb 5 14:19:28 director kernel: IPVS: TCP input [S...]
192.168.0.166:80->192.168.10.211:3180 state: NONE->SYN_RECV cnt:2
Feb 5 14:19:29 director kernel: IPVS: lookup/in TCP
192.168.10.211:1054->192.168.0.167:22 not hit
-------
And 'netstat -an' reports -
tcp 0 0 192.168.0.190:80 192.168.10.211:4066 SYN_RECV
But never progresses. On the other hand, when I attempt a connection to the
Realserver IP directly, it answers as expected.
tcp 0 0 192.168.0.166:80 192.168.10.211:4065 TIME_WAIT
telnet 192.168.0.166 80
Trying 192.168.0.166...
Connected to 192.168.0.166.
Escape character is '^]'.
get /
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
get to /index.html not supported.<P>
Invalid method in request get /<P>
</BODY></HTML>
Connection closed by foreign host.
telnet 192.168.0.190 80
Trying 192.168.0.190...
Connected to 192.168.0.190.
Escape character is '^]'.
get /
^]
telnet> quit
Connection closed.
-=-=-=-
I'm not certain if I used the correct patch on the director, and this is my
first attempt at an LVS setup under 2.4, so I would certainly appreciate any
assistance, suggestions, or pointers to the correct section of an existing
HOWTO. ;)
Please let me know if you need the values of anything under /proc - I only
mentioned the ones I felt might affect my particular setup and it's
troubleshooting.
Thanks again for any assistance!
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|