IP Addressing and Subnetting Explained Step by Step

Every device on a network needs an address. In IPv4, that address is a 32-bit number, written as four decimal numbers separated by dots, such as 192.168.10.45. Subnetting is the skill of splitting one larger network into smaller ones.

What the prefix means

The number after the slash, such as /26, tells you how many of the 32 bits belong to the network part. The remaining bits identify hosts. A /26 uses 26 network bits and leaves 6 host bits, and its subnet mask is 255.255.255.192.

How many hosts fit in a subnet

Use this formula: usable hosts = 2^(host bits) − 2. The two addresses taken away are the network address and the broadcast address. For a /26, 2^6 = 64, minus 2 gives 62 usable hosts.

Worked example: 192.168.10.45/26

  1. The block size is 64 (256 − 192).
  2. The subnets in the last octet start at 0, 64, 128 and 192.
  3. 45 falls inside the block starting at 0, so the network address is 192.168.10.0.
  4. The broadcast address is the last address in the block: 192.168.10.63.
  5. Usable hosts run from 192.168.10.1 to 192.168.10.62.

Practice

Try 172.16.5.130/27 yourself. The block size is 32, the network is 172.16.5.128, the broadcast is 172.16.5.159, and there are 30 usable hosts. You can check any answer with the subnet calculator on the TECHGAYAN homepage.

Leave a Comment

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

Scroll to Top