Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

The General Steps for Subnetting an IPv4 Address

First of all, keep in mind the placeholder values for the eight bits of an octet: 27 128 26 64 25 32 24 16 23 8 22 4 21 2 20 1

1. From the given address, determine the address class by examining the first octet value. 2. Apply the default mask for the addresss class to determine the network portion of the address. 3. Write the network portion of the address in dotted decimal and the host portion in binary. a. Class B example: 172.16. 00000000.00000000 4. Determine the number of bits to borrow for the creation of subnets a. There are three ways this could be presented in a scenario. (For the sake of a consistent outcome, all three example options that follow will have the same result. The addresses and actual subnetting used in these examples are not the important things the process is the important thing.) 1. Option 1: The subnet mask to be applied is given in the scenario. a. Based on the given mask, determine the number of host bits borrowed to create subnets then place the subnet squiggle between the subnet bits and remaining host bits. 1. Class B example: Assume a given scenario subnet mask of 255.255.240.0. This mask indicates that four bits were borrowed from the third octet to create subnets so the subnet squiggle goes between the 4th and 5th bits in the third octet: 172.16. 0000|0000.00000000 2. Option 2: The scenario asks for the creation of a certain number of subnets. a. Apply the formula: 2N > Number of Subnets Needed (Where N is the number of host bits to be borrowed to create subnets.) Note: because of the binary placeholders, we usually have to create more subnets than are required. 1. Class B example: Assume a given scenario asking for the creation of 12 subnets so lets borrow 4 bits because 24 = 16. (Note: borrowing 3 bits gives us 23 = 8 subnets, so thats why we have to borrow 4 bits.) Lets place the subnet squiggle between the 4th and 5th bits in the third octet of our Class B address: 172.16. 0000|0000.00000000. Now determine the new subnet mask for this scenario to mask the first 4 bits of the third octet: 255.255.240.0 3. Option 3: The scenario asks for the creation of a certain number of useable host addresses per subnet. a. Apply the formula: 2H 2 > Number of Hosts per Subnet (Where H is the number of host bits remaining un-borrowed in the host portion of the 1

address.) Note: because of the binary placeholders, we usually have to create more host addresses than are required. Also, remember that the subnet and broadcast addresses cannot be assigned to a host device, therefore the reason for the minus two. 1. Class B example: Assume a given scenario asking for the creation of subnets supporting 4000 host addresses per subnet so lets leave 12 host bits un-borrowed because 212 2 = 4094. (Note: leaving 11 bits gives us 211 2 = 2046 hosts per subnet, so thats why we have to leave 12 bits.) Lets place the subnet squiggle between the 4th and 5th bits in the third octet of our Class B address: 172.16. 0000|0000.00000000. Now determine the new subnet mask for this scenario to mask the first four bits of the third octet: 255.255.240.0 5. Determine the increment between subnet addresses. a. The increment between subnet addresses is determined by the least significant bit in the subnet portion of the address (the bit just to the left of the subnet squiggle). 1. Class B example: Assume that four bits were borrowed from the third octet to create subnets, so the subnet squiggle goes between the 4th and 5th bits in the third octet: 172.16. 0000|0000.00000000. Referring to our chart of placeholder values on page one, we can see that the placeholder value of the 4th bit in the third octet is 16; therefore, the increment from one subnet to the next is 16. Always begin with subnet 0. Keep in mind that the host portion of the subnet address (the part of the address to the right of the subnet squiggle) will be all zeros in binary. Subnet Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Subnet Address 172.16.0.0 172.16.16.0 172.16.32.0 172.16.48.0 172.16.64.0 172.16.80.0 172.16.96.0 172.16.112.0 172.16.128.0 172.16.144.0 172.16.160.0 172.16.176.0 172.16.192.0 172.16.208.0 172.16.224.0 172.16.240.0

6. Determine the broadcast address for each subnet. a. The broadcast address of each subnet will be one less than the next subnet address. Remember that the host portion of the broadcast address (the part of the address to the right of the subnet squiggle) will be all ones in binary. 1. Continuing our Class B example from Step 5-a-1 above with the addition of each subnets broadcast address: Subnet Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Subnet Address 172.16.0.0 172.16.16.0 172.16.32.0 172.16.48.0 172.16.64.0 172.16.80.0 172.16.96.0 172.16.112.0 172.16.128.0 172.16.144.0 172.16.160.0 172.16.176.0 172.16.192.0 172.16.208.0 172.16.224.0 172.16.240.0 Broadcast Address 172.16.15.255 172.16.31.255 172.16.47.255 172.16.63.255 172.16.79.255 172.16.95.255 172.16.111.255 172.16.127.255 172.16.143.255 172.16.159.255 172.16.175.255 172.16.191.255 172.16.207.255 172.16.223.255 172.16.239.255 172.16.255.255

7. Determine the host range for each subnet. a. The host range for each subnet is simply from one more than the subnet address to one less than the broadcast address. 1. Continuing our Class B example from Step 6-a-1 above with the addition of each subnets host range: Subnet Number 0 1 2 3 4 5 6 7 8 Subnet Address 172.16.0.0 172.16.16.0 172.16.32.0 172.16.48.0 172.16.64.0 172.16.80.0 172.16.96.0 172.16.112.0 172.16.128.0 First Host Address 172.16.0.1 172.16.16.1 172.16.32.1 172.16.48.1 172.16.64.1 172.16.80.1 172.16.96.1 172.16.112.1 172.16.128.1 Last Host Address 172.16.15.254 172.16.31.254 172.16.47.254 172.16.63.254 172.16.79.254 172.16.95.254 172.16.111.254 172.16.127.254 172.16.143.254 Broadcast Address 172.16.15.255 172.16.31.255 172.16.47.255 172.16.63.255 172.16.79.255 172.16.95.255 172.16.111.255 172.16.127.255 172.16.143.255 3

9 10 11 12 13 14 15

172.16.144.0 172.16.160.0 172.16.176.0 172.16.192.0 172.16.208.0 172.16.224.0 172.16.240.0

172.16.144.1 172.16.160.1 172.16.176.1 172.16.192.1 172.16.208.1 172.16.224.1 172.16.240.1

172.16.159.254 172.16.175.254 172.16.191.254 172.16.207.254 172.16.223.254 172.16.239.254 172.16.255.254

172.16.159.255 172.16.175.255 172.16.191.255 172.16.207.255 172.16.223.255 172.16.239.255 172.16.255.255

Things to keep in mind: 1. Treat each subnetting problem individually. Do not assume that each problem will require the same solution as the one you just solved. 2. Always document (write down) the known elements from each subnetting scenario. This will help you to find the unknown elements. 3. Not every subnetting scenario will require that you determine the address of every subnet. Sometimes you may be asked to just define a single component of a subnet such as the subnet address, a host address, or the broadcast address. 4. Subnet addresses and broadcast addresses are NEVER assigned to hosts or applied to any host devices interface configuration. The only way a subnet address is used is to identify an individual subnet in your documentation. 5. It is important to document (write down) subnet addresses on diagrams. This simple documentation of subnet addresses helps you to make sure that you are applying host IP addresses in a consistent manner.

You might also like