Host is unreacheble with static networking configuration via /etc/network/interfaces while GUI NetworkManager is ok

Posted by Riccardo on Ask Ubuntu See other posts from Ask Ubuntu or by Riccardo
Published on 2014-06-04T12:57:48Z Indexed on 2014/08/24 22:33 UTC
Read the original article Hit count: 399

Filed under:
|

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 help.ubuntu.com 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
address 10.1.1.50
gateway 10.1.1.10
netmask 255.255.255.0
dns-nameservers 192.168.3.45 192.168.8.10

$ sudo /etc/init.d/networking restart

I than try to ping for example google.com ping -c 3 www.google.com 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:10.1.1.50  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::92e6:baff:fe07:4a77/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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
10.1.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0

© Ask Ubuntu or respective owner

Related posts about networking

Related posts about network-manager