DNS 6 YXDOMAIN vs 22 BADTRUNC
Both DNS 6 (YXDOMAIN) and 22 (BADTRUNC) belong to the DNS Response Codes (RCODEs) category. 6 indicates that name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records. Meanwhile, 22 means that bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Description
Name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records.
Quand vous le voyez
A DNS UPDATE prerequisite check failed because the domain name already exists when the update expected it to be absent.
Comment résoudre
Review your dynamic update prerequisites. If you expect to create a new name, remove the existing records first or change the prerequisite to allow existing names.
Description
Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Quand vous le voyez
A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Comment résoudre
Retry the query over TCP to avoid truncation. If using UDP, ensure your EDNS buffer size is large enough to receive the full signed response.
Différences clés
DNS 6: Name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records.
DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
You encounter 6 when a DNS UPDATE prerequisite check failed because the domain name already exists when the update expected it to be absent.
You encounter 22 when a large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Quand utiliser lequel
For 6 (YXDOMAIN): Review your dynamic update prerequisites. If you expect to create a new name, remove the existing records first or change the prerequisite to allow existing names. For 22 (BADTRUNC): Retry the query over TCP to avoid truncation. If using UDP, ensure your EDNS buffer size is large enough to receive the full signed response.