Let me show you why it is confusing. There are seveal network classes, but I will only list the first three. It is as below:
Class | First Octet Range | Default Subnet Mask |
---|---|---|
A | 1 - 127 | 255.0.0.0 |
B | 128 - 191 | 255.255.0.0 |
C | 192 - 223 | 255.255.255.0 |
Figure 1
Max No. of Hosts = (2^n) - 2.
Hence, Max No. of Hosts for:
- A: 16, 777, 214
- B: 65, 534
- C: 254
But, what about Max No. of Networks for those class A, B, C?
A: 254
B: 65, 534
C: 16, 777, 214
WRONG! WRONG WRONG!
I too got the same perception initially. But when I looked at the book, it says,
Max No. of Networks for:
- A: 127
- B: 16, 384
- C: 2, 097,152
How on earth did they get that value??
After thinking and thinking, scribbling, and sketching on a piece of paper, I think I found the answer. Let me explain in my own way.
Let's go back to figure 1 above, look at the octet range for class A, B, and C. How on earth did they derive it. I can't catch a ball when I first look at it. I presume that you have some understanding about logical addressing and subnet mask. I am not gonna explain on that. So in order to get the octet ranges in a way that I could understand, here is what I do:
Class | Binary | Octet Value | Default Subnet Mask |
---|---|---|---|
A | 0000 0001 | 1 | 255.0.0.0 |
0111 1111 | 127 | 255.0.0.0 | |
B | 10000 0000 | 128 | 255.255.0.0 |
1011 1111 | 191 | 255.255.0.0 | |
C | 1100 0000 | 192 | 255.255.255.0 |
1101 1111 | 223 | 255.255.255.0 |
Figure 2
Does this make sense to you? It does to me. Now I can understand what is written in figure 1, Octet Range.
Ok, now let's go to the second issue which is the maximum number of networks for each classes.
For class A, you can clearly see from the table that max number of network is 127. What about B and C?
*evil grin*
Here is the formula that I derived,
- B: 2^(n-2)
- C: 2^(n-3)
Why is it "-2" and "-3"? Good question! To be honest, I am not too sure too. I derived this formula from looking at those 3 classes. You know that broadcast is not included in the calculation right? so, it is "-1" for every class basically. I know it is not a strong explanation. I'll update this post again when I find the right answer.
This post is basically to remind myself when I forget the basics. Hope you guys enjoyed it.
No comments:
Post a Comment