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?
> 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.
> thanks,
> Padraig.
Regards
--
Julian Anastasov <ja@xxxxxx>
|