CS Fundamentals
Understand IP addresses — what they are, how they work, the difference between IPv4 and IPv6, public vs private addresses, and how devices are identified on networks.
Introduction
Every device connected to a network needs a unique address — just like every house on a street needs a unique house number for mail delivery. Without addresses, the postman cannot know where to deliver your letter, and similarly, without IP addresses, the internet cannot know where to send data. An IP address is the fundamental addressing system that makes the internet work.
When you send a message on WhatsApp, stream a video on YouTube, or load a webpage, data packets travel across the internet from the source server to your specific device among billions of connected devices worldwide. The IP address is how those packets know where to go. Understanding IP addresses is essential for anyone studying computer networking — it is one of the most tested topics in exams and one of the most practical concepts you will use throughout your IT career.
What Is an IP Address?
IP stands for Internet Protocol, and an IP address is a numerical label assigned to every device participating in a computer network that uses the Internet Protocol for communication. It serves two purposes: host identification (uniquely identifying a specific device) and location addressing (providing the location of the device in the network topology so data can be routed to it).
Think of an IP address like a phone number. Just as every phone needs a unique number so calls can reach it, every device on a network needs a unique IP address so data packets can reach it. When you visit google.com, your browser sends a request to Google's server at its IP address (like 142.250.180.14), and Google's server sends the response back to your device's IP address.
IPv4 — The Current Standard
IPv4 (Internet Protocol version 4) has been the foundation of internet addressing since 1983. An IPv4 address is a 32-bit number, which means it is a sequence of 32 ones and zeros. However, writing 32 binary digits is impractical for humans, so we use dotted decimal notation — four numbers (called octets) separated by dots.
Each octet represents 8 bits and can have a value from 0 to 255. Examples of valid IPv4 addresses include 192.168.1.100, 10.0.0.1, 172.16.254.1, and 8.8.8.8 (Google's public DNS server).
With 32 bits, IPv4 provides approximately 4.3 billion (2^32) unique addresses. This seemed like plenty when it was designed in the early 1980s, but with billions of devices now connecting to the internet (computers, phones, tablets, IoT devices, servers), IPv4 addresses have actually run out. This exhaustion is why IPv6 was created and why technologies like NAT are used.
IPv4 Address Classes
Originally, IPv4 addresses were divided into classes based on the first octet, determining how many networks and hosts each class could support.
Class A (1.0.0.0 to 126.255.255.255) uses the first octet for the network and the remaining three for hosts. This allows 126 networks with about 16 million hosts each — designed for very large organizations.
Class B (128.0.0.0 to 191.255.255.255) uses the first two octets for the network. This allows about 16,000 networks with about 65,000 hosts each — for medium organizations.
Class C (192.0.0.0 to 223.255.255.255) uses the first three octets for the network. This allows about 2 million networks with 254 hosts each — for small organizations.
Class D (224.0.0.0 to 239.255.255.255) is reserved for multicast (sending data to multiple specific recipients simultaneously).
Class E (240.0.0.0 to 255.255.255.255) is reserved for experimental use.
While classful addressing is largely replaced by CIDR (Classless Inter-Domain Routing) in modern networks, understanding classes remains important for exam purposes.
Public vs Private IP Addresses
Not every device needs a globally unique, publicly routable IP address. Private IP addresses are reserved ranges used within local networks that are not directly accessible from the internet.
Private address ranges are: 10.0.0.0 to 10.255.255.255 (Class A private), 172.16.0.0 to 172.31.255.255 (Class B private), and 192.168.0.0 to 192.168.255.255 (Class C private). Your home WiFi router likely assigns addresses in the 192.168.1.x range to your devices.
These private addresses can be reused in every local network worldwide — your 192.168.1.5 and your neighbor's 192.168.1.5 are different devices on different networks. NAT (Network Address Translation) at the router translates private addresses to the single public IP address assigned to your internet connection, allowing multiple private devices to share one public address.
This is why your router has two addresses — a private one facing your home network (like 192.168.1.1) and a public one facing the internet (assigned by your ISP).
IPv6 — The Future of Internet Addressing
IPv6 (Internet Protocol version 6) was designed to solve the IPv4 address exhaustion problem. It uses 128-bit addresses instead of 32-bit, providing approximately 340 undecillion (3.4 × 10^38) unique addresses — enough to give a unique address to every atom on Earth's surface and still have addresses left over.
IPv6 addresses are written as eight groups of four hexadecimal digits separated by colons. For example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Leading zeros in each group can be omitted, and consecutive groups of all zeros can be replaced with :: (but only once per address), so the above becomes: 2001:db8:85a3::8a2e:370:7334.
Beyond just more addresses, IPv6 provides built-in security (IPsec is mandatory), simplified header format (faster routing), better support for mobile devices, and elimination of NAT (every device can have a globally unique address). The transition from IPv4 to IPv6 is ongoing but slow — both protocols currently run in parallel across the internet.
Static vs Dynamic IP Addresses
A static IP address is permanently assigned to a device — it never changes. Servers, printers, and network infrastructure typically use static IPs because other devices need to find them at a consistent address.
A dynamic IP address is temporarily assigned by a DHCP (Dynamic Host Configuration Protocol) server. Most home and office computers receive dynamic IPs — when you connect to a network, the DHCP server assigns an available address from its pool. This address might change each time you reconnect. Dynamic addressing is efficient because addresses are only used while devices are connected.
Subnet Masks
A subnet mask determines which portion of an IP address identifies the network and which identifies the specific host. For example, with the common mask 255.255.255.0, the first three octets identify the network (192.168.1) and the last octet identifies the specific device (.100). This means up to 254 devices can exist on that network.
Subnetting divides large networks into smaller, more manageable segments. This improves security (isolating network segments), reduces broadcast traffic, and makes more efficient use of IP addresses.
Key Takeaways
- IP addresses uniquely identify devices on networks — they are essential for routing data to the correct destination
- IPv4 uses 32-bit addresses (about 4.3 billion possible) written in dotted decimal notation
- IPv6 uses 128-bit addresses (virtually unlimited) to solve IPv4 exhaustion
- Private addresses (10.x.x.x, 172.16-31.x.x, 192.168.x.x) are used in local networks; public addresses are globally unique
- NAT allows multiple private devices to share a single public IP address
- Static IPs remain constant (for servers); dynamic IPs are assigned temporarily by DHCP
- Subnet masks determine the network and host portions of an address
- IP addressing is one of the most fundamental and frequently tested networking concepts
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for IP Address.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Computer Fundamentals topic.
Search Terms
computer-fundamentals, computer fundamentals, computer, fundamentals, networking, basics, address, ip address
Related Computer Fundamentals Topics