a simple DHCP client program written in C/C++ that works in a Linux (FC 8) machine......it should interact with a DHCP server following the Standard DHCP RFC2131...
## Deliverables
this is the exact detailed requirement that the program needs to implement
Guidelines for DHCP Client
==========================
Basic requirements:
(1) Use a configuration file to control the parameters of your
DHCP client. (This file must not have the same format as
the configuration file used for Linux. Also, please do *not*
use commandline options.) This file should contain:
(a) port number to use for DHCP server
(b) a flag to choose from one of the following:
- obtain a dynamic IP address
- request for a specific IP address (manual)
- use the last IP address assigned to this client if
possible (this is optional)
(c) timeout values (at least T1 and T2 to override the
default values for demoing)
(2) Your DHCP client must print state changes so you know exactly
what state it is in; the names of the states should match what's
in the RFC
(3) Your DHCP client must print all packets sent to the DHCP server
and received from the DHCP server; you should print important
fields in these packets
For (2) and (3), these types of output can either go to stdout or
a log file.
Your demo should include the following:
(A) Basic operations
(1) unplug ethernet
(2) start DHCP client, should not get valid IP address
(3) connect ethernet, should get a valid IP address
(a) demonstrate that the timeout has the correct value
(4) change the configuration file to use a bad ethernet name, restart
the DHCP client and verify that it detects the bad name
(5) make sure that you cannot run two instances of your client program
(B) Specify an IP address
(1) change the configuration file to ask for a specific IP address
(a) verify that it woks with a good IP address
(b) verify that it rejects a bad IP address (either already
in use or not in this network)
(C) Small renewal interval
(1) use a small renewal interval to see that your DHCP client
continues obtaining IP address
(D) Change the ifup-eth and ifdown-eth scripts to use your DHCP client
(1) verify that it works properly