1

I have successful connection through WIFI in both Ubuntu and Windows.

(I have dual boot:Ubuntu 14.04 installed & upgraded to 14.04.1 and Windows 8.1)

But I have problem in wired connection in Ubuntu only(though it works fine in Windows).

I have consulted here but no luck. I think I have some problem in setting IP address statically from Ubuntu side. The connection is shown but I cannot access the Internet and even not gateway (I mean 192.168.1.1).

I followed the way described here:

So my NetworkManager.conf looks like:

[main]
plugins=ifupdown,keyfile
#dns=dnsmasq

[ifupdown]
managed=true

But I removed other part that were by default.

And my interface is like:

auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.1.102 #I have seen from Windows that it's 1.102
gateway 192.168.1.1 # 1.1 is because I use 192.168.1.1 to access router settings
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

And I used following to restart new settings

sudo service network-manager restart
sudo service networking restart
sudo service resolvconf restart

Now I have

ifconfig -a

    eth0      Link encap:Ethernet  HWaddr 98:4b:e1:a2:2f:fa  
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::9a4b:e1ff:fea2:2ffa/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1089 errors:0 dropped:0 overruns:0 frame:0
          TX packets:644 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:77228 (77.2 KB)  TX bytes:72394 (72.3 KB)

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:4756 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4756 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1240162 (1.2 MB)  TX bytes:1240162 (1.2 MB)

wlan0     Link encap:Ethernet  HWaddr e0:2a:82:fa:e9:f8  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1997 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1085963 (1.0 MB)  TX bytes:348905 (348.9 KB)

route -n

 Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0

ping -c3 192.168.1.1

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.0.102 icmp_seq=1 Destination Host Unreachable
From 192.168.0.102 icmp_seq=2 Destination Host Unreachable
From 192.168.0.102 icmp_seq=3 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms
pipe 2

ping -c3 4.2.2.2

PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.
From 192.168.0.102 icmp_seq=1 Destination Host Unreachable
From 192.168.0.102 icmp_seq=2 Destination Host Unreachable
From 192.168.0.102 icmp_seq=3 Destination Host Unreachable

--- 4.2.2.2 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms
pipe 3

And after following the link I have new settings (Previous was AutoEthernet and new one I got is ifeth(up). I guess I should try connecting the ifeth0(up)).

Thank you for your time!!

  • After doing all these steps, what exactly is the problem? Do you get a static IP but can't access the internet? Or do you not get a static IP? What's the output of ifconfig -a; route -n; ping -c3 192.168.1.1; ping -c3 4.2.2.2 after doing all the steps in your question? Also, question: do you actually have these end of line comments in your interfaces file (like address 192.168.1.102 #this comment)? All comments in this file have to be in a separate line, not at the end of a line. – Alaa Ali Sep 4 '14 at 16:29
  • @AlaaAli Sorry for unclear question. Please see my edited question. Thank you – Nabin Sep 4 '14 at 16:56
  • @AlaaAli Sorry for my late response, as I need to switch OS to Windows to use AskUbuntu and See what I have by using Ubuntu. :-) – Nabin Sep 4 '14 at 16:57
  • @AlaaAli I don't have comments, just for the question here – Nabin Sep 4 '14 at 16:58
  • Your eth0 has an IP of 192.168.0.102 (from your ifconfig output). Did you previously set a static IP? Or is that being automatically assigned from a DHCP? Are you sure your Windows uses 1.102 not 0.102? Try executing the command sudo ifdown eth0 then sudo ifup eth0 and check the ifconfig output again. – Alaa Ali Sep 4 '14 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.