In: Computer Science
What subnet mask would you use for the 178.32.0.0 network, such that you can get 50 subnets and 1000 hosts per subnet?
Please show work.
255.255.252.0 or /22 Explanation: ------------- default subnet mask is /16 or 255.255.0.0 number of subnets = 50 number of additional bits for subnet mask = log2(50) = 5.64 => 6 bits total number of bits in subnet mask = 16+6 = 22 So, subnet mask in binary is 11111111.11111111.11111100.00000000 Now, let's convert this to decimal 11111111.11111111.11111100.00000000 Let's convert all octets to decimal separately Converting 11111111 to decimal Converting 11111111 to decimal 11111111 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1 => 128+64+32+16+8+4+2+1 => 255 11111111 in decimal is 255 Converting 11111111 to decimal Converting 11111111 to decimal 11111111 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1 => 128+64+32+16+8+4+2+1 => 255 11111111 in decimal is 255 Converting 11111100 to decimal Converting 11111100 to decimal 11111100 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+0x2^1+0x2^0 => 1x128+1x64+1x32+1x16+1x8+1x4+0x2+0x1 => 128+64+32+16+8+4+0+0 => 252 11111100 in decimal is 252 Converting 00000000 to decimal Converting 00000000 to decimal 00000000 => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0 => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1 => 0+0+0+0+0+0+0+0 => 0 00000000 in decimal is 0 ===================================================================================== || 11111111.11111111.11111100.00000000 in decimal notation is 255.255.252.0 || ===================================================================================== So, subnet mask in decimal is 255.255.252.0