DNS 4 NOTIMP vs 22 BADTRUNC
Both DNS 4 (NOTIMP) and 22 (BADTRUNC) belong to the DNS Response Codes (RCODEs) category. 4 indicates that not Implemented. The name server does not support the requested query type or operation. Meanwhile, 22 means that bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
คำอธิบาย
Not Implemented. The name server does not support the requested query type or operation.
เมื่อคุณพบเห็น
You sent a query type (e.g., IXFR, dynamic update) that the server does not support or has disabled.
วิธีแก้ไข
Verify the server supports the query type you are using. If you need zone transfers or dynamic updates, enable them in the server configuration.
คำอธิบาย
Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
เมื่อคุณพบเห็น
A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
วิธีแก้ไข
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.
ความแตกต่างหลัก
DNS 4: Not Implemented. The name server does not support the requested query type or operation.
DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
You encounter 4 when you sent a query type (e.g., IXFR, dynamic update) that the server does not support or has disabled.
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.
ควรใช้อันไหนเมื่อไร
For 4 (NOTIMP): Verify the server supports the query type you are using. If you need zone transfers or dynamic updates, enable them in the server configuration. 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.