world leader in high performance signal processing
Trace: » dhcpcd

Dynamic Host Configuration Protocol

What is DHCP

DHCP's purpose is to enable individual computers (the 'DHCP client') on an IP network to extract their configurations from a server (the 'DHCP server') or servers, in particular, servers that have no exact information about the individual computers until they request the information. The overall purpose of this is to reduce the work necessary to administer a large IP network. The most significant piece of information distributed in this manner is the IP address.

DHCP was created by the Dynamic Host Configuration Working Group of the Internet Engineering Task Force (IETF; a volunteer organization which defines protocols for use on the Internet). As such, it's definition is recorded in an Internet RFC and the Internet Activities Board (IAB) is asserting its status as to Internet Standardization.

HowTo & man pages

There are Howtos and man pages avalible for desktop dhcp client and servers:

DHCP clients in uClinux

DHCP Client Options

There are a few options for dhcp clients in uClinux, depending on the features and size of the application you are looking for.

  • ./user/dhcpcd-new : dhcpcd-1.3.20-pl0 (04/06/2001) maintained by Sergei Viznyuk, web site DEFAULT
  • ./user/dhcpcd : dhcpcd-0.70 writen by Yoichi Hariguchi
  • ./user/dhcp-isc : Internet Systems Consortium reference implementation Version 2 Patchlevel 5, (September 6, 2000) web site
  • ./busybox/networking/udhcp/ : Busybox has a dhcp client

All the DHCP clients have their own README files in the directories in cvs, but should be able to be built by selecting them in the menuconfiguration system.

Using the DHCP client

Depending on which client you have selected, this example may be slightly different - this is the default from ./user/dhcpcd-new. To use the dhcp client deamon in uClinux, it is pretty easy:

  1. Check to see if networking is configured:
    root:~> ifconfig
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
  2. run the dhcp client deamon, and put it in the background:
    root:~> dhcpcd &
    28

    The 28 means that the process id of the dhcpcd is 28.

  3. check on the network, to make sure the dhcp client has recieved a IP number:
    root:~> ifconfig
    eth0      Link encap:Ethernet  HWaddr C6:FB:5F:FA:AE:31
              inet addr:10.64.204.139  Bcast:10.64.204.255  Mask:255.255.255.0
              UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:14 errors:0 dropped:0 overruns:0 frame:0
              TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
  4. You can check on other things as well:
    root:~> cat /etc/dhcpc/dhcpcd-eth0.info
    IPADDR=10.64.204.141
    NETMASK=255.255.255.0
    NETWORK=10.64.204.0
    BROADCAST=10.64.204.255
    GATEWAY=10.64.204.1
    DOMAIN=ad.analog.com
    DNS=10.64.53.110,10.64.51.110,10.66.5.110,10.64.82.11
    DHCPSID=10.64.204.245
    DHCPGIADDR=0.0.0.0
    DHCPSIADDR=0.0.0.0
    DHCPCHADDR=EA:24:5B:7B:B8:20
    DHCPSHADDR=00:D0:B7:74:C9:BE
    DHCPSNAME=
    LEASETIME=259200
    RENEWALTIME=129600
    REBINDTIME=226800

    This indicates the networking settings the dhcp client has received from the dhcp server. If you are using a non-volitale file system, sometimes bad data in the /etc/dhcpc directory can cause the dhcp client not to ask the server for the correct information, and the best thing is to remove the files in this directory.

DHCP Servers in uClinux

DHCP Server Options

There are a few options for dhcp servers in uClinux, depending on the features and size of the application you are looking for.

FIXME!

For More Information

There are many sites on the internet which are dedicated to DHCP. Here are a few good ones: