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[-][--][++]

DHCP[-][--][++]

  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.

Static[-][--][++]

  1. Bring down the eth
  2. Edit /etc/network/interfaces
    allow-hotplug eth0
    iface eth0 inet static
    address 192.168.12.50
    netmask 255.255.255.0
    network 192.168.12.0
    broadcast 192.168.12.255
    gateway 192.168.12.1
    dns-nameservers 192.168.12.1
    dns-search networkq
    
  3. Note: if the resolveconf package is installed, then the dns-* options above will be implemented by resolveconf

Arch linux[-][--][++]

edit the /etc/rc.config file

eth0="dhcp"
wlan0="dhcp"

Other stuff[-][--][++]

setup IP and netmask with ifconfig

ifconfig   [ netmask  ]
ifconfig eth0 192.168.12.200 255.255.255.0

Add a default gateway

route [add default gw]  
route add default gw 192.168.12.1 eth0

resolv.conf[-][--][++]

Your /etc/resolv.conf would be something like this (where networkq is your domain or your workgroup name)

server networkq
domain networkq
nameserver 192.168.12.1

Resources[-][--][++]