Definition

A Network ID is the first address of a subnet, with every host bit zero. Compute it as IP address AND netmask.

Intuition

Addresses are divided into equal-sized, aligned blocks. A 16-address block starts at 0, 16, 32, and so on within the last octet; it cannot start at an arbitrary address such as 24.

Worked example

For 130.192.1.24/28, the final four bits are host bits:

24:   0001 | 1000
mask: 1111 | 0000
AND:  0001 | 0000 = 16

The Network ID is 130.192.1.16/28, broadcast .31, and ordinary usable hosts .17-.30.

Important rules

  • /30: last-octet starts are multiples of 4.
  • /29: last-octet starts are multiples of 8.
  • /28: last-octet starts are multiples of 16.
  • These last-octet shortcuts apply when the boundary is in that octet. For /23, inspect the third octet instead.
  • Compute broadcast by setting all host bits to one.

Common mistakes

  • Calling .24/28 an invalid IP address: it is a valid host address, but not a valid Network ID.
  • Assuming a Network ID always ends in .0: 130.192.1.4/30 is valid.
  • Ignoring the prefix: .4/30 names a subnet, but .4/29 lies inside .0/29.

Source

Lecture 01 - IPv4 Addressing and Routing, PDF page 11. Binary calculation and host range are added explanation.