223k views
5 votes
a site administrator has been told that a particular network at teh site must accommodate 126 hosts. which subnet mask would be used that contains the required number of host bits

User Qjuanp
by
8.9k points

1 Answer

5 votes

Final answer:

To support 126 hosts, a subnet mask of 255.255.255.128 is needed. This mask provides 7 host bits, allowing for 128 address combinations, which satisfies the need for 126 unique host addresses, after excluding the network and broadcast addresses.

Step-by-step explanation:

To accommodate 126 hosts on a network, a subnet mask that allows for enough host bits must be used. Each bit in the host part of an IP address can be either a 0 or a 1, which equates to two possible values. To calculate the number of host bits required, you can use the formula 2n - 2 >= number of hosts (the -2 accounts for the network and broadcast addresses that can't be assigned to hosts). For 126 hosts, the calculation would be 2n - 2 >= 126. The smallest value of n that satisfies this equation is 7, because 27 - 2 equals 128 - 2, which is 126.

Therefore, you would need 7 bits for the host portion of your IP address. A standard IPv4 address has 32 bits, divided into 4 octets. If you use 7 bits for hosts, that leaves us with 32 - 7 = 25 bits for the network portion. Thus, the subnet mask would be 255.255.255.128, because the first 25 bits are set to 1 and the remaining bits are set to 0. In binary, this would be represented as 11111111.11111111.11111111.10000000, which corresponds to 255.255.255.128 in decimal notation.

User Johan Walles
by
8.6k points