KXDPGUN(8) | Knot DNS | KXDPGUN(8) |
kxdpgun - XDP-powered DNS benchmarking tool
kxdpgun [options] -i filename targetIP
Powerful generator of DNS traffic, sending and receiving packets through XDP.
Queries are generated according to a textual file which is read sequentially in a loop until a configured duration elapses. The order of queries is not guaranteed. Responses are received (unless disabled) and counted, but not checked against queries.
The number of parallel threads is autodected according to the number of queues configured for the network interface.
Each line describes a query in the form:
query_name query_type [flags]
Where query_name is a domain name to be queried, query_type is a record type name, and flags is a single character:
E Send query with EDNS.
D Request DNSSEC (EDNS + DO flag).
Linux kernel 4.18+ is required.
The utility has to be executed under root or with these capabilities: CAP_NET_RAW, CAP_NET_ADMIN, CAP_SYS_ADMIN, CAP_SYS_RESOURCE, CAP_SETPCAP.
Exit status of 0 means successful operation. Any other exit status indicates an error.
Manually created queries file:
abc6.example.com. AAAA nxdomain.example.com. A notzone. A a.example.com. NS E ab.example.com. A D abcd.example.com. DS D
Queries file generated from a zone file (Knot DNS format):
cat ZONE_FILE | awk "{print \$1,\$3}" | grep -E "(NS|DS|A|AAAA|PTR|MX|SOA)$" | sort -u -R > queries.txt
Program usage:
# kxdpgun -i ~/queries.txt 2001:1489:fffe:10::16
# kxdpgun -t 120 -Q 6000000 -i ~/queries.txt -b 5 -r -p 8853 192.168.101.2
CZ.NIC Labs <https://www.knot-dns.cz>
Copyright 2010–2021, CZ.NIC, z.s.p.o.
2021-03-25 | 3.0.5 |