Forum Discussion
SNAT Pool selection Irule
I've had an odd request through an F5 which might or might not be possible. Its a tricky scenario so bare with me. We have 2 large WAN circuits, one in use, 1 as backup from different providers. They want to use the F5 to split the traffic down both links via different ips. (why they can't use routing I don't know, but lets assume they can't).
What I want to do is:- 1) create a snat pool test1 10.0.0.4 for example 2) create a snat pool test2 10.0.0.5 3)create a pool with 2 members these being 10.0.0.2 and 10.0.0.3 with ICMP monitor (these would actually be the wan interfaces) LB would be Round Robin
create a VIP with the pools set up as above and this irule
when LB_SELECTED { If { [IP::addr [LB::server addr] equals 10.0.0.2] }{ snatpool test1 } If { [IP::addr [LB::server addr] equals 10.0.0.3] }{ snatpool test2 } }
what I need to know is do you think this would then sent all 10.0.0.2 destined traffic from a 10.0.0.4 address and all 10.0.0.3 destined traffic from a 10.0.0.5 address?
Then if a wan link failed the pool member would be down and all traffic would go over the other link with its associated snat address?
Does the irule look rights. This is all weird and theoretical to me but it makes sense in my head. As I say I don't know why they don't just route it but I assume its something to do with the provider only routing 1 address because they are different providers.
Thanks
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi,
the irule seams good but a elseif is better than a second if, and "if" is in lower case.
when LB_SELECTED { if { [IP::addr [LB::server addr] equals 10.0.0.2] }{ snatpool test1 } elseif { [IP::addr [LB::server addr] equals 10.0.0.3] }{ snatpool test2 } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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