Lab 10.7.5 Subnetmask 

Estimated time: 45 min.

Objectives:

This lab will focus on your ability to accomplish the following tasks:

  • Work with Class B network addresses and subnets
  • Determine the subnets available with a particular IP network address and subnet mask
  • Given a network address and requirements, be able to determine how many subnets and hosts
  • Be able to determine what subnet mask should be used to give the appropriate number of hosts and subnets
  • Assign IP addresses and subnet masks to hosts and router interfaces
  • Use the "ANDing" process to track an IP packet from a local host to a remote host through a router

Background:

This lab will focus on a Class B network with three subnets and using a subnet mask.  

Tools / Preparation:

This is primarily a written lab exercise but you will want to use Control Panel / Network to review some real network IP addresses and the basics covered in Lab 10.4.1. The following resources will be required:

  • PC workstation with Windows operating system (Win 95, 98, NT or 2000) installed on PC to the Windows Calculator.

Notes:






Step 1 – IP Address Basics

Explanation: For reference, the IP addressing table is included here. IP network addresses are assigned by ARIN. You will work with a Class B.

Cls 1st Octet Decimal Range 1st Octet High Order Bits Network / Host ID (N=Network, H=Host) Default Subnet Mask Number of Networks Hosts per Network (usable addresses)
A 1 – 126* 0 N.H.H.H 255.0.0.0 126 (27 – 2) 16,777,214 (2 24 – 2)
B 128 – 191 1 0  N.N.H.H 255.255.0.0 16,382 (214 - 2) 65,534 (2 16 – 2)
C 192 – 223 1 1 0 N.N.N.H 255.255.255.0 2,097,150 (221 – 2) 254 (2 8 – 2)
D 224 – 239 1 1 1 0 Reserved for Multicasting
E 240 – 254  1 1 1 1 0 Experimental, used for research

 

Step 2 – Class B network address with 3 subnets.

Task: Use the information below and from prior labs to help determine your valid subnets and host IP addresses. Answer the following questions.

Explanation: Your institution has a Class B network address of 150.193.0.0. This class B network address will be subdivided to accommodate your physical network and you will need at least 50 subnets interconnected with routers. Each subnet needs to be able to handle at least 750 hosts per subnet (workstations, servers and router interfaces). As the network manager for your local campus at the institution, you were given the first 10 of these subnets for use with your local campus. You will be using 6 of these subnets now and will keep the others for future growth. Do NOT use the first or last subnet.

  1. What is the binary equivalent of the Class B network address 150.193.0.0 in the exercise?  
    _______ . _________ . _________ . __________
  2. Which octet(s) and how many bits are used to represent the network portion of this network address?
     
  3. Which octet(s) and how many bits represent the host portion of this Class B network address?


  4. How many original Class B networks are there?


  5. What is the total number of hosts that can be created with a Class B network address if it has not been subdivided?


  6. How many bits must you borrow from the host portion of the network address in order to provide at least 50 subnets and at least 750 hosts per subnet?


  7. What will the Subnet Mask be (using dotted decimal notation) based on the number of bits borrowed in step 6?


  8. What is the binary equivalent of the subnet mask above: 
    _______ . ________ . ________ . ________

Step 3 – Class B network address with 3 subnets.

Task: Complete the table below according to the instructions. Use the information in the table to answer the questions and complete the diagram at the end of this lab.

Explanation: Be sure to specify all four octets for the subnet address and subnet mask. The same subnet mask should be used for all hosts, router interfaces and all subnets. Having a common subnet mask will allow hosts and routers to determine which subnet the IP packet is intended for. Router interfaces will usually be numbered first when assigning IP addresses and hosts will receive higher numbers.

  1. Fill in the following table for each of the possible subnets that can be created by borrowing 6 bits for subnets from the third octet (1st host octet). Identify the Network Address, the Subnet Mask, the Subnetwork Address, the range of possible host IP addresses for each subnet, the broadcast address of each subnet and also indicate whether the subnet is useable or not. You will only use 3 of these subnets for the exercise.
SN#  Network Address Subnet mask Subnetwork Address Range of possible Host IP Addresses  Broadcast Address Use?
0              
           
           
           
           
5             
           
7             
           
9             

 

  1. Assign an IP Address and Subnet Mask to router interface A and write it down here.




  2. Assign an IP Address and Subnet Mask to router interface B and write it down here. 




  3. Assign an IP Address and Subnet Mask to router interface C and write it down here. 




  4. Assign a host IP Address to Host X on Subnet A and assign an IP address to Host Z on Subnet C (answers may vary). Describe the steps (using ANDing) for the process of sending an IP packet from Host X to Host Z through the router. Remember, when ANDing two 1s together the result is a 1, ANDing any other combination (1 and 0, 0 and 1 or 0 and 0) results in a zero (0). Also, when ANDing two network IP addresses together the result of the ANDing process will be the network (or subnetwork) address of the destination IP address in the packet. Use the information from the diagram above to help assign IP addresses and subnet masks.








  5. What is the result of the ANDing process for Host X?
    Decimal Host X IP addr: ______ . ______ . ______ . _______
    Binary Host X IP addr: ______ . ______ . _______ . _______
    Binary Subnet Mask: ______ . _____ . _______ . ________
    Binary ANDing Result: _______ . _______ . _______ . ________
    Decimal ANDing Result: ______ . ______ . _______ . ________
  6. What is the result of the ANDing process for Host Z?
    Decimal Host Z IP addr: ____ . _____ . _______ . ______
    Binary Host Z IP addr: ______ . _____ . _______ . _______
    Binary Subnet Mask: _____ . ______ . ______ . _______
    Binary ANDing Result: ______ . ______ . _______ . _______
    Decimal ANDing Result: _____ . _____ . ______ . ______
  7. The Decimal ANDing result from questions 7 is the network/subnet that Host X is on. The result from question 8 is the network/subnet that Host Z is on. Are Host X and Host Z on the same network/subnet?




  8. What will Host X now do with the packet ? 




  9. Fill in the blanks in the following diagram with the correct Network and IP addresses.

LAB 10.7.6.2 – SUBNET MASK – 3 – ANSWERS

Step 2

  1. 1. What is the binary equivalent of the class B network address 150.193.0.0 in the exercise?
    10010110 . 11000001 . 00000000 . 00000000
  2. Which octet(s) and how many bits are used to represent the network portion of this network address?
    The first and second octets or 16 bits
  3. Which octet(s) and how many bits represent the host portion of this class B network address? 
    The third and fourth octets or 16 bits
  4. How many original Class B networks are there? 
    16,382 (2^14 – 2)
  5. What is the total number of hosts that can be created with a class B network address if it has not been subdivided?  
    65,534 (2^16 – 2)
  6. How many bits must you borrow from the host portion of the network address in order to provide at least 50 subnets and at least 750 hosts per subnet?  
    6 bits (2^6 = 64 – 2 = 62 possible subnetworks. This leaves 10 bits or 2^10 – 2 = 1022 hosts per subnet
    )
  7. What will the Subnet Mask be (using dotted decimal notation) based on the number of bits borrowed in step 6? 255 . 255 . 252 . 0 (The first 6 bit are borrowed from the left side of the host address. 128 + 64 + 32 + 16 + 8 + 4 = 252)
  8. What is the binary equivalent of the subnet mask above:
    11111111 . 11111111 . 11111100 . 00000000
    (The first two octets (16 bits of all 1s) mask the original network address. The first 6 bits of the host portion 3rd octet are all 1s and mask the subnet number. The last 10 bits of 0s are reserved for host Ids.)

Step 3

  1. Fill in the following table for each of the possible subnets that can be created by borrowing 6 bits for subnets from the third octet (1st host octet).
SN#  Network Address Subnet mask Subnetwork Address Range of possible Host IP Addresses  Broadcast Address Use?
1st  150.193.0.0 255.255.252.0  150.193.0.0 150.193.0.1 – 3.254 150.193.3.255  No
2nd  150.193.0.0 255.255.252.0  150.193.4.0 150.193.4.1 – 7.254 150.193.7.255  Y
3rd  150.193.0.0 255.255.252.0  150.193.8.0 150.193.8.1 – 11.254 150.193.11.255  Y
4th  150.193.0.0 255.255.252.0  150.193.12.0 150.193.12.1 – 15.254 150.193.15.255  Y
5th  150.193.0.0 255.255.252.0  150.193.16.0 150.193.16.1 – 19.254 150.193.19.255  Y
6th  150.193.0.0 255.255.252.0  150.193.20.0 150.193.20.1 – 23.254 150.193.23.255  Y
7th  150.193.0.0 255.255.252.0  150.193.24.0 150.193.24.1 – 27.254 150.193.27.255  Y
8th  150.193.0.0 255.255.252.0  150.193.28.0 150.193.28.1 – 31.254 150.193.31.255  Y
9th  150.193.0.0 255.255.252.0  150.193.32.0 150.193.32.1 – 35.254 150.193.35.255  Y
10th 150.193.0.0 255.255.252.0  150.193.36.0 150.193.36.1 – 39.254 150.193.39.255  Y
  1. Assign an IP Address and Subnet Mask to router interface A and write it down here.
    150.193.4.1 / 255.255.252.0
  2. Assign an IP Address and Subnet Mask to router interface B and write it down here.
    150.193.8.1 / 255.255.252.0
  3. Assign an IP Address and Subnet Mask to router interface C and write it down here.
    150.193.12.1 / 255.255.252.0
  4. Assign a host IP Address to Host X on Subnet A and assign an IP address to Host Z on Subnet C (answers may vary). Describe the steps (using ANDing) for the process of sending an IP packet from Host X to host Z through the router. Use the information from the diagram above and in Lab 1.10 to help assign IP addresses and subnet masks.  
    Host X = 150.193.4.2 (4.1 was used for the router interface on subnet A), Host Z = 150.193.12.2 (12.1 was used for the router interface on subnet C). Host X compares (ANDs) the subnet mask to its own IP address and comes up with its own network/subnet address of 150.193.4.0. It then compares the subnet mask to the IP address of the destination host (150.193.12.2) and comes up with the network/subnet address of the target network (150.193.12.0). Since the two do not match, host X must assume that the destination host is not on its network and it send the packet to its "Default Gateway" or the nearside port of the router (interface A). The router goes through the same process on its incoming interface A and determines that network 150.193.12.2 is on it's C interface. The router forwards the packet to interface C and since the Router also knows the MAC address of hosts directly attached to its interfaces such as host Z, it forwards the packet to the 150.193.12.0 network/subnet LAN and host Z picks it up.
  5. What is the result of the ANDing process for host X?
    Decimal Host X IP addr: 150 . 193 . 4 . 2
    Binary Host X IP addr: 10010110 . 11000001 . 00000100 . 00000010
    Binary Subnet Mask: 11111111 . 11111111 . 11111100 . 00000000
    Binary ANDing Result: 10010110. 11000001 . 00000100 . 00000000
    Decimal ANDing Result: 150 . 193 . 4 . 0
  6. What is the result of the ANDing process for host Z?
    Decimal Host Z IP addr: 150 . 193 . 12 . 2
    Binary Host Z IP addr: 10010110 . 11000001 . 00001100 . 00000010
    Binary Subnet Mask: 11111111 . 11111111 . 11111100 . 00000000
    Binary ANDing Result: 10010110. 11000001 . 00001100 . 00000000
    Decimal ANDing Result: 150 . 193 . 12 . 0
  7. The Decimal ANDing result from questions 6 is the network/subnet that Host X is on. The result from question 7 is the network/subnet that Host Z is on. Are Host X and Host Z on the same network/subnet?
    NO
  8. What will host X now do with the packet ?  
    Since the destination host Z is not on the Host X Local Area Network, Host X will send the packet to the "Default Gateway" which is the IP address of Interface A on the router
  9. Fill in the blanks in the following diagram with the correct Network and IP addresses.