Subnetting: An IP addresses is a 32-bit number. That means an IP address has 32 placeholders for zero’s or one’s: 11001100101101100001000000000010 These 32-bits can represent 2 to the 32 or 4,294,967,296 unique numbers. IP addresses can be subdivided by periods into four sets of bytes: 11001100.10110110.00010000.00000010 A byte is 8 bits. This means each set of eight numbers can represent 2 to the 8 or 256 unique numbers. All four bytes therefore can yield 256x256x256x256 = 4,294,967,296 addresses. We can convert each binary representation of a byte into its decimal equivalent. This is called dotted quad notation and it’s how we normally write IP addresses: 204.182.16.2 Therefore IP addresses range from: 0.0.0.0 binary or 0.0.0.0 decimal to: 11111111.11111111.11111111.11111111 binary or 255.255.255.255 decimal IP addresses are grouped into networks. The beginning part of an IP address describes a unique network. The ending portion of an IP address describes a unique host. There are three types of networks, called class A, B and C. In a class A network the first byte designates a network and the remaining three bytes describe unique hosts. In a class B the first two bytes describe a network and the last two bytes describe hosts. In a class C the first three bytes describe a network and the last byte describes host. Class A, B and C networks also begin with specific numbers: Networks: First Byte: Network Bytes: Host Bytes: Class A >128 1 3 Class B 128-191 2 2 Class C 192-223 3 1 Reserved > 223 For example 204.182.16.2 begins with 204 so it is a class C network. Therefore the first three bytes, 204.182.16, describe a unique network and the trailing byte, 2, describes a unique host. We represent this network address as: 204.182.16.0 And we specify that the first three bytes belong to the network portion of the address by using what’s called a subnet mask: Class A Subnet Mask: 255.0.0.0 Class B Subnet Mask: 255.255.0.0 Class C Subnet Mask: 255.255.255.0 Subnets are normally divided on byte boundaries. For example, the class C network 204.182.16.0 would have a subnet mask of 255.255.255.0: Network: 204.182.16.0 Subnet Mask: 255.255.255.0 If we translate each byte back into bits the subnet mask would look like: 11111111.11111111.11111111.00000000 However, the subdivision of a subnet on the byte boundary is completely arbitrary. You can subdivide a network at any bit. For a class C there are eight possible bit-wise subnet division points: 11111111.11111111.11111111.00000000 11111111.11111111.11111111.10000000 11111111.11111111.11111111.11000000 11111111.11111111.11111111.11100000 11111111.11111111.11111111.11110000 11111111.11111111.11111111.11111000 11111111.11111111.11111111.11111100 11111111.11111111.11111111.11111110 11111111.11111111.11111111.11111111 From these data we can calculate the number of networks and the number of hosts per network we get with each bit-wise subnet division: Bits: Subnet: Subnet: Number of Number of IP’s (Binary) (Decimal) Networks: per Network: 0 00000000 0 1 256 1 10000000 128 2 128 2 11000000 192 4 64 3 11100000 224 8 32 4 11110000 240 16 16 5 11111000 248 32 8 6 11111100 252 64 4 7 11111110 254 128 2 8 11111111 255 256 1 The first column is the number of bits used for the subnet. This is shown by a binary number in the second column. The third column is just the binary number from the previous column converted into decimal. This number is used as the last part of the subnet mask. Note that addresses ending on network boundaries (multiples of the number of bits used for the subnetting) are reserved for subnetwork address and are therefore not available for host addresses. The last number of each subnet is used as the broadcast address. This means there are two less hosts per network then listed above. Therefore the actual numbers are: Bits: Subnet: Subnet: Number of Number of Hosts (Binary) (Decimal) Networks: per Network: 0 00000000 0 1 254 1 10000000 128 2 126 2 11000000 192 4 62 3 11100000 224 8 30 4 11110000 240 16 14 5 11111000 248 32 6 6 11111100 252 64 2 7 11111110 254 128 0 8 11111111 255 256 0 So for example, say we have a class C license, 204.182.16.0, and we want to break it into 16 Subnetworks with 14 hosts per network by using 4-bit subnetting. From the table we can see that we would use a subnet mask of: 204.182.16.240 This would yield 16 networks: 204.182.16.0 204.182.16.16 204.182.16.32 204.182.16.48 204.182.16.64 204.182.16.80 204.182.16.96 204.182.16.112 204.182.16.128 204.182.16.144 204.182.16.160 204.182.16.176 204.182.16.192 204.182.16.208 204.182.16.224 204.182.16.240 In this example, the twelfth subnetwork would be 204.182.16.176. It would have the following addresses: Network Address 204.182.16.176 Subnet Mask 204.182.16.240 Broadcast Address: 204.182.16.191 Host Addresses: 204.182.16.177 204.182.16.178 204.182.16.179 204.182.16.180 204.182.16.181 204.182.16.182 204.182.16.183 204.182.16.184 204.182.16.185 204.182.16.186 204.182.16.187 204.182.16.188 204.182.16.189 204.182.16.190 Below we have listed all 16 subnets with a netmask of 255.255.255.240 for the Class C Network 204.182.16.0. This yields 16 subnets with 224 hosts. To divide your class C address into subnetworks you simply have to choose the proper Subnet Mask and Broadcast address and use these in your configuration files. Network 1 Network 204.182.16.0 Network Address (do not assign to hosts) Network 1 Node 204.182.16.1 Network 1 Node 204.182.16.2 Network 1 Node 204.182.16.3 Network 1 Node 204.182.16.4 Network 1 Node 204.182.16.5 Network 1 Node 204.182.16.6 Network 1 Node 204.182.16.7 Network 1 Node 204.182.16.8 Network 1 Node 204.182.16.9 Network 1 Node 204.182.16.10 Network 1 Node 204.182.16.11 Network 1 Node 204.182.16.12 Network 1 Node 204.182.16.13 Network 1 Node 204.182.16.14 Network 1 Broadcast 204.182.16.15 Broadcast Address (do not assign to hosts) Network 2 Network 204.182.16.16 Network Address (do not assign to hosts) Network 2 Node 204.182.16.17 Network 2 Node 204.182.16.18 Network 2 Node 204.182.16.19 Network 2 Node 204.182.16.20 Network 2 Node 204.182.16.21 Network 2 Node 204.182.16.22 Network 2 Node 204.182.16.23 Network 2 Node 204.182.16.24 Network 2 Node 204.182.16.25 Network 2 Node 204.182.16.26 Network 2 Node 204.182.16.27 Network 2 Node 204.182.16.28 Network 2 Node 204.182.16.29 Network 2 Node 204.182.16.30 Network 2 Broadcast 204.182.16.31 Broadcast Address (do not assign to hosts) Network 3 Network 204.182.16.32 Network Address (do not assign to hosts) Network 3 Node 204.182.16.33 Network 3 Node 204.182.16.34 Network 3 Node 204.182.16.35 Network 3 Node 204.182.16.36 Network 3 Node 204.182.16.37 Network 3 Node 204.182.16.38 Network 3 Node 204.182.16.39 Network 3 Node 204.182.16.40 Network 3 Node 204.182.16.41 Network 3 Node 204.182.16.42 Network 3 Node 204.182.16.43 Network 3 Node 204.182.16.44 Network 3 Node 204.182.16.45 Network 3 Node 204.182.16.46 Network 3 Broadcast 204.182.16.47 Broadcast Address (do not assign to hosts) Network 4 Network 204.182.16.48 Network Address (do not assign to hosts) Network 4 Node 204.182.16.49 Network 4 Node 204.182.16.50 Network 4 Node 204.182.16.51 Network 4 Node 204.182.16.52 Network 4 Node 204.182.16.53 Network 4 Node 204.182.16.54 Network 4 Node 204.182.16.55 Network 4 Node 204.182.16.56 Network 4 Node 204.182.16.57 Network 4 Node 204.182.16.58 Network 4 Node 204.182.16.59 Network 4 Node 204.182.16.60 Network 4 Node 204.182.16.61 Network 4 Node 204.182.16.62 Network 4 Broadcast 204.182.16.63 Broadcast Address (do not assign to hosts) Network 5 Network 204.182.16.64 Network Address (do not assign to hosts) Network 5 Node 204.182.16.65 Network 5 Node 204.182.16.66 Network 5 Node 204.182.16.67 Network 5 Node 204.182.16.68 Network 5 Node 204.182.16.69 Network 5 Node 204.182.16.70 Network 5 Node 204.182.16.71 Network 5 Node 204.182.16.72 Network 5 Node 204.182.16.73 Network 5 Node 204.182.16.74 Network 5 Node 204.182.16.75 Network 5 Node 204.182.16.76 Network 5 Node 204.182.16.77 Network 5 Node 204.182.16.78 Network 5 Broadcast 204.182.16.79 Broadcast Address (do not assign to hosts) Network 6 Network 204.182.16.80 Network Address (do not assign to hosts) Network 6 Node 204.182.16.81 Network 6 Node 204.182.16.82 Network 6 Node 204.182.16.83 Network 6 Node 204.182.16.84 Network 6 Node 204.182.16.85 Network 6 Node 204.182.16.86 Network 6 Node 204.182.16.87 Network 6 Node 204.182.16.88 Network 6 Node 204.182.16.89 Network 6 Node 204.182.16.90 Network 6 Node 204.182.16.91 Network 6 Node 204.182.16.92 Network 6 Node 204.182.16.93 Network 6 Node 204.182.16.94 Network 6 Broadcast 204.182.16.95 Broadcast Address (do not assign to hosts) Network 7 Network 204.182.16.96 Network Address (do not assign to hosts) Network 7 Node 204.182.16.97 Network 7 Node 204.182.16.98 Network 7 Node 204.182.16.99 Network 7 Node 204.182.16.100 Network 7 Node 204.182.16.101 Network 7 Node 204.182.16.102 Network 7 Node 204.182.16.103 Network 7 Node 204.182.16.104 Network 7 Node 204.182.16.105 Network 7 Node 204.182.16.106 Network 7 Node 204.182.16.107 Network 7 Node 204.182.16.108 Network 7 Node 204.182.16.109 Network 7 Node 204.182.16.110 Network 7 Broadcast 204.182.16.111 Broadcast Address (do not assign to hosts) Network 8 Network 204.182.16.112 Network Address (do not assign to hosts) Network 8 Node 204.182.16.113 Network 8 Node 204.182.16.114 Network 8 Node 204.182.16.115 Network 8 Node 204.182.16.116 Network 8 Node 204.182.16.117 Network 8 Node 204.182.16.118 Network 8 Node 204.182.16.119 Network 8 Node 204.182.16.120 Network 8 Node 204.182.16.121 Network 8 Node 204.182.16.122 Network 8 Node 204.182.16.123 Network 8 Node 204.182.16.124 Network 8 Node 204.182.16.125 Network 8 Node 204.182.16.126 Network 8 Broadcast 204.182.16.127 Broadcast Address (do not assign to hosts) Network 9 Network 204.182.16.128 Network Address (do not assign to hosts) Network 9 Node 204.182.16.129 Network 9 Node 204.182.16.130 Network 9 Node 204.182.16.131 Network 9 Node 204.182.16.132 Network 9 Node 204.182.16.133 Network 9 Node 204.182.16.134 Network 9 Node 204.182.16.135 Network 9 Node 204.182.16.136 Network 9 Node 204.182.16.137 Network 9 Node 204.182.16.138 Network 9 Node 204.182.16.139 Network 9 Node 204.182.16.140 Network 9 Node 204.182.16.141 Network 9 Node 204.182.16.142 Network 9 Broadcast 204.182.16.143 Broadcast Address (do not assign to hosts) Network 10 Network 204.182.16.144 Network Address (do not assign to hosts) Network 10 Node 204.182.16.145 Network 10 Node 204.182.16.146 Network 10 Node 204.182.16.147 Network 10 Node 204.182.16.148 Network 10 Node 204.182.16.149 Network 10 Node 204.182.16.150 Network 10 Node 204.182.16.151 Network 10 Node 204.182.16.152 Network 10 Node 204.182.16.153 Network 10 Node 204.182.16.154 Network 10 Node 204.182.16.155 Network 10 Node 204.182.16.156 Network 10 Node 204.182.16.157 Network 10 Node 204.182.16.158 Network 10 Broadcast 204.182.16.159 Broadcast Address (do not assign to hosts) Network 11 Network 204.182.16.160 Network Address (do not assign to hosts) Network 11 Node 204.182.16.161 Network 11 Node 204.182.16.162 Network 11 Node 204.182.16.163 Network 11 Node 204.182.16.164 Network 11 Node 204.182.16.165 Network 11 Node 204.182.16.166 Network 11 Node 204.182.16.167 Network 11 Node 204.182.16.168 Network 11 Node 204.182.16.169 Network 11 Node 204.182.16.170 Network 11 Node 204.182.16.171 Network 11 Node 204.182.16.172 Network 11 Node 204.182.16.173 Network 11 Node 204.182.16.174 Network 11 Broadcast 204.182.16.175 Broadcast Address (do not assign to hosts) Network 12 Network 204.182.16.176 Network Address (do not assign to hosts) Network 12 Node 204.182.16.177 Network 12 Node 204.182.16.178 Network 12 Node 204.182.16.179 Network 12 Node 204.182.16.180 Network 12 Node 204.182.16.181 Network 12 Node 204.182.16.182 Network 12 Node 204.182.16.183 Network 12 Node 204.182.16.184 Network 12 Node 204.182.16.185 Network 12 Node 204.182.16.186 Network 12 Node 204.182.16.187 Network 12 Node 204.182.16.188 Network 12 Node 204.182.16.189 Network 12 Node 204.182.16.190 Network 12 Broadcast 204.182.16.191 Broadcast Address (do not assign to hosts) Network 13 Network 204.182.16.192 Network Address (do not assign to hosts) Network 13 Node 204.182.16.193 Network 13 Node 204.182.16.194 Network 13 Node 204.182.16.195 Network 13 Node 204.182.16.196 Network 13 Node 204.182.16.197 Network 13 Node 204.182.16.198 Network 13 Node 204.182.16.199 Network 13 Node 204.182.16.200 Network 13 Node 204.182.16.201 Network 13 Node 204.182.16.202 Network 13 Node 204.182.16.203 Network 13 Node 204.182.16.204 Network 13 Node 204.182.16.205 Network 13 Node 204.182.16.206 Network 13 Broadcast 204.182.16.207 Broadcast Address (do not assign to hosts) Network 14 Network 204.182.16.208 Network Address (do not assign to hosts) Network 14 Node 204.182.16.209 Network 14 Node 204.182.16.210 Network 14 Node 204.182.16.211 Network 14 Node 204.182.16.212 Network 14 Node 204.182.16.213 Network 14 Node 204.182.16.214 Network 14 Node 204.182.16.215 Network 14 Node 204.182.16.216 Network 14 Node 204.182.16.217 Network 14 Node 204.182.16.218 Network 14 Node 204.182.16.219 Network 14 Node 204.182.16.220 Network 14 Node 204.182.16.221 Network 14 Node 204.182.16.222 Network 14 Broadcast 204.182.16.223 Broadcast Address (do not assign to hosts) Network 15 Network 204.182.16.224 Network Address (do not assign to hosts) Network 15 Node 204.182.16.225 Network 15 Node 204.182.16.226 Network 15 Node 204.182.16.227 Network 15 Node 204.182.16.228 Network 15 Node 204.182.16.229 Network 15 Node 204.182.16.230 Network 15 Node 204.182.16.231 Network 15 Node 204.182.16.232 Network 15 Node 204.182.16.233 Network 15 Node 204.182.16.234 Network 15 Node 204.182.16.235 Network 15 Node 204.182.16.236 + Network 15 Node 204.182.16.237 Network 15 Node 204.182.16.238 Network 15 Broadcast 204.182.16.239 Broadcast Address (do not assign to hosts) Network 16 Network 204.182.16.240 Network Address (do not assign to hosts) Network 16 Node 204.182.16.241 Network 16 Node 204.182.16.242 Network 16 Node 204.182.16.243 Network 16 Node 204.182.16.244 Network 16 Node 204.182.16.245 Network 16 Node 204.182.16.246 Network 16 Node 204.182.16.247 Network 16 Node 204.182.16.248 Network 16 Node 204.182.16.249 Network 16 Node 204.182.16.250 Network 16 Node 204.182.16.251 Network 16 Node 204.182.16.252 Network 16 Node 204.182.16.253 Network 16 Node 204.182.16.254 Network 16 Broadcast 204.182.16.255 Broadcast Address (do not assign to hosts)