Understanding Network Addressing: IP Addresses and Subnetting
Explore the fundamentals of network addressing, including IPv4 and IPv6 addressing schemes and subnetting techniques. This tutorial explains how IP addresses uniquely identify devices on a network, the structure of IP addresses (network ID, host ID), and how subnetting divides networks into smaller subnetworks for efficient network management.
Understanding Network Addressing: IP Addresses and Subnetting
Introduction to Network Addressing
Network addressing is how devices on a network are identified. Every device needs a unique address to receive data. At the network layer of the OSI model, this is handled by IP (Internet Protocol) addresses. These are logical addresses; they don't directly reflect the physical location of a device.
Hosts and Routers:
A host (an end-system like a computer or smartphone) has one network interface and one IP address. A router, connecting multiple networks, has multiple interfaces, each with its own IP address. This allows the router to participate in the addressing process within the network.
IP Addresses: IPv4
IPv4 (Internet Protocol version 4) uses 32-bit addresses, represented in dotted-decimal notation (e.g., 192.168.1.100). Each part (octet) is a decimal number between 0 and 255. Historically, IPv4 addresses were categorized into classes (A, B, C, D, E).
Classful Addressing (IPv4):
Each class defined the number of bits for the network ID (identifying the network) and the host ID (identifying the device within the network):
Class | First Bits | Network ID Bits | Host ID Bits | Number of Networks | Number of Hosts per Network | Address Range |
---|---|---|---|---|---|---|
A | 0 | 8 | 24 | 128 | 16,777,214 | 0.0.0.0 - 127.255.255.255 |
B | 10 | 16 | 16 | 16,384 | 65,534 | 128.0.0.0 - 191.255.255.255 |
C | 110 | 24 | 8 | 2,097,152 | 254 | 192.0.0.0 - 223.255.255.255 |
D | 1110 | - | - | - | - (Multicast) | 224.0.0.0 - 239.255.255.255 |
E | 1111 | - | - | - | - (Reserved) | 240.0.0.0 - 255.255.255.255 |
Note: Classful addressing is largely obsolete; Classless Inter-Domain Routing (CIDR) using subnet masks is now the standard.
Rules for Assigning IP Addresses
IP addresses are assigned following specific rules:
Host ID Rules:
- Must be unique within a network.
- All zeros is reserved for the network address.
- All ones is typically reserved for broadcast addresses.
Network ID Rules:
- Must be unique.
- Certain ranges are reserved (e.g., 127.0.0.0/8 is loopback).
- All zeros and all ones are generally reserved.
IPv6 Addressing
IPv6 (Internet Protocol version 6) uses 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Leading zeros can be dropped, and consecutive zeros can be compressed using "::".
Conclusion
Network addressing is crucial for enabling communication. The transition from IPv4's classful addressing to classless addressing and the adoption of IPv6 reflect the need for efficient and scalable addressing schemes to meet the ever-increasing demands of the internet.