LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: bad config ?

To: Jerome BENOIST <jbenoist@xxxxxxxxxx>, IPPFVS Mailing List <linux-virtualserver@xxxxxxxxxxxx>
Subject: Re: bad config ?
From: Matthew Kellett <matthewk@xxxxxxxxxxxxxxxxx>
Date: Fri, 30 Apr 1999 09:43:05 -0400
Again, please take a look at the message I posted earlier in the week.  If you can't find it, e-mail me and I'll send it to you directly.

The idea is that the nodes have to be on a distinctly different subnet than the rest of the world.  The LinuxDirector acts as a router between the networks.  This should apply even in the case of tunnelling.  I've never done tunnelling before, but I would assume the following setup would work.

195.134.208.27 netmask 255.255.255.0  LinuxDirector outside interface (the interface the world sees)
195.134.1.1 netmask 255.255.255.0      LinuxDirector inside interface (the interface the slaves see)

You'll notice that the inside interface is on a different network (195.134.1.0) than the outside interface (195.134.208.27).  When a packet arrives that isn't addressed to the LinuxDirector, it checks to see if it belongs to any OTHER networks it's connected to.  If both interfaces are on the same network (195.134.208.0) it drops the packet in the input portion of the network code.  The port forwarding happens in the middle of the forwarding portion of the network code and will never be executed.

The nodes should be configured something like the following.  Someone should verify this.

195.134.1.11    Node 1 inside interface
195.134.208.51  Node 1 outside interface
195.134.1.12    Node 2 inside interface
195.134.208.52  Node 2 outside interface

I hope this helps.

Cheers,
Matthew

P.S: Wensong, it's time to start a FAQ.  I'll write up this explanation in HTML, possibly with pictures, and I'll send it to you in the next week or two so you can add it to the website.

Jerome BENOIST wrote:

My config don't work ???

Load Balancer :
ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  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

eth0      Link encap:Ethernet  HWaddr 00:60:08:6E:38:EF
          inet addr:195.134.208.27  Bcast:195.134.208.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:693 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0
          Interrupt:9 Base address:0xff00

eth1      Link encap:Ethernet  HWaddr 00:10:4B:BC:30:55
          inet addr:195.134.208.28  Bcast:195.134.208.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:630 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0
          Interrupt:9 Base address:0xf880

/proc/net/ip_pfvs
ippfvs (LinuxDirector) version 0.9pre1 (Tunneling, WRR, size=4096)
IP Port Forwarding & Virtual Server Table
Protocol Local Addr:Port ==>
                        Remote Addr           Weight ActiveConns
TotalConns
                        ...
UDP      195.134.208.28:80 ==>
                        195.134.208.51        1      0
0
                        195.134.208.50        1      0
0
TCP      195.134.208.28:80 ==>
                        195.134.208.51        1      2
2
                        195.134.208.50        1      2
2

Real Server 1 :
ifconfig

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  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

tunl0     Link encap:IPIP Tunnel  HWaddr
          inet addr:195.134.208.28  Mask:255.255.255.0
          UP RUNNING NOARP  MTU:1480  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

eth0      Link encap:Ethernet  HWaddr 00:10:5A:3E:17:ED
          inet addr:195.134.208.50  Bcast:195.134.208.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1589 errors:0 dropped:0 overruns:0 frame:0
          TX packets:825 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          Interrupt:10 Base address:0xfc80

Real Server 2 :
ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  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

eth0      Link encap:Ethernet  HWaddr 00:10:5A:3E:17:F5
          inet addr:195.134.208.51  Bcast:195.134.208.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1387 errors:0 dropped:0 overruns:0 frame:0
          TX packets:470 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          Interrupt:12 Base address:0x1280

tunl0     Link encap:IPIP Tunnel  HWaddr
          inet addr:195.134.208.28  Mask:255.255.255.0
          UP RUNNING NOARP  MTU:1480  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

The kernel of loadbalancer send message :
Apr 30 11:39:47 loadb kernel: eth1: Packet targetted at myself!
-----
Linux Virtual Server Project -- http://proxy.iinchina.net/~wensong/ippfvs
mailto: majordomo@xxxxxxxxxxxx  Body: un/subscribe linux-virtualserver

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