1KXDPGUN(8) Knot DNS KXDPGUN(8)
2
3
4
6 kxdpgun - XDP-powered DNS benchmarking tool
7
9 kxdpgun [options] -i filename targetIP
10
12 Powerful generator of DNS traffic, sending and receiving packets
13 through XDP.
14
15 Queries are generated according to a textual file which is read sequen‐
16 tially in a loop until a configured duration elapses. The order of
17 queries is not guaranteed. Responses are received (unless disabled) and
18 counted, but not checked against queries.
19
20 The number of parallel threads is autodected according to the number of
21 queues configured for the network interface.
22
23 Options
24 -t, --duration seconds
25 Duration of traffic generation, specified as a decimal number in
26 seconds (default is 5.0).
27
28 -Q, --qps queries
29 Number of queries-per-second (approximately) to be sent (default
30 is 1000).
31
32 -b, --batch size
33 Send more queries in a batch. Improves QPS but may affect the
34 counterpart's packet loss (default is 10).
35
36 -r, --drop
37 Drop incoming responses. Improves QPS, but disables response
38 statistics.
39
40 -p, --port number
41 Remote destination port (default is 53).
42
43 -F, --affinity cpu_spec
44 CPU affinity for all threads specified in the format
45 [<cpu_start>][s<cpu_step>], where <cpu_start> is the CPU ID for
46 the first thread and <cpu_step> is the CPU ID increment for next
47 thread (default is 0s1).
48
49 -i, --infile filename
50 Path to a file with query templates.
51
52 -I, --interface interface
53 Network interface for outgoing communication. This can be useful
54 in situations when the interfaces are in a bond for example.
55
56 -l, --local localIP[/prefix]
57 Override the auto-detected source IP address. If an address
58 range is specified instead, various IPs from the range will be
59 used for different queries uniformly.
60
61 targetIP
62 The IPv4 or IPv6 address of remote destination.
63
64 -h, --help
65 Print the program help.
66
67 -V, --version
68 Print the program version.
69
70 Queries file format
71 Each line describes a query in the form:
72
73 query_name query_type [flags]
74
75 Where query_name is a domain name to be queried, query_type is a record
76 type name, and flags is a single character:
77
78 E Send query with EDNS.
79
80 D Request DNSSEC (EDNS + DO flag).
81
83 Linux kernel 4.18+ is required.
84
85 The utility has to be executed under root or with these capabilities:
86 CAP_NET_RAW, CAP_NET_ADMIN, CAP_SYS_ADMIN, CAP_SYS_RESOURCE, CAP_SETP‐
87 CAP.
88
90 Exit status of 0 means successful operation. Any other exit status in‐
91 dicates an error.
92
94 Manually created queries file:
95
96 abc6.example.com. AAAA
97 nxdomain.example.com. A
98 notzone. A
99 a.example.com. NS E
100 ab.example.com. A D
101 abcd.example.com. DS D
102
103 Queries file generated from a zone file (Knot DNS format):
104
105 cat ZONE_FILE | awk "{print \$1,\$3}" | grep -E "(NS|DS|A|AAAA|PTR|MX|SOA)$" | sort -u -R > queries.txt
106
107 Program usage:
108
109 # kxdpgun -i ~/queries.txt 2001:1489:fffe:10::16
110
111 # kxdpgun -t 120 -Q 6000000 -i ~/queries.txt -b 5 -r -p 8853 192.168.101.2
112
114 kdig(1).
115
117 CZ.NIC Labs <https://www.knot-dns.cz>
118
120 Copyright 2010–2021, CZ.NIC, z.s.p.o.
121
122
123
124
1253.0.6 2021-05-12 KXDPGUN(8)