1

Consider a network with id 158.159.0.0. There are two subnets included, with subnet numbers 0.0.160.0 and 0.0.161.128. Determine the subnet mask, which allows a maximum number of hosts per subnet


I know a maximum number of hosts is reached with maximum 0s of Subnet Mask. So should it be 255.255.160.0 ? Or should I write different answers for both subnets ?

The answers found on the Internet relate to determining a number of hosts for a given Subnet Mask. Here is subnet mask not given and number of hosts also not.

arten22
  • 13
  • 4
  • the answer in the link says: "Calculating the maximum possible number of hosts in a subnet: Maximum Number of hosts = 2**(32 - netmask_length) - 2" So it does not help at all because I know neither number of host nor netmask, so can't solve the equation – arten22 Jun 04 '16 at 08:10
  • 1
    Subnet math is subnet math. It's all the same bits. – Ricky Jun 04 '16 at 08:28

1 Answers1

0

160 = 1010 0000 Thus 3 important bits: 1110 0000 or 224 (255.255.224.0) BUT we know there's a 161 subnet which a /19 would step on. So, the largest 160 can be without treading into 161 is "all bits" -- 255.255.255.0 (/24).

Similarly, 161.128 = 1010 0001.1000 0000 Thus 1 bit in the last octect: 255.255.255.128 (/25)

Ricky
  • 31,438
  • 2
  • 43
  • 84