Forum Discussion
SNAT and Next hop based on Node address
Hi vbhugra,
Please try follow step below,
1. You have to create pool with priority group less than 1 and prefer prioruty on direct node more than other node
2. Create irule below and apply to virtual server
when CLIENT_ACCEPTED {
if { [active_members your-pool] > 2 } {
snat automap
}
}
or
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals 10.222.45.252] } {
snat automap
}
}
https://clouddocs.f5.com/api/irules/LB__server.html
I hope this information will help you
Hello,
I tried what you mentioned but did not work. The thing I observed is my first condition is not working, the second one always works. So I assigned the priority 10.219.45.114 - 30 and 10.222.45.252 - 20. The Irule does not work. Whereas I changed the priority and moved 10.222.45.252 - 40, it works.
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals 10.219.45.114] } {
node 10.219.45.114
} else {
LB::reselect snat automap
LB::reselect nexthop /DBS/DBS_CLIENT_174 10.219.30.65
}
}
Recent Discussions
Related Content
* 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