DNS

DNS 16 BADVERS/BADSIG vs 17 BADKEY

Both DNS 16 (BADVERS/BADSIG) and 17 (BADKEY) belong to the DNS Response Codes (RCODEs) category. 16 indicates that bad OPT Version or TSIG Signature Failure. Either the EDNS version in the OPT record is not supported, or the TSIG signature on the message failed verification. Meanwhile, 17 means that key not recognized. The TSIG key name in the message is not configured on the server.

Description

Bad OPT Version or TSIG Signature Failure. Either the EDNS version in the OPT record is not supported, or the TSIG signature on the message failed verification.

When You See It

As BADVERS: your client sent an EDNS version higher than the server supports. As BADSIG: the TSIG MAC on the message did not match, indicating a shared-secret mismatch or message tampering.

How to Fix

For BADVERS, downgrade the EDNS version (most servers support version 0 only). For BADSIG, regenerate and re-synchronize the TSIG shared secret on both endpoints.

Description

Key not recognized. The TSIG key name in the message is not configured on the server.

When You See It

Your TSIG-signed query or update references a key name that the server does not have in its keyring, so it cannot verify the signature.

How to Fix

Ensure the TSIG key name matches exactly (case-sensitive) on both client and server. Add the missing key to the server's configuration if it is a new key.

Key Differences

1.

DNS 16: Bad OPT Version or TSIG Signature Failure. Either the EDNS version in the OPT record is not supported, or the TSIG signature on the message failed verification.

2.

DNS 17: Key not recognized. The TSIG key name in the message is not configured on the server.

3.

You encounter 16 when as BADVERS: your client sent an EDNS version higher than the server supports. As BADSIG: the TSIG MAC on the message did not match, indicating a shared-secret mismatch or message tampering.

4.

You encounter 17 when your TSIG-signed query or update references a key name that the server does not have in its keyring, so it cannot verify the signature.

When to Use Which

For 16 (BADVERS/BADSIG): For BADVERS, downgrade the EDNS version (most servers support version 0 only). For BADSIG, regenerate and re-synchronize the TSIG shared secret on both endpoints. For 17 (BADKEY): Ensure the TSIG key name matches exactly (case-sensitive) on both client and server. Add the missing key to the server's configuration if it is a new key.

Learn More