Forum Discussion
Chris_Phillips
Mar 11, 2006Nimbostratus
A bit more work and it's a bit better and more efficient (I think)
when LB_SELECTED {
server_networks is a data group / class defined elsewhere
start with zero score
set snat_score 0
increase score if client is on server network
if {[matchclass [IP::client_addr] equals $::server_networks]} {
incr snat_score
}
increase score if server is on server network
if {[matchclass [LB::server addr] equals $::server_networks]} {
incr snat_score
}
if score is not 1 then client and server are on
same side of LTM, so SNAT is required
if { $snat_score != 1 } {
snatpool my_snatpool
}
}
Of course if i'm missing something really fundamental here about the need to SNAT then i'd appreciate advice!