2Outline Overview What a Subnet Mask Does How End Systems Use Subnet MasksHow Routers Use Subnet MasksMechanics of Subnet Mask OperationApplying Subnet Mask OperationSummaryLab Exercise 5-1: Modifying the IP Subnet Mask
3What a Subnet Mask DoesSubnet mask used by routers and hosts to determine the number of network-significant bits in an IP address
9Subnet Masks on Octet Boundaries Using the Boolean or Logical “AND” Procedure255 means all 1’s in mask - therefore copy entire octet0 means all 0’s in mask - therefore 0 entire octet
10Subnet Masks on Non-Octet Boundaries Using the Boolean or Logical “AND” Procedure255 means all 1s in mask; therefore, copy entire octet.0 means all 0s in mask; therefore, 0 entire octet.Any other value of octet means we must examine the address inbinary format.Therefore, network address =
11Example: Using a Given Class C Address and Given Subnet Mask
14SummarySubnet masks help routers and end systems immediately recognize the network and subnet portion of IP addresses.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.The subnet mask is the tool used by the router to determine which bits are routing (network and subnet) bits and which bits are host bits.The Boolean AND operation is carried out by evaluating a mask bit against an address bit and supplying a result, which is either 0 or 1.
15Summary (Cont.)The effect of the Boolean operation between the IP address and the subnet mask is to replace all the host-significant part of the IP address with 0s.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.
16Summary (Cont.)Subnet masks that fall within an octet are considered to be on non-octet boundaries. These subnet masks are slightly more difficult to calculate than masks on octet boundaries.Determining the subnetwork number is accomplished through this procedure:Express the IP address in binary form.Express the subnet mask in binary form.Perform the AND operation on the IP address and the subnet mask, yielding the subnet address in binary form.Express the subnet address in decimal form.