DEV Community

Discussion on: Explain DNS Like I'm Five

Collapse
 
jwp profile image
John Peters

TCP/IP doesn't know URLs like dev.to it knows IP addresses. DNS servers translate names to address using DNS queries. Before anything happens at TCP layer, the DNS query must return the address. Udp Port 53 is used to send the query as a broadcast, meaning any listening server can reply. There are two types of replies, Definitive for the Domain, and just a reply. The first is saying 'this response is good', the other is saying 'I had this cached'. Definitive replies always win. These days most network failures are caused by DNS server issues. DNS works closely with DHCP for dynamic address assignments using lease agreements. This could become history with IP version 6, as it's address space is massive.

DNS servers are critical in the communications world, but are usually configured with more than one server. This plus the non-definitive replies make it robust.

If you use Wireshark you will always see the DNS work happen before anything else.