π Networking Basics
Understand how devices communicate β IP addresses, DNS, DHCP and the fundamentals of networking.
π Subnetting
CIDR notation, subnet masks, calculating hosts per subnet.
π OSI Model
The 7 layers explained with real-world examples.
π Protocols
TCP, UDP, NAT, ARP and how data moves across networks.
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.
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
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.255172.16.0.0 β 172.31.255.255192.168.0.0 β 192.168.255.255
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.
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
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
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.