© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Constructing Network Addresses Calculating Subnet Masks
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Outline Overview What a Subnet Mask Does How End Systems Use Subnet Masks How Routers Use Subnet Masks Mechanics of Subnet Mask Operation Applying Subnet Mask Operation Summary Lab Exercise 5-4: Calculating Subnet Masks Lab Exercise 5-5: Modifying the IP Subnet Mask
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v What a Subnet Mask Does Tells the router the number of bits to look at when routing Defines the number of bits that are significant Used as a measuring tool, not to hide anything
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Mail Operation Example
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v End System Subnet Mask Operation
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v How Routers Use Subnet Masks
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Applying the Subnet Address Scheme
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Octet Values of a Subnet Mask Subnet masks, like IP addresses, are represented in the dotted decimal format like
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Default Subnet Masks Example Class A address (decimal): Example Class A address (binary): Default Class A mask (binary): Default Class A mask (decimal): Default classful prefix length:/8 Example Class C address (decimal): Example Class C address (binary): Default Class C mask (binary): Default Class C mask (decimal): Default classful prefix length:/24 Example Class B address (decimal): Example Class B address (binary): Default Class B mask (binary): Default Class B mask (decimal): Default classful prefix length:/16
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Procedure for Implementing Subnets 1. Determine the IP address assigned by the registry authority. 2. Based on the organizational and administrative structure, determine the number of subnets required. 3. Based on the address class and required number of subnets, determine the number of bits you need to borrow from the host ID. 4. Determine the binary and decimal value of the subnet mask. 5. Apply the subnet mask to the network IP address to determine the subnet and host addresses. 6. Assign subnet addresses to specific subnets.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Easy Steps for Determining Subnet Addresses
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Easy Steps for Determining Subnet Addresses (Cont.)
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Example: Applying a Subnet Mask for a Class C Address
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Example: Applying a Subnet Mask for a Class B Address
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Example: Applying a Subnet Mask for a Class A Address
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Summary The subnet mask is the tool that the router uses to determine which bits are routing (network and subnet) bits and which bits are host bits. End systems use subnet masks to compare the network portion of the local network addresses with the destination addresses of the packets to be sent. Routers use subnet masks to determine if the network portion of an IP address is on the corresponding routing table or if the packet needs to be sent to the next router.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Summary (Cont.) In CIDR notation, the value n in /n format of the representation indicates how many bits in the subnet mask are set to 1. Subnet masks that fall on the octet boundary are considered default subnet masks. The CIDR notation for the default Class A subnet mask is A = /8. The CIDR notation for the default Class B subnet mask is B = /16. The CIDR notation for the default Class C subnet mask is C = /24.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Summary (Cont.) Determining the subnetwork and host addresses using a subnet mask is accomplished through this procedure: 1. Write the octet being split in binary. 2. Write the mask in binary and draw a line to delineate the significant bits. 3. Cross out the mask so you can view the significant bits. 4. Copy the subnet bits four times. 5. Define the network address by placing all zeroes in the host bits. 6. Define the broadcast address by placing all ones in the host bits. 7. Define the first and last host numbers. 8. Increment the subnet bits by one.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v