Forum Discussion
Please validate iRule to Load balance the traffic based on SNAT.
Hello Folks,
I need your help by verifying my iRule, responsible to SNAT the traffic generated from one Site (B) and going to another site (A), and should select specif pool to communicate further.
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals 1.1.1.0 mask 255.255.255.0] } {
snat 1.1.1.1
pool Test_Pool
}
else {pool Normal}
}
Brief information about customer setup.
- Client has 2 sites located on different geographic area.
- We are managing their network setup.
- Being an ISP, we are responsible to load balance all the traffic flowing between two sites.
- Now, they have configured their network in such a way, where SiteA should see only one specific IP address when SiteB tries to communicate with SiteA.
- At the same time, load balance should work for both the sites.
Please feel free to reply if you need any further informaiton to verify the iRule or share a better one.
- JRahmAdmin
Assuming that 1.1.1.1 is routable back to the site, looks fine. Just one tweak that will save 8% compute cycles on the IP comparison
when CLIENT_ACCEPTED { if [IP::addr [IP::remote_addr] equals 1.1.1.0/24] } { snat 1.1.1.1 pool Test_pool } else { pool Normal } }
I wrote up an article a while back on IP Comparison performance if interested.
- swo0sh_gt_13163Altostratus
Thank you very much Jason, appreciate your efforts.
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