Mailing List Archive

[lvs-users] udp sessions
I have been testing an LVS setup on Ubuntu 12.04, and have it mostly
working. I am trying to balance UDP sessions. Currently my setup works,
but it assumes all packets from a single source IP address and different
source ports are the same session. If I make two connections from
different source IP's, everything works great. Is there a setting or
something I am missing which will make the UDP sessions be based on both
source IP and source port?

Example:

connection 1: 192.168.1.10:3219
connection 2: 192.168.1.10:5319
connection 3: 192.168.1.11:3219

With these three connections, connection 1 and 2 will be seen as the same
session and sent to the same real server, while connection 3 will be seen
as new and sent to the appropriate real server based on the scheduling
algorithm. I would really like to be able to use LC scheduling, and have
all three of these go to three different real servers.
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] udp sessions [ In reply to ]
Alright, I have a little better understanding of my problem. It seems that
with out turning on persistence, each connection from the same source IP
and different source port gets sent to a different real server. Until the
UDP connection times out, this works perfectly for me. Problem being that
with out persistence, the session doesn't stay as long as traffic is seen.
Even if there is traffic, the session will time out and then the server
could change. As soon as I turn on persistence to keep the session alive
with traffic, it starts grouping all ports from a single host together.

Is there any set of options which will reset the timeout for the UDP
connection, while not grouping different source ports into a single session?

I have currently placed a BSD box with PF running in front of my lvs
server. With PF I can source nat traffic to multiple different source
IP's, including traffic which comes from the same source IP with different
source ports. Doing this before hitting lvs allows me to use persistence
again, as I have now created individual source IP's for each connection.
It would just be much cleaner with out an additional firewall doing
translation first.




On Thu, Jun 12, 2014 at 7:48 AM, sangdrax8 <sangdrax8@gmail.com> wrote:

> I have been testing an LVS setup on Ubuntu 12.04, and have it mostly
> working. I am trying to balance UDP sessions. Currently my setup works,
> but it assumes all packets from a single source IP address and different
> source ports are the same session. If I make two connections from
> different source IP's, everything works great. Is there a setting or
> something I am missing which will make the UDP sessions be based on both
> source IP and source port?
>
> Example:
>
> connection 1: 192.168.1.10:3219
> connection 2: 192.168.1.10:5319
> connection 3: 192.168.1.11:3219
>
> With these three connections, connection 1 and 2 will be seen as the same
> session and sent to the same real server, while connection 3 will be seen
> as new and sent to the appropriate real server based on the scheduling
> algorithm. I would really like to be able to use LC scheduling, and have
> all three of these go to three different real servers.
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] udp sessions [ In reply to ]
Hello,

On Thu, 12 Jun 2014, sangdrax8 wrote:

> Alright, I have a little better understanding of my problem. It seems that
> with out turning on persistence, each connection from the same source IP
> and different source port gets sent to a different real server. Until the
> UDP connection times out, this works perfectly for me. Problem being that
> with out persistence, the session doesn't stay as long as traffic is seen.
> Even if there is traffic, the session will time out and then the server
> could change. As soon as I turn on persistence to keep the session alive
> with traffic, it starts grouping all ports from a single host together.
>
> Is there any set of options which will reset the timeout for the UDP
> connection, while not grouping different source ports into a single session?

Perhaps

ipvsadm --set 0 0 UDP_TIMEOUT_SECONDS

to modify just the timeout used for UDP connections.

man ipvsadm

Regards

--
Julian Anastasov <ja@ssi.bg>

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

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