Harris_Hassan_3
Nov 08, 2007Nimbostratus
redirecting all TCP and all UDP to different servers and routes
Hi ,
Appreciate the devcentral site , got a lot of good iRules samples from the tuorials and was implementing a setup for a customer. Basically it's a bunch Compression server for internet traffic.
Question , i'm not very familiar with iRules and managed to get one from your site , modded it a bit till i got this :
rule Redirect_Server_Pool {
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 0.0.0.0] } {
pool server_pool
}
It all works fine , all traffic hitting the LB will be routed to server pool (had to use iRules as customer was LB'ing links rather than servers).
Now , i'm required to filter based on TCP or others. It's simple enough if it's a specific port as i could [TCP::port XX] but how do you select all TCP ports then filter others out ? I guess the pseudocode of the new modded rule would be :
rule Redirect_Server_Pool {
when CLIENT_ACCEPTED {
if { port is TCP )
Reusing old code
rule Redirect_Server_Pool {
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 0.0.0.0] } {
pool server_pool
}
Reusing old code
else (if other types UDP , GRE ,ESP)
{ forward to another pool }
end
Appreciate any help. Thanks