Find Network Address for /16

Beginner Identify

Question

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

Given

{
  "ip": "172.16.45.200",
  "prefix": 16
}

Answer

{
  "network": "172.16.0.0",
  "broadcast": "172.16.255.255",
  "first_host": "172.16.0.1",
  "last_host": "172.16.255.254",
  "host_count": 65534
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Convert the prefix length to a subnet mask

A /16 prefix means the first 16 bits are the network portion:

Binary subnet mask: 11111111.11111111.00000000.00000000
Dotted decimal:     255      .255     .0       .0

Step 2: Apply the subnet mask to find the network address

Bitwise AND between the IP and subnet mask:

IP address:    172. 16. 45.200  →  10101100.00010000.00101101.11001000
Subnet mask:   255.255.  0.  0  →  11111111.11111111.00000000.00000000
                               AND ─────────────────────────────────────
Network:       172. 16.  0.  0  →  10101100.00010000.00000000.00000000

Step 3: Find the broadcast address

Set all host bits (last 16 bits) to 1:

Network:       172.16.0.0     →  10101100.00010000.00000000.00000000
Host bits all 1:               →  10101100.00010000.11111111.11111111
Broadcast:     172.16.255.255

Step 4: Calculate the host range

  • First host: 172.16.0.1
  • Last host: 172.16.255.254
  • Usable hosts: 2^(32−16) − 2 = 2^16 − 2 = 65,536 − 2 = 65,534

Note that 172.16.0.0/16 is part of the RFC 1918 private address space (172.16.0.0–172.31.255.255).

Summary

Field Value
Network 172.16.0.0
Broadcast 172.16.255.255
First host 172.16.0.1
Last host 172.16.255.254
Usable hosts 65,534

Related Terms

More Identify Worksheets