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've recently installed ubuntu 12.04 on an old dell pc, which I'm using as media center. I have an ethernet cable plugged in from the pc directly to the router.

There's nothing wrong with the network card as its I can access the pc from my laptop using Chicken VNC.

My ifconfig looks like this:

eth0      Link encap:Ethernet  HWaddr 00:0f:1f:59:b1:5e  
          inet addr:192.168.1.21  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:1fff:fe59:b15e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15360 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19712 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1640979 (1.6 MB)  TX bytes:17863489 (17.8 MB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8534 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8534 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:664924 (664.9 KB)  TX bytes:664924 (664.9 KB)

Any help appreciated.

Regards, Stephen

share|improve this question
1  
The output of ifconfig looks OK. There is an IP address, and seemingly no errors. I've no idea what you mean by "no internet connection", but the next step would be to try pinging google, like this: ping -c4 google.com or like this ping -c4 173.194.70.101. –  mikewhatever Dec 3 '12 at 20:52
    
@mikewhatever When I say 'no internet connection' I mean I can't access the internet at all. I tried pinging google.com but I get 'unknown host google.com'. –  Stephen Dec 3 '12 at 20:58
1  
Hm..., what about the other ping command? If it works, then you have a DNS problem we should investigate. –  mikewhatever Dec 3 '12 at 21:03
    
ok, ping -c4 173.194.70.101 worked. So what does that mean ? –  Stephen Dec 3 '12 at 21:06
    
That means there is a DNS problem (usually easily solved). Click on the network icon in the panel, and select Connection Information. What does it say next to Default Route: and Primary DNS:? –  mikewhatever Dec 3 '12 at 21:19
show 11 more comments

1 Answer

One possible cause of such problems is misconfiguration of the resolvconf package. Try running the following in a terminal on the PC.

sudo dpkg-reconfigure resolvconf

Then reboot the PC.

If you still can't ping www.google.com but can ping a valid IP address on the Internet then you probably need to adjust the DNS configuration. If you are using ifup and /etc/network/interfaces then you need to add "dns-nameservers 8.8.8.8" to the "iface eth0" stanza in /etc/network/interfaces, where you can use 8.8.8.8 or some other working nameserver's address. If you are, instead, using NetworkManager then you should use the Connection Editor to enable the acquisition of nameserver addresses via DHCP (Set IPv4 Settings | Method to "Automatic (DHCP)" and not to "Automatic (DHCP) addresses only") or to set static nameserver addresses for the Wired Connection.

share|improve this answer
add comment

protected by Community Jun 1 '13 at 13:38

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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