LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] LVS-NAT - Problem with round robin

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] LVS-NAT - Problem with round robin
From: "pierrick grasland" <pierrick.grasland@xxxxxxxxx>
Date: Fri, 14 Mar 2008 11:49:33 +0100
Hello,

I'm actually trying to setup my first LVS from scratch, so I'm currently
testing with NAT. (System for director : debian etch, kernel 2.6.18-5-k7,
with ipvsadm 1.24 for ipvs1.21 (standard package in debian repository))

After following instructions in the wiki and the howto, I obtain the
following configuration with one client, the director and one realserver :

*client
192.168.1.209
|
|
-------192.168.1.231 / 192.168.2.231 director
|
|
192.168.2.2
realserver*

After some trials (I had to handle ICMP_redirect, because I only have one
physical network, and one network card on my director), my setup is working
in this configuration for tcp on port 80, and a basic OPTIONS message for
SIP (on port 5060)

But now, I'm working on the next step, with 2 realservers :

*client
192.168.1.209
|
|
-------192.168.1.231 / 192.168.2.231 director
|
|
|
---------192.168.2.3 realserver2
|
192.168.2.2
realserver1*

So, based on my previous setup, I actually try the following configuration :

*director:~# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
UDP  192.168.1.231:sip rr
  -> 192.168.2.2:sip              Masq    1      0          0
  -> 192.168.2.3:sip              Masq    1      0          0
TCP  192.168.1.231:sip rr
  -> 192.168.2.2:sip              Masq    1      0          0
  -> 192.168.2.3:sip              Masq    1      0          0
TCP  192.168.1.231:www wlc
  -> 192.168.2.2:www              Masq    1      0          0*

Just a classic round robin, without weight, for UDP on 5060 (no persistence,
nothing particular, just a SEND / REPLY test with an OPTIONS for SIP).

But, when I test this configuration, I only reach one realserver, and no
message are scheduled to the other

*Tcpdump | grep sip :*

*
director:~# tcpdump | grep sip
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
11:39:26.957524 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:26.957545 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:26.960106 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:26.960126 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:28.961514 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:28.961538 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:28.963505 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:28.963523 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:30.963117 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:30.963127 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:30.965067 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:30.965077 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:32.964288 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:32.964300 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:32.966314 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:32.966329 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:34.965530 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:34.965539 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:34.967514 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:34.967529 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:36.966793 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:36.966810 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:36.968854 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:36.968869 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:38.968410 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:38.968419 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:38.970371 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:38.970379 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:40.970842 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:40.970854 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:40.972820 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:40.972834 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:42.972524 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:42.972532 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:42.975148 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:42.975156 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
11:39:44.974240 IP 192.168.1.209.sip > 192.168.1.231.sip: SIP, length: 302
11:39:44.974253 IP 192.168.1.209.sip > 192.168.2.2.sip: SIP, length: 302
11:39:44.976160 IP 192.168.2.2.sip > 192.168.1.209.sip: SIP, length: 326
11:39:44.976173 IP 192.168.1.231.sip > 192.168.1.209.sip: SIP, length: 326
193 packets captured
193 packets received by filter
0 packets dropped by kernel*


When I check the log for my service, I have confirmation of the tcpdump :
realserver1 get all, realserver2 get nothing.

So, if someone have an hint in order to resolve this problem, thanks.

PS : I also try with lc, but it's the same, only one get traffic)


-- 
Grasland Pierrick
ENSSAT - LSI 3

<Prev in Thread] Current Thread [Next in Thread>