CIS Home > Networking > Machine Configuration > Linux DHCP Configuration

Linux DHCP Configuration

Red Hat and Fedora Linux:

  1. Start the GUI network administration/configuration tool by typing redhat-config-network (Red Hat 9 and Enterprise 3.0) or system-config-network (Fedora) at a shell prompt.
  2. Make sure your network interface (typically eth0) is highlighted and click the Edit icon.
  3. Select the Automatically obtain IP address settings with dhcp radio button.
  4. Check the Automatically obtain DNS information from provider checkbox.
  5. Select Save from the File menu and close the window.

Alternately,

  1. Run ifconfig to identify your network interface (typically eth0).
  2. Bring down the network interface with ifdown eth0.
  3. Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 so that it contains only the following lines for eth0:
                  DEVICE=eth0
                  BOOTPROTO=dhcp
                  ONBOOT=yes
                  
  4. Bring the network interface back up with ifup eth0.

Debian GNU/Linux

  1. Run ifconfig to identify your network interface (typically eth0).
  2. Bring down the network interface with ifdown eth0.
  3. Edit /etc/network/interfaces so that the only lines for eth0 are:
                  auto eth0
                  iface eth0 inet dhcp
                  
  4. Bring the network interface back up with ifup eth0.