LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Missing default gw and the simplest lvs_nat

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Missing default gw and the simplest lvs_nat
From: "McGuire, Dennis" <dmcguire@xxxxxxxxxxxx>
Date: Thu, 17 Jan 2002 20:23:00 -0600
Hello,
I am trying to setup a two-nic-two-network single director lvs_nat using
telnet as directed in the howto/mini-howto, but have a problem I can't seem
to resolve.  I'll give you the problem up front, then supply info.

Problem:  telnet only works from CIP to VIP when I add my default route back
to the director box after it is removed by the configure script.

ipvsadm is:
[root@devlvsn01 configure-lvs_0.9.2]# ipvsadm --v
ipvsadm v1.19 2001/08/27 (compiled with getopt_long and IPVS v0.9.3)

director is: 
[root@devlvsn01 configure-lvs_0.9.2]# uname -a
Linux devlvsn01.brierley.com 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001
i686 unknown
    N.B. - this is Mandrake 8.1, which comes pre-compiled with ip_vs and
suppplies ipvsadm.

realserver is:
Win2K, SP2.  RIP's defgw is the DIP. I used the '254' interface metric trick
on the MS loopback adapter, which has the VIP assigned to it with a /24
mask.

# #############################################
               ________
              |        |
              | client |
              |________|
           CIP=eth0 192.168.12.47/24
                  |
                  |
        VIP=eth0:2236 192.168.22.36/32
              __________
             |          |
             | director |
             |__________|
        DIP=eth1   192.168.200.37/24
                  |
                  |
                  |
         -------------------
         |                 
         |                 
     RIP1=eth0         
    192.168.200.39/24      
   ______________   
  |              |  
  | realserver1  |  
  |______________|
# #############################################
ip_forwarding is on:
[root@devlvsn01 configure-lvs_0.9.2]# cat /proc/sys/net/ipv4/ip_forward
1
# #############################################
 
netstat -rn *BEFORE* I run the configure script:
[root@devlvsn01 configure-lvs_0.9.2]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.22.0    0.0.0.0         255.255.255.0   U        40 0          0
eth0
192.168.200.0   0.0.0.0         255.255.255.0   U        40 0          0
eth1
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo
0.0.0.0         192.168.22.1    0.0.0.0         UG       40 0          0
eth0 
# #############################################

contents of bp.conf, my comment-less copy of
lvs_nat.conf.two_NIC_two_network:
[root@devlvsn01 configure-lvs_0.9.2]# cat bp.conf
#----------lvs_nat.conf------------------------------------
LVSCONF_FORMAT=1.1
LVS_TYPE=VS_NAT
INITIAL_STATE=on
CLEAR_IPVS_TABLES=yes
VIP=eth0:2236 192.168.22.36 255.255.255.255 192.168.22.236
DIP=eth1 192.168.200.37 192.168.200.0 255.255.255.0 192.168.200.255
DIRECTOR_GW=192.168.22.1
SERVICE=t telnet rr 192.168.200.39:23
SERVER_NET_DEVICE=eth0
#----------end lvs_nat.conf---------------------------------
# #############################################

netstat -rn *AFTER* running configure script:
[root@devlvsn01 configure-lvs_0.9.2]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.22.36   0.0.0.0         255.255.255.255 UH       40 0          0
eth0
192.168.22.0    0.0.0.0         255.255.255.0   U        40 0          0
eth0
192.168.200.0   0.0.0.0         255.255.255.0   U        40 0          0
eth1
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo
# #############################################

As expected, I see the VIP has been added.  The default gw is now gone...

I cannot telnet from the CIP to the VIP, nor can I ping the VIP.  If I go to
the director and add the default route back ('route add default gw
192.168.22.1'), I can ping the VIP and telnet works (I get a banner and I
see an incremented Active Connections in ipvsadm).

Am I supposed to add back the default route, or is that the wrong thing to
do?  Do I have some other problem that I'm not seeing?  I've read & re-read
the howto & mini-howto, searched the list archives, and gone over & over my
environment.  I'm embarrassed to say I can't figure out what's supposed to
be the simplest install.

Thanks in advance!

Dennis McGuire


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