What is the primary purpose of a subnet mask in a network?
Think about how networks separate devices into groups.
A subnet mask helps identify which part of an IP address refers to the network and which part refers to the host (device). This division allows networks to be split into smaller subnetworks.
If a subnet mask is 255.255.255.240, how many usable host addresses are available in that subnet?
Calculate the number of host bits and subtract network and broadcast addresses.
The mask 255.255.255.240 corresponds to 28 bits for the network and 4 bits for hosts. 2^4 = 16 addresses total, but 2 are reserved (network and broadcast), so 14 usable hosts.
You need to create a subnet that supports at least 100 hosts. Which subnet mask should you use?
Calculate how many host bits are needed to support 100 hosts.
255.255.255.128 has 7 host bits (2^7=128 addresses). Subtracting 2 reserved addresses gives 126 usable hosts, enough for 100 hosts. Other masks provide fewer usable hosts.
Which subnet mask creates the largest number of subnets but the smallest number of hosts per subnet?
More subnet bits mean more subnets but fewer hosts per subnet.
255.255.255.224 uses 3 bits for subnetting (more subnets) and 5 bits for hosts (fewer hosts). It creates more subnets but fewer hosts per subnet compared to others.
You have a subnet with IP address 192.168.1.64 and broadcast address 192.168.1.95. What is the subnet mask?
Calculate the range size between IP and broadcast to find host bits.
The range from 64 to 95 is 32 addresses. 2^5=32, so 5 host bits. The mask with 5 host bits is 255.255.255.224.