Forum Discussion
Dustin_132959
Nimbostratus
Sep 30, 20141 VIP multiple ports different pools
I have done some research on this and can't seem to find a good way to achieve what I am looking for. I have a scenario where a single VIP must be routed to 3 different nodes based on the port (appr...
jgranieri
Nimbostratus
Oct 01, 2014we had a similar situation... this is what we did:
Code
`
This event is triggered when a client -> BigIP connection is established
when CLIENT_ACCEPTED {
` Look in the Clear or the SSL Pools for the TCP port
if { [ class match [TCP::local_port] equals Data_group1 ] } {
Disable SSL, assign the pool from the class (and optionally log the pool selection)
SSL::disable
set app_pool [class match -value -- [TCP::local_port] equals Data_group2 ]
pool $app_pool
if { $static::LOG_ACCEPTED_REQ == 1 }{
log local0. "Cleartext pool selected: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port] -> $app_pool"
}
} elseif { [ class match [TCP::local_port] equals Data_group1 ] } {
Assign the pool from the class (and optionally log the pool selection)
set app_pool [class match -value -- [TCP::local_port] equals Data_group2 ]
pool $app_pool
}
} else {
discard
if { $static::LOG_DROPPED_REQ == 1 }{
log local4.info "No pool selected: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]"
}
}
`
}
`CodeHelp 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