PART 2 – Subnetmask

Second part of the article series about connection to Internet. This article is only base on subnetmask. What it is and why it is used.

What is it?

Subnetmask tells us how many bits of IP-address goes to network. Basically more it takes, less devices can be connected to it. But the main reason subnetmask exist is that is one way to isolate different networks from each other.

To me it took forever to learn anything about this. So if you are newbie like me, I help you out telling you examples.

Basics

Subnetmask is used when you create your own network. This is something that is used especially in corporations interior LAN. Like IP-address it can be 32-bit long and one example of it is : 255.0.0.0

Here is the list of all possible subnet numbers that I know. This helps you a lot

  • 0
  • 128
  • 192
  • 224
  • 248
  • 250
  • 252
  • 254
  • 255

If you wonder why the number 127 can’t be, open your windows calculator. Choose view and choose programmers side. Then  input 127 and choose bin or look at the way first 8 numbers  0 and 1 are localize. Computers works all about hex and bin numbers. It doesn’t understand number 127 because it  0111 1111 . But 128 is 1000 0000 and this is something computer understands. To see more about this, use Google search, because of my newbieness I can’t provide you correct answer of why 128 is first number and 127 isn’t. Moreover then why 129 can’t be??? This is something I don’t know for sure.

Solving subnetmask within IP-address

Normally, you are not able to see this kind marking in IP-address, 172.1.1.0 /24. What does this have to do with subnetmask? Well this margin means that there are 24-bits for the networks and 8-bit to devices(means we have 2^8 – 2 =254 possible device). That means that subnetmask is: 255.255.255.0 and the network is 172.1.1.0 .

  • 8-bit   ->  255.0.0.0
  • 16-bit ->  255.255.0.0
  • 24-bit ->  255.255.255.0

What subnetmask can’t be, it cannot be like this 0.128.255.0 or 255.0.128.0 .

Conclusion

In this article I only used basic 255 number, but I know that there can be used other numbers as well. Sunbetmask can be 255.128.0.0 but then it-is not 16-bit long.

– Tuomas Törmä

Sources

  • Studies in Haaga-Helia spring 2013 Course Basics of Computers and networks Teacher Petri Hirvonen

Leave a comment