Forum Discussion
aquispe17_31055
Nimbostratus
May 20, 2018iRule to forward traffic based in state pool member
Hi eveyone,
I have my F5 connected with 3 Internet Service Provider.
I have a pool with 3 pool members: Router Provider A, Router Provider B and Router Provider C.
I have an irule to take decision ab...
Simon_Blakely
Employee
May 20, 2018So you have a gateway pool, with gateway_icmp monitors (maybe with a transparent monitor).
You need to select the appropriate SNAT IP address based on the selected outgoing router.
I would apply priority group settings so that you have a preferred router (10.0.0.1) and fallback routers (10.0.0.2, 10.0.0.3).
Then use an irule similar to the following: when CLIENT_ACCEPTED {
if {[LB::status pool default_gateway_pool member 10.0.0.1 0] eq "up"}
Preferred router 10.0.0.1 up, so use correct SNAT
{ snat 10.1.0.1 }
elseif {[LB::status pool default_gateway_pool member 10.0.0.2 0] eq "up"}
Preferred Router not up, Fallback1 router 10.0.02 up,
{ snat 10.2.0.1 }
elseif {[LB::status pool default_gateway_pool member 10.0.0.3 0] eq "up"}
Preferred router, Fallback1 router not up,
{ snat 10.3.0.1 }
}
I hope this helps.
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
