# Subnetting Practice Exercises
## Level 1 - Easy
Exercise 1:
Network: 192.168.1.0/24
Task: Find network address, broadcast address, first host, last host, and number of usable hosts.
Answer:
Network address: 192.168.1.0
Broadcast address: 192.168.1.255
First host: 192.168.1.1
Last host: 192.168.1.254
Usable hosts: 254
Exercise 2:
IP address: 192.168.5.100/26
Task: Identify which subnet this host belongs to.
Answer:
/26 block size = 64. Third multiple of 64 below 100 is 64.
Network address: 192.168.5.64
Broadcast: 192.168.5.127
Host is in subnet 192.168.5.64/26.
Exercise 3:
Convert /28 to dotted decimal subnet mask.
Answer:
28 ones followed by 4 zeros in binary.
11111111.11111111.11111111.11110000
= 255.255.255.240
## Level 2 - Medium
Exercise 4:
Network: 10.0.0.0/8
Task: Create subnets of size /24. How many subnets? How many hosts per subnet?
Answer:
Bits borrowed = 24 - 8 = 16 bits.
Number of /24 subnets = 2^16 = 65,536 subnets.
Host bits per subnet = 32 - 24 = 8.
Usable hosts per subnet = 2^8 - 2 = 254.
Exercise 5:
A company needs subnets supporting 200 hosts, 100 hosts, 50 hosts, and 25 hosts from 192.168.0.0/24.
Answer using VLSM allocate largest first:
200 hosts needs /24 which gives 254 hosts but that uses entire network.
Actually 200 hosts needs at least 8 host bits giving /24, not possible within /24 parent.
Recalculate: 200 hosts needs 2^h >= 202, so h=8 giving /24. Cannot fit in /24 parent.
Corrected using 10.0.0.0/22 instead:
200 hosts: /24 - 10.0.0.0/24, hosts .1 to .254
100 hosts: /25 - 10.0.1.0/25, hosts .1 to .126
50 hosts: /26 - 10.0.1.128/26, hosts .129 to .190
25 hosts: /27 - 10.0.1.192/27, hosts .193 to .222
Exercise 6:
IP: 172.20.55.67/21
Find network address and broadcast address.
Answer:
/21 means interesting octet is third octet with 5 network bits and 3 host bits.
Block size = 2^3 = 8.
55 / 8 = 6 remainder 7, subnet starts at 6 x 8 = 48.
Network: 172.20.48.0
Broadcast: 172.20.55.255
## Level 3 - Hard
Exercise 7:
A router has the following networks in its routing table:
192.168.16.0/24
192.168.17.0/24
192.168.18.0/24
192.168.19.0/24
Summarize these into a single route.
Answer:
Third octet values: 16=00010000, 17=00010001, 18=00010010, 19=00010011.
Common bits: first 22 bits are 00010000 to 00010011, first 6 bits of third octet are common 000100.
Summary route: 192.168.16.0/22
Exercise 8:
How many subnets and hosts does 172.16.0.0/12 have when subnetted to /20?
Answer:
Bits borrowed = 20 - 12 = 8 bits.
Number of subnets = 2^8 = 256.
Host bits = 32 - 20 = 12.
Usable hosts = 2^12 - 2 = 4094.Back to Subject