Once upon a time when the IP addressing scheme was invented, the people who developed this thought it would be enough to have 3 different classes as we have seen so far, class A,B and C networks. There were only three subnet masks:
- Class A: 255.0.0.0 (16.777.216 addresses)
- Class B: 255.255.0.0 (65.536 addresses)
- Class C: 255.255.255.0 (256 addresses)
These networks are also known as classful networks.
When the internet started growing rapidly in the beginning of the 90’s this caused some problems. Large companies received entire class A networks with millions of addresses. Here’s a list on wikipedia that gives you an idea what kind of companies got these class A networks.
Smaller companies could get a class B network with 65.536 addresses or class C networks with 256 addresses. Many addresses were wasted so something had to be done.
The solution to this problem is classless interdomain routing, in other words we stop working with the classful networks and start working with classless networks.
Classless networks means we don’t use the class A,B or C networks anymore but are free to use any subnet mask we like. Also instead of writing down the subnet mask like 255.255.255.0 we often use a “bit” notation like /24. This represents the number of bits that are used for the subnet mask.
- 192.168.1.0 with subnet mask 255.255.255.0 is the same thing as 192.168.1.0 /24.
- 172.16.0.0 with subnet mask 255.255.0.0 is the same thing as 172.16.0.0 /16.
- 10.0.0.0 with subnet mask 255.0.0.0 is the same thing as 10.0.0.0 /8.
Here’s a little overview with subnet masks and the CIDR notation: