Forum Discussion
David_22984
Oct 26, 2010Nimbostratus
DNS notify loadbalancing
I'm trying to handle the case of a loadbalanced authoritative DNS server pool. This pool has two members, however DNS notifies need to go to only one of them (the one with the master SQL database).
I've put together an iRule for the UDP notify request and it seems to be working, however I'm not having any luck creating a TCP version of it.
UDP iRule for DNS notify
when CLIENT_ACCEPTED {
binary scan [UDP::payload] SS id flags
set opcode [expr ($flags >> 11) & 0xf]
Send NOTIFYs (opcode 4) to the master SQL database node.
if { $opcode == 4 } {
log local0. "DEBUG: NOTIFY, sending to MASTER"
node MASTER_SERVER_IP 53
}
else {
log local0. "DEBUG: NOT A NOTIFY"
}
}
This test irule works OK for UDP, however not being an irule expert my naive attempt to convert that to a TCP irule doesn't appear to work.
when CLIENT_ACCEPTED {
binary scan [TCP::payload] SS id flags
set opcode [expr ($flags >> 11) & 0xf]
Send NOTIFYs (opcode 4) to the master SQL database node.
if { $opcode == 4 } {
log local0. "DEBUG: NOTIFY TCP, sending to MASTER"
node MASTER_SERVER_IP 53
}
else {
log local0. "DEBUG TCP: NOT A NOTIFY"
}
}
Any suggestions? According to the RFC's a DNS notify can come over TCP or UDP (UDP is tried first, but it falls back to TCP in the case of a large packet and or firewall blocking).
Thx
-- david
- Nat_ThirasuttakornEmployee2 things
when CLIENT_ACCEPTED { TCP::collect } when CLIENT_DATA { binary scan [TCP::payload] SSS length id flags set opcode [expr ($flags >> 11) & 0xf] Send NOTIFYs (opcode 4) to the master SQL database node. if { $opcode == 4 } { log local0. "DEBUG: NOTIFY TCP, sending to MASTER" node MASTER_SERVER_IP 53 } else { log local0. "DEBUG TCP: NOT A NOTIFY" } TCP::release }
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