3 ms·
RFC 1035: > Messages sent over TCP connections use server port 53 (decimal). The message is prefixed with a two byte length field which gives the message lengt
by js2 3y ago
RFC 1035:
> Messages sent over TCP connections use server port 53 (decimal). The message is prefixed with a two byte length field which gives the message length, excluding the two byte length field. This length field allows the low-level processing to assemble a complete message before beginning to parse it.
https://www.rfc-editor.org/rfc/rfc1035#section-4.2.2 https://www.rfc-editor.org/rfc/rfc1035#section-4.2.2
- EthanHeilman 3y agoThanks!
- ale42 3y agoThis is the actual reason. TCP being a stream-oriented protocol, it would be perfectly valid (although totally inefficient) for the DNS server to send back an answer in 25 small-sized TCP packets. The DNS client would possibly even not notice it.