I know there's a lot written about this issue but no response seem to answer my question. So I am wondering my problem is with the most recent version of Ubuntu.

I have just installed an Ubuntu 12.04 server (64bit) - Precise, on my home PC using Virtualbox v4.3.6 by Bridging the network adapter.

Everything works fine as I can run apt-get update and see the outside world, name resolution resolves perfectly too (i.e: nslookup google.com)

My problem is when I edit the interfaces file and enter a static address identical to the DHCP address issued by my router, and restart the server or the network, I can no longer access my local network, in other words I cannot even ping my gateway.

If I enter the same IP address manually, for example ifconfig eth0, I can then ping my gateway but I cannot see the outside world.

I have purged my Network Manager, wondering if that is the cause. When I installed the server at work I can work around this by reserving the IP address, but I am hoping to get a better understanding of the problem.

Any advise on this.?

Thanks for your replies, this is my interface file with static assigned

auto lo iface lo inet loopback

The primary network interface

auto eth0

iface eth0 inet dhcp

iface eth0 inet static address netmask network broadcast gateway

Thanks but. Adding nameserver to the interface file didn't help. When I switched back to DHCP everything works fine, I can ping internet addresses by IP and by name.

  • how did you set the static ip address – Beginner Mar 1 '14 at 12:47
  • could you please post the output of your interfaces after assigning the static IP's... you may use cat /etc/network/interfaces :) – AzkerM Mar 1 '14 at 12:59

I think you didn't mention your dns name server :

So if you ping which is google ip , it will ping normally , but if you ping www.google.com it will state unknow host .

So in your options in /etc/network/interfaces add :

dns-nameservers (your dns ip address )

I hope this could solve your problem , reply.

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.