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.
For example:
- 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:
Hi Rene,
Question- does the subnet mask dictate the class of the network or the value of the octets? It seems here in this example that the subnet mask would dictate whether it was class A, B or C. However I was recently advised that it is not the subnet mask for example it has been recently stated to me:
The class of a network is not determined by its subnet mask. The default subnet mask is determined by the class of a network. The class of a network is determined by the first octet of the IP.
0-127 is considered “class A”.
... Continue reading in our forum128-191 is considered “class B”.
192
James,
Only the first four bits (3 really, since E class isn’t used) in the first octet determine class (as shown in the table below). You are correct in your example about 171.15.85.0/24.
Keep in mind, however, that “class” doesn’t really mean anything anymore. This is an outdated term that nobody really uses now. Even Cisco has stopped bothering to test on it!
Zaman,
These can be easily confused–in fact I had to review them myself to make sure I am giving you accurate information.
VLSM is aptly named, because it means using a subnet mask of variable lengths throughout your organization with the same network block. For example, suppose your ISP has given you 10.10.10.0/24 as an IP range. Without VLSM, you would have to pick a certain subnet mask, say, 255.255.255.240 (/28) and stick with that. So if you wanted to use this block throughout your company, you would always have to use /28. This becomes wasteful in the
... Continue reading in our forumHere my summary:
• 255.0.0.0 /8 (8 bits Network, 24 bits Hosts = 2^24 = 256256256 = 16.777.216-2)
... Continue reading in our forum• 255.128.0.0 /9 (8+1 = 9 bits Network, 23 bits Hosts = 2^23 = 128256256 = 8.388.608-2)
• 255.192.0.0 /10 (8+2 = 10 bits Network, 22 bits Hosts = 2^22 = 64256256 = 2.097.152-2)
• 255.224.0.0 /11 (8+3 = 11 bits Network, 21 bits Hosts = 2^21 = 32256256 = 2.097.152-2)
• 255.240.0.0 /12 (8+4 = 12 bits Network, 20 bits Hosts = 2^20 = 16256256 = 1.048.576-2)
• 255.248.0.0
Excellent answer Laz. Really nice explanation