Forum Discussion
Michael_60521
Nimbostratus
Dec 11, 2007send to pool-member by port-range
I have an problem to get it to work right.
I have made an VL om port any, with an default pool.
some ports have to go to one server ande some ports have to go to the other server. I have made an iroule (paste belowe) but it only works evry 2. time. I am not sure the iroule have any effekt, it might only use the LB bye the VL ???
when CLIENT_ACCEPTED {
set srv_port [TCP::local_port]
if { $srv_port >= 6740 and $srv_port <= 6749 } {
pool mpapp-pool member 10.10.66.22 $srv_port
log local0. "Client sent to $srv_port"
} elseif { $srv_port >= 6830 and $srv_port <= 6839 } {
pool mpapp-pool member 10.10.66.21 $srv_port
log local0. "Client sent to $srv_port"
} elseif { $srv_port >= 6860 and $srv_port <= 6869 } {
pool mpapp-pool member 10.10.66.22 $srv_port
log local0. "Client sent to $srv_port"
} elseif { $srv_port >= 6880 and $srv_port <= 6889 } {
pool mpapp-pool member 10.10.66.21 $srv_port
log local0. "Client sent to $srv_port"
} elseif { $srv_port >= 7000 and $srv_port <= 7009 } {
pool mpapp-pool member 10.10.66.22 $srv_port
log local0. "Client sent to $srv_port"
} else {
log local0. "no match on port $srv_port"
}
}
- hoolio
Cirrostratus
The rule looks fine. What does the client see on the request which fails? What logging do you see for a failure? - Michael_60521
Nimbostratus
I can see every 2. connection are LB to the other server (the wrong one), it seems for me that it is working with the default pool and not the iRoule. - Michael_60521
Nimbostratus
this is workin without an default pool :-)) - hoolio
Cirrostratus
That makes sense. A request which doesn't match any condition in the rule would be sent to the default pool of the VIP, if one is configured. If there isn't a default pool, the request will be dropped. - Patrick_Chang_7Historic F5 Accountswitch will consume less CPU than the elseif
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