Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IP Addresses and DNS (The phonebook of the web)

Every computer on the internet has its own address, just like every house in your neighborhood. This address is how computers find each other!

What is an IP Address?

An IP address is a special set of numbers that uniquely identifies every device connected to the internet. Think of it like a digital home address. When you want to send a postcard to a friend, you need their street name and house number. On the internet, your computer uses an IP address to know exactly where to send information.

A typical IP address (called IPv4) looks like this: 192.168.1.1. It is made of four sets of numbers separated by dots.

IPv4 vs IPv6: Running out of space!

Imagine a town that only has 100 house numbers. If 101 people move in, someone won’t have an address! This is what happened to the internet.

  • IPv4: This is the older system. It uses numbers like 172.217.11.14. It can hold about 4 billion addresses. That sounds like a lot, but with billions of people using phones, computers, and even “smart” fridges, we ran out!
  • IPv6: This is the new system. It uses both numbers and letters, like 2001:0db8:85a3:0000:0000:8a2e:0370:7334. It can hold trillions and trillions of addresses—enough for every grain of sand on Earth to have its own IP address!

DNS: The Internet’s Phonebook

IP addresses are hard for humans to remember. It’s much easier to remember a name like google.com than a bunch of numbers like 142.250.190.46. That’s where DNS (Domain Name System) comes in.

DNS is like the internet’s phonebook—it converts “human” names (called Domain Names) into the “computer” numbers (IP addresses).

How a DNS Request Works

When you type www.wikipedia.org into your browser, a lot happens in just a split second:

  1. The Question: Your computer asks a DNS Resolver (usually run by your ISP), “Hey, do you know the IP address for wikipedia.org?”
  2. The Search: If the resolver doesn’t know, it starts asking other special servers called Root Servers and TLD Servers (Top-Level Domain servers like .org or .com).
  3. The Answer: Finally, it finds the right IP address and sends it back to your computer.
  4. The Connection: Your computer now knows the “phone number” and can finally talk to the Wikipedia server to show you the website!

How it works together: An Analogy

Imagine you want to call your friend, Leo.

  • Domain Name: This is your friend’s name, “Leo.” It’s easy to remember.
  • DNS: This is your phone’s contact list. You search for “Leo.”
  • IP Address: This is Leo’s actual phone number, like 555-0123. Your phone uses this number to make the call.
  • The Internet: This is the phone network that connects your phone to Leo’s phone.

Did you know?

  • Speedy Search: Even though a DNS search might involve several servers around the world, it usually happens in less than a blink of an eye!
  • Dot-Com Fever: The very first domain name ever registered was symbolics.com on March 15, 1985.
  • Memory Power: Your computer actually remembers (or “caches”) the IP addresses of websites you visit often so it doesn’t have to ask the DNS phonebook every single time.

Check Your Knowledge

  1. What is an IP address, and why is it like a home address?
  2. Why are we moving from IPv4 to IPv6?
  3. What is the main job of the DNS?
  4. In our phonebook example, what represents the “Domain Name” and what represents the “IP Address”?
  5. What is a “DNS Resolver,” and who usually provides it for you?