Forum Discussion
MiLK_MaN
May 02, 2012Nimbostratus
You have a few options, but the best two will to either use a switch statement, or use a data group.
By using the switch command, you can do something like:
switch [IP::client_addr] {
"1.1.1.1" { snatpool Y }
"2.2.2.2" { snatpool Y2 }
etc...
}
You can add a default statement at the end to catch anything that is not matched.
If you want to create a data group, you can create one with a type of string, with a name := value pair of client IP := snatpool name.
Then, an iRule with something like:
if { [set snatpoolname [class lookup [IP::client_addr] ] ne "" } {
snat $snatpoolname
} else {
}