Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



This 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.


Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: