LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] local forwarding method not working

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] local forwarding method not working
From: "Matías E. Fernández" <matias.fernandez@xxxxxxx>
Date: Fri, 13 Dec 2013 13:01:18 +0100
Dear lvs-users

We use LVS extensively with Keepalived for running redundant
load balanced setups. As part of the load balancer we sometimes
use what is called a sorry_server in Keepalived. This maps to a 
local real server in LVS speak.

In recent versions we have found a change in behaviour that
seems to break that functionality of a local sorry_server. It boils
down to LVS not setting the forward mode to "Local" for addresses for
which there interfaces on the local node.

See the following examples. First on a Ubuntu 10.04.4 LTS:

# uname -a
Linux ubuntuserver1004 2.6.32-54-server #116-Ubuntu SMP Tue Nov 12 19:37:57 UTC 
2013 x86_64 GNU/Linux

# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
 -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.10.0.2:80 wlc
 -> 127.0.0.1:80                 Local   1      0          0         

In this example the forward mode is correctly set to "Local". In newer
versions this doesn't seem to work any more:

# uname -a
Linux ubuntuserver1204 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 
18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

# ipvsadm -A -t 10.10.0.2:80
# ipvsadm -a -t 10.10.0.2:80 -r 127.0.0.1
# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
 -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.10.0.2:80 wlc
 -> 127.0.0.1:80                 Route   1      0          0         

Note that in this later cate the forward mode in the second example
has *NOT* been set to "Local".

This behaviour contradicts the documentation in the manual, which states:

> Regardless of the packet-forwarding mechanism specified, real servers for 
> addresses for  which  there  are interfaces on the local node will be use 
> the local forwarding method, then packets for the servers will be passed to 
> upper layer on the local node. This cannot be specified by ipvsadm, rather  
> it  set  by  the  kernel  
> as  real servers are added or modified.

Is the observed behaviour desired or a bug in LVS or even the Kernel?

Regards
Matías



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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