[lvs-users] Fallback directive in ldirectord - what does it actually do?

Simon Oxwell s.oxwell at murdoch.edu.au
Sat Jul 19 10:32:46 BST 2008

Simon Horman wrote:
> On Sat, Jul 19, 2008 at 03:31:53PM +0800, Simon Oxwell wrote:
>> Simon Horman wrote:
>>>> So, what is it that I've got misconfigured? Or is it a case of not 
>>>> understanding what it is that the fallback directive actually does in 
>>>> this case?
>>> Can you try setting apache to listen on
>>> The connections from end-users should have that as their source IP address
>>> and port at the time that they are received by apache.
>> Yep, I can do that, and that works, but I'm not understanding why it 
>> works, particularly as it doesn't seem to matter what port I set in the 
>> in fallback directive - works just as well as
>> Is it that ipvs passes the packet through the kernel 'normally' (not 
>> quite sure of the correct terminology) when the server-address is 
>> localhost, rather than rewriting/forwarding the packet when it gets 
>> picked up on the INPUT chain?
> Yes, that is likely the case.
> I did hack up some code a while back to give the behaviour that
> you were expecting, but perhaps its not merged. You can easily tell
> by running ipvsadm -Ln. If it says, then that is what
> it is using, regardless of what you asked for. If that is the case,
> could you let me know which kernel version you have (uname -a) and
> I'll chase down what became of my patch.

I changed the VIP port to port 81, made apache listen on port 81, and 
set the fallback to

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP lc persistent 600
   ->             Masq    0      0          0
   ->             Masq    0      0          0
   ->                Local   1      0          0

And that works, so ipvs isn't remapping the port all (i've got nothing 
listening on port 800) - it's just being a transparent pass-through, 
like for any non-ipvs managed ip:port.

(it's 2.6.18 kernel, specifically the 2.6.18-6-686 debian package)

Thanks for your help.


o Simon Oxwell -- Database & Systems Administrator --- IT Services o
| s.oxwell at murdoch.edu.au                 Science & Computing 1.37 |
| Phone: +61 8 9360 7335                        Murdoch University |
o-----o  "The lesson here is that dreams inevitably lead to  o-----o
           hideous implosions" - Miss Bitters, 'Invader Zim'

More information about the lvs-users mailing list