I can ping other workstations from Ubuntu 11.10 workstation. I can ping Ubuntu 11.10 workstation from other workstations. But I can't ping gateway from Ubuntu work station.

/etc/resolv.conf have three nameserver saved even after several reboot. Still unable to connect to internet. Unable to ping or dig google.com Unable to download packages using sudo apt-get update.

I have an entry for eth0 configured in /etc/network/interfaces and also managed=true set in /etc/NetworkManager/NetworkManager.conf file. I really appreciate if you could tell me what am I doing wrong.

Thank you

  • Sorry I forgot to mention in my post. Yes ip address is reservered for ubuntu workstation (with Mac address). This ip address is not used by any other computers in the network. I have verified it.
    – Surya
    Nov 18, 2011 at 23:25
  • I have pasted arp command result $ arp Address Hwtype Hwaddress Flags Mask iface ETHER 00:21:91:03:C7:19 C eth0 It showing router mac address correctly
    – Surya
    Nov 19, 2011 at 0:07
  • add the this info from your terminal ifconfig and netstat -r... but it's sounds more like @The Terminaor answers it.
    – maniat1k13
    Mar 2, 2012 at 8:00

3 Answers 3


enter image description hereThe Other Way

I got the same problem even its pinging my gateway but internet not working

so what i did the easiest way is that i have reserved the ip in my router for my mac address ...

  • 1
    i think this the best & easiest way to have an static ip address for new users
    – One Zero
    Nov 18, 2011 at 5:40
  • Thank you for the response. I added my comment. Yes I did reserve the ip address. It is not used by any computers in the network.
    – Surya
    Nov 18, 2011 at 23:27

You need to get your routing table correct. Use sudo netstat -r to see if you have a default route. If there is no default route, use this command to set the default route:

sudo route add default gw <ip address of the gateway>

/etc/resolv.conf doesn't have anything to do with routing, its for DNS. Now check if your internet is working using ping If the ping is working, you can add the DNS servers to /etc/resolv.conf and your net will be fully functional.


What did you use for a static IP? If you picked an IP already in use you might be able to ping other machines, but the gateway might be colliding with what you have set. Each IP address must be unique within the network.

You can check your IP address using: ifconfig eth0

Do you actually need a static IP address? Do you have a DHCP server?

  • Yes I would like to have statics ip instead DHCP. ifconfig etho results shows the right ip address.
    – Surya
    Nov 18, 2011 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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