HOW TO ENABLE DHCP IP WHILE BOOTING IN CENT-OS 6:-
The /etc/sysconfig/network file should contain the following line:
NETWORKING=yes
The NETWORKING variable must be set to yes if you want networking to start at boot time.
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 for the network script includes:
The /etc/sysconfig/network file should contain the following line:
NETWORKING=yes
The NETWORKING variable must be set to yes if you want networking to start at boot time.
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 for the network script includes:
- DHCP_HOSTNAME — Only use this option if the DHCP server requires the client to specify a hostname before receiving an IP address. (The DHCP server daemon in Red Hat Enterprise Linux does not support this feature.)
- PEERDNS=<answer>, where <answer> is one of the following:
- 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.
- yes — Modify /etc/resolv.conf with information from the server. If using DHCP, then yes is the default.
- SRCADDR=<address>, where <address> is the specified source IP address for outgoing packets.
- USERCTL=<answer>, where <answer> is one of the following:
- yes — Non-root users are allowed to control this device.
- no — Non-root users are not allowed to control this device.