Forum Discussion

Bryan_Chick_152's avatar
Bryan_Chick_152
Icon for Nimbostratus rankNimbostratus
Jan 04, 2007

Redirecting Based on Server Port

Hi all,

 

 

Can someone kindly assist with the following iRule conversion. The existing iRule redirects traffic to one of three pools based on server port:

 

 

Existing iRule

 

==============

 

 

if (server_port == 2702) {

 

use pool orbix-qa-2702.vwoa.na.vwg

 

}

 

else if (server_port == 2802) {

 

use pool orbix-qa-2802.vwoa.na.vwg

 

}

 

else {

 

use pool orbix-qa.vwoa.na.vwg

 

}

 

 

 

We came up with a new iRule to replace this (not sure if it is correct). The new iRule, however, limits redirects for TCP-based traffic and we need it to redirect for ALL types of traffic. Can someone advise on the following:

 

 

1.) Is syntax of New iRule correct?

 

2.) How can we not limit the redirects to TCP-based traffic?

 

 

 

Our new iRule

 

=============

 

 

rule orbix_qa_rule_1 {

 

if { [TCP::server_port] == 2702) } {

 

pool orbix-qa-2702.vwoa.na.vwg

 

}

 

elseif { [TCP::server_port] == 2802 } {

 

pool orbix-qa-2802.vwoa.na.vwg

 

}

 

else {

 

use pool orbix-qa.vwoa.na.vwg

 

}

 

}

 

}
No RepliesBe the first to reply