Find Network for /28

Intermediate Identify

Question

Given the IP address 172.20.5.100 with a /28 prefix length, identify the network address, broadcast address, first usable host, last usable host, and total number of usable hosts.

Given

{
  "ip": "172.20.5.100",
  "prefix": 28
}

Answer

{
  "network": "172.20.5.96",
  "broadcast": "172.20.5.111",
  "first_host": "172.20.5.97",
  "last_host": "172.20.5.110",
  "host_count": 14
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Convert /28 to a subnet mask

28 network bits, 4 host bits:

Binary:      11111111.11111111.11111111.11110000
Decimal:     255      .255     .255     .240

Step 2: Find the block size

Block size = 256 − 240 = 16.

Network boundaries in the last octet: 0, 16, 32, 48, 64, 80, 96, 112, ...

Step 3: Locate 172.20.5.100 in the correct block

100 ÷ 16 = 6.25 → floor to 6 → block start = 6 × 16 = 96.

The network is 172.20.5.96 and covers addresses .96 through .111.

Binary verification:

IP address:    172. 20.  5.100  →  10101100.00010100.00000101.01100100
Subnet mask:   255.255.255.240  →  11111111.11111111.11111111.11110000
                               AND ─────────────────────────────────────
Network:       172. 20.  5. 96  →  10101100.00010100.00000101.01100000

Step 4: Find the broadcast address

Set the 4 host bits to 1:

Network:  172.20.5.96   →  ...01100000
Host = 1:               →  ...01101111
Broadcast: 172.20.5.111

Step 5: Calculate the host range

  • First host: 172.20.5.97
  • Last host: 172.20.5.110
  • Usable hosts: 2^4 − 2 = 16 − 2 = 14

/28 subnets are commonly used for small network segments such as server clusters or DMZs.

Summary

Field Value
Network 172.20.5.96
Broadcast 172.20.5.111
First host 172.20.5.97
Last host 172.20.5.110
Usable hosts 14

Related Terms

More Identify Worksheets