I see. I haven't tested this, but I think you could use the default load balancing algorithm to choose the pool member IP address and then change the destination port based on the last octet of the requested IP address.
LB_SELECTED is an event triggered when a load balancing decision is made. You can get details on the other commands on the iRule wiki (
Click here).
when LB_SELECTED {
log local0. "[IP::client_addr]:[TCP::client_port]: Request to VS [IP::local_addr]:[TCP::local_port]\
Default selection: [LB::server]"
Use the node command to change the destination port of the selected pool member
node [LB::server addr] [getfield [IP::local_addr] "." 4]
log local0. "[IP::client_addr]:[TCP::client_port]: Changing to node:\
[LB::server addr] [getfield [IP::local_addr] "." 4]"
}
Aaron