CPSC 456 Lab 1 - Due: Sat, Sept 12 @ 11:59 PM Fall 2020
Dynamic Host Configuration Protocol (DHCP)
Experiment Using GNS3, Wireshark & VirtualBox
GNS3 is a platform to create a network topology in order to gain
visual understanding of how networks are setup and learn how protocols
are used to communicate to other network devices. It also provides a
platform to allow packet analysis using Wireshark at any given
Ethernet link attached between two network devices of a network
diagram.
In this lab, you will create a simple network topology in GNS3 using
the built-in ethernet switch & a cloud device along with two
VirtualBox Guest VMs. The goal is to understand how to setup dynamic
IP addressing to network devices via DHCP rather than providing static
assignments. This is done within GNS3 along with Wireshark for packet
capture in the virtual link connections attached to the switch. The
captured DHCP traffic allows each client to lease an IP address.
Refer to the Setup GNS3 guide from Week 1 on how to install and use
GNS3 to build a network topology. Wireshark is also required to be
installed locally on your system. If needed, it can download from
[Link]
Integrate VirtualBox Guest VMs in GNS3
1. Download and install VirtualBox and VirtualBox Extension Pack at
[Link] for your host OS.
2. Download [Link] (login credentials: cpsc:cpsc) from
[Link]
3. Import [Link] twice in VirtualBox. Once imported, go to
VM Settings. (a)Set the Graphics Controller to VMSVGA under the
Display panel. (b)Set the Network Adapter1’s Attached to Not
Attached under the Network panel. Click the OK button to accept
all changes. Repeat for the other VM.
(a) (b)
Page 1 of 5
CPSC 456 Lab 1 - Due: Sat, Sept 12 @ 11:59 PM Fall 2020
4. In GNS3, go to Preferences. (1)Expand VirtualBox and select
VirtualBox VMs. (2)Click on the New button. (3)Verify that the
local computer is used for the server type. (4)Click on the Next
Button.
Select one of two imported lubuntux86 guest VM from the VM list
and click on the Finish button.
Select the recently added VM template and click on the Edit
button. Select Network tab and change the “Name format” value
from Ethernet{0} to enp0s3. Click on the OK button to accept the
change.
5. Repeat step #4 to add the other lubuntux86 VM.
Next, let’s build the network topology! You must answer all of
the questions highlighted in yellow to get credit for this lab.
Page 2 of 5
CPSC 456 Lab 1 - Due: Sat, Sept 12 @ 11:59 PM Fall 2020
Create a Network Topology
1. Add an Ethernet switch device from the devices list.
Note: Select the local server if prompted. This applies to all
added devices.
2. Add a Cloud device from the devices list. Label the default Cloud
device as “Internet”.
3. Add the two lubuntux86 VMs to the topology from the devices list.
4. Toggle the “Show/Hide Interface labels” to display network
interfaces.
5. Add Ethernet links to connect the rest of devices to the switch’s
available ports. For instance, you may connect these devices to
the following switch ports. Take a screenshot of your network
topology (15 pts)
a. Cloud (Use your host network interface)çè switch port 0
b. lubuntux86_1 çè Switch port 1
c. lubuntux86_2 çè Switch port 2
6. (a)Right-click on a link and select Start capture to start a
Wireshark window. Accept the default setting and hit the OK
button when prompted. (b)Type “dhcp” on the display filter search
field to only show packets related to dhcp/bootp.
(a) (b)
7. Start the lubuntux86 VM to which it has a microscope icon along
its link to the switch to indicate that network traffic is now
being captured. On the Wireshark window, you should see a similar
sequence of 4 network packets listed below highlighted in blue as
soon as the VM is fully started. Take a similar screenshot of
your Wireshark packet capture of the DHCP transactions (10 pts).
Page 3 of 5
CPSC 456 Lab 1 - Due: Sat, Sept 12 @ 11:59 PM Fall 2020
8. Stop the Wireshark packet capture and save it as “lab1-dhcp” on
your computer. Go to Statistics menu and select flow graph to
generate a timeline similar to the one below. Take a similar
screenshot of your Wireshark packet capture of the DHCP
transactions. (10 pts)
9. Explain how the client machine was able to get an IPv4 address
from the DHCP server on the network. (15 pts) Hint: Explain DORA
10. From the first lubuntux86 VM, open a terminal and run
“hostname -I”. What is your given network IPv4 address for this
VM? (5 pts)
Hint: This should be an IP address within that belong to your
home network. Note that if you see only [Link] that is
incorrect. That is your loopback or local address that cannot be
used outside your machine. You may also see an IPv6 address. Just
ignore that portion for this lab.
11. Start the second lubuntux86 VM. Open a terminal and run
“hostname -I”. What is your given network IPv4 address for this
VM? (5 pts)
12. From the second lubuntux86 VM, try to ping the first
lubuntux86’s IPv4 address. Were you able to successfully ping the
other machine? Perform another ping command using an outside host
such as [Link]. Were you able to successfully ping [Link]?
Take a screenshot of both terminal outputs. (10 pts)
Page 4 of 5
CPSC 456 Lab 1 - Due: Sat, Sept 12 @ 11:59 PM Fall 2020
Further Examination of the Wireshark Capture
13. Which transport protocol is used in DHCP? (5 pts)
14. Which transport port is used by the server? (5 pts)
15. Which transport port is used by the client? (5 pts)
16. Describe why the source machine have an IPv4 address of [Link]
during the DHCP Discover phase. (5 pts)
17. Describe why the destination machine have an IPv4 address of
[Link] during the DHCP Discover phase. (5 pts)
18. In the DHCP Offer packet, what is the IPv4 Address lease time?
(5 pts) Hint: Under packet details, see option 51
Page 5 of 5