Forum Discussion
Harris_Hassan_3
Nimbostratus
Nov 08, 2007redirecting 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
- Deb_Allen_18Historic F5 AccountThe best way would be to create protocol-specific virtual servers, one specifying protocol UDP and one specifying TCP. Since SCTP is the only other supported transport protocol for Standard VS, if you want to specify VS for others, you'd have to be using a Forwarding VS, rather than Standard VS LBing to a pool.
- Harris_Hassan_3
Nimbostratus
Thanks a lot for the reply , much appreciated. I could post a visio document of flow but dunno if it's allowed in here. Only private IP's are shown so not much of a security issue i guess. - Harris_Hassan_3
Nimbostratus
Was thinking about your reply , while traffic flow still can't be done without iRules , the TCP/ UDP separation can. - Harris_Hassan_3
Nimbostratus
Alrite , tested out by seperating the VS. Didn't work as a standard VS as expected , but managed to get the setup running via a wildcard VS. Thanks - Deb_Allen_18Historic F5 AccountExcellent, glad to help
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