IP Addressing (IPv4)
The unique 'postal address' every device needs to be found on a network.
What is an IP Address?
An IP (Internet Protocol) address is a unique numerical label assigned to every device on a network, used to identify and locate it so data knows where to go. IPv4 addresses are 32 bits long, written as 4 numbers (0-255) separated by dots โ like 192.168.1.10 โ this format is called dotted decimal notation.
Network Portion vs Host Portion
Every IP address is split into two parts: a NETWORK portion (identifies which network the device belongs to) and a HOST portion (identifies the specific device within that network) โ similar to how a postal address has a city/area code plus a specific house number. A subnet mask determines exactly where this split happens.
IP Address Classes (Classful Addressing)
Historically, IPv4 addresses were divided into classes: Class A (first bit 0, huge networks, millions of hosts each), Class B (medium networks), Class C (small networks, only 254 usable hosts), Class D (multicast), Class E (reserved/experimental). This rigid class system wasted huge numbers of addresses, which led to more flexible systems being adopted later.
Public vs Private IP Addresses
Public IP addresses are globally unique and directly reachable over the internet. Private IP addresses (like the common 192.168.x.x, 10.x.x.x, and 172.16.x.x-172.31.x.x ranges) are reserved for use INSIDE local networks only, and aren't routable on the public internet โ this is why your home devices can share one public IP address via your router (using NAT, Network Address Translation).
The IPv4 Address Shortage
IPv4 only supports about 4.3 billion unique addresses total โ a number that seemed enormous in the 1980s but is nowhere near enough for today's billions of phones, laptops, and IoT devices. This shortage is the entire reason IPv6 was developed (covered in the next topic), and why techniques like NAT and private IP ranges became essential to stretch IPv4's limited address space.
๐ Real-World Use
Your home router has ONE public IP address given by your ISP, but every device inside your house (phone, laptop, smart TV) gets its own private IP address (like 192.168.1.5, 192.168.1.6) โ the router uses NAT to translate between these when your devices access the internet.
๐ก Pro Tip
A very common exam question asks you to identify a class from an IP address just by its first number โ memorize the rough ranges: Class A starts 1-126, Class B starts 128-191, Class C starts 192-223 โ this quick recall saves valuable time in exams.
๐งช Quick Self-Test
Check what you just learned โ no pressure, just practice.
1. How many bits make up an IPv4 address?
2. Which of these is a private IP address range?
3. What technique lets multiple devices share one public IP address?