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
address 10.1.1.50
geteway 10.1.1.10
netmask 255.255.255.0
dns-nameservers 192.168.3.45 192.168.8.10

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

EDIT 1

ifconfig -a

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)


lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)

EDIT 2

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
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 10.1.1.50 netmask 255.255.255.0 implies network from 10.1.1.0 - 10.1.1.255

as you can see geteway 10.0.0.1 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 10.1.1.10 if so maybe it's your dns? ping google at ping 8.8.8.8 –  meccooll Jun 4 at 14:51
    
ping 10.1.1.1 looks good while if I ping 8.8.8.8 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 10.1.1.1 you're setting the gateway at 10.1.1.10 (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

 
discard

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.