Class B IP Analysis
Nerd Cafe | نرد کافه
Let’s do a step-by-step IP analysis of:
IP: 172.16.1.20/16We will find:
Network IP
Broadcast IP
First IP (usable)
Last IP (usable)
Number of available IPs (hosts)
Subnet mask
Write IP in binary
Break down each octet to binary:
1
172
10101100
2
16
00010000
3
1
00000001
4
20
00010100
Full IP in binary:
10101100.00010000.00000001.000101001. Subnet Mask in binary
Means:
16 bits for network (all 1’s)
16 bits for host (all 0’s)
1
255
11111111
2
255
11111111
3
0
00000000
4
0
00000000
Subnet mask:
Binary:
Meaning:
First 24 bits = Network part
Last 8 bits = Host part
2. Find Network Address
Rule:
IP in binary:
Subnet Mask:
Bitwise AND:
Convert to decimal:
1
11000000
172
2
00010000
16
3
00000000
0
4
00000000
0
Network Address
3. Find Broadcast Address
Rule:
Broadcast = Network Address with all host bits = 1
Network bits (first 24) stay the same
Host bits (last 8) all 1
Binary:
Decimal:
1
10101100
172
2
00010000
16
3
11111111
255
4
11111111
255
Broadcast Address
4. First Usable IP
Rule:
First Usable = Network Address + 1
Network Address: 172.16.0.0
Add 1 to last octet:
Network Address:
First IP in Binary:
First Usable IP
5. Last Usable IP
Rule:
Last Usable = Broadcast - 1
Broadcast Address: 172.16.255.255
Subtract 1 from last octet:
Broadcast Address:
Last IP in Binary:
Last Usable IP
6. Number of Usable IPs
Rule:
Host bits = 16 (since /16)
Calculation:
Number of usable IP
Final Answer in Table (with Binary)
Subnet Mask
255.255.0.0
11111111.11111111.00000000.00000000
Network Address
172.16.0.0
10101100.00010000.00000000.00000000
Broadcast Address
172.16.255.255
10101100.00010000.11111111.11111111
First Usable IP
172.16.0.1
10101100.00010000.00000000.00000001
Last Usable IP
172.16.255.254
10101100.00010000.11111111.11111110
Number of Usable IPs
65,534
(2^16)-2
💖 Support Our Work
If you find this post helpful and would like to support my work, you can send a donation via TRC-20 (USDT). Your contributions help us keep creating and sharing more valuable content.
TRC-20 Address: TAAVVf9ZxUpbyvTa6Gd5SGPmctBdy4PQwf
Thank you for your generosity! 🙏
Keywords
Network IP , Broadcast IP , First IP (usable) , Last IP (usable) , Number of available IPs (hosts) , Subnet mask , Nerd Cafe , نرد کافه
🌐 Website: www.nerd-cafe.ir
📺 YouTube: @nerd-cafe
🎥 Aparat: nerd_cafe
📌 Pinterest: nerd_cafe
📱 Telegram: @nerd_cafe
📝 Blog: Nerd Café on Virgool
💻 GitHub: nerd-cafe
Last updated