Forum Discussion

Paul_Slosberg_8's avatar
Paul_Slosberg_8
Historic F5 Account
May 17, 2007

A better way

Greetings,

Im trying to grab the last octect of the client adress so I can then use that to send the thraffic to the proper pool. I will have 254 pools that I need to send traffic too. Im trying to use variables to stream line this i-Rule any help or sugestions would be great. I will be using a nework virtual server and 254 port spcific pools. ie (4001-4254)


when CLIENT_ACCEPTED {
set port_info [getfield [IP::client_addr] "." 4]
set poolname "mypool_"
if  
{ $port_info matches_regex "[ 1-9]"}
{ pool $poolname400$portinfo } 
elseif
{ $port_info matches_regex "[ 10-99]"}
{pool $poolname40$port_info}
else 
{ $port_info matches_regex "[ 100-254]"}{
pool $poolname4$portinfo}
   }
 }

13 Replies