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

I have some trouble setting-up the network interface using the static IP configuration. I run ubuntu 12.04 kernel 3.11.0-22 with the back-ports enabled.

I followed these instructions from but there seems to exist some conflict between the GUI approach (NetworkManager) and the command line approach.

$ sudo nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

$ sudo /etc/init.d/networking restart

I than try to ping for example ping -c 3 the response is that the host is unreachable. The icon on the top right of the desktop says: wired network disconnected.

If I work using the GUI approach (Edit Connections and so on...) all works great.

Can same one explain to me where I wrong?

$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 90:e6:ba:07:4a:77  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::92e6:baff:fe07:4a77/64 Scope:Link
          RX packets:39619 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18520 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:19030895 (19.0 MB)  TX bytes:2768769 (2.7 MB)

$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0     U         0 0          0 eth0
share|improve this question
Is the word geteway misspelled? It is gateway. – chili555 Jun 4 '14 at 20:46
up vote 0 down vote accepted

Your gateway is outside of your network

address netmask implies network from -

as you can see geteway falls outside. Check the subnet on your gateway and assign ip within that range

share|improve this answer
Sorry, typing ERROR, I edited the post with the right geteway – Riccardo Jun 4 '14 at 13:47
whatdoes ifconfig -a return? – meccooll Jun 4 '14 at 13:53
Looks good. Can you get to your gateway? ping if so maybe it's your dns? ping google at ping – meccooll Jun 4 '14 at 14:51
ping looks good while if I ping I get: network is ureachable!! The thing I do not understand is why if I do all these operation via GUI approach all works fine??? – Riccardo Jun 4 '14 at 15:07
Why are you pinging you're setting the gateway at (10 in the last octet) – meccooll Jun 4 '14 at 15:24

You have to remove the network manager

sudo apt-get remove network-manager

Editor's note:

For the love of all that's holy, DO NOT RUN THIS COMMAND!

share|improve this answer
DO NOT EVER DO THIS – Kaz Wolfe Sep 10 '14 at 5:54

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.