DNSREPLAY(1) PowerDNS Authoritative Server DNSREPLAY(1)

# [NAME](#NAME)

dnsreplay - A PowerDNS nameserver debugging tool

# [SYNOPSIS](#SYNOPSIS)

**dnsreplay** \[*OPTION*]... *FILENAME* *ADDRESS* \[*PORT*]

# [DESCRIPTION](#DESCRIPTION)

This program takes recorded questions and answers and replays them to the specified nameserver and reporting afterwards which percentage of answers matched, were worse or better.

**dnsreplay** compares the answers and some other metrics with the actual ones with those found in the dumpfile.

By default it will only replay queries with recursion-desired flag set.

# [OPTIONS](#OPTIONS)

[**FILENAME**](#FILENAME)

is expected to be an PCAP file. The queries are send to the DNS server specified as *ADDRESS* and *PORT*.

[**ADDRESS**](#ADDRESS)

IPv4 or IPv6 address of the nameserver to replay *FILENAME* to.

[**PORT**](#PORT)

if omitted, 53 will be used.

[**--help*,* -h**](#help)

Show summary of options.

[**--ecs-mask &lt;VAL&gt;**](#ecs)

When EDNS forwarding an IP address, mask out first octet with this value

[**--ecs-stamp &lt;FLAG&gt;**](#ecs~2)

Add original IP address as EDNS Client Subnet Option when forwarding to reference server

[**--packet-limit &lt;NUM&gt;**](#packet)

Stop after replaying *NUM* packets. Default for *NUM* is 0, which means no limit.

[**--pcap-dns-port &lt;VAL&gt;**](#pcap)

Look at packets from or to this port in the PCAP. Default is 53.

[**--quiet &lt;FLAG&gt;**](#quiet)

If *FLAG* is set to 1, **dnsreplay** will not be very noisy with its output. This is the default.

[**--recursive &lt;FLAG&gt;**](#recursive)

If *FLAG* is set to 1, **dnsreplay** will only replay queries with recursion desired flag set. This is the default.

[**--source-from-pcap &lt;FLAG&gt;**](#source)

If *FLAG* is set to 1, **dnsreplay** will send the replayed queries from the source IP address and port present in the PCAP file. This requires IP\_TRANSPARENT support. Default is 0 which means replayed queries will be sent from a local address.

[**--source-ip &lt;VAL&gt;**](#source~2)

Send the replayed queries from the source IP specified in *VAL*. Default is to send them from a local address.

[**--source-port &lt;VAL&gt;**](#source~3)

Send the replayed queries from the source port specified in *VAL*. Default is to send from a random port selected by the kernel.

[**--speedup &lt;FACTOR&gt;**](#speedup)

Replay queries with this speedup *FACTOR*. Default is 1.

[**--timeout-msec &lt;MSEC&gt;**](#timeout)

Wait at least *MSEC* milliseconds for a reply. Default is 500.

# [BUGS](#BUGS)

dnsreplay has no certain handling for timeouts. It handles around at most 65536 outstanding answers.

# [SEE ALSO](#SEE_ALSO)

[pcap(3PCAP)](/man/os/pdns-5.3/pcap.3PCAP), [tcpdump(8)](/man/os/pdns-5.3/tcpdump.8), [dnswasher(1)](/man/os/pdns-5.3/dnswasher.1)

# [AUTHOR](#AUTHOR)

PowerDNS.COM BV

# [COPYRIGHT](#COPYRIGHT)

PowerDNS.COM BV

April 22, 2026

---

Document: dnsreplay(1) from pdns-5.3 5.3.6-r0 (Chainguard OS)
Source: https://github.com/PowerDNS/pdns
