Computer Networking · Intermediate level

Intermediate level · Module 1: TCP/IP and Subnetting · Lesson 2 of 3

Subnetting IPv4

Divide an address block into correctly sized subnets.

In this lesson you will

  • Convert between CIDR and subnet masks
  • Calculate network, host range and broadcast

Key concepts

CIDR prefixsubnet maskusable hostsbroadcast address

The lesson

A prefix such as /26 means 26 network bits, leaving 6 host bits: 2⁶ = 64 addresses, of which 62 are usable (the first is the network address, the last the broadcast).

The mask for /26 is 255.255.255.192. Subnets of this size start at multiples of 64: .0, .64, .128, .192.

Choose the smallest subnet that fits each group with room to grow.

Step by step

  1. Convert prefixes to masks.
  2. Calculate block sizes.
  3. Find network, first, last and broadcast addresses.
  4. Check with a classmate.
Worked calculation

Calculating a /26 subnet

Finding the mask, address count and usable range for 192.168.10.0/26.

Subnet 192.168.10.0/26
ItemWorkingAmount
Host bits32 − 266
Addresses in the block2⁶64
Subnet mask26 ones: 255.255.255.(256 − 64)255.255.255.192
Network addressfirst address192.168.10.0
Usable host rangefirst + 1 to last − 1192.168.10.1 – 192.168.10.62
Broadcast addresslast address192.168.10.63
Usable hosts64 − 262

Explanation

The block size, 64, tells you where subnets start: 192.168.10.0, .64, .128 and .192. The next subnet begins where this one ends.

Two addresses are reserved in each IPv4 subnet — the network address and the broadcast address — so a /26 serves 62 devices, including the gateway.

Check your understanding

4 subnets × 64 addresses = 256, the whole /24.

Practice activity

Subnet the /24 for five departments.

Expected result: Correct, non-overlapping subnets with ranges.

Check your understanding

  1. How many usable hosts are in a /26?

    Show answer

    62.

  2. What is the mask for /26?

    Show answer

    255.255.255.192.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.