Persistence across multiple virtual servers.

I have gotten the following request to configure multiple tcp ports for the same load balanced pool. Also, once a client makes a connection over any of the ports, it should choose that same server for any of the other ports. Is this possible? So basically (Just generic IP addresses below in example),

Virtual Server 1 = 192.168.0.20:437

Virtual Server 2 = 192.168.0.20:4437

Virtual Server 3 = 192.168.0.20:10337

These all back end the nodes

Pool 1 = 192.168.1.10:437,192.168.1.11:437,192.168.1.12:437

Pool 2 = 192.168.1.10:4437,192.168.1.11:4437,192.168.1.12:4437

Pool 3 = 192.168.1.10:10337,192.168.1.11:10337,192.168.1.12:10337

So if we start a connection and it goes to 192.168.1.10:437, all additional 4437 and 10337 should go to 192.168.1.10.

If this is possible, I am guessing it is an iRule? Any help would be greatly appreciated.

I’ve never tested this, but this persistence option might work:

match-across-virtuals         Specifies, when enabled, that all persistent connections from the same client IP address go to the same node. The default value is disabled.

So if you are using cookie persistence, say:

create ltm persistence cookie test { match-across-virtuals enabled }

Then that persistence profile would be added to each of the virtuals in question. You could do it via an iRule too, but if the above works, that would certainly be easier to support.