|
Lab
10.7.7 Subnet Mask
Estimated time: 45 min.
Objectives:
This lab will focus on your ability to accomplish the following
tasks:
- Work with a more complex Class C subnet scenario
- 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 move an IP packet from a
local host to a remote host through a router
Background:
This lab will build on Lab Subnet Mask 1 and help develop a
better understanding of IP subnet masks using a real-world example
with additional worksheet exercises based on foundations established
in the prior lab. This
lab will focus on a Class C network with three subnets and using a
Custom 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 the prior lab. The
following resources will be required:
- PC workstation
with Windows operating system (Win 95, 98, NT or 2000) installed
on the PC and access to the Windows Calculator.
Notes:



Step 1 – IP Address
Basics
Explanation: For reference, the IP addressing table from the
prior lab is included here. IP network addresses are assigned by the
Internet Network Information Center (InterNIC). You will work with a
Class C.
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 C
network address with 3 subnets.
Task: Use the following
information and use the information from the worksheet in the prior
lab to help determine your valid subnets and host IP addresses. Do NOT
use the zero or last subnet.
Explanation: Your company has a class C network address of
200.10.57.0. You want to subdivide your physical network into 3
subnets (A, B and C) using a router as shown in the diagram at the end
of the worksheet. You will need at least 20 hosts per subnet. Answer
the following questions.
- What is the binary equivalent of the Class C network address 200.10.57.0
in the exercise?
__________
. __________ . __________ . __________
Which octet(s) represent the network portion and which octet(s)
represent the host portion of this Class C network address?

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

What will the Subnet Mask be (using dotted decimal notation)
based on the number of bits borrowed in step 3?
_________ . _________ . __________
. __________
What is the binary equivalent of the subnet mask above:
_________ . _________ . __________ . __________
Step 3 – Class C
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 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.
- Fill in the following table for each of the possible subnets
that can be created by borrowing 3 bits for subnets from the
fourth octet (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? |
1st
|
|
|
|
|
|
|
2nd |
|
|
|
|
|
|
3rd |
|
|
|
|
|
|
4th |
|
|
|
|
|
|
5th |
|
|
|
|
|
|
6th |
|
|
|
|
|
|
7th |
|
|
|
|
|
|
8th |
|
|
|
|
|
|
- Assign an IP Address and Subnet Mask to router interface A and
write it down here.
__________________
/ ___________________
Assign an IP Address and Subnet Mask to router interface B and
write it down here.
__________________ / ___________________
Assign an IP Address and Subnet Mask to router interface C and
write it down here.
__________________ / ___________________
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
and prior lab to help assign IP addresses and subnet masks.



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: ________ . ________ . ________ . ________
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: ________ . ________ . ________ . _________
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?

What will Host X now do with the packet ?

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

LAB
10.7.6.1 – SUBNET MASK – 2 – ANSWERS
Step 2
- What is the binary equivalent of the class C network address
200.10.57.0 in the exercise?
11001000 . 00001010 . 00111001 . 00000000
- Which octet(s) represent the network portion and which octet(s)
represent the host portion of this class C network address?
The first three octets are the network and the 4th octet is the
host.
- How many bits must you borrow from the host portion of the
network address in order to provide at least 3 subnets and at
least 20 hosts per subnet?
3 bits (2^3 – 2 = 6) will create 8 possible subnets of which 6
are useable (not counting the first and the last subnet).
- What will the Subnet Mask be (using dotted decimal notation)
based on the number of bits borrowed in step 3 ? 255 . 255 .
255 . 224 (The first 3 bit are borrowed from the
left side of the host address. 128 + 64 + 32 = 224)
- What is the binary equivalent of the subnet mask above:
11111111 . 11111111 . 11111111 . 11100000 (The first
three octets (24 bits of all 1s) mask the original network
address. The first 3 bits of the host portion 4th octet are all 1s
and mask the subnet number. The last 5 bits of 0s are reserved for
host Ids.)
Step 3
1. Fill in the following table
SN# |
Network
Address |
Subnet
mask |
Subnetwork
Address |
Range
of possible Host IP Addresses |
Broadcast
Address |
Use? |
1st |
200.10.57.0 |
255.255.255.224 |
200.10.57.0 |
200.10.57.1-30 |
200.10.57.31 |
N |
2nd |
200.10.57.0 |
255.255.255.224 |
200.10.57.32 |
200.10.57.33-62 |
200.10.57.63 |
Y |
3rd |
200.10.57.0 |
255.255.255.224 |
200.10.57.64 |
200.10.57.65-94 |
200.10.57.95 |
Y |
4th |
200.10.57.0 |
255.255.255.224 |
200.10.57.96 |
200.10.57.97-126 |
200.10.57.127 |
Y |
5th |
200.10.57.0 |
255.255.255.224 |
200.10.57.128 |
200.10.57.129-158 |
200.10.57.159 |
Y |
6th |
200.10.57.0 |
255.255.255.224 |
200.10.57.160 |
200.10.57.161-190 |
200.10.57.191 |
Y |
7th |
200.10.57.0 |
255.255.255.224 |
200.10.57.196 |
200.10.57.193-222 |
200.10.57.223 |
Y |
8th |
200.10.57.0 |
255.255.255.224 |
200.10.57.224 |
200.10.57.225254 |
200.10.57.255 |
N |
- Assign an IP Address and Subnet Mask to router interface A and
write it down here.
200.10.57.33 / 255.255.255.224 (The first subnet you can use is
the .32 net. The first useable IP address for a host or router
interface on the .32 net is .33 since the .32 is reserved for
the address of the subnet itself, the lowest numbers are
reserved for router interfaces. The subnet mask will be the same
for all interfaces and subnets)
- Assign an IP Address and Subnet Mask to router interface B and
write it down here.
200.10.57.65 / 255.255.255.224
- Assign an IP Address and Subnet Mask to router interface C and
write it down here.
200.10.57.97 / 255.255.255.224
- 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) in the
process of sending an IP packet from Host X to host Z through the
router.
Host X = 200.10.57.34 (.33 was used for the router interface on
subnet A), Host Z = 200.10.57.98 (.97 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 200.10.57.32. It then compares the subnet mask to the
IP address of the destination host (200.10.57.98) and comes up
with the network/subnet address of the target network
(200.10.57.96). 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. The router goes through the same process on its
incoming interface A and determines that network 200.10.57.96 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 200.10.57.96 network/subnet LAN and host Z picks it up.
What is the result of the ANDing process for host X?
Decimal Host X IP addr: 200 . 10 . 57 . 34
Binary Host X IP addr: 11001000 . 00001010 . 00111001 .
00100110
Binary Subnet Mask: 11111111 . 11111111 . 11111111 .
11100000
Binary ANDing Result: 11001000 . 00001010 . 00111001 .
00100000
Decimal ANDing Result: 200 . 10 . 57 . 32
What is the result of the ANDing process for host Z?
Decimal Host Z IP addr: 200 . 10 . 57 . 98
Binary Host Z IP addr: 11001000 . 00001010 . 00111001 .
01100110
Binary Subnet Mask: 11111111 . 11111111 . 11111111 .
11100000
Binary ANDing Result: 11001000 . 00001010 . 00111001 .
00100000
Decimal ANDing Result: 200 . 10 . 57 . 96
The Decimal ANDing result from questions 11 is the
network/subnet that Host X is on. The result from question 12 is
the network/subnet that Host Z is on. Are Host X and Host Z on
the same network/subnet?
NO
What will host X 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.
When the router receives the packet from Host X and compares
its interface A IP address and the destination address for host
Z with the subnet mask, which router interface will it send the
packet out of to get the packet to Host Z?
Interface C

|