Implementing Subnet Planning


Implementing Subnet Planning
 
Without subnets, the organization operates as a single network. These flat topologies result in short routing tables but, as the network grows, the use of bandwidth becomes inefficient. (All systems on the network receive all the broadcasts on the network.) Network addressing can be made more efficient by breaking the addresses into smaller segments, or subnets. Subnetting provides additional structure to an addressing scheme without altering the addresses. In the figure, the network address 172.16.0.0 is subdivided into four subnets:
172.16.1.0, 172.16.2.0, 172.16.3.0, and 172.16.4.0. If traffic were evenly distributed to each end station, the use of subnetting would reduce the overall traffic seen by each end station by 75 percent.
 
 
Subnet Mask
 
A subnet mask is a 32-bit value written as four octets. In the subnet mask, each bit determines how the corresponding bit in the IP address should be interpreted (network, subnet, or host). The subnet mask bits are coded as follows:
  •  
  • Binary 1 for the network bits
  •  
  • Binary 1 for the subnet bits
  •  
  • Binary 0 for the host bits
    Although dotted decimal is the most common format, the subnet can be represented in several ways:
  •  
  • Dotted decimal—172.16.0.0 255.255.0.0
  •  
  • Bit count—172.16.0.0/16
  •  
  • Hexadecimal—172.16.0.0 0xFFFF0000
     
    The ip netmask-format command can be used to specify the format of network masks for the current session. Dotted decimal is the default.
     
     
    Default Subnet Masks
     
    Each address class has a default subnet mask. The default subnet masks only the network portion of the address, the effect of which is no subnetting. With each bit of subnetting beyond the default, you can create 2n – 2 subnets. These examples show the effect of adding subnet bits.
     
     
     
    How Routers Use Subnet Masks
     
    To determine an address’s subnet, a router performs a logical AND operation with the IP address and subnet mask. Recall that the host portion of the subnet mask is all 0s. The result of this operation is that the host portion of the address is removed, and the router bases its decision on only the network portion of the address. In the figure, the host bits are removed, and the network portion of the address is revealed. In this case, a 10-bit subnet address is used, and the network (subnet) number 172.16.2.128 is extracted.
     
     
    Broadcast Addresses
     
    Broadcast messages are sent to every host on the network. There are three kinds of broadcasts:
  •  
  • Directed broadcasts—You can broadcast to all hosts within a subnet and to all subnets within a network. (170.34.2.255 sends a broadcast to all hosts in the 170.34.2.0 subnet.)
  •  
  • Hop count is used as the metric for path selection (the maximum is 15).
  •  
  • Flooded broadcasts (255.255.255.255)—Local broadcasts within a subnet.
  •  
  • You can also broadcast messages to all hosts on all subnets within a single network. (170.34.255.255 sends a broadcast to all subnets in the 170.34.0.0 network.)
     
    Identifying Subnet Addresses
     
    Given an IP address and subnet mask, you can identify the subnet address, broadcast address, first usable address, and last usable address using this method:
    1 Write down the 32-bit address. Directly below that, write down the subnet mask.
    2 Draw a vertical line just after the last 1 bit in the subnet mask.
    3 Copy the portion of the IP address to the left of the line. Place all 0s for the remaining free spaces to the right. This is the subnet number.
    4 Copy the portion of the IP address to the left of the line. Place all 1s for the remaining free spaces to the right. This is the broadcast address.
    5 Copy the portion of the IP address to the left of the line. Place all 0s in the remaining free spaces until you reach the last free space. Place a 1 in that free space. This is your first usable address.
    6 Copy the portion of the IP address to the left of the line. Place all 1s in the remaining free spaces until you reach the last free space. Place a 0 in that free space. This is your last usable address.
     
     
    How to Implement Subnet Planning
     
    Subnetting decisions should always be based on growth estimates rather than current needs. To plan a subnet, follow these steps:
    1 Determine the number of subnets and hosts for each subnet required.
    2 The address class you are assigned and the number of subnets required determine the number of subnetting bits used. For example, with a Class C address and a need for 20 subnets, you will have a 29-bit mask (255.255.255.248). This allows for the Class C default 24-bit mask and 5 bits required for 20 subnets. (The formula 2n – 2 yields only 14 subnets for 4 bits, so 5 bits must be used.)
    3 The remaining bits in the last octet are used for the host field. In this case, each subnet has 23 – 2, or 6 hosts.
    4 The final host addresses are a combination of the network/subnet plus each host value. The hosts on the 192.168.5.32 subnet would be addressed as 192.168.5.33, 192.168.5.34, 192.168.5.35, and so forth.
     
     
    Implementing Subnet Planning Summary
  •  
  • Breaking up networks into smaller segments (or subnets) improves network efficiency and conserves IP addresses.
  •  
  • A 32-bit subnet mask determines the boundary between the subnet host portions of the IP address using 1s and 0s.
  •  
  • A subnet defines a broadcast domain in a routed network.
  •  
  • Cisco IOS Software supports directed, local network, and subnet broadcasts.
  •  
  • Subnet planning should be based on future growth predictions rather than current needs.
     
    Continue on to the Configuring IP Addresses Article
     

    Specials more
    Cisco CCNA Lab Workbook
    Cisco CCNA Lab Workbook
    $39.99
    $29.99
    Specials more
    Cisco CCNA CRAM Sheet
    Cisco CCNA CRAM Sheet
    $17.99
    $14.99
    Specials more
    Cisco CCNA/CCNP Training CD
    Cisco CCNA/CCNP Training CD
    $39.99
    $29.99
    Shopping Cart more
    0 items
    Bestsellers
    01.1900/2900/3500 Rack Mount Kit
    02.Back to Back Cable
    03.2500 Rack Mount Kits
    04.2600/3620/PIX 515 Rack Mount Kits
    05.12U Home Rack Stand
    06.Transceiver
    07.Cisco CCNA Lab Workbook
    08.3640/AS5300 Rack Mount Kit
    09.WIC-1T
    10.Advanced CCNA/Starter CCNP Kit III