Forum Discussion
Misty_Spillers
Nimbostratus
Sep 23, 2015Need an iRule to choose pool by port.
First of all this isn't http traffic so I can't use the http profile. (I tried, doesn't work)
I basically need an iRule that says something like this. I'll just write in the parts I don't know the ...
Brad_Parker
Cirrus
Sep 23, 2015Give this a try,
when CLIENT_ACCEPTED {
if {[TCP::local_port clientside] << 50000}{
pool pool1
}
else {
pool pool2
}
}
- Brad_ParkerSep 23, 2015
Cirrus
updated to use TCP::local_port clientside as it is more appropriate. - Misty_SpillersSep 23, 2015
Nimbostratus
Thank you for the quick response. If I wanted to look at source port instead, would I just change clientside to serverside? Sorry, the documentation I was given is confusing, want to make sure I could it either way. Thanks again! - Brad_ParkerSep 23, 2015
Cirrus
TCP::client_port would you give the clients source port. If you changed it to serverside, what you would have would be the source port of the LTM's connection to the backend server not the source port of the client's connection to the LTM.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects