Mastering IP Subnetting
Introduction to IP Addressing
The Internet's Postal Service
Every device connected to a network needs a unique identifier, just like every house on a street needs a unique address. In the world of computer networks, this identifier is called an Internet Protocol (IP) address. It's how data knows where to go, whether it's being sent to a server across the world or just to the printer in the next room.
The most common version you'll encounter is IPv4 (Internet Protocol version 4). An IPv4 address is a 32-bit number. To make it easier for humans to read, this long binary number is broken down into four 8-bit chunks called octets. Each octet is then converted to a decimal number between 0 and 255 and separated by a dot.
For example, the address
192.168.1.1is what the computer sees as11000000.10101000.00000001.00000001.
Network vs. Host
An IP address isn't just one long, random number. It has two distinct parts: the network portion and the host portion.
- The network portion identifies the specific network a device is on. It's like the street name and zip code of your home address.
- The host portion identifies the individual device on that network. This is like your house or apartment number.
This division is what makes routing data across the internet possible. A router's job is to look at the network portion of an IP address and figure out which direction to send the data. It doesn't need to know about every single device, just how to get to the right network. Once the data arrives at the correct network, the local system uses the host portion to deliver it to the final destination.
Address Classes
Historically, IPv4 addresses were divided into categories called classes. This system, known as classful addressing, determined the default boundary between the network and host portions of an address. While modern networking uses more flexible methods, understanding classes is still fundamental.
The class of an address is determined by the value of its first octet.
| Class | First Octet Range | Default Network/Host Division | Purpose |
|---|---|---|---|
| A | 1 - 126 | N.H.H.H | A small number of very large networks |
| B | 128 - 191 | N.N.H.H | Medium-sized networks, like universities |
| C | 192 - 223 | N.N.N.H | A large number of small networks |
| D | 224 - 239 | (N/A) | Reserved for multicasting (sending to a group) |
| E | 240 - 255 | (N/A) | Reserved for experimental use |
Let's look at what this means for the first three classes, which are used for assigning addresses to devices:
Class A: In a Class A address, only the first octet represents the network. The remaining three octets are for hosts. This allows for a small number of networks (126 of them) but gives each one over 16 million possible host addresses. For example, in the address 10.50.30.1, 10 is the network portion and 50.30.1 is the host portion.
Class B: A Class B address uses the first two octets for the network and the last two for hosts. This creates over 16,000 networks, each with over 65,000 possible hosts. In the address 172.16.25.100, 172.16 is the network portion.
Class C: A Class C address uses the first three octets for the network, leaving only the last octet for hosts. This allows for over 2 million networks, but each can only have 254 usable host addresses. The address 192.168.1.55 belongs to the 192.168.1 network.
You might have noticed that the range for Class A starts at 1, not 0, and skips 127. Addresses starting with
0are reserved, and the entire127.0.0.0network is reserved for loopback, which a device uses to send messages to itself.
Classes D and E are special cases. Class D addresses are used for multicasting, a technique where data is sent from one source to a group of interested destinations simultaneously, like in video streaming. Class E addresses are reserved for future or experimental uses and are not assigned on the public internet.
What is the primary purpose of an IP address in a computer network?
An IPv4 address is a 32-bit number, typically represented as four decimal numbers separated by dots. What is each of these 8-bit chunks called?
