Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to configure Oracle Linux 6.5 to request ip address from dhcp server

884659Dec 20 2013 — edited Dec 26 2013

I have installed Oracle Linux 6.5 (minimal installation) on a virtual machine created on VMware vSphere 5.5.   I have tried to configure dhcp during the installation by editing IPv4 Settings of System eth0 to use Automatic (DHCP) but somehow it does not work.

Then I changed the ifcfg-eth0 to use static ip address and that works.

Here is the content of /etc/sysconfig/network:

NETWORKING=yes

HOSTNAME=TESTOL

Here is the content of /etc/sysconfig/network-scripts/ifcfg-eth0 using static ip address:

DEVICE=eth0

TYPE=Ethernet

UUID=xxxxxxxx.xxxx-xxxx-xxxxxxxxxxxx

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

HWADDR=xx:xx:xx:xx:xx:xx

IPADDR:##.##.###.###

PREFIX=24

GATEWAY=##.##.###.###

DNS1=##.##.###.###

DOMAIN:test.com

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"

Based on my understanding, I should able to use dhcp by changing ifcfg-eth0 (I commented the parameters not needed for dhcp by adding #) but I have tried the following ifcfg-eth0 and it does not work:

DEVICE=eth0

TYPE=Ethernet

UUID=xxxxxxxx.xxxx-xxxx-xxxxxxxxxxxx

ONBOOT=yes

NM_CONTROLLED=yes

#BOOTPROTO=no

BOOTPROTO=dhcp

HWADDR=xx:xx:xx:xx:xx:xx

#IPADDR:##.##.###.###

#PREFIX=24

#GATEWAY=##.##.###.###

DNS1=##.##.###.###

#DOMAIN:test.com

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"

I have also tried to add GATEWAY=##.##.###.### to /etc/sysconfig/network but that does not help.

I have checked that dhclient package is installed by using rpm -qa dhclient.

I'm new to Linux.

Thanks for any help

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2014
Added on Dec 20 2013
6 comments
30,586 views