The /etc/sysconfig/network file should contain the following line:
NETWORKING=yes
The /etc/sysconfig/network-scripts/ifcfg-eth0 file should contain the following lines:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
A configuration file is needed for each device to be configured to use DHCP.
Other options
PEERDNS=
yes — Modify /etc/resolv.conf with information from the server. If using DHCP, then yes is the default.
no — Do not modify /etc/resolv.conf.
USERCTL=
yes — Non-root users are allowed to control this device.
no — Non-root users are not allowed to control this device.
3 comments:
couldn't find any such file on ubuntu 8.04
Post is mainly for RHEL / Fedora / CentOS/OpenSuse
If you want to configure DHCP address on Ubuntu you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card
sudo vi /etc/network/interfaces
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp
thank you nikesh
Post a Comment