Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to give my server a static IP address. This seems to work without any problems, but I can't seem to get an internet connection after this process. I've also changed my DNS server to (google dns right?).

OS: Ubuntu Server 12.04 x86
Environment: Virtualbox
File: /etc/network/interfaces:

auto eth0
iface eth0 inet static

I've fixed the issue myself, it appeared my router settings had changed somehow, it was set to the 10.x.x.x range instead of the 192.x.x.x

share|improve this question
Steps I would take to troubleshoot, try to ping yourself( if that works, try to ping the gateway( if that works, do an nslookup on and see if it is able to resolve it and let us know the results. – Lipongo Sep 15 '12 at 15:39
@Lipongo Huh..? – Yuki Kutsuya Sep 15 '12 at 15:40
Hit enter by mistake, just updated the comment. – Lipongo Sep 15 '12 at 15:40
I can ping them, but doe you have an example on the nslookup command? – Yuki Kutsuya Sep 15 '12 at 16:04
type nslookup at the command line and comment with the output. – Lipongo Sep 15 '12 at 16:14
up vote 0 down vote accepted

I've fixed the issue myself, it appeared my router settings had changed somehow, it was set to the 10.x.x.x range instead of the 192.x.x.x

share|improve this answer

Look at your DHCP server and gateway it might be that they block unregistered devices from gaining access to the Internet.

But the better way to give static IPs in a DHCP environment is to configure the DHCP to reserve the chosen IP for a certain device; you'll definitely need to exclude the chosen IP from the pool for available IP addresses either way.

share|improve this answer
I've disabled DHCP in the Virtualbox settings. – Yuki Kutsuya Sep 15 '12 at 18:07

Don't forget about ports or port forwarding if you're trying to do something fancy and want access from the Internet (serving web pages are you?) - or even access to the internet (have a proxy to consider?).

I like Zoredache's answer. You probably do want to configure your router to reserve a certain IP range so that you can statically assign IP's in one range while allowing DHCP to assign IPs for another (this is not class "segmenting" where you may have to figure out different netmasks for completely separate internal LAN's).

I can only state what I've done for myself where I split my DHCP and static IP ranges by assigning the DHCP range in my class C LAN to start at rather than let it start at the default of That way, I can statically assign IP addresses to devices from to Of course, I could statically assign IP's within my DHCP range too but that may cause problems if DHCP ever wanted to assign an IP that may have already been statically assigned. Of course, I also have to make sure that there are 2 valid DNS addresses either way I go too. And since I don't run my own DNS server I prefer to use OpenDNS with primary set to and secondary at ( However you can use whatever DNS server(s) you like. Just remember to leave the gateway ( and netmask ( alone if you keep it a class C LAN. I only mention this since you may want to do the same.

But if you're using a class B LAN then you probably would want to change your netmask to and your Gateway would then probably be Of course, your DNS would be whatever you like or you could just leave it alone and let your ISP provide DNS services. But as always, you may have to fiddle with ports and firewalls for the really odd ball stuff like VPN or VoIP or whatever. You may have to do it with email services or even HTML too (ports 25, 110 and 80). So don't forget about the ports and firewalls! (...and antivirus.)

share|improve this answer

Your Answer


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.