Subnet and netmask

An IP address can be split into 2 different parts – the network- and the host-part.

When/How this partition is happening is defined via the netmask, which is built by the same 32 bit as an IP address (therefore in a range between and

The network part can be seen from left to right, the host part from right to left.


Netmask – Short /24
Available IP addresses in this subnetwork: 254

This means if we define a network with the first 3 numbers 192.168.0 are the network part and the last number 0 is the host part.

Theoratically there are 256 IP addresses available, but the first and last IP address inside a subnet are predefined. With our example of a /24 subnet => Network address => Broadcast address

That why we “only” have an actual useable area between and which sums up to a maximum of 254 usable addresses.

If we want to have more than 254 concurrent clients inside a given network we have to decrease the netmask. See the following table:

Netmaskusable IPv4 addressesNetmask visualized as bits 16.777.2141111’1111.0000’0000.0000’0000.0000’0000 (/12)max. 1.048.5741111’1111.1111’0000.0000’0000.0000’0000 (/16)max. 65.5341111’1111.1111’1111.0000’0000.0000’0000 (/20)max. 40941111’1111.1111’1111.1111’0000.0000’0000 (/21)max. 20461111’1111.1111’1111.1111’1000.0000’0000 (/22)max. 10221111’1111.1111’1111.1111’1100.0000’0000 (/23)max. 5101111’1111.1111’1111.1111’1110.0000’0000 (/24)max. 2541111’1111.1111’1111.1111’1111.0000’0000 (/25)max. 1261111’1111.1111’1111.1111’1111.1000’0000 (/26)max. 621111’1111.1111’1111.1111’1111.1100’0000 (/27)max. 301111’1111.1111’1111.1111’1111.1110’0000 (/28)max. 141111’1111.1111’1111.1111’1111.1111’0000 (/29)max. 61111’1111.1111’1111.1111’1111.1111’1000 (/30)max. 21111’1111.1111’1111.1111’1111.1111’1100 (/31)2 as P2P1111’1111.1111’1111.1111’1111.1111’1110 (/32)None1111’1111.1111’1111.1111’1111.1111’1111

But of course you can use multiple subnetworks and combine them with each other via a Router.

Why do we need subnetworks?

Subnetworks are needed so clients know if an IP-packet should be redirected only in the local network or if it should be handled by a router (and therefore redirected to another network).

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.