LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Re: lvs-dr

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Re: lvs-dr
From: charles huang <charles-huang@xxxxxxxx>
Date: Fri, 7 Sep 2001 17:39:51 +0800
Joseph Mack,您好!

Hi! this is my lvs structure(lvs-dr,director: kernel 2.4.5 with patch 0.9.2, 
real-server: kernel 2.4.9 with patch hidden-2.4.5-1.diff):
                        ________
                       |        |
                       | client |
                       |________|
                           |
                        (router)(61.131.4.129)
                           |
             __________    |
            |          |   |    VIP=61.131.4.187 (eth0:0, arps)
            | director |---     DIP=61.131.4.170 (eth0)
            |__________|   |
                           |
                           |
          -------------------------------------
          |                |                  |
          |                |                  |
   RIP1=61.131.4.171 RIP2=61.131.4.172 RIP3=61.131.4.173 (eth0)
   VIP=61.131.4.187  VIP=61.131.4.187  VIP=61.131.4.187  (all dummy0:0, 
non-arping)
   _____________     _____________      _____________
  |             |   |             |    |             |
  | realserver |   | realserver |    | realserver |
  |_____________|   |_____________|    |_____________|
          |                |                  |
      (router)          (router)           (router)
          |                |                  |
          ---------------------------------------------->  to router
                                                           in front of
                                                           director
here is lvs_dr.conf(compile with configure 0.8)

#----------lvs_dr.conf----------------------------------------
LVSCONF_FORMAT=1.0
LVS_TYPE=VS_DR
INITIAL_STATE=on
CLEAR_IPVS_TABLES=yes
VIP=eth0:0 61.131.4.187 255.255.255.255 61.131.4.187
DIRECTOR_INSIDEIP=eth0 61.131.4.170 61.131.4.128 255.255.255.192 61.131.4.191
SERVICE=t http wrr 61.131.4.171,2 61.131.4.172,2 61.131.4.173,2
SERVER_VIP_DEVICE=dummy0:0
SERVER_NET_DEVICE=eth0
SERVER_GW=61.131.4.129
#----------end lvs_dr.conf------------------------------------

here is the ifconfig -a at director before run rc.lvs_dr:

#-------------------------------------------------
eth0      Link encap:Ethernet  HWaddr 00:30:48:41:04:08
          inet addr:61.131.4.170  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1011 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11

eth0:0    Link encap:Ethernet  HWaddr 00:30:48:41:04:08
          inet addr:61.131.4.187  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:30:48:41:04:09
          BROADCAST 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:100
          Interrupt:11 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          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
#--------------------------------------------------------------------

and route table:

#---------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.131.4.129    0.0.0.0         UG    0      0        0 eth0
#---------------------------------------------------------------------

and real-servers' ifconfig -a:
#---------------------------------------------------------------------
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          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

dummy0:0  Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:61.131.4.187  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:06:5B:19:90:2A
          inet addr:61.131.4.172  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1156 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:06:5B:19:90:2B
          BROADCAST 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:100
          Interrupt:10 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          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
#------------------------------------------------------------------

real-servers' route table:
#------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
61.131.4.128    *               255.255.255.192 U     0      0        0 dummy0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.131.4.129    0.0.0.0         UG    0      0        0 eth0
#-------------------------------------------------------------------

then run rc.lvs_dr on director and real-server(attachment is the echo of runing 
rc.lvs_dr on director and real-server), I found that the config of dummy0:0, 
eth0:0 are changed by rc.lvs_dr.
here is the config -a of director after run rc.lvs_dr:
#-------------------------------------------------------------------
eth0      Link encap:Ethernet  HWaddr 00:30:48:41:04:08
          inet addr:61.131.4.170  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12789 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3076 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11

eth0:0    Link encap:Ethernet  HWaddr 00:30:48:41:04:08
          inet addr:61.131.4.187  Bcast:61.255.255.255  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:30:48:41:04:09
          BROADCAST 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:100
          Interrupt:11 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
#------------------------------------------------------------------------------
route table:
#------------------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.187    *               255.255.255.255 UH    0      0        0 eth0
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
#-------------------------------------------------------------------------------

and real-servers:
#-------------------------------------------------------------------------------
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          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

dummy0:0  Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:61.131.4.187  Bcast:61.255.255.255  Mask:255.255.255.255
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:06:5B:19:90:2A
          inet addr:61.131.4.172  Bcast:61.131.4.191  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33208 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3216 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:06:5B:19:90:2B
          BROADCAST 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:100
          Interrupt:10 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          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
#--------------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.187    *               255.255.255.255 UH    0      0        0 dummy0
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.131.4.129    0.0.0.0         UG    0      0        0 eth0
#---------------------------------------------------------------------------

you can find that the config are changed, so I have to reset dummy0:0.
ifconfig dummy0:0 61.131.4.187 netmask 255.255.255.192 broadcast 61.131.4.191 up
then the route table is changed again.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
61.131.4.128    *               255.255.255.192 U     0      0        0 dummy0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.131.4.129    0.0.0.0         UG    0      0        0 eth0

reset eth0:0
ifconfig eth0:0 61.131.4.187 netmask 255.255.255.192 broadcast 61.131.4.191 up
route table also changed

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.131.4.128    *               255.255.255.192 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

Testing lvs, the speed of the client connecting lvs is very slowly, and ipvsadm 
shows entries in InActConn, but none in ActiveConn.
the route table is error?
                     致
礼!

            charles huang
            charles-huang@xxxxxxxx

Attachment: direct_rc.txt
Description: Binary data

Attachment: real_rc.txt
Description: Binary data

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