In: Computer Science
a) Class D b) 212.134.99.96 c) number of subnets = 8 d) first address is 212.134.99.97 last address is 212.134.99.126 IP Address: 212.134.99.112 ---------------------------------------- Let's first convert this into binary format 212.134.99.112 Let's convert all octets to binary separately Converting 212 to binary Divide 212 successively by 2 until the quotient is 0 > 212/2 = 106, remainder is 0 > 106/2 = 53, remainder is 0 > 53/2 = 26, remainder is 1 > 26/2 = 13, remainder is 0 > 13/2 = 6, remainder is 1 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11010100 So, 212 of decimal is 11010100 in binary 212 in binary is 11010100 Converting 134 to binary Divide 134 successively by 2 until the quotient is 0 > 134/2 = 67, remainder is 0 > 67/2 = 33, remainder is 1 > 33/2 = 16, remainder is 1 > 16/2 = 8, remainder is 0 > 8/2 = 4, remainder is 0 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 10000110 So, 134 of decimal is 10000110 in binary 134 in binary is 10000110 Converting 99 to binary Divide 99 successively by 2 until the quotient is 0 > 99/2 = 49, remainder is 1 > 49/2 = 24, remainder is 1 > 24/2 = 12, remainder is 0 > 12/2 = 6, remainder is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1100011 So, 99 of decimal is 1100011 in binary 99 in binary is 01100011 Converting 112 to binary Divide 112 successively by 2 until the quotient is 0 > 112/2 = 56, remainder is 0 > 56/2 = 28, remainder is 0 > 28/2 = 14, remainder is 0 > 14/2 = 7, remainder is 0 > 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 1110000 So, 112 of decimal is 1110000 in binary 112 in binary is 01110000 ===================================================================================== || 212.134.99.112 in binary notation is 11010100.10000110.01100011.01110000 || ===================================================================================== Subnet address: 255.255.255.224 ---------------------------------------- Let's convert this into binary format 255.255.255.224 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 So, 255 of decimal is 11111111 in binary 255 in binary is 11111111 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 So, 255 of decimal is 11111111 in binary 255 in binary is 11111111 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 So, 255 of decimal is 11111111 in binary 255 in binary is 11111111 Converting 224 to binary Divide 224 successively by 2 until the quotient is 0 > 224/2 = 112, remainder is 0 > 112/2 = 56, remainder is 0 > 56/2 = 28, remainder is 0 > 28/2 = 14, remainder is 0 > 14/2 = 7, remainder is 0 > 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 11100000 So, 224 of decimal is 11100000 in binary 224 in binary is 11100000 ====================================================================================== || 255.255.255.224 in binary notation is 11111111.11111111.11111111.11100000 || ====================================================================================== Remove all dots to form 11111111111111111111111111100000 Remove all 0's from the right side to form 111111111111111111111111111 Number of 1's in this is 27 so, Subnet mask is /27 For Calculating network ID, keep first 27 bits of 11010100.10000110.01100011.01110000 and set all remaining bits to 0. so, network ID in binary is 11010100.10000110.01100011.01100000 11010100.10000110.01100011.01100000: ---------------------------------------- 11010100.10000110.01100011.01100000 Let's convert all octets to decimal separately Converting 11010100 to decimal => 11010100 => 1x2^7+1x2^6+0x2^5+1x2^4+0x2^3+1x2^2+0x2^1+0x2^0 => 1x128+1x64+0x32+1x16+0x8+1x4+0x2+0x1 => 128+64+0+16+0+4+0+0 => 212 11010100 in decimal is 212 Converting 10000110 to decimal => 10000110 => 1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+1x2^2+1x2^1+0x2^0 => 1x128+0x64+0x32+0x16+0x8+1x4+1x2+0x1 => 128+0+0+0+0+4+2+0 => 134 10000110 in decimal is 134 Converting 01100011 to decimal => 01100011 => 0x2^7+1x2^6+1x2^5+0x2^4+0x2^3+0x2^2+1x2^1+1x2^0 => 0x128+1x64+1x32+0x16+0x8+0x4+1x2+1x1 => 0+64+32+0+0+0+2+1 => 99 01100011 in decimal is 99 Converting 01100000 to decimal => 01100000 => 0x2^7+1x2^6+1x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0 => 0x128+1x64+1x32+0x16+0x8+0x4+0x2+0x1 => 0+64+32+0+0+0+0+0 => 96 01100000 in decimal is 96 ===================================================================================== || 11010100.10000110.01100011.01100000 in decimal notation is 212.134.99.96 || ===================================================================================== ============================================ || So, Network ID is 212.134.99.96 || ============================================ For Calculating first valid address in subnet, add 1 to the network address. Network Address is 212.134.99.96 =============================================================== || So, first valid address in subnet is 212.134.99.97 || =============================================================== For Calculating last valid address in subnet, remove 1 from the broadcast address. Broadcast Address is 212.134.99.127 =============================================================== || So, last valid address in subnet is 212.134.99.126 || ===============================================================