Date: Wed, 06 Feb 2002 13:11:48 -0600 (CST) From: Mark Jacobson To: 810-023-01@uni.edu Subject: Subnet masks answers... Question #6: A company is assigned the network ID 150.134.0.0 by the InterNIC. The company wants to have 15 subnets and up to 1000 hosts per subnet. How many bits are needed for the custom subnet mask? Try using different methods to obtain the answer. Question #7: In question #6, what should the company use for the subnet mask? Answers: Since there are 15 subnets needed, 4 bits are required for the custom subnet mask y portion, as in w.x.y.z, since the w.x octets are part of the network id, for the class B network. 4 2 = 16 and 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111 are the 16 different possible bit patterns that can be written in binary with 4 binary digits, i.e. 4 bits, i.e. 1/2 byte. The answer is thus 20 bits are needed for the custom subnet mask. The default subnet mask of 255.255.0.0 requires 16 bits. The custom subnet mask of 255.255.240.0 requires 20 bits, 16 + 4 = 20 bits. That leaves 12 bits for the host identification, 32 - 20 = 12 bits. That allows for up to 4096 hosts on each of the 15 or 16 different subnets. ---- But the problem says the company only wants to have up to 1000 hosts per subnet. More than that would be too much pressure for one subnet. What does this mean? If the company really wants to only have up to 1000 hosts per subnet, and never more than that, then they really only need to have 10 bits, or 1024 or fewer hosts on each subnet. 10 2 = 1024 hosts on each subnet using 10 bits for host id portion, allows for up to 1000 hosts per subnet. 9 would be TOO FEW BITS, because 2 to the 9th power is 512, not enough for 1000 hosts. This means that we could use 6 bits for the subnet specification, and 10 bits for the host within the subnet, meaning that the subnet mask could be: 255.255.252.0 which is 11111111.11111111.11111100.00000000 11111111.11111111.11111100.00000000 nnnnnnnn.nnnnnnnn.sssssshh.hhhhhhhh where n is network and s is subnetwork and h is host. Note that using 6 bits for the subnet mask, plus the 12 bits of 255.255.0.0 to make the mask 255.255.252.0 means that we can have up to 64 subnets on our businesses network, giving plenty of room to grow in the future. If any group or portion of the organization gets up to the 1000 (actually 1024) computer host limit for their subnet, then we just split that into two or three subnets. Mark