This action might not be possible to undo. Are you sure you want to continue?
Objectives • Identify the reasons to use a subnet mask. • Distinguish between a default subnet mask and a custom subnet mask. • Given the requirements, determine the subnet mask, number of subnets, and hosts per subnet. • Understand usable subnets and usable number of hosts. • Use the ANDing process to determine whether a destination IP address is local or remote. • Identify valid and invalid IP host address based on a network number and subnet mask. Background / Preparation This lab helps you understand the basics of IP subnet masks and their use with TCP/IP networks. You can use the subnet mask to split up an existing network into subnetworks or subnets. Some of the primary reasons for subnetting are as follows: • • • Reduce the size of the broadcast domains. (Create smaller networks with less traffic.) Allow LANs in different geographical locations to communicate through routers. Provide improved security by separating one LAN from another.
Routers separate subnets, and the router determines when a packet can go from one subnet to another. Each router a packet goes through is considered a hop. Subnet masks help workstations, servers, and routers in an IP network determine whether the destination host for the packet they want to send is on their own network or another network. This lab reviews the default subnet mask and then focuses on custom subnet masks, which uses more bits than the default subnet mask by “borrowing” these bits from the host portion of the IP address. This process creates a three-part address: • • • The original network address The subnet address consisting of the bits borrowed The host address consisting of the bits left after borrowing some for subnets.
Step 1. Review IP address basics and default subnet masks. a. If your organization has a Class A IP network address, the first octet (8 bits) is assigned and does not change. Your organization can use the remaining 24 bits to define up to 16,777,214 hosts on your network. That is a lot of hosts! It is not possible to put all of these hosts on one physical network without separating them with routers and subnets. b. It is common for a workstation to be on one network or subnet and a server to be on another. When the workstation needs to retrieve a file from the server, it must use its subnet mask to determine the network or subnet that the server is on. The purpose of a subnet mask is to help hosts and routers determine the network location where a destination host appears. Refer to Table 8-2.1 to review IP address classes, default subnet masks, and the number of networks and hosts that you can create with each class of network address.
the host must know the IP address of the server or the host name (for example.com).1.5 and wants to send a packet to Host Z (destination) on network 200. the network is not being subnetted.1. the first three octets (24 bits) are assigned as the network address.2. If the results are different.1 shows how you can use a Class C default subnet mask to determine which network a host is on.H. This example in Figure 8-2. Step 2.0. the ANDing result is a 1. A default subnet mask does not break an address into subnets.00000000.1. the source host compares (ANDs) its own IP address to its own subnet mask.11111111. ANDing depends on the subnet mask. http://www. To connect to a server. . a Domain Name System (DNS) server converts it to an IP address.1.255. Remember that with a Class C network address. and so on.8.0. If the two bits are both 1s.0 or 11111111. they can communicate directly.777.0. or they might not be able to communicate at all.H N. so these are two different Class C networks.0 255. If the two bits are a 0 and a 1 or two 0s.1.11111111. It then compares the destination IP address to its own subnet mask. Host X (source) on network 200. which has an IP address of 200.150 (221 – 2) Hosts per Network (Usable Addresses) 16. this rule means that a combination of two 1s results in a 1.H N.N.0 224-239 1110 Reserved for multicasting 240-254 1 1 1 1 0 Experimental.H Default Subnet Mask Number of Networks 126 (27 – 2) 16.Table 8-2. the result of the ANDing process is the network or subnet number that the source or destination address is on.214 (224 – 2) 65. The ANDing process happens each time a host wants to send a packet to another host on an IP network. First. It compares the first bit of the IP address to the first bit of the subnet mask.2. Subnet masks are always all ones. The result of the ANDing is to identify the network where the source host resides.H.0 has an IP address of 200.255. A default subnet mask for a Class C network is 255.cisco.382 (214 – 2) 2.0.534 (216 – 2) 254 (28 – 2) 1st Octet Decimal Range 1-126* 128-191 192-223 A B C D E 255. H = Host) N. used for research *You cannot use Class A address 127 because it is reserved for loopback and diagnostic functions.1.097. If the host uses the host name. but anything else is a 0.N. If you use the default subnet mask. they are on different networks or subnets. the second bit to the second.N. so each Class C network can have up to 254 hosts (28 = 256 – 2 = 254).255. Step 3.255. If the source network address and the destination network address are the same.255. The host compares this mask to the source IP address bit for bit.1 Address Class IP Address Classes and Information 1st Octet High Order Bits 0 10 110 Network/ Host ID (N = Network.H. Hosts and routers use the ANDing process to determine whether a destination host is one the same network. Determine a host network using two Class C default subnet masks. This requirement leaves one octet (8 bits) for hosts.0 255. the ANDing result is a 0. The result of the second ANDing is the network that the destination host is on. All hosts on each network are connected to hubs or switches and then to a router. and they need to communicate through routers. Basically. Review the ANDing process.
1.255.1 Host Z IP Address: 126.96.36.19911111. Determine the host subnet using a Class C network custom subnet mask.0 Subnet Mask: 255. Remember that. which is 200.00000010.0: ANDing Result (200.1.1. The router then repeats the ANDing process to determine which router interface to send the packet out.1 Using a Class C default subnet mask to determine a host’s network Source Network: 200. Host X now knows that Host Z is not in its LAN.1.1.255.00000101 11111111.1.0) and shows how you can use a Class C custom subnet mask to determine which subnetwork (or subnet) a host is on and to route packets from one subnetwork to another.0 to Host 188.8.131.52 Host X IP Address: 200.255. and they are different.1 on network 200.5 on network 200.00000000 Note: The result of Step 3a of the ANDing process is the network address of Host X. which is 200.1. so each Class C network can have up to 254 hosts (28 = 256 – 2 = 254).5 Router Interface: IP 200. Host X compares the ANDing results from Step A and the ANDing results from Step B.0.00000001.00001000 11111111.2.0): 11001000.Figure 8-2.00000001.1.5: Subnet Mask 255.1.1.1.00000001. Host Z IP address 200.11111111. Step 4.0 Source Network: 200.0: ANDing Result (184.108.40.206.0): 11001000.00000000 11001000.1.2.1.220.127.116.11 Router Interface: IP 200. the first three octets (24 bits) are assigned as the network address.255.0.255.1.2. which is the IP address of the router interface of 200.1. Next.1.11111111. This requirement leaves 8 bits (one octet) for hosts. Host X compares the IP address of the Host Z destination to its own subnet mask using the ANDing process. This example uses a single Class C network address (200.00000001.00000000 Note: The result of Step 3b of the ANDing process is the network address of Host Z. and it must send the packet to its default gateway.8 The ANDing process helps the packet get from Host 200. with a Class C network address.255.1.2.00000001.1.1.8: Subnet Mask 255.00000001. .8 on network 200. Host X IP address 200.1111118.104.22.168.255.1.1.0 Subnet Mask: 255.0 by using the following steps: Host X compares its own IP address to its own subnet mask using the ANDing process.00000010.00000000 11001000.2.0.
and you want to create two subnetworks and separate them with a router for security reasons or to reduce traffic.0. Because you have only one Class C network address. you have only 8 bits in the fourth octet available for a total of 254 possible hosts. Table 8-2. Because you need two subnets. the 192 results from adding the first two bits from the left (128 + 64 = 192). and the new. This number is greater than the number of subnets you need. “custom” subnet mask is 255. Table 8-2. This change leaves 6 bits for host IP addresses. For example. or 26 = 64 hosts per subnet.3 indicates. Perform the following steps: The first step to subnetting is to determine how many subnets you need. which equals three. this result should be adequate. This setup creates smaller independent broadcast domains and can improve network performance and increase security because one or more routers will separate these subnetworks. Because you need to borrow two bits from the left side.2 Calculating Subnet Bits to Be Borrowed 4th Octet Host Address Bits Host Address Bit Values (from Right) 1 128 1 64 1 32 1 16 1 8 1 4 1 2 1 1 (Add bits starting from the right side [the 1 and the 2] until you get more than the number of subnets you need.255. The existing default subnet mask was 255.255.255. To see how many bits you should borrow from the host portion of the network address. add the bit values from right to left until the total is equal to or greater than the number of subnets you need. As Table 8-2. You use the custom subnet mask to “borrow” bits from the host portion of the address.) Note: An alternate way to calculate the number of bits to borrow for subnets is to take the number of bits borrowed to the power of 2. you take them from the left side of the host address (the fourth octet). The result must be greater than the number of subnets you need. so you must create a custom subnet mask. you decrease the number of hosts per subnet.192. if you borrow 2 bits. the calculation is 2 to the second power. After you know how many bits to borrow.255.Perhaps you want less that 254 hosts (workstations and servers) all on one network. Assume you need at least two subnetworks and at least 50 hosts per subnetwork. Even though you increase the number of subnets.2 provides this information. Because the number of subnets you need is two. which equals 4.3 Determining the “Custom” Subnet Mask 4th Octet Borrowed Bits for Subnet Subnet Bit Values (from 1 128 1 64 1 32 1 16 1 8 1 4 1 2 1 1 . Table 8-2. Every bit you borrow leaves fewer bits for the hosts. so you need to borrow at least two bits from the host address starting from the left side of the octet that contains the host address. you need two subnetworks. add the one bit and the two bit. These bits now become 1s and are part of the overall subnet mask. In this case. you must show that new value in the subnet mask.
The first two bits are the subnet binary value.0 in dotted decimal format.1. the 128 net.0. Step 5.0. You want to subdivide your physical network into four subnets. the number of hosts per subnet is 26 or 64.64 for a host ID because it is the network ID of the 64 subnet.0. You need to use a Class C custom subnet mask and a router between the subnets to route packets from one subnet to another. The “slash” number after the network number is an abbreviated method of indicating the subnet mask being used.22. One way to determine the number of hosts on each subnet or the start of each subnet is to take the remaining host bits to the power of 2.0/8.) Another common way to represent a subnet mask.255.0. This would represent a custom subnet mask of 255. This indicates that 24 bits are used for the network and 2 bits for the subnet. you can create 4 subnets (2^2) with 64 hosts each.0.127 because it is the broadcast address for the 64 net.) You cannot use the IP address of 200. which will be interconnected by routers. (The host portion is all 1s.0 with a standard subnet mask (255. would be written as 200.15. which is the number of hosts on each subnet.0) would be written as 22.214.171.124. If 8 bits (the next octet) were being used for subnets it would be written as 10.1.0.Left Side) With this information.1. By borrowing 2 bits from the 8 bits of the host address.192 in dotted decimal format. As an example. The same network. You need at least 25 hosts per subnet.1. which equals 64. you can build Table 8-2. a Class C network address such as 200.0. Another way to figure the number of hosts per subnet or the “increment” from one subnet to the next is to subtract the subnet mask value in decimal (192 in the fourth octet) from 256 (which is the maximum number of possible combinations of 8 bits).0.1.4. increases by 64. The last six bits are the host bits. Your company has applied for and received a Class C network address of 197.255. The 4 networks created are the 0 net. when subnetted by using two host bits for subnets.0) would be written as 10.4 Determining the Usable Subnets Subnet Number 0 Subnet 1st Subnet 2nd Subnet 3rd Subnet Subnet Bits Borrowed Binary Value 00 01 10 11 Subnet Bits Decimal Value 0 64 128 192 Host Bits Possible Binary Values (Range) (6 Bits) 000000 – 111111 000000 – 111111 000000 – 111111 000000 – 111111 Subnet/ Host Decimal Range 0-63 64-127 128-191 192-254 Usable? No Yes Yes No Notice that the first subnet always starts at 0 and.0/24. This would represent a custom subnet mask of 255.1.0/26. and the 192 net. is the use of the “slash/number” (/#) where the # following the slash is the number of bits used in the mask (network and subnet combined).0. Use the following information and the previous examples to answer the following subnetrelated questions. This result means you start at 0 for the first network and add 64 for each additional subnetwork.0/16. Because you borrowed 2 of the 8 bits for subnets and you have 6 bits left.0 with a standard mask (255. Determine the number of bits you .1.1. the 64 net. you cannot use the IP address of 200.255. A Class A network of 10. The 0 net and the 192 net are unusable—because the 0 net has all zeros in the host portion of the address and the 192 net has all 1s in the host portion of the address. indicating that 24 bits are used for the mask.1. Table 8-2. in this case. If you take the second subnet (the 64 net) as an example. (The host portion is all 0s.255.
5 and answer the questions that follow. (Hint: There will be eight possible subnets. 1. Use the information in Table 8-2.5 Creating a Class C Custom Subnet Mask to Support at Least 25 Host per Subnet Subnet Number Subnet Bits Borrowed Binary Value Subnet Bits Decimal and Subnet Number Host Bits Possible Binary Values (Range) (5 Bits) Subnet/ Host Decimal Range Use? 0 Subnet 1st Subnet 2nd Subnet 3rd Subnet 4th Subnet 5th Subnet 6th Subnet 7th Subnet Notes _________________________________________________________________________________ _________________________________________________________________________________ _________________________________________________________________________________ _________________________________________________________________________________ _________________________________________________________________________________ _________________________________________________________________________________ _________________________________________________________________________________ b.need to borrow from the host portion of the network address and then the number of bits left for host addresses.) a. of which six can be used. Table 8-2.5 you just developed to help answer the following questions. Which octets represent the network portion of a Class C IP address? ______________________________________________________________________________ . Fill in Table 8-2.
How many bits were left in the fourth octet for host IDs? ______________________________________________________________________________ 9.15.160 a valid host IP address with this scenario? ______________________________________________________________________________ 14. How many high-order bits did you borrow from the host bits in the fourth octet? ______________________________________________________________________________ 5. _________. What is the maximum number of hosts that you can define for all subnets with this scenario (assuming you cannot use the lowest and highest subnet numbers and cannot use the lowest and highest host ID on each subnet)? ______________________________________________________________________________ 11. __________. Are these hosts on the same subnet? ____________________________________________________ Why? . Is 126.96.36.199)? Decimal network address: Binary network address: _________. How many hosts per subnet can you define with this subnet mask? ______________________________________________________________________________ 10. __________. __________.2.22. Host A has an IP address of 197.22.22. Is 197.15. Why or why not? ______________________________________________________________________________ 15. 4. What is the binary equivalent of the Class C network address in the scenario (197. __________. _________. What is the maximum number of subnets that you can create with this subnet mask? ______________________________________________________________________________ 7. Why or why not? ______________________________________________________________________________ 13. __________. 6. __________.15.) Decimal subnet address: Binary subnet address: _________. __________. What subnet mask must use? (Show the subnet mask in decimal and binary. __________. Host B has an IP address of 197.63 a valid host IP address with this scenario? ______________________________________________________________________________ 12. __________. __________. Which octets represent the host portion of a Class C IP address? ______________________________________________________________________________ 3.15.129. __________. __________. What is the maximum number of usable subnets that you can create with this mask? ______________________________________________________________________________ 8.126.22.
______________________________________________________________________________ ______________________________________________________________________________ .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.