LeaV97_339056
Jun 07, 2018Nimbostratus
iRule with switch
I have an application that needs to be routed based on the incoming port . They have 5 different pools each with 25 ports. I'm thinking 1 VS with all ports open and then using an iRule to control the pool selection. I've found a lot of examples with 3-4 ports or a single port range but none with 125 ports in 5 different ranges. I'm looking at either a switch or a data group. Can you use a range in a switch? Can you use a range in a datagroup or does it have to be an exact match?
I'm sure my syntax is wrong but something like this:
when CLIENT_ACCEPTED { switch [TCP::local_port] { 10000-10024 { pool pool-site1 } 10025-10049 { pool pool-site2 } 10050-10074 { pool pool-site3 } default { pool default_pool } }