Forum Discussion
Justin_Poston_4
Nimbostratus
Oct 27, 2006Load balancing clients based on client domain name
I have a need to direct my customers to different web pools based on the domain the client is located on. So far i have only seen one solution that doesn't involve just using ip's and that was to search the udp_content for the domain name. I have not had any success at getting that to work.
I am hoping there exists an easier way to key off the client domain information.
TIA
- Deb_Allen_18Historic F5 AccountYou might be able to use [NAME::lookup] against the reverse zone, but keep in mind that not all reverse zones accurately reflect the domain from which the user is connecting. (ISPs frequently retain control over the reverse zones, and refuse to customize, returning always records reflecting some-ISP-specific-infrastructure-based-string+the ISPs own domain name.)
when HTTP_REQUEST { set PTRname [getfield [IP::client_addr] "." 4].[getfield [IP::client_addr] "." 3].[getfield [IP::client_addr] "." 2].[getfield [IP::client_addr] "." 1].in-addr.arpa. set clDomain [domain [NAME::lookup $PTRname] 2] switch $clDomain { "x.com" { pool x.com } "y.com" { pool y.com } "z.com" { pool z.com } } }
- Deb_Allen_18Historic F5 AccountIt's also worth mentioning that in addition to ISP-controlled reverse zones, not every IP address has a corresponding PTR record, so you could receive either negative or NULL responses.
- Martin_MachacekHistoric F5 AccountJustin,
- Justin_Poston_4
Nimbostratus
Yeah i'm using a 4.x version of Big-ip. I tried setting up classses but my situation is a bit more unique. I had a hard time verifying the address blocks.
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