Determine Subnet Mask for /27
Beginner IdentifyQuestion
Given the IP address 10.10.10.50 with a /27 prefix length, determine the subnet mask in dotted-decimal notation, the network address, the broadcast address, and the total number of usable hosts.
Given
{
"ip": "10.10.10.50",
"prefix": 27
}
Answer
{
"subnet_mask": "255.255.255.224",
"network": "10.10.10.32",
"broadcast": "10.10.10.63",
"host_count": 30
}
Try to solve it first, then click Reveal Answer
Step-by-Step Explanation
Step 1: Convert /27 to binary and dotted-decimal
A /27 means 27 bits set to 1, followed by 5 bits set to 0:
Bit positions: 1 2 3 4 5 6 7 8 | ... | 25 26 27 28 29 30 31 32
Binary: 1 1 1 1 1 1 1 1 | ... | 1 1 1 0 0 0 0 0
Focus on the last octet: the first 3 bits are 1, the last 5 are 0:
Last octet binary: 1 1 1 0 0 0 0 0
Place values: 128 64 32 16 8 4 2 1
Mask value: 128 + 64 + 32 = 224
Subnet mask: 255.255.255.224
Step 2: Find the block size
Block size = 256 − 224 = 32.
Network boundaries: 0, 32, 64, 96, 128, 160, 192, 224.
Step 3: Locate 10.10.10.50 in the correct block
50 ÷ 32 = 1.5625 → floor to 1 → block start = 1 × 32 = 32.
The network address is 10.10.10.32.
Binary verification:
IP address: 10. 10. 10. 50 → 00001010.00001010.00001010.00110010
Subnet mask: 255.255.255.224 → 11111111.11111111.11111111.11100000
AND ─────────────────────────────────────
Network: 10. 10. 10. 32 → 00001010.00001010.00001010.00100000
Step 4: Broadcast and host range
Set the 5 host bits to 1:
Network: 10.10.10.32 → ...00100000
Host = 1: → ...00111111
Broadcast: 10.10.10.63
- Usable hosts: 2^5 − 2 = 32 − 2 = 30
Summary
| Field | Value |
|---|---|
| Subnet mask | 255.255.255.224 |
| Network | 10.10.10.32 |
| Broadcast | 10.10.10.63 |
| Usable hosts | 30 |