Forum Discussion
GTM split DNS iRule
Greetings!
I was hoping you guys could scrutinize this iRule. The goal is to have the GTM return internal addresses to internal DNS queries and public addresses to public DNS queries. I also want to avoid having to create "internal only" VSs and Pools on the GTM. I have the following questions:
- Will it even work?
- What if all pool members are down?
- Can you foresee any "gotchas"?
- Can you make it better?
I would create a unique iRule for each WIP...
when LB_SELECTED { Check if the client source IP matches a private IP and also check which pool member was chosen. If the client IP is private and the chosen member server name contains "dal-" return the Dallas LTM VIP. If the client IP is private and the chosen member server name contains "ftw-" return the Ft. Worth LTM VIP.
if { ([matchregion ldns private]) && ([LB::server name] contains "dal-") } { host 172.10.20.6 } elseif { ([matchregion ldns private]) && ([LB::server name] contains "ftw-") } { host 10.10.20.6 } }
Environment:
- Active/Active data centers. One in Dallas, the other in Ft. Worth.
- A GTM and an LTM at each location.
- Each GTM has WIPs that point to pools that contain both a Dallas and Ft. Worth member (GTM configs are synced).
- Each GTM pool member has an Address (public IP) and a Translation (LTM VIP).
- Dallas LTM VIPs = 172.10.20.x. Ft. Worth LTM VIPs = 10.10.20.x.
- RiverFishAltostratus
I failed at formatting the code...sorry
- Mohamed_LrhaziAltocumulus
GTM's Topology load balancing method is supposed to solve the same problem, no?
- RiverFishAltostratus
I have spent the last two hours trying to fix the code formatting problem with no success. I have tried the "preformatted code" button. I have tried every browser and disabled popups. I have reposted here: https://devcentral.f5.com/questions/gtm-irule-split-dns
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