Expensive
Technology

Why didn't stone age people invent this, were they stupid?


Artificial Intelligence
Juice Jacking

It's a Layer 8 Problem


Internet
IP Address
Malware
Antimalware Software
Escape Character

Information Technology/Networking/Internet/
Domain Name System

“

The Domain Name System (DNS) is the phonebook of the Internet. It translates human-readable domain names to machine-readable IP addresses.

”

All content on the internet is reached with IP Addresses. Whether it's a Minecraft game server, an app on your smartphone (like social media or video/audio streaming) or a website, your device connects to the associated service with an IP Address. At the end of every connection on the internet, there is a machine that has a publicly reachable IP address.

However, when you use a browser, you will in all likelihood be used to entering domains, such as youtube.com or ultracomfy.net. This may at first seem to contradict my initial statement, but it actually doesn't.

The IP address you connected to when opening this website is 217.154.217.127. In lieu of entering ultracomfy.net, you can open this website just as well by typing 217.154.217.127 into the URL bar and hitting Enter. While 217.154.217.127 is an IP address, ultracomfy.net is what we call a domain. Initially, there were no domains, and remembering and typing in IP addresses had to be done manually by each user. This number-juggling is annoying and wastes time. DNS was then invented as a solution to that problem.

You can compare this to telephone number services (“directory inquiry service”?) that used to be a thing. The premise is quite similar: You don't know all phone numbers, but you have a name. To make this work, all you need is the name of the person you're trying to reach, and the phone number of the directory inquiry service. So you can call the inquiry service and ask for the number of the person you're trying to reach. They give you the number. You hang up, and now you can dial the number you just got. This is how DNS works. If you have an IP address, you can connect to it directly. If you only have a domain name, you can “call” the “inquiry service” and it can tell you which IP address that domain points to. Then you can “hang up” and make a new “call” using the IP address you were given.

Of course the presumption here is that your IP is listed in the Domain Name System to begin with. Anyone can connect a computer to the internet, so anyone can get an IP address, but nobody forces you to register a domain. If you're happy with just using IP addresses (which some backend developers may) then you can program your software or configurations to just connect to IP addresses instead, without ever making any DNS Lookups. You could say all domains have an IP address, but not all IP addresses have domains.

In a bit more detail, this works as follows:

  1. A person sets up a machine connected to the internet. They set it up to serve a website. This is called a server. Every machine gets an IP Address, the computer that serves you this particular website has the IP address 217.154.217.127.
  2. The host of the server reaches out to a registrar. Registrars are rather large businesses that have the authority to claim and manage domains. This is a legitimate business and you can buy (ie. rent) your own domain for relatively cheap on the website of one of the registrars. For example, I am renting the domain ultracomfy.net which, as long as I pay my bills, is mine and cannot be rented by someone else.
  3. The host of the server then instructs their registrar to make the domain point towards a particular IP address. This step will make sense later, but for now note that I have instructed my registrar to make my domain ultracomfy.net point at 217.154.217.127. This is called an A-Record.
  4. The registrar makes this A-Record publicly available. So-called DNS Servers can pick that A-Record up and save it to their database. Google, for example, is well known for hosting a DNS Server at 8.8.8.8.
  5. When you type ultracomfy.net into your browser, your browser will not connect directly to ultracomfy.net. Of course it can't, because ultracomfy.net is not an IP address. Instead, your browser will reach out to a DNS server to perform what is called a DNS Lookup. It may, for example, decide to connect to 8.8.8.8 first and ask “What's the IP for ultracomfy.net?”. Google will then scour their database and see that my registrar has made public knowledge that ultracomfy.net be pointed towards 217.154.217.127. Google then responds with 217.154.217.127 and at that point your browser will open a new connection, this time directly to 217.154.217.127.

There are many DNS providers out there and your device might not be using 8.8.8.8. The point of this system, though, is that you either enter an IP address directly into the URL bar, or you enter a domain, in which case your browser will find out the IP address by looking it up with a server that serves DNS Lookups. To make this work, of course, your device must know where to reach a DNS provider, which is the only time in internet configuration where you're forced to actually, directly deal with bare IP addresses. DNS servers help your device find out the IP address of a domain, but of course to connect to that system first you cannot use a domain. You have to know about the IP address of a DNS server ahead of time, in the same way you need to know the number of the directory inquiry service ahead of time.