Installing dnsperf tool on RHEL or CentOS 7.
Today in this post, we will see how to install dnsperf on RHEL or CentOS 7.
The easy and quick way is to do via snapd.
Lets see the steps below.
1. Install snapd if its not installed.
[user@ngelinux001 ~]$ sudo yum install snapd
2. Enable snapd.socket
[root@ngelinux001 ~]# systemctl enable --now snapd.socket [root@ngelinux001 ~]#
3. Create a link of snap
# ln -s /var/lib/snapd/snap /snap
4. Now install dnsperf tool
[root@ngelinux001 ~]# snap install dnsperf --beta error: The publisher of snap "dnsperf" has indicated that they do not consider this revision to be of production quality and that it is only meant for development or testing at this point. As a consequence this snap will not refresh automatically and may perform arbitrary system changes outside of the security sandbox snaps are generally confined to, which may put your system at risk. If you understand and want to proceed repeat the command including --devmode; if instead you want to install the snap forcing it into strict confinement repeat the command including --jailmode. [root@ngelinux001 ~]# ### Lets do it in devmode root@ngelinux001 ~]# snap install dnsperf --beta --devmode dnsperf (beta) 2.1.1.0.d from Mike Pontillo (mpontillo) installed
5. Run dnsperf and check this out.
[root@ngelinux001 ~]# dnsperf DNS Performance Testing Tool Nominum Version 2.1.1.0.d [Status] Command line: dnsperf [Status] Sending queries (to 127.0.0.1) [Status] Started at: Thu Jun 9 04:02:38 2022 [Status] Stopping after 1 run through file ^C[Status] Testing complete (interruption) Statistics: Queries sent: 0 Queries completed: 0 (0.00%) Queries lost: 0 (0.00%)
6. Test your DNS server performance.
Command: Sends 1000 queries in 60 seconds to server nge-dnsserv.
# cat ./queryfile A google.com [root@ngelinux002 ~]# /usr/local/nom/bin/dnsperf -s nge-dnsserv -d ./queryfile -l 60 -c 1 -Q 1000 DNS Performance Testing Tool Nominum Version 2.1.0.0 [Status] Command line: dnsperf -s nge-dnsserv -d ./queryfile -l 60 -c 1 -Q 1000 [Status] Sending queries (to 10.207.134.61) [Status] Started at: Fri Jun 3 11:48:05 2022 [Status] Stopping after 60.000000 seconds [Status] Testing complete (time limit) Statistics: Queries sent: 23566 Queries completed: 23566 (100.00%) Queries lost: 0 (0.00%) Response codes: NOERROR 23566 (100.00%) Average packet size: request 28, response 292 Run time (s): 60.253350 Queries per second: 391.115183 Average Latency (s): 0.254979 (min 0.248618, max 0.273378) Latency StdDev (s): 0.001762 [root@ngelinux002 ~]# ====================== Corresponding DNS server ================= 02-Jun-2022 23:19:06.054 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61) 02-Jun-2022 23:19:06.059 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61) 02-Jun-2022 23:19:06.063 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61) 02-Jun-2022 23:19:06.063 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61) 02-Jun-2022 23:19:06.063 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61) 02-Jun-2022 23:19:06.068 queries: info: client @0x7fea0c00f7b0 172.23.90.98#34932 (google.com): query: google.com IN A + (10.207.134.61)