I've never had so much problems setting a network interface card to static addressing.

I'm not sure what has changed, but I can only seem to get this thing to work if it's set to obtain the address via DHCP.

I've tried multiple attempts to get this to work and referred to documentation on here as well as on other sites.

Here is a copy of my /etc/network/interfaces file:

# interfaces(5) file used by ifup(8) and ifdown(8)
#       First SETUP Attempt
# auto lo
# iface lo inet loopback
# iface lo inet interface
# auto eth0
# iface eth0 inet static
# address
# netmask
# gateway
# dns-nameservers
#       Current Setup
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# Comment out
#iface eth0 inet dhcp
# add these lines
iface eth0 inet static
address # define IP address
network  # define network address
netmask  # define subnet mask
broadcast   # define broadcast address
gateway     # define default gateway
dns-nameservers   # define name server - Router/Gateway

Restarting the networking services fails. I end up trying to reboot. At that point the network interface does not come back up

If I force it back up with sudo ip link set eth0 up the interface comes up, but shows no addressing other than broadcast information. It does not connect to the internet.

Help with this is greatly appreciated.

closed as off-topic by user117103, bain, Wilf, psusi, Sylvain Pineau Jul 29 '14 at 15:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – guntbert, bain, Wilf, psusi, Sylvain Pineau
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Are you using Ubuntu or Ubuntu Server? – Louis Matthijssen May 3 '14 at 22:15
  • Originally was Ubuntu Server 12.04, but upgraded as releases came out and then installed the Gnome 3 GUI from PPA repository when at 13.10. Upgraded to 14.04 only in the last 2 weeks. – Clutsicus May 3 '14 at 23:15
  • Shouldn't you use GNOME's network manager then? – Louis Matthijssen May 3 '14 at 23:24
  • You woulld think that would work, but since installing Gnome, the network manager portion never worked. That's why trying to configure via command line at system level. – Clutsicus May 3 '14 at 23:33

Ok, I ditched Microsoft and change my household computers and laptops to Ubuntu 14.04.

After a week long searching the internet how to get a static ip-address on Ubuntu 14.04 I finally found a way.

It seems the network-manager is overwriting (or by-passing) my /etc/network/interfaces every single time, I thought of removing it but decided on trying to use it first.

Go to the right upper corner and click the network icon, go down to the bottom and right click edit connections.

This opens network connections and choose the connection to change, click edit and go to IPv4 settings. Choose Method: Manual and then fill in the Address, Netmask and Gateway and your desired DNS server.

Just save and your done. It will change to the given static IP-address on the fly even after reboot!!

This might be an old thread, but after a week of searching I updated the 10 first hits in Google. Hope to safe other people some time!!


Was a very weird issue but in the end I got the Gnome-network manager working again.

Not sure exactly what fixed it.

I did remark (#) everything from /etc/network/interfaces, rebooted, but nothing changed.

I believe the uninstaling and reinstalling the network manager fixed it. All I know is now I can access it from within Gnome 3 and set my address as static.

I may disable this in the future if I decide to install XEN, but for now it's working the way it should.

Speaking of XEN - had was indeed preparing to do that today on another machine, but noticed I can't find any toolstacks outside of XL in the repo's. I'll post this as a separate question.

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