DNS

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.

Descripción

Name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records.

Cuándo lo verás

A DNS UPDATE prerequisite check failed because the domain name already exists when the update expected it to be absent.

Cómo solucionarlo

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.

Descripción

Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.

Cuándo lo verás

A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.

Cómo solucionarlo

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.

Diferencias clave

1.

DNS 6: Name Exists when it should not. Used in dynamic updates to indicate a name that should not exist already has records.

2.

DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.

3.

You encounter 6 when a DNS UPDATE prerequisite check failed because the domain name already exists when the update expected it to be absent.

4.

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.

Cuándo usar cada uno

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.

Saber más