Forum Discussion
Pool Selection
I am trying to select a pool based on the server port the client tries to connect on. I am getting the below error. I am also posting the rule below as well. Thanks for any assistance.
iRule
when CLIENT_ACCEPTED { switch -glob [TCP::server_port] { "10320" { pool CloverLeaf-NADCLLINTSIN01C-Pool log local0. "Cloverleaf Matched 10.28.8.93"} "10870" { pool CloverLeaf-NADCLLINTSIN01B-Pool log local0. "Cloverleaf Matched 10.28.8.91"} default { discard } } }
Log Error
Wed Oct 23 15:41:02 CDT 2013 err local/tmm1 tmm1[5254] 01220001 TCL error: Cloverleaf-Port-Translation - Error: No serverside connection established (line 1) invoked from within "TCP::server_port"
4 Replies
- Kevin_Stewart
Employee
Assuming you mean the destination port of the VIP, you'd use TCP::local_port.
when CLIENT_ACCEPTED { switch -glob [TCP::local_port] { "10320" { pool CloverLeaf-NADCLLINTSIN01C-Pool log local0. "Cloverleaf Matched 10.28.8.93" } "10870" { pool CloverLeaf-NADCLLINTSIN01B-Pool log local0. "Cloverleaf Matched 10.28.8.91" } default { discard } } } - Joe_Curl_105786
Nimbostratus
Ok that helps. Thanks for the response. I tried that one and it did seem to work.
I have a question about the CLIENT_ACCEPTED. If I use that command will it run the rule every time a TCP connection is created or will it not run this if an existing connection is in the persistence table. I am trying to make it as efficient as I can. If I don't need to add the extra load on the F5 then I would like to avoid it if I can. Persistence is set to source address.
- Kevin_Stewart
Employee
The CLIENT_ACCEPTED is triggered on each new TCP handshake, regardless of persistence.
- Joe_Curl_105786
Nimbostratus
Ok, thanks again. That is what I thought.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com