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.
Descrição
Name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records.
Quando você o vê
A DNS UPDATE prerequisite check failed because the domain name already exists when the update expected it to be absent.
Como corrigir
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.
Descrição
Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Quando você o vê
A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Como corrigir
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.
Diferenças principais
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.
Quando usar qual
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.