DNS 2 SERVFAIL vs 22 BADTRUNC
Both DNS 2 (SERVFAIL) and 22 (BADTRUNC) belong to the DNS Response Codes (RCODEs) category. 2 indicates that server failure. The name server encountered an internal error while processing the query. Meanwhile, 22 means that bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
คำอธิบาย
Server failure. The name server encountered an internal error while processing the query.
เมื่อคุณพบเห็น
The recursive resolver could not get an authoritative answer — commonly caused by DNSSEC validation failures, unreachable upstream nameservers, or misconfigured zones.
วิธีแก้ไข
Try a different resolver (e.g., 8.8.8.8 or 1.1.1.1) to isolate the issue. If you control the zone, check DNSSEC signatures, SOA serial consistency, and nameserver reachability.
คำอธิบาย
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 2: Server failure. The name server encountered an internal error while processing the query.
DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
You encounter 2 when the recursive resolver could not get an authoritative answer — commonly caused by DNSSEC validation failures, unreachable upstream nameservers, or misconfigured zones.
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 2 (SERVFAIL): Try a different resolver (e.g., 8.8.8.8 or 1.1.1.1) to isolate the issue. If you control the zone, check DNSSEC signatures, SOA serial consistency, and nameserver reachability. 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.