What is the subnet mask for a network with 30 usable IP addresses?
Practice Questions
Q1
What is the subnet mask for a network with 30 usable IP addresses?
255.255.255.252
255.255.255.248
255.255.255.240
255.255.255.224
Questions & Step-by-Step Solutions
What is the subnet mask for a network with 30 usable IP addresses?
Step 1: Understand that a subnet mask determines how many IP addresses are available in a network.
Step 2: Know that each subnet has a certain number of usable IP addresses based on the subnet mask.
Step 3: Calculate the number of IP addresses needed. For 30 usable IP addresses, we need to find a subnet that can accommodate at least 32 addresses (30 + 2 for network and broadcast).
Step 4: Recognize that the formula for calculating the number of usable IP addresses is 2^n - 2, where n is the number of bits available for hosts.
Step 5: Find the smallest n such that 2^n - 2 >= 30. In this case, n = 5 because 2^5 - 2 = 30.
Step 6: Determine the total number of bits in an IPv4 address, which is 32 bits. Subtract the 5 bits used for hosts from 32 to find the bits used for the network: 32 - 5 = 27.
Step 7: The subnet mask is represented in CIDR notation as /27, which corresponds to 255.255.255.224.
Step 8: Verify that a /27 subnet provides 32 total IP addresses (30 usable + 1 network + 1 broadcast).