Final answer:
DNS lookups primarily use UDP for quick and efficient resolution of domain names to IP addresses, but can also use TCP for larger queries or when reliable delivery is needed.
Step-by-step explanation:
A basic DNS lookup typically uses UDP (User Datagram Protocol). This choice was made because UDP allows for lower latency and efficiency in the resolution of domain names to IP addresses. Unlike TCP (Transmission Control Protocol), UDP does not require the establishment of a connection before data is sent. This means that UDP can quickly send and receive questions and answers without the overhead of managing a connection, making it faster for simple queries that fit within a single UDP packet. However, DNS can use TCP as well, particularly for situations that require reliable delivery, such as zone transfers or when the response data size exceeds the UDP packet size limit.