Forum Discussion
Josh_41258
Apr 25, 2013Nimbostratus
Sure.
when RULE_INIT {
Use a local array to configure SNAT addresses.
These addresses do not need to be defined in a SNAT pool or elsewhere.
set static::snat_ips_FC-EX2010-DC1-CAS(0) 172.26.92.166
set static::snat_ips_FC-EX2010-DC1-CAS(1) 172.26.92.167
}
when CLIENT_ACCEPTED {
Calculate the crc32 checksum of the client IP
Use the modulo of the checksum and number of SNAT IPs to pick a SNAT IP
snat $static::snat_ips_FC-EX2010-DC1-CAS([expr {[crc32 [IP::client_addr]] % [array size static::snat_ips_FC-EX2010-DC1-CAS]}])
}