Forum Discussion
Shaker_347973
Nimbostratus
May 18, 2018GTM load balancing based on source IPv6
I have an irule to balance DNS request based on even/odd last octe4t of the IPv4 address.
when DNS_REQUEST {
log local0. "GTM LOGGING: DNS request matching test.com [IP::remote_addr] - QUEST...
May 18, 2018
Something like this:
when DNS_REQUEST {
log local0. "GTM LOGGING: DNS request matching test.com [IP::remote_addr] - QUESTION:[DNS::question name], [DNS::question type]"
set ipaddress [lindex [split [IP::client_addr] "%"] 0]
set last [lindex [split $ipaddress ":"] 7]
set lastdec [expr 0x$last]
log local0. "8th hextet $last ($lastdec)"
if { ( $lastdec%2 ) } { set destination "odd" } else { set destination "even" }
if {$destination equals "even"} {
pool pool1
}
else {
pool pool2
}
}
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