Forum Discussion
James_Thomson
Employee
Apr 11, 2005intelligent SNAT using server_selected
I read post http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=1540 and it was helpful. I am trying to do the same type of thing, but add 1 more piece. I have a BIG-IP with ext...
unRuleY_95363
Apr 12, 2005Historic F5 Account
Yes, SERVER_SELECTED was replaced by LB_SELECTED along time ago, docs has just been playing catchup.
My only other concern is your comparison of IP addresses. It doesn't work to simply use '==' or '!=' as Tcl treats those as string comparisons. Obviously with network masks, this doesn't apply very well. So, there is a command IP::addr that is used for comparing IP addresses.
Here is your example updated to use IP::addr for the comparisons:
when LB_SELECTED {
if {[IP::addr "[IP::client_addr]/24" equals "[IP::server_addr]/24"]} {
snat automap
} else {
snat none
}
}
At this point, I'm not certain if IP::server_addr is available at the time of LB_SELECTED or if you need to get it from the "LB::server addr" command.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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