Classes and subnetting
Classes and subnetting
In the early days of IP addressing, IPv4 addresses were divided into five classes (A, B, C, D, E) to
accommodate different network sizes. These classes helped in organizing the allocation of IP
addresses. Here's a quick breakdown:
1. Class A
• Range: 1.0.0.0 to 126.255.255.255
• Default Subnet Mask: 255.0.0.0
• Purpose: Large networks with a huge number of hosts.
2. Class B
• Range: 128.0.0.0 to 191.255.255.255
• Default Subnet Mask: 255.255.0.0
• Purpose: Medium-sized networks.
3. Class C
• Range: 192.0.0.0 to 223.255.255.255
• Default Subnet Mask: 255.255.255.0
• Purpose: Small networks.
4. Class D
• Range: 224.0.0.0 to 239.255.255.255
• Purpose: Reserved for multicast groups.
5. Class E
• Range: 240.0.0.0 to 255.255.255.255
• Purpose: Reserved for experimental use.
Subnetting
Subnetting is the process of dividing a network into smaller, more manageable sub-networks
(subnets). It helps in improving network performance, security, and management. Here's how it
works:
1. Subnet Mask
• A subnet mask is used to determine which portion of an IP address is the network
part and which is the host part. It consists of a series of 1s followed by a series of 0s
(e.g., 255.255.255.0).
2. Borrowing Bits
• To create subnets, you "borrow" bits from the host part of the IP address. For
example, if you have a Class C network (192.168.1.0/24), and you want 4 subnets,
you need to borrow 2 bits (since 22=4). This changes your subnet mask to
255.255.255.192 (/26).
3. Calculating Subnets
• With the new subnet mask, you can calculate the number of subnets and hosts per
subnet. For example, in a /26 subnet, you have 64 IP addresses, but only 62 usable (2
are reserved for network and broadcast addresses).