Forum Discussion
bindummawat
Sep 28, 2023Altostratus
iRule giving error: rule [/common/ecs_rule] error: /common/ecs_rule:6: error: [undefined procedure:
Hi I am trying to run a setup with GTM. Here I have ECS enabled on client requesting DNS query. Behind F5 I have 2 DNS server configured. Now I can see the packet recived by F5 has client subnet i...
Paulius
Sep 28, 2023MVP
bindummawat I found some odd formating such as spaces around variables and events which I have adjusted. Try this iRule and see if you receive the same or another error. If you do receive an error please post it here.
when DNS_REQUEST {
if { [DNS::edns0 exists] } {
# log local0. [DNS::edns0 subnet address]"
set ecs_address [DNS::edns0 subnet address]
if { ${ecs_address} == "172.31.177.0" } {
log local0. "Received EDNS request from [IP::client_addr]:${ecs_address}"
host 172.30.112.9
} else {
log local0. "Received EDNS request from [IP::client_addr]:${ecs_address}"
host 172.30.112.8
}
}
}
- bindummawatSep 28, 2023Altostratus
The same works under GSLB-iRules but did not work Delivery-iRules.
But I found another solution using node <ip> <port> and that worked for my requirement.
Thanks
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