Forum Discussion
JRahm
Sep 28, 2023Admin
bindummawat is correct, the host command only works in GTM context, you need to use node command in LTM context. Untested, and not for production, but just playing around with how to distinguish between both contexts in a single iRule, something that might work in a lab environment (Seriously, LAB ONLY):
when DNS_REQUEST {
if { [catch { [DNS::is_wideip [DNS::question name]] }]} {
# DNS::is_wideip is an LTM-only command, and will trigger a Tcl error on GTM
# This is a GTM request, using host command
} else {
# This is an LTM request, using node command
}
}