Forum Discussion
fubarSUSHI
Altocumulus
Jan 13, 2021How to perform a dig command using iControl?
Im trying to figure out any information on using dig commands or its closest equivalent using iControl?
Satoshi_Toyosa1
Jan 14, 2021Ret. Employee
Do you want to execute dig on the target BIG-IP remotely to (perhaps) test the DNS resolver on the box? If so, executing ping via POST /mgmt/tm/util/ping would do. Pinging to a remote device with its domain name would resolve its IP address. For example, ping'ing to www.google.com from my test BiG-IP;
curl -sku admin:admin https://<BIGIP>/mgmt/tm/util/ping \
-X POST -H "Content-Type: application/json" \
-d '{"command":"run", "utilCmdArgs": "-c 3 www.google.com"} ' | \
jq -r .commandResult
PING www.google.com (172.217.14.228) 56(84) bytes of data.
64 bytes from 172.217.14.228 (172.217.14.228): icmp_seq=1 ttl=128 time=198 ms
64 bytes from 172.217.14.228 (172.217.14.228): icmp_seq=2 ttl=128 time=198 ms
64 bytes from 172.217.14.228 (172.217.14.228): icmp_seq=3 ttl=128 time=199 ms
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 198.649/198.974/199.350/0.288 ms
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