I came across an ip like this the other day

I thought the /16 referred to the number of subnetting addresses the IP could generate. However, I suspect I may be horribly wrong and felt that the Linux/Unix experts on this forum could assist.


The value after the slash, i.e. the 24 in your example, uses CIDR notation to indicate the number of bits available for network addressing as distinct from host addressing. For IPv4 each IP address is 32 bits, so the host addressing for a /24 network would be 32 - 24 = 8 bits.

Let's look at this a bit more closely.

Take an example address This says that 24 bits of the 32 are for the network address. Each octet is 8 bits so it become trivially easy to see that this means that 192.168.1 is the network address, and the remainder is for the host. Eight bits gives 28 addresses, i.e. 256. The lowest is unavailable and the highest is reserved for local network broadcasts, so that leaves room for 254 host addresses, all beginning with 192.168.1.

Now take an example address Here we have 16 bits of the 32 for network addressing, leaving 16 bits for the hosts on the network. We have 216 = 65536 host addresses but, as before, two are pre-allocated so you have 65534 available addresses for hosts on this network, all starting 192.168.

This is all very easy; where it gets exciting is when the subnet field is not a multiple of eight. For example, you could have a network The same rules apply though; you have 26 bits for the network address and 6 bits for the hosts on that network. 26 is 64 and two are reserved so you can have 62 hosts on such a network. Using the ipcalc tool you can see that the valid IP addresses on this network would be to

Address:        11000000.10101000.00000001.10 000000
Netmask: = 26 11111111.11111111.11111111.11 000000
Wildcard:             00000000.00000000.00000000.00 111111
Network:     11000000.10101000.00000001.10 000000
HostMin:        11000000.10101000.00000001.10 000001
HostMax:        11000000.10101000.00000001.10 111110
Broadcast:        11000000.10101000.00000001.10 111111
Hosts/Net: 62                    Class C, Private Internet
  • @Isaac I believe I have edited the answer to address your concerns – roaima Jan 14 at 15:27

An /16 is usually used to indicate the number of bits that are fixed (would not change) in a range of addresses of a network. That is a simpler syntax to express the CIDR.

Having an IP number as means that any address from up to is part of that address range or network.

However, an IP number that starts with 255, similar to the one you wrote is usually used only for netmask and means that the first 16 bits are fixed and the rest may change.

A mask of and an a.b.c.d/16 have the exact same masking bits (or bits used).

An IP of is reserved by IANA for future use and also called the "limited broadcast" destination address for the network. Or, in layman terms Broadcast Address.

The full explanation is a bit longer, but this is the gist of it.


The diminish following the IP address is the abbreviation for the subnet mask. ... The quantity of ones in the subnet masks is equal to the range of the abbreviation. For example, the /16 subnet masks you asked about would have sixteen ones in a row, the relaxation of the numbers being zeros. 11111111.11111111. 00000000.00000000.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.