Chapter 6-5 Subnet Masks PDF
Document Details
Uploaded by LuckiestErbium
Tags
Summary
This document provides an overview of subnet masks and subnetting in computer networks, including examples and diagrams. Techniques for establishing subnets and subnet masks in computer networks are demonstrated. Examples are provided to guide readers through the process of borrowing bits to determine the number of available hosts in the subnet.
Full Transcript
Chapter 6-5 Subnet Masks Subnetting Subnetting is a technique used to break down (or partition) networks into subnets. The subnets are created through the use of subnet masks. The subnet mask identifies what bits in the IP address are to be used to represent...
Chapter 6-5 Subnet Masks Subnetting Subnetting is a technique used to break down (or partition) networks into subnets. The subnets are created through the use of subnet masks. The subnet mask identifies what bits in the IP address are to be used to represent the network/subnet portion of an IP address. The subnets are created by borrowing bits from the host portion of the IP address as shown. The network portion of the IP address and the new subnet bits are used to define the new subnet. Routers use this information to properly forward data packets to the proper subnet. The Class C network, shown is partitioned into four subnets. It takes 2 bits to provide four possible subnets therefore 2-bits are borrowed from the host bits. This means the process of creating the four subnets reduces the number of bits available for host IP addresses. The equations for calculating the number of subnets created and the number of hosts/subnet. 192.168.12.0 Network Subnet A Subnet B Subnet C Subnet D subnet mask = ? Partitioning a network into subnets. Network Host 24 + 2 = 26 bits 6 bits The next step is to determine the subnet mask required for creating the four subnets. Recall that creating the four subnets required borrowing 2 host bits. The two MSB (most significant bit) positions, borrowed from the host and network portion of the IP address must be included in the subnet mask selection. The purpose of the subnet mask is to specify the bit positions used to identify the network and subnet bits. Applying equations 6-1 and 6-2 to calculate the number of subnets and hosts/subnet. 192 168 12 ---- Creating the subnet mask to select the 192.168.12.0 subnet. Network + Subnet subnet Network Host Network Network Subnet bits Host bits Borrowed bits Borrowing bits from the host to create subnets. Example 6-8 Given a network address of 10.0.0.0, divide the network into 8 subnets. Specify the subnet mask, the broadcast addresses, and the number of usable hosts/subnet. Network + Subnet bits host bits 8 + 3 5 + 8 + 8 Example 6-9 Determine the subnet mask needed for the router link shown. Only two host addresses are required for this router-to-router link. Example 6-9 Determine the subnet mask needed for the router link shown. Only two host addresses are required for this router-to-router link. Answer: 255.255.255.252 Subnet Mask Computer’s use the subnet mask to control data flow within network’s. The subnet mask is used to determine if the destination IP address is intended for a host in the same LAN or if the data packet should be sent to the gateway IP address of the LAN. The gateway IP address is typically the physical network interface on a layer 3 switch or a router. Subnet Mask For example, assume that the IP address of the computer in the LAN is 172.16.35.3. A subnet mask of 255.255.255.0 is being used. This means that that all data packets with an IP address between 172.16.35.0 and 172.16.35.255 stay in the LAN. A data packet with a destination IP address of 172.16.34.15 is sent to the LAN gateway. The 255.255.255.0 subnet mask indicates that all bits in the first three octets must match each other to stay in this LAN. Destination Network ? This can be verified by “ANDing” the subnet mask with the destination address as shown. 172. 16. 35.3 255.255.255.0 172. 16. 35.0 in the same subnet as the LAN 172. 16. 34.15 255.255.255.0 172. 16. 34. 0 not in the same subnet as the LAN Summary This section has demonstrated techniques for establishing subnets and subnet masks in computer networks. Examples have been presented that guide the reader through the process of borrowing bits to determining the number of available hosts in the subnet. Section 6-5 Key Terms Subnet Mask