11.3 Configuring a DHCP Client

To configure an Oracle Linux system as a DHCP client:

  1. Install the dhclient package:

    # yum install dhclient
  2. Edit /container/name/rootfs/etc/sysconfig/network-scripts/ifcfg-iface, where iface is the name of the network interface, and change the value of BOOTPROTO to read as:

  3. Edit /etc/sysconfig/network and verify that it contains the following setting:

  4. To specify options for the client, such as the requested lease time and the network interface on which to request an address from the server, create the file /etc/dhclient.conf containing the required options.

    The following example specifies that the client should use the eth1 interface, request a lease time of 24 hours, and identify itself using its MAC address:

    interface "eth1" {
      send dhcp-lease-time 86400;
      send dhcp-client-identifier 80:56:3e:00:10:00;

    For more information, see the dhclient.conf(5) manual page.

  5. Restart the network interface or the network service to enable the client, for example:

    # service network restart

    When the client has requested and obtained a lease, information about this lease is stored in /var/lib/dhclient/dhclient-interface.leases.

For more information, see the dhclient(8) manual page.