LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: local routing problems

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: local routing problems
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Padraig Brady <padraig@xxxxxxxxxxxxx>
Date: Wed, 16 Jan 2002 17:31:11 +0000
Julian Anastasov wrote:

        Hello,

On Tue, 15 Jan 2002, Padraig Brady wrote:


        The trick you are trying works only when the port
is preserved, you can't alter the port. I'm not sure whether
ipvsadm should return error on such setup.


Ah it is a trick :-)

If you add the 127.0.0.1:port and also specify masq (-m)
it retains the port like I demonstrated before, but
if you dont specify -m it changes the port to be the
same as the virtualservice like you say is required.


        Yes, because only the NAT mode alters addresses/ports
in the packet. All other 3 methods don't change them
nor localnode performs port redirection like the ipchains
redirection. For LocalNode LVS just passes the packet to
the upper layers, without change.


So ipvsadm should at least be consistent in changing
the port in both cases and ALSO it should print a warning
saying it has done so.


        What I saw in your previous posting looks like a
problem: ipvsadm allows real server with localnode method
to have port different from the virtual server's port.


As you say the following does work:

TCP  172.24.1.156:112 lc
  -> 127.0.0.1:112                  Local   1      0          2

A small point is the server must bind(INADDR_ANY). Binding to
127.0.0.1 or 172.24.1.156 alone does not work?


        Hm, I assume that it should work with binding to ANY or
with VIP.


Also for completeness, this does not work (connection refused):

TCP  172.24.1.156:112 lc
  -> 172.24.1.156:112               Local   1      0          0


        I assume your service is listening correctly on
.156:112 or I'm missing something?


Yes it is listening correctly I think, let me double check...
Feck! sorry. Listening to 127.0.0.1 or VIP alone should work fine.
Don't mind me, stupid bug in my server.


What I'm trying to do is create a fallback realservice on the
director machine that can be added into any virtualservice as
appropriate, for e.g. to display a "sorry page" to a web client.
Any ideas?


        With localnode this real server can run only on the VIP/ANY:VPORT.


That's awkward, as it would be very handy to have a server
listening on 127.0.0.1:some_port. So what I will have to do is have
the server listening to 127.0.0.1:all_VPORTs (which subsequently has
to dynamically change the ports it listens on), Feck..

Thank you very much
for the info,

Padraig.



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