🌐 Networking Basics

Understand how devices communicate β€” IP addresses, DNS, DHCP and the fundamentals of networking.

πŸ“‘ IP Addresses
Q1 What is an IP address? Beginner β–Ό

An IP address (Internet Protocol address) is a unique numerical label assigned to every device connected to a network. It serves two main purposes: identifying the host (or network interface) and providing the location of the device in the network.

Think of it like a postal address β€” just as a postal address tells the post office where to deliver a letter, an IP address tells the internet where to send data packets.

An IPv4 address looks like this: 192.168.1.10 β€” four numbers (0–255) separated by dots.

πŸ’‘ Every device on the internet (or local network) must have a unique IP address to send and receive data correctly.
Q2 What is the difference between IPv4 and IPv6? Beginner β–Ό

IPv4 is the fourth version of the Internet Protocol. It uses 32-bit addresses, giving about 4.3 billion possible addresses. Example: 192.168.0.1

IPv6 is the sixth version, using 128-bit addresses β€” giving an astronomically large number (~340 undecillion). Example: 2001:0db8:85a3::8a2e:0370:7334

  • IPv4 is still widely used today but addresses are running out
  • IPv6 was designed to solve the shortage problem
  • IPv6 also has built-in security (IPSec) and better routing efficiency
⚠️ Most modern networks support both IPv4 and IPv6 simultaneously β€” this is called a "dual-stack" configuration.
Q3 What is a public IP vs a private IP address? Beginner β–Ό

A public IP address is assigned by your ISP and is globally unique β€” it identifies your network on the internet. Websites you visit can see your public IP.

A private IP address is used inside your local network (home or office) and is not directly reachable from the internet. Common private ranges:

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255
πŸ’‘ Your router uses NAT (Network Address Translation) to share one public IP among all devices in your home that each have private IPs.
🌍 DNS β€” Domain Name System
Q4 What is DNS and why is it important? Beginner β–Ό

DNS (Domain Name System) is often called the "phone book of the internet." It translates human-readable domain names like google.com into machine-readable IP addresses like 142.250.64.78.

Without DNS, you'd have to memorise the IP address of every website you want to visit. DNS makes the internet human-friendly.

πŸ’‘ When you type a URL in your browser, a DNS query happens automatically in the background before the page even starts loading.
Q5 What are the different types of DNS records? Intermediate β–Ό

DNS records are instructions stored in DNS servers. Common types:

  • A record β€” Maps a domain to an IPv4 address (e.g. example.com β†’ 93.184.216.34)
  • AAAA record β€” Maps a domain to an IPv6 address
  • CNAME record β€” Alias of one domain to another (e.g. www β†’ example.com)
  • MX record β€” Specifies mail servers for a domain
  • TXT record β€” Stores text info (often used for domain verification)
  • NS record β€” Lists the authoritative name servers for the domain
⚠️ When you change DNS records (like pointing a domain to a new server), it can take up to 48 hours to propagate worldwide β€” this is called DNS propagation.
βš™οΈ DHCP β€” Dynamic Host Configuration Protocol
Q6 What is DHCP and how does it work? Beginner β–Ό

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and other network settings to devices when they join a network. Without DHCP, you'd have to manually configure every device's IP address.

The DHCP process works in 4 steps (DORA):

  • Discover β€” Device broadcasts "I need an IP address!"
  • Offer β€” DHCP server responds with an available IP
  • Request β€” Device says "Yes, I'll take that IP"
  • Acknowledge β€” Server confirms the lease
πŸ’‘ Your home router is typically the DHCP server β€” it's why your phone and laptop get IP addresses automatically when connecting to Wi-Fi.
Q7 What is a DHCP lease? Intermediate β–Ό

A DHCP lease is a temporary assignment of an IP address to a device. It has an expiry time (e.g. 24 hours). When the lease expires, the device must request a new IP address (which might be the same one or a different one).

Leases prevent IP address exhaustion β€” if a device leaves the network, its IP gets returned to the pool after the lease expires.

⚠️ If you need a device to always have the same IP (e.g. a printer or server), configure a DHCP reservation β€” it links a specific IP to a device's MAC address.