Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to replicate in VMWare Player the exact same conditions I have under my Dedicated Server for testing purposes.

Now, the thing is that that when I try to install something, or ping http://google.com, it fails since it has no connection.

what do I do to fix it??

Screenshot

I'm not much of a sys admin, but i'll get there (This is my first Dedicated Server), I ordered a minimal OS to learn.

share|improve this question
    
ifconfig eth0 up –  Laurentiu Roescu Nov 10 '12 at 18:07
    
@LaurentiuRoescu It would be awesome if you could explain me in more detail how to do it. I tried to edit /etc/sysconfig/network-scripts/ifcfg-eth0, and maybe I'm doing something wrong. –  CoCoMonk Nov 10 '12 at 18:14
    
Could it be that you're simply in a too low run-level? What does who -r say? –  Joseph R. Nov 10 '12 at 20:12
add comment

2 Answers 2

up vote 5 down vote accepted

I solved the issue by forcing the interface to get the IP via DHCP

This made the magic:

dhclient -v eth0

For more detail, check the accepted answer: CentOS doesnt know what the internet is

share|improve this answer
add comment

As root/sudo:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add to the bottom:

BOOTPROTO="dhcp"

also change the line that says ONBOOT to read as so:

ONBOOT="yes"

Now you should run ifup eth0 and/or reboot your machine. It should pull a DHCP address every time now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.