Why are DNS packets sent in TCP and not UDP?
DNS (Domain Name Service) is used in order to resolve host names in TCP/IP network.
Normally, a query to DNS server is sent using UDP (User Datagram Protocol) "due to their lower overhead and better performance"(see Section 4.2 of RFC-1035).
However, it sometimes occurs that a packet size of DNS query may be larger than 512 Octets (bytes); such a packet cannot be sent in UDP.
In this case, TCP (Transmission Control Protocol) connection is used.
TCP is also used when DNS server data is transferred to the primary DNS server to the secondary.