Content:: Network Subnets
Network SubnetTraditional "Classful" Networks were grouped into three primary classes. A class "A", class "B", class "C". Each class divided an IP address by the bit count. An IP Address Consists of 4 block of numbers ranging from 1 - 255 with each block seperated by a period. Each class controls a specific block of IP Addresses like (A.B.C.#). A class C network would consist of 255 addresses an example would be 10.0.0.1 to 10.0.0.255. A class B network would be 10.0.0.1 to 10.0.255.255 A class A network would be 10.0.0.0 to 10.255.255.255.
In the 1990's subnets were created to split the larger networks apart. A class C networks subnet would be 255.255.255.0. It is possible to split a class C address (containing 256 IP addresses) in half with a subnet of 255.255.255.128 containing 128 IP addresses. Each subnet will by default use two IP addresses one for the router and one for the broadcast.
CIDR
Each block in a subnet can be a number from 0 to 255 a total of 256 possibilities. A "Classless Inter-Domain Routing" Notation commonly known as CIDR is a shorthand notation for the subnet. A CIDR Notation can be calculated by counting the bits in each block of the subnet.
A byte consists of 8 bits. Each bit is basically an On and off switch with each byte containing 8 On and Off switches. The possible combinations of 8 On and Off switches is 256. A binary Number appears as a sequence of 8 characters, each character can be a 0 or a 1. A binary number commonly appears as 0000-0000.
| Binary Number : | 0 | 0 | 0 | 0 | - | 0 | 0 | 0 | 0 |
| Bit Count Per Placement : | 128 | 64 | 32 | 16 | - | 8 | 4 | 2 | 1 |
Using the above table we can translate the numbers 0-255 to Binary or vice versa. In Binary the number 0 will appear as 0000-0000, 3 will appears as 0000-0011, 128 will appear as 1000-0000, 255 as 1111-1111.
Now that we know how to count bits from a subnet number sequence we can look at a class C network which has the subnet of 255.255.255.0. Each 255 will appear as 1111-1111 and the 0 appears as 0000-0000 in binary. Each one is considered as a bit we can count for the CIDR. Lets look at the subnet as a binary byte.
1111-1111.1111-1111.1111-1111.0000-0000 If we count every number 1 we can see a total of 24. Instead of counting each bit we can easily figure out each block contains 8 ones. With three blocks set to 255 we can multiple 8 by 3 to get the same answer.
Subnet CIDR Table
| Subnet Mask | IP Addresses per Network | Usable IP Addresses | CIDR Notation |
| 255.0.0.0 | 16,777,216 | /8 | |
| 255.255.0.0 | 65,536 | /16 | |
| 255.255.255.0 | 256 | 254 | /24 |
| 255.255.255.128 | 128 | 126 | /25 |
| 255.255.255.192 | 64 | 62 | /26 |
| 255.255.255.224 | 32 | 30 | /27 |
| 255.255.255.240 | 16 | 14 | /28 |
| 255.255.255.248 | 8 | 6 | /29 |
| 255.255.255.252 | 4 | 2 | /30 |
| 255.255.255.254 | 2 | 2 | /31 |
| 255.255.255.255 | 1 | 1 | /32 |
References :
http://en.wikipedia.org/wiki/Classful_network
http://en.wikipedia.org/wiki/Subnetwork
http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing


