# Subnetting Practicals
## Exercise 1 - Basic Subnetting
Given network 192.168.10.0/24, divide it into 4 equal subnets.
Solution:
Need 4 subnets so borrow 2 bits from host portion.
New prefix = /24 + 2 = /26
Subnet mask = 255.255.255.192
Block size = 256 - 192 = 64
Subnet 1: Network 192.168.10.0, Hosts .1 to .62, Broadcast .63
Subnet 2: Network 192.168.10.64, Hosts .65 to .126, Broadcast .127
Subnet 3: Network 192.168.10.128, Hosts .129 to .190, Broadcast .191
Subnet 4: Network 192.168.10.192, Hosts .193 to .254, Broadcast .255
## Exercise 2 - Host Requirement Subnetting
A company needs subnets for departments with 50, 25, 12, and 2 hosts. Use 192.168.1.0/24.
Solution using VLSM allocate largest first:
Department 1 needs 50 hosts. Use /26 providing 62 hosts.
Subnet: 192.168.1.0/26, Hosts .1 to .62, Broadcast .63
Department 2 needs 25 hosts. Use /27 providing 30 hosts.
Subnet: 192.168.1.64/27, Hosts .65 to .94, Broadcast .95
Department 3 needs 12 hosts. Use /28 providing 14 hosts.
Subnet: 192.168.1.96/28, Hosts .97 to .110, Broadcast .111
Department 4 needs 2 hosts. Use /30 providing 2 hosts.
Subnet: 192.168.1.112/30, Hosts .113 to .114, Broadcast .115
## Exercise 3 - Find Subnet Information
Given IP address 172.16.45.200/20, find network address, broadcast, and host range.
Solution:
/20 means 20 network bits. Third octet has 4 network bits and 4 host bits.
Block size in third octet = 2 to the power of 4 = 16
Third octet 45 divided by 16 = 2 remainder 13, so subnet starts at 2 times 16 = 32
Network address: 172.16.32.0
Broadcast: 172.16.47.255
First host: 172.16.32.1
Last host: 172.16.47.254
Total hosts: 4094
Usable hosts: 4094
## Exercise 4 - Supernetting
Combine these four networks into one summary route:
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
Solution:
Third octet values 0, 1, 2, 3 in binary are 00, 01, 10, 11
The first 22 bits are common to all four.
Summary route: 192.168.0.0/22
Verify: 192.168.0.0/22 covers 192.168.0.0 to 192.168.3.255 which includes all four networks.
## Exercise 5 - Identify Class and Default Mask
Identify the class and default subnet mask of these addresses:
10.5.6.7 - Class A - default mask /8 - 255.0.0.0
172.20.1.1 - Class B - default mask /16 - 255.255.0.0
192.168.5.100 - Class C - default mask /24 - 255.255.255.0
224.0.0.1 - Class D - multicast - no default host mask
127.0.0.1 - Loopback - special addressBack to Subject