Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just installed Ubuntu 12.04 Server 64-bit on a machine and when the prompt in the install came up to configure DHCP I didn't have an Internet connection so it failed. It gave my the option to configure it later so I chose it thinking it wouldn't be an issue to lookup how to configure it later. Now I can't even ping a DNS server and I'm at a loss of how to configure DHCP. I've found documentation on how to configure a DHCP server but little on how to actually just get client side DHCP configured, I have found some however.

dhclient.leases is completely empty and the routing table is empty. I tried, per the documentation here, adding the following lines to /etc/network/interfaces

auto eth0
iface eth0 inet dhcp

then running "sudo ifup eth0" as noted in the documentation. After ifup finally finished (took quite a few minutes) I was still unable to ping OpenDNS. It seems a file named dhclient.eth0.leases as added to /var/lib/dhcp but it is empty also.

I'm not really sure what to do or check at this point :/

share|improve this question
    
I'm just checking the basics: have you tried sudo ifdown eth0 before sudo ifup eth0? Is eth0 your interface name? Do you have a DHCP server configured in your network that provides the necessary DNS and Gateway settings? Can you test it with a different computer/phone/etc.? –  lgarzo Jul 4 '13 at 18:18
    
The first time I called ifup I did not call ifdown first. In subsequent times that I tried it I had to call ifdown then ifup first because it would say "eth0 is already up". I have 4 interfaces, eth0, eth1, eth2, and eth3. I should be plugged into eth0 now. I am currently using Precise desktop on my laptop on the same network plugged into the same router. I did not have to preform this kind of config when I did the install nor did I have to after the install, it just worked. On my laptop machine I have stuff in dhclient. It only has loopback stuff in /etc/network/interfaces, nothing about dhcp –  Jake Jul 4 '13 at 18:30
    
Please try to connect the cable to other ports as well if you haven't already done so. DHCP seems to be configured correctly. Also if you have working devices on this network, router configuration problems seem to be out of the way. (Your desktop OS network connections are managed by NetworkManager, therefore the interfaces file is not used.) –  lgarzo Jul 5 '13 at 7:29
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.