The core of most Internet use is rarely seen to most people when they go to there favorite site. The first step the users browser completes is a DNS look up. Which converts a domain name “example.com” to something the Internet can route. (route: meaning a path to a server). That first step of DNS lookup coverts the domain to a IP address which is route-able on the Internet. Below is an example of a DNS look up on a linux system.
This simple command give a lot of info about our current DNS setup and even some info about the network we are connected to. In the DNS look up you can see information about what the DNS server knows and found on the users behalf. What we found is first the “Server: 10.0.0.117” which is a DNS server running on a LAN (LAN:network in a home or office) We also know the DNS server is running on port 53 because of the next line; which is the default port used by DNS. The next line reads “Non-authoritative answer: ” This means my DNS server on this LAN did not know where to find “google.com” but rather it asked another server and is simply repeating what it found out. Now we get to the important information where does “google.com” exists. As you can see there are two ips for google 18.104.22.168 and 22.214.171.124. Which means our users pc can go to ether ip address and will find “google.com”. This is one of the most common type of records the “A” record which returns a ipv4 address which is in the xxx.xxx.x
xx.xxx format, where the xxx is a number between 1 and 254. There is also a record used for ipv6 adress called “AAAA” which is a record in the following format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where xxxx is a hex number 0-9 then A-F.
The many DNS servers on the Internet work in a hierarchical structure starting from the DNS servers that manage the root domain like .net, .com or org. From there the domains are delegated down to owners of a domain so a url becomes google.com is assigned in the .com root and all request to google.com are sent to another dns server. The next piece in the equation is how the clients get the “A records” or domain names. Now most will agree if all of the computers of the world talked to the root servers (.net, .com .org) we would quickly over load the server. So rather that over load a single server DNS records are instead cached(saved) on servers from your ISP (ISP:Internet Service Provider) or your LAN like the example from before. There for it only has to ask the root servers for domains it has never looked up before. There however is a few disadvantaged to this method. For example if you host your own website for example. You first have to register the domain with a provider that can add domains to the root servers.(which is strictly controlled) Second the dns servers on the Internet have to update to be able to see the “A” or “AAAA” record for your site. So because of all the DNS servers on the Internet it can take a few hours for the other DNS servers to relies you have registered your site so you cant expect delays. Now this becomes a large problem especially if you move to a new server or your server is assigned a new ip. Now many DNS servers on the Internet have your old record while some have your new record. So visitors to your site may not be able to get to your site for upwards of 6 hours as the dns information is transferred around thought various Internet DNS servers.