Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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


OS: Ubuntu 12.0.4 Server
Router: Netgear Genie WNDR3700v2


To give my Ubuntu server a static ip address so I could eventually forward a router port to it and make it accessible via the internet.


I disabled ipv6 by adding the below lines to the bottom of my /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


Once I setup a static ip using the below /etc/network/interfaces file, I can't connect to the internet.


  1 # This file describes the network interfaces available on your system
  2 # and how to activate them. For more information, see interfaces(5).
  4 # The loopback network interface
  5 auto lo
  6 iface lo inet loopback
  8 # The primary network interface
  9 auto eth0
 10 iface eth0 inet static
 11 address
 12 netmask
 13 gateway
 14 network
 15 broadcast
 16 dns-nameservers
 18 # This is an autoconfigured IPv6 interface
 19 # iface eth0 inet6 auto

Any ideas or suggestions for troubleshooting this would be greatly appreciated.

share|improve this question
Are you sure you don't have the gateway ( and network ( addresses switched around? – steeldriver Jan 5 '14 at 3:17
Nope, tried switching them, and setting both to .1 and 'sudo ifup -a' still returns 'failed to bring up eth0' – James Nicholson Jan 5 '14 at 3:23

I was able to fix this by changing the below field in my /etc/network/interfaces file:


Turns out that the previous value of was in the range reserved for DHCP by my router.

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.