LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: LVS-NAT configuration problem

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: LVS-NAT configuration problem
From: "Madhav" <msp@xxxxxxxxxxxx>
Date: Wed, 4 Apr 2001 10:50:33 +0530
Hi all,
    Here I am giving more details. I have one director. and two real
servers.
director(eth0:172.16.30.75& gateway 172.16.0.1, eth1:10.1.10.9 &gateway
10.1.10.100,
eth0:0 172.16.30.76 & gateway 172.16.0.1).
server1(eth0:10.1.10.10, gateway 10.1.10.100)
server1(eth0:10.1.10.11, gateway 10.1.10.100)
All are Redhat 6.1 distributions.(kernel -2.2.12-20)
I am using ipvsadm 0.8.3.
--------------------------------------------------------
[root@director /root]# ipvsadm -L -n | head -1
IP Virtual Server version 0.8.3 (size=4096)
------------------------------------------------
[root@director /root]# ipvsadm -h | head -1
ipvsadm  v1.1 1999/7/1
-----------------------------------------------------------

I connected the eth1 of director and eth0 of both server1 and server2 to a
hub. yes I got a hub yesterday night.
I connected the eth0 of director to my LAN(gateway 172.16.0.1). So It is
nothing but the setup given in LVS-NAT diagram.
I gave the following commands :
-----------------------------------------------------------
 echo 1 > /proc/sys/net/ipv4/ip_forward
 /sbin/ipchains -A forward -j MASQ -s 10.1.10.9/8 -d 0.0.0.0/0
 ipvsadm -A -t 172.16.30.76:23 -s wlc
 ipvsadm -a -t 172.16.30.76:23 -R 10.1.10.10:23 -m
 ipvsadm -a -t 172.16.30.76:23 -R 10.1.10.11:23 -m
--------------------------------------------------------------------
 My director is having two ethernet cards. The ifconfig output is :
----------------------------------------------------------------------------
-----------
eth0      Link encap:Ethernet  HWaddr 00:A0:C9:CC:97:2E
          inet addr:172.16.30.75  Bcast:172.16.255.255  Mask:255.255.0.
eth0:0    Link encap:Ethernet  HWaddr 00:A0:C9:CC:97:2E
          inet addr:172.16.30.76  Bcast:172.16.255.255  Mask:255.255.0.0

eth1      Link encap:Ethernet  HWaddr 00:80:48:EE:E7:3E
          inet addr:10.1.10.9  Bcast:10.255.255.255  Mask:255.0.0.0

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
------------------------------------------------------------------------
and server1
eth0      inet addr:10.1.10.10  Bcast:10.255.255.255  Mask:255.0.0.0
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
-----------------------------------------------------------------
and server2
eth0      inet addr:10.1.10.11  Bcast:10.255.255.255  Mask:255.0.0.0

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
----------------------------------------------------------------------------
----------
ipchains -L gives the following
-------------------------------------------------------------
Chain input (policy ACCEPT):
Chain forward (policy ACCEPT):
target     prot opt     source                destination           ports
MASQ       all  ------  10.0.0.0/8           anywhere              n/a
Chain output (policy ACCEPT):
--------------------------------------------------------------
ipvsadm gives the following
---------------------------------------------
[root@director /root]# ipvsadm
IP Virtual Server version 0.8.3 (size=4096)
Protocol LocalAddress:Port Scheduler Flags
      -> RemoteAddress:Port    Forward Weight ActiveConn InActConn
TCP 172.16.30.76:23 wlc
      -> 10.1.10.11:23         Masq    1      0          1 <<<------- It is
showing the connection as inactive when I tried from a
client on LAN
      -> 10.1.10.10:23         Masq    1      0          0
----------------------------------------------------------------
My problem is that I could not connect from any client to the virtual IP
when I try to connect from any client in tha LAN.
I hope this helps to help me.
thanks in advance,
madhav



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