How to install dnsperf on RHEL 6/Centos 6 and use this to test DNS server ?

In this article, we will see how to install dnsperf tool on RHEL/CentOS 6.

And how to use it to test DNS server performance.

1. Download the RPM package.

[root@ngelinux001 ~]# wget https://www.dns-oarc.net/files/dnsperf/2.1.0.0/dnsperf-2.1.0.0-1-rhel-6-x86_64.tar.gz --no-check-certificate
--2022-06-03 11:41:26--  https://www.dns-oarc.net/files/dnsperf/2.1.0.0/dnsperf-2.1.0.0-1-rhel-6-x86_64.tar.gz
Resolving www.dns-oarc.net... 64.191.0.198, 2620:ff:c000::198
Connecting to www.dns-oarc.net|64.191.0.198|:443... connected.
WARNING: cannot verify www.dns-oarc.net’s certificate, issued by “/C=US/O=Let's Encrypt/CN=R3”:
  Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: 1612628 (1.5M) [application/x-gzip]
Saving to: “dnsperf-2.1.0.0-1-rhel-6-x86_64.tar.gz”

100%[======================================================================================>] 1,612,628    649K/s   in 2.4s

2022-06-03 11:41:30 (649 KB/s) - “dnsperf-2.1.0.0-1-rhel-6-x86_64.tar.gz” saved [1612628/1612628]

 

2. Untar the rpm package.

[root@ngelinux001 ~]# tar -xvf dnsperf-2.1.0.0-1-rhel-6-x86_64.tar.gz
dnsperf-2.1.0.0-1/
dnsperf-2.1.0.0-1/./INSTALL
dnsperf-2.1.0.0-1/./RELEASE_NOTES
dnsperf-2.1.0.0-1/./dnsperf-2.1.0.0-1.el6.x86_64.rpm

 

3. Install the package now.

[root@ngelinux001 ~]# cd dnsperf-2.1.0.0-1
[root@ngelinux001 dnsperf-2.1.0.0-1]# ls -ltr
total 1588
-r--r--r-- 1 root root    6648 Dec 16  2015 RELEASE_NOTES
-r--r--r-- 1 root root    1293 Dec 16  2015 INSTALL
-r--r--r-- 1 root root 1611344 Dec 16  2015 dnsperf-2.1.0.0-1.el6.x86_64.rpm

[root@ngelinux001 dnsperf-2.1.0.0-1]# yum install ./dnsperf-2.1.0.0-1.el6.x86_64.rpm
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security, subscription-manager,
              : tmprepo, verify, versionlock
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Loading support for Red Hat kernel ABI
Setting up Install Process
Examining ./dnsperf-2.1.0.0-1.el6.x86_64.rpm: dnsperf-2.1.0.0-1.el6.x86_64
Marking ./dnsperf-2.1.0.0-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dnsperf.x86_64 0:2.1.0.0-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================
 Package                Arch                  Version                        Repository                                    Size
================================================================================================================================
Installing:
 dnsperf                x86_64                2.1.0.0-1.el6                  /dnsperf-2.1.0.0-1.el6.x86_64                4.5 M

Transaction Summary
================================================================================================================================
Install       1 Package(s)

Total size: 4.5 M
Installed size: 4.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : dnsperf-2.1.0.0-1.el6.x86_64                                                                                 1/1
  Verifying  : dnsperf-2.1.0.0-1.el6.x86_64                                                                                 1/1

Installed:
  dnsperf.x86_64 0:2.1.0.0-1.el6

Complete!
[root@ngelinux001 dnsperf-2.1.0.0-1]#

 

4. Run the tool to test if its working.

[root@ngelinux001 dnsperf-2.1.0.0-1]# /usr/local/nom/bin/dnsperf
DNS Performance Testing Tool
Nominum Version 2.1.0.0

[Status] Command line: dnsperf
[Status] Sending queries (to 127.0.0.1)
[Status] Started at: Fri Jun  3 11:43:20 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%)

  Response codes:
  Average packet size:  request 0, response 0
  Run time (s):         6.035052
  Queries per second:   0.000000

  Average Latency (s):  0.000000 (min 0.000000, max 0.000000)

[root@ngelinux001 dnsperf-2.1.0.0-1]#

 

5. Command: Sends 1000 queries in 60 seconds to server dnsserver1.

[root@ngelinux001 ~]# dnsperf -s dnsserver1 -d ./queryfile -l 60 -c 1 -Q 1000
DNS Performance Testing Tool
Nominum Version 2.1.0.0

[Status] Command line: dnsperf -s dnsserver1 -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@ngelinux001 ~]#


====================== Corresponding DNS server =================
[root@dnsserver1 log]# pwd
/var/named/chroot/var/log
[root@dnsserver1 log]# tail -f bind.log
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)

[root@ngelinux001 ~]# cat queryfile
google.com A
[root@ngelinux001 ~]#

So we have tested the DNS performance and its respond time for 60 seconds test.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments