CPSC 341 - Wireshark DHCP Lab
Earl Rodd
Name: _________________________________________________
Operating System _________________________________
System used for lab _____________________________________
Overview
This lab contains instructions for both LINUX and Windows.
Windows provides fewer options for
the user, but to do the things we want to do, it is simpler.
The Windows instructions are provided in case you use your own machine
with Wireshark. Malone lab Windows machines do not have Wireshark installed.
We will trace three functions:
- Renewing our DHCP - this will request a DHCP address. This might be
used if we had lost our connection.
- Release our lease.
- Renew (obtain) our connection.
Lab steps
When you start Wireshark, it is helpful to filter unwanted traffic.
We could use a filter of "udp" since DHCP uses UDP packets, but this
can get unwanted packets. The best capture filter to use is:
src port 67 or src port 68
These are the ports used for DHCP.
- Start Wireshark
- Renew our DHCP lease:
- Windows: At a Windows command line: "ipconfig /renew".
- LINUX:
sudo dhclient
- Stop Wireshark
- Start Wireshark
- Release our lease
- Windows: At a Windows command line: "ipconfig /release".
- LINUX:
sudo dhclient -r
- Stop Wireshark
- 5. What DHCP command is sent? ________________________
- 6. What is the IP address this command is sent to? __________________
- 7. What DHCP reply is received? _______________________
- 8. Confirm your IP address is no longer there with the command.
- Windows
ipconfig
- LINUX
ifconfig
- Start Wireshark
- Ask DHCP to obtain an IP address
- Windows: At a Windows command line: "ipconfig /renew".
- LINUX:
sudo dhclient
- Stop Wireshark
- 8. What DHCP command sequence is sent? ________________________
- 9. What is the IP address the first command is sent to? __________________
- 10. To what IP address is the DHCP Offer sent to? ______________________
- 11. What is the IP address the DHCP Request is sent to? _____________
- 12. Compare the results of the two DHCP replies. What do you see?
- 13. Since UDP is connectionless, what field to you see that
the DHCP client can use to connect the replies (Offer and Ack) to the
request (Discover or Request).
____________________________________________________________
- 14. Looking at the sequence, which UDP port number is used for
the DHCP server? __________
and for the DHCP client? __________
_______________________________________
_______________________________________
- 15. Confirm your IP address with the command:
- Windows
ipconfig
- LINUX
ifconfig
IP Address: ____ . _____ . ______ . _______
To hand in
This handout with answers.