In: Computer Science
On a Class C network, how many hosts per subnet will you get if you have a subnet mask of 255.255.255.240. On how many subnets was divided this class C address? Show your calculations
255.255.255.240 Let's convert all octets to binary separately Converting 255 to binary Divide 255 successively by 2 until the quotient is 0 255/2 = 127, remainder is 1 127/2 = 63, remainder is 1 63/2 = 31, remainder is 1 31/2 = 15, remainder is 1 15/2 = 7, remainder is 1 7/2 = 3, remainder is 1 3/2 = 1, remainder is 1 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11111111 255 in binary is 11111111 Converting 240 to binary Divide 240 successively by 2 until the quotient is 0 240/2 = 120, remainder is 0 120/2 = 60, remainder is 0 60/2 = 30, remainder is 0 30/2 = 15, remainder is 0 15/2 = 7, remainder is 1 7/2 = 3, remainder is 1 3/2 = 1, remainder is 1 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11110000 240 in binary is 11110000 so, 255.255.255.240 in binary notation is 11111111.11111111.11111111.11110000 first 28 bits of this subnet mask are 1's. remaining 4 bits are 0's. 1) Number of hosts per subnet => 2^(number of 0 bits) - 2 => 2^4 - 2 => 16 - 2 => 14 Answer: 14 2) On how many subnets was divided this class C address => number of subnets in class C address = 2^number of 1's in last octet (11110000) => 2^4 => 16 Answer: 16