upatel209_95128
Apr 14, 2014Nimbostratus
DNS caching
when RULE_INNIT {
Hostname to resolve to IP - Production
set ::EBSProductionHost "EBS.Production.Nationalgrid.net"
Time in ms after which to re-query DNS server
set ::QueryTime 30000
table add -subtable "DNS" "Production" "[RESOLV::lookup @13.13.13.13 $::EBSProductionHost]" indef
after $::QueryTime - periodic { table replace -subtable "DNS" "Production" "[RESOLV::lookup @13.13.13.13 $::EBSProductionHost]" indef }
}
when CLIENT_ACCEPTED {
Retrieve VIP address from table and define variable
set ::VIP [table lookup -subtable "DNS" "Prodution"]
Select the IP
log local0. "IP resolved! - [lindex $::VIP 0]"
node [lindex ::VIP 0] 21
}