Can't get ip address from dhcp

Issues related to configuring your network
Post Reply
dricher
Posts: 3
Joined: 2014/02/11 01:05:48

Can't get ip address from dhcp

Post by dricher » 2014/02/11 01:44:01

Hey everyone,

I have looked at multiple topics about similar problems but couldn't find answer to the issues i'm facing.

I install CentOS and installed the right driver for my NIC. After installing de drivers everything worked fine. I restarted my computer to check something on my windows partition.
After rebooting back into CentOS I noticed that my eth0 card failed to start. I pinged my Gateway and it couldn't connect to host.
I tried to modify the ifcfg-eth0 to use a Static IP address and restarted the network using /etc/init.d/network restart with started ok.

I pinged back to my gateway and another computer on my network but it still couldn't connect.

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
IPADDR=192.168.0.125
USERCTL=no

Thanks a lot!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't get ip address from dhcp

Post by TrevorH » 2014/02/11 01:50:47

How did you install the network card driver and for which card?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dricher
Posts: 3
Joined: 2014/02/11 01:05:48

Re: Can't get ip address from dhcp

Post by dricher » 2014/02/11 03:45:20

NIC is RTL8111E from a Gigabyte motherboard. I downloaded the drivers from the realtek website.
http://www.realtek.com.tw/downloads/dow ... wn=false#2

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't get ip address from dhcp

Post by TrevorH » 2014/02/11 03:52:07

Yeah, that'll be why it stopped working, I suspect you updated your kernel and the drivers you build from source will need rebuilding every time you update the kernel. Do yourself a favour and run lspci -nn and get the PCI vendor:device Id for your card and take those to ELRepo and use their page http://elrepo.org/tiki/DeviceIDs to find a kmod driver for your card. Download the kmod package and get that to your machine and use yum to install it. That version of the driver will survive a kernel update, building from source will not.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dricher
Posts: 3
Joined: 2014/02/11 01:05:48

Re: Can't get ip address from dhcp

Post by dricher » 2014/02/11 04:48:22

Thanks a lot that worked! I did not even think about that...

Post Reply