Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2001 14:56:30 +0900
From:      =?ks_c_5601-1987?B?uc7Dtr/4?= <cwmin@simplexi.com>
To:        <net@FreeBSD.ORG>
Subject:   LVS problem
Message-ID:  <000901c07f81$1323dcc0$b23fe7cb@chulwon>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C07FCC.82AE70A0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0006_01C07FCC.82AE70A0"


------=_NextPart_001_0006_01C07FCC.82AE70A0
Content-Type: text/plain;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: base64

ICAgICAgICAgDQogIA0K

------=_NextPart_001_0006_01C07FCC.82AE70A0
Content-Type: text/html;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PWtz
X2NfNTYwMS0xOTg3IiBodHRwLWVxdWl2PUNvbnRlbnQtVHlwZT4NCjxNRVRBIGNvbnRlbnQ9Ik1T
SFRNTCA1LjAwLjI2MTQuMzUwMCIgbmFtZT1HRU5FUkFUT1I+DQo8U1RZTEU+PC9TVFlMRT4NCjwv
SEVBRD4NCjxCT0RZIGJnQ29sb3I9I2ZmZmZmZj4NCjxESVY+PEZPTlQgc2l6ZT0yPiZuYnNwOyZu
YnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyA8QlI+Jm5ic3A7IA0KPC9G
T05UPjwvRElWPjwvQk9EWT48L0hUTUw+DQo=

------=_NextPart_001_0006_01C07FCC.82AE70A0--

------=_NextPart_000_0005_01C07FCC.82AE70A0
Content-Type: application/octet-stream;
	name="LVS problem"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="LVS problem"

Hello,

I am setting up a LVS/DR cluster with 2 nodes(FreeBSD), but It doesn't =
work.=20

Here is my network configuration;

                  Internet    (203.231.63.70 is Virtual IP)
                     |
                     | =20
                   Router  (203.231.63.0/24 network)
                     |
                     |  <-----  eth0 : 203.231.63.74  =20
                  LVS(Linux)=20
                     |  <-----  eth1 : 203.231.63.70 (VIP)=20
                     |
            ------------------
            |                |=20
          SVR1              SVR2  <-- Real Servers are FreeBSD =
4.2-RELEASE
=20
 fxp0 : 203.231.63.70     203.231.63.70  (VIP)
 fxp1 : 203.231.63.71     203.231.63.72  (Real IP)           =20
=20
----] in Load Valancing Server(203.231.63.74);
=20
  [root@ha1 log]# ifconfig -a
   eth0      Link encap:Ethernet  HWaddr 00:10:5A:80:D7:FF =20
             inet addr:203.231.63.74  Bcast:203.231.63.255  =
Mask:255.255.255.0
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    =20
   eth1      Link encap:Ethernet  HWaddr 00:10:5A:76:02:49 =20
             inet addr:203.231.63.70  Bcast:203.231.63.70  =
Mask:255.255.255.255
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        =20
   lo        Link encap:Local Loopback =20
             inet addr:127.0.0.1  Mask:255.0.0.0
             UP LOOPBACK RUNNING  MTU:3924  Metric:1
=20
  [root@LVS /]# route -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    =
Use Iface
  203.231.63.70   0.0.0.0         255.255.255.255 UH    0      0        =
0 eth1
  203.231.63.74   0.0.0.0         255.255.255.255 UH    0      0        =
0 eth0
  203.231.63.0    0.0.0.0         255.255.255.0   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         203.231.63.254  0.0.0.0         UG    0      0        =
0 eth0
 =20
  [root@LVS /]# sysctl -p     =20
  net.ipv4.ip_forward =3D 1       =20
  net.ipv4.conf.all.rp_filter =3D 1
  net.ipv4.ip_always_defrag =3D 0 =20
  kernel.sysrq =3D 0              =20

  [root@LVS /]# vi /etc/ha.d/conf/ldirectord.cf=20
  timeout=3D3                                      =20
  checkinterval=3D5                                =20
  autoreload=3Dno                                  =20
  fallback=3D127.0.0.1:80                          =20
  virtual=3D203.231.63.70:80                       =20
          real=3D203.231.63.71:80 gate 1           =20
          real=3D203.231.63.72:80 gate 1           =20
          service=3Dhttp                           =20
          request=3D"index.html"                   =20
          receive=3D"Test Page"                    =20
          scheduler=3Drr                           =20
          protocol=3Dtcp     =20
  =20
----] in Real Server(231.63.71,72);  =20
=20
 SVR1# ifconfig -a                                            =20
  fxp0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500    =

          inet 203.231.63.70 netmask 0xffffffff broadcast 203.231.63.70  =
                           =20
  fxp1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
          inet 203.231.63.72 netmask 0xffffff00 broadcast 203.231.63.255 =
=20
         =20
  SVR2 in the same way..

******* Problem:

 1. LVS dosen't forward http request packet to the real server..
 2. I don't know how FreeBSD(real server) can avoid arp request..

 About first problem:=20
=20
   Client try to connect 203.231.63.70:80, but LVS doesn't reply to that =
SYN packet.. :-(=20
=20
   There are 2 things that seems odd..
  =20
   First, When I start up ldirectord, output is like this..
=20
   [root@LVS /]# /etc/rc.d/init.d/ldirectord start
   Starting ldirectord [  OK  ]                    =20
   [root@LVS /]# vi /var/log/ldirectord.log =20
    ......
   [Tue Jan 16 13:47:48 2001..] Starting Linux Director Daemon           =
                                          =20
   [Tue Jan 16 13:47:48 2001..] Adding virtual server: 203.231.63.70:80  =
                                     =20
   [Tue Jan 16 13:47:48 2001..] Starting fallback server for: =
203.231.63.70:80                                =20
   [Tue Jan 16 13:47:49 2001..] Adding real server: 203.231.63.71:80 =
(1*203.231.63.70:80)                     =20
   [Tue Jan 16 13:47:49 2001..] Turning off fallback server for: =
203.231.63.70:80                             =20
   [Tue Jan 16 13:47:49 2001..] system(/sbin/ipvsadm -a -t =
203.231.63.70:80 -R 203.231.63.72:80 -g -w 1) failed
   [Tue Jan 16 13:47:49 2001..] Adding real server: 203.231.63.72:80 =
(2*203.231.63.70:80)                     =20
    ......     =20
   =20
   system(/sbin/ipvsadm -a -t 203.231.63.70:80 -R 203.231.63.72:80 -g -w =
1) failed    =20
   **Why this error occured?? What should I do to eliminate this error =
message??                                                                =
                                  =20
   =20
   Second, Here's my ipvsadm output:       =20
   [root@LVS /]# ipvsadm -L -n                                         =20
   IP Virtual Server version 0.9.7 (size=3D4096)                         =
                       =20
   Prot LocalAddress:Port Scheduler Flags                             =20
     -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
   TCP  203.231.63.70:www rr                                          =20
     -> 255.255.255.255:52199       Masq    4194304 0          0      =20
 =20
  Last output line seems wrong,, I think It should look like this.. =
right?
 =20
   TCP  203.231.63.70:www rr                                         =20
     -> 203.231.63.71:80            gate(?) 1       0          0     =20
     -> 203.231.63.72:80            gate(?) 1       0          0   =20
         =20
  **How can I fix this thing?? =20
 =20
 Second problem:
=20
   As you know.. in LVS cluster, real servers should not reply to arp =
request that=20
   asks VIP's MAC address.. Only LVS should reply to that arp request..
   I have an idea about it.. Let the real server reply to client's arp =
request(for VIP)=20
   with LVS's hardware address.. then all client's packet that towards =
VIP go to the LVS..
   That's a good idea..
   so I commanded like this..
  =20
   arp -s 203.231.63.70 00:10:5A:76:02:49 pub
  =20
   203.231.63.70 is VIP and 00:10:5A:76:02:49 is LVS's MAC address..
  =20
   I got a meessage :
    set: proxy entry exists for non 802 device=20
   =20
   without 'pub' flag :   =20
    set: can only proxy for 203.231.63.70
   =20
   ***What is this message means??=20
   ***ARP reply with another MAC address is impossible??
   ***How can I solve this arp problem??
  =20
 Thanks in advance..   
------=_NextPart_000_0005_01C07FCC.82AE70A0--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000901c07f81$1323dcc0$b23fe7cb>