Forum Discussion
Mui_64918
Cirrus
Feb 20, 2014Dynamic Pool Members with DNS resolution
Has anyone tried to route traffic to a pool member using DNS name instead of IP address?
Either resolve the name then check the IP/Node if its active and then send traffic.
If we were to talk to oth...
nitass
Employee
Feb 23, 2014as JPV mentioned, you can use RESOLV::lookup and node command.
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 14
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
set host [HTTP::host]
set dest [lindex [RESOLV::lookup @8.8.8.8 -a [HTTP::host]] 0]
if { $dest ne "" } {
node $dest
} else {
HTTP::respond 503
}
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] server [IP::remote_addr]:[TCP::release] host $host"
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Feb 23 00:37:05 ve11a info tmm[4068]: Rule /Common/myrule : client 172.28.24.1:39112 server 206.190.36.45:0 host www.yahoo.com
Feb 23 00:37:13 ve11a info tmm1[4068]: Rule /Common/myrule : client 172.28.24.1:39113 server 74.125.200.99:0 host www.google.com
Feb 23 00:37:20 ve11a info tmm[4068]: Rule /Common/myrule : client 172.28.24.1:39114 server 64.4.11.42:0 host www.microsoft.com
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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