COSC 4300 Networks and Internets

Fall 2014

Homework Assignment #2

Due: Saturday, September 13th, 11:59pm CDT
Submit: Turn in your entire Project 2 directory using the turnin command on the Systems Lab machines.
Please run "make clean" in your compile/ subdirectory before submitting. Work is to be completed in teams. Only one team member should turnin, but it would be courteous to notify your teammate(s) when you do this. Names of authors should be included in all work. You may submit multiple times, but only the last turnin will be kept. The automatic submission system will not accept work after the deadline.

DHCP Client

As preparation, make a copy of your Project 1 directory for Project 2.

Add a shell command, "dhcp", that spawns a DHCP protocol daemon.

For a passing grade, your DHCP protocol daemon should at least send a fresh DHCP_DISCOVER packet and receive a DHCP_OFFER packet in order to learn the IP address of the host you are on.

Higher grades will go to more complete implementations that also parse the lease time, subnet mask, and router address in the DHCP payload. Points will be awarded for completing the four steps of the DHCP state machine necessary to reach the "BOUND" state in Figure 18.28 of the text.

Notes

Constructing fresh DHCP packets should not be very hard after completing last week's assignment, but there are a few "gotchas" to be wary of.


[Revised 2014 Sep 08 15:25 DWB]