1

I have a dual boot setup with Windows 7 and Ubuntu 12.04. In Windows my connection is perfect but when booting into Ubuntu I cannot connect at all.

The network manager states that I'm connected but I cannot access any websites or ping any external addresses.

I've only been using Ubuntu for a few weeks so don't know too much about it yet. I'm also not well versed in networking.

The strange thing is that it has worked perfectly for a while after the initial install and sometime afterwards it was not working for about 2 days and then it worked again for a day and now it's completely non-functioning.

I'm investigating the possibility of it being an issue with recently install software but am hoping you guys can spot something suspicious with the results posted below.

Below is some commands and their output that I've run that I've seen asked for on other threads:

ifconfig

eth0      Link encap:Ethernet  HWaddr f4:6d:04:90:d3:fe
          inet addr:10.0.0.102  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f66d:4ff:fe90:d3fe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:281 errors:0 dropped:64 overruns:0 frame:0
          TX packets:581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21637 (21.6 KB)  TX bytes:56926 (56.9 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:16436  Metric:1
          RX packets:1429 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1429 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:93375 (93.3 KB)  TX bytes:93375 (93.3 KB)

ping 192.168.1.254

This is the address for the router's web interface which I cannot even connect to.

PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Net Unreachable
From 10.0.0.2 icmp_seq=2 Destination Net Unreachable
From 10.0.0.2 icmp_seq=3 Destination Net Unreachable
From 10.0.0.2 icmp_seq=4 Destination Net Unreachable
From 10.0.0.2 icmp_seq=5 Destination Net Unreachable

nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth0  [Wired connection 1] -------------------------------------------
  Type:              Wired
  Driver:            r8169
  State:             connected
  Default:           yes
  HW Address:        F4:6D:04:90:D3:FE

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.2        0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

  Capabilities:
    Carrier Detect:  yes
    Speed:           100 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         10.0.0.102
    Prefix:          24 (255.255.255.0)
    Gateway:         10.0.0.2

    DNS:             10.0.0.2

ping -c4 4.2.2.2

PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Net Unreachable
From 10.0.0.2 icmp_seq=2 Destination Net Unreachable
From 10.0.0.2 icmp_seq=3 Destination Net Unreachable
From 10.0.0.2 icmp_seq=4 Destination Net Unreachable

--- 4.2.2.2 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2997ms

If there are any other commands to run or things to confirm please ask.

Thank you in advance :)

4
  • Are you sure your router's IP address is 192.168.1.254? Because from your outputs, it's supposed to be 10.0.0.2, unless you have a larger network setup with more than one router. What's the output of ping -c4 4.2.2.2 and grep proxy /etc/environment?
    – Alaa Ali
    Jul 8, 2013 at 17:38
  • @Alaa, yes, I'm sure. That's what I use in Windows and have previously used it from within Ubuntu. I tried 10.0.0.2 anyway but was unable to connect. Also, I've added the output from your suggested command to the end of my question.
    – tone7
    Jul 8, 2013 at 18:21
  • This is very strange. How did your computer end up getting a 10.0.0.102 IP address, with proper DNS and gateway settings? What's even weirder is that 10.0.0.2 is actually up. I'll post an answer to change these settings.
    – Alaa Ali
    Jul 8, 2013 at 18:31
  • I have not idea how it got to be set up this way. I'm going to try your suggestion in your answer below in report back.
    – tone7
    Jul 8, 2013 at 18:46

3 Answers 3

1

Your PC and your router are on diferent networks. TCP/IP can comunicate machines on the same network.

Change the address in the Ubuntu computer to some address like 192.168.1.x (where x < 254 and x > 0), netmask 255.255.255.0 (or /24) and gateway 192.168.1.254

If the router has a dhcp server activated you can define network address as DHCP in network manager

1
  • Your answer helped me solve my problem, thanks.
    – tone7
    Jul 8, 2013 at 19:15
0

From the comments, you've mentioned that your router is 192.168.1.254, so let's do some changes. These will be temporary changes to check if we're on the right track.

In a terminal, type the following:

  1. sudo ifconfig eth0 192.168.1.98
    • This will change your machine's IP address.
  2. sudo route del default gw 10.0.0.2
    • This will remove the old default route.
  3. sudo route add default gw 192.168.1.254
    • This will add a new default route to your router.

Now, try ping -c4 192.168.1.254. If you get a response, then great! (If you don't, try setting your IP to something else, like sudo ifconfig eth0 192.168.1.113). Next, try ping -c4 4.2.2.2. If you get a response, great!

We'll need to make these changes permanent. Your machine is configured with static IP settings, so we'll need to change that. Do sudo nano /etc/network/interfaces; this will open up that file in a text editor in the terminal. Look for something like this:

auto eth0
iface eth0 inet static

If it does look like that, then delete all the , and change the second line to iface eth0 inet dhcp. When done, hit Ctrl+X, then Y, then Enter. When back to the terminal, do sudo service networking restart.

4
  • When running sudo route del default gw 10.0.0.2 I get the message SIOCDELRT: No such process then I run the ping commands which both responds and the when running sudo service networking restart I get the messages stop: Unknown instance: and networking stop/waiting. Also, my etc/network/interfaces file looked like this: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback The good news is that I'm posting from the Ubuntu machine at the moment. I've set up the IP address, Netmask and gateway like @utrescu mentioned in his answer below.
    – tone7
    Jul 8, 2013 at 19:05
  • 1
    Hmm. Okay well, I'm glad you got it running. Try changing the IP address settings to DHCP, and then do sudo dhclient eth0 to get an IP from your router.
    – Alaa Ali
    Jul 8, 2013 at 19:13
  • Thank you very much for your effort in trying to help me out. I really appreciate it. Although it is not much I will come back to upvote your comment once I have enough rep.
    – tone7
    Jul 8, 2013 at 19:16
  • No problem =), the important thing is that you got it fixed.
    – Alaa Ali
    Jul 8, 2013 at 19:29
-2

Ubuntu is an open source software free to download. But there is internet not working. So use some tips and tricks to solve this issue. So follow the simple steps and solve this issue.

Solution: http://www.wiknix.com/solved-ubuntu-internet-not-working/

2
  • The question contains details for the specific situation for the OP. It does not make sense to just paste a general tricks here. -1 for that.
    – gertvdijk
    Jan 20, 2014 at 10:17
  • @JayBokhiria Welcome to Ask Ubuntu! Even if you're not trying to conceal this information, we still require that you explicitly disclose that you're linking to your own blog, when doing so. At minimum, please edit your post to include such disclosure. In addition, it would be even better to include the essential parts of the answer here, and provide the link for reference. Jan 20, 2014 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .