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.

  • this is the mask : number of IP address in the network (the mask) then you can determinate the number from the mask
    – francois P
    Commented Jan 12, 2020 at 19:35
  • @francoisP so what you are saying mate is that if my network ip is say then the network of ip has exactly 24 IP addresses??
    – lsn00b
    Commented Jan 12, 2020 at 19:38
  • that is the number of 1 bits in the subnet mask ... sane as
    – jsotola
    Commented Jan 12, 2020 at 19:47
  • 4
    Note that nothing about this is specific to, or directly connected to, Linux. Or Unix for that matter. Hence superuser.com/q/196444/38062 and superuser.com/q/111593/38062 and superuser.com/q/922232/38062 and superuser.com/q/528775/38062 and superuser.com/q/1464492/38062 and …
    – JdeBP
    Commented Jan 12, 2020 at 19:48
  • Let's drop some names: CIDR
    – user313992
    Commented Jan 12, 2020 at 19:53

3 Answers 3


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, and the network address for a /24 network has 24 bits, so the host addressing for such a 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 (0) is unavailable and the highest (255) is reserved for local network broadcasts, so that leaves room for 254 host addresses, all beginning with 192.168.1.

Now take another 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 reserved ( and 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

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .