Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have some trouble setting-up the network interface using the static IP configuration.

I run ubuntu 12.04 with kernel 3.11.0-22 with the back-ports enabled.

I followed these istructions but seems to exist some conflict between the GUI approach (NetworkManager) and the command line approach (/etc/network/interface).

In particular:

sudo nano /etc/network/interfaces

I edit the file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

and then

sudo /etc/init.d/networking restart

I than try to ping for example google.com

ping -c 3 www.google.com

but the response is that the host is unreacheble; indeed 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 grate.

Can same one explain to me where I wrong???

Best, Riccardo


ifconfig -a

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)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6336 (6.3 KB)  TX bytes:6336 (6.3 KB)


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 at 20:46

2 Answers 2

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 at 13:47
whatdoes ifconfig -a return? –  meccooll Jun 4 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 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 at 15:07
Why are you pinging you're setting the gateway at (10 in the last octet) –  meccooll Jun 4 at 15:24

You have to remove the network manager

sudo apt-get remove network-manager

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.