Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

General Description

DHCP client is used for automatic retrieving of different parameters from DHCP server for one or several unit’s network interfaces. Among the parameters are IP-address, network mask, default gateway etc.

DHCP client management is implemented via dhcpc command.

Syntax:

dhcpc [options] [IFNAME] [commands]

  • "IFNAME" – name of the network interface to which options and commands are referred.

Options

Options define working parameters of DHCP client on a corresponding interface, or these options defaults if no interface name is specified. For each option special values can be specified: none and default. Option value none means this parameter absence for this interface even though default value of this parameter exists. Option value default means the absence of a specific parameter value (meaning that only default option exists). With this, default parameter value is applied if specified. Default option value is not displayed in DHCP client configuration.

  • "-l (none|default|$ACLNAME|acl:ACLNAME)" – sets the list of IP-addresses of DHCP servers from which the client is permitted to receive parameters. Here, "ACLNAME" – the name of access control list (see acl command). If specified list is not configured in the system (this acl does not exist), DHCP client will be able to receive parameters from any DHCP server.
  •  "-k (none|default|key:KEYVALUE)" – sets authorization key. DHCP authorization is in accordance with “RFC 3118 - Authentication for DHCP Messages”.
  • "-a (none|default|NUMBER)" – sets the number of repeated arp requests which sends DHCP client after getting a lease of IP-address from DHCP server. In accordance with DHCP, the client is obliged to check received IP-address if there are any other network devices with the same IP-address. For higher reliability, DHCP client sends a series of such request with ¼ second interval.  If arp requests number is not specified for all of the interfaces (including absence of default value for this parameter), DHCP client sends 16 requests.
  • "-t (on|off)"  - this option turns on/off sending debug information to the system log. The option is not attached to any specific interface.

Commands

  • "start" - starts DHCP client on a specified interface
  • "stop" - stops DHCP client on a specified interface
  • "delete" - stops DHCP client on a specified interface and clears all the options.
  • "dump" - shows current status of DHCP client.

Examples

dhcpc –a 5
dhcpc –l $DHCP_SERVERS eth0 start
dhcpc –a none –k key:qwerty  rf5.0 start

This configuration sets the number for ARP requests of 5. For eth0 interface the list of allowed DHCP servers is specified in "DHCP_SERVERS ACL". The client is started for eth0 interface. For rf5.0 interface none option is set for the number of ARP requests. Thus, rf5.0 will send 16 ARP requests. Also, DHCP client on rf5.0 interface will use “qwerty” as authorization key.

dhcpc dump

The command prints current status of DHCP client.

ID  I-face   IP address/mask   Gateway address    Server ID    Lease exp.
== ======== ================== =============== ===
 0   eth0   192.168.61.29/26    192.168.61.1    192.168.61.1 000:35:16
 1   rf5.0  ------------------ ---------------

Here, clients are started on eth0 and rf5.0 interfaces.

For eth0 interface DHCP client obtained a lease for 192.168.61.26 IP-address with 26 bits network mask length from 192.168.61.1 DHCP server. The lease expires in 35 minutes and 16 seconds.

DHCP client on rf5.0 interface has not yet received any parameters.

  • No labels