Forum Discussion
SSHSSH_97332
Jan 07, 2012Nimbostratus
IRule To Source Nat based on Load Balanced Pool
i want to source nat based on the Pool choosen for load balancing
ie :
1-if choosen pool for load balancing is PoolX , source nat using snat-pool-X
2- if if choosen pool for load balancing is PoolY , source nat using snat-object-Y ( thsi SNAt object contains mapping between Origin address & translation address
Can some one help me to get this IRule ?
- hooleylistCirrostratusHi sshssh,
when LB_SELECTED { Check the selected pool name switch [LB::server pool] { pool1 { LB pool was pool1, so select the corresponding snat pool snatpool pool1_snatpool } pool2 { snatpool pool2_snatpool } default_pool { LB pool was not pool1 or pool2, so select a default snat pool snatpool default_snatpool } } }
- SSHSSH_97332NimbostratusThanks alot
- nitassEmployeee.g.
when LB_SELECTED { Check the selected pool name switch [LB::server pool] { pool1 { LB pool was pool1, so select the corresponding snat pool if {[IP::addr [IP::client_addr] equals X.X.X.X]} { snatpool Y } else { snatpool pool1_snatpool } } pool2 { snatpool pool2_snatpool } default_pool { LB pool was not pool1 or pool2, so select a default snat pool snatpool default_snatpool } } }
- SSHSSH_97332NimbostratusThanks alot , last question , what is the difference between "if" & "switch"
- nitassEmployeewhat is the difference between "if" & "switchJoe has written good article about them. hope it is helpful.
- SSHSSH_97332NimbostratusThanks , it is perfect
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