Up till now, I've been talking about IP addresses and specifying
the netmasks by spelling them out: network 192.168.13.0 with a
netmask of 255.255.255.0. I've explained that the netmask indicates
the bits that are the network part of the address, and that
changing anything in those bits puts you on a different network or
Is there any real difference between a network and a subnet? Not
really. Any network is a subnet of something larger, so in that
sense, the terms are identical. However, you could look at this
another way: your network is the addresses which you can subnet.
Or, your network is the bits you cannot change because someone else
assigned them to you. As it's always just the number of bits that
is important, we can represent networks or subnets another way. The
network 192.168.0 with that 255.255.255.0 netmask can be expressed
as 192.168.13.0/24. The "24" is the number of bits set to "1"
(remember, 8 bits in each section of a mask).
So, a 255.0.0.0 netmask would be /8, a 255.255.0.0 would be /16
and so on. Those are pretty easy. What about masks like
255.255.240.0? If you aren't used to thinking in bits, this might
give you a little headache. But don't panic, it's not that hard.
One way to think of it is how many bits are not set in the
third octet. We have 8 each set in the first two, so that's 16, and
it would be 24 if all the bits were set in the third, but bits
adding up to 15 (255 - 240) are missing. That's the 8-4-2-1 bits (8
+ 4 + 2 + 1 = 15), so 4 bits are missing, so it is a 20 bit mask:
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Jump to Comments
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.