2

Short summary (added after the problem was solved)

Apparently some wireless USB network adapter drivers were incompatible with my Linux OS, and in the end I worked around the problem by buying a wireless bridge ~= receiver ~= wireless access point. Now, here is the actual question:

Question:

If a computer has been provided an IP address by a broadband router, and the firewall is turned off, but internet nevertheless doesn't work and it's not even possible to ping the router, then what might the problem be? And how can I fix it?

Background:

I'm unable to connect from my desktop to [the wireless broadband router in the appartment to which I've just moved], via [a wireless network USB card].

The router gives me an IP address (first it asks me to specify a WSP PIN code, which I do), but although I get an IP address, I'm unable to reach the Internet: I cannot resove any host names, and I cannot even ping the broadband router, i.e. the machine that gave me the IP address (!).

More information:

Below follows lots of hopefully helpful information.

My laptop, which has always been configured via DHCP, is able to connect to the broadband router without any issues. Only my desktop doesn't work. It recently had bridged networking configured.

Here are my desktop's interfaces, after I've connected it to the broadband router. wlan0 (at the end of the list) is the network USB card.

$ ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 20:cf:30:4c:2f:02 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::22cf:30ff:fe4c:2f02/64 scope link 
       valid_lft forever preferred_lft forever

(Uninteresting stuff related to KVM, VMWare, VirtualBox:
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
    link/ether 6e:84:3c:57:95:4a brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
5: vmnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:50:56:c0:00:01 brd ff:ff:ff:ff:ff:ff
    inet 172.16.228.1/24 brd 172.16.228.255 scope global vmnet1
    inet6 fe80::250:56ff:fec0:1/64 scope link 
       valid_lft forever preferred_lft forever
6: vmnet8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff
    inet 192.168.133.1/24 brd 192.168.133.255 scope global vmnet8
    inet6 fe80::250:56ff:fec0:8/64 scope link 
       valid_lft forever preferred_lft forever
END uninteresting stuff)

9: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 44:94:fc:29:59:6e brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.6/24 brd 192.168.100.255 scope global wlan0  <-- it has an IP addr (!)
    inet6 fe80::4694:fcff:fe29:596e/64 scope link 
       valid_lft forever preferred_lft forever

Here is the routing table: (192.168.100.* is the broadband router's network)

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.100.1   0.0.0.0         UG    0      0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 wlan0
172.16.228.0    *               255.255.255.0   U     0      0        0 vmnet1
192.168.100.0   *               255.255.255.0   U     2      0        0 wlan0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
192.168.133.0   *               255.255.255.0   U     0      0        0 vmnet8

Here is the iptables configuration: (it's disabled, right?)

$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

When I ping the gateway (192.168.100.1), and Google, ping says:

$ ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
From 192.168.100.6 icmp_seq=3 Destination Host Unreachable
From 192.168.100.6 icmp_seq=5 Destination Host Unreachable
From 192.168.100.6 icmp_seq=6 Destination Host Unreachable

$ ping google.com
ping: unknown host google.com

How is that possible? 192.168.100.1 has given me an IP address, then it cannot be "unreachable"? I'm able to ping the gateway from my laptop, so it does reply to ping requests.

Here is resolv.conf: (Why does it specify localhost???? — I suppose that's (parts of) the reason Google isn't ping:able?)

$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

In the past, I had a bridged network configured in /etc/network/interfaces, but I've commented it out, and restarted the whole computer. Here are the not-commented-out lines in that file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

I'm using Kubuntu 12.04 LTS. Network Manager shows wlan0 as status CONNECTED.

Update: Here's the output from lsusb:

$ lsusb
Bus 004 Device 004: ID 05f3:0081 PI Engineering, Inc. Kinesis Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 09da:0006 A4 Tech Co., Ltd Optical Mouse WOP-35 / Trust 450L Optical Mouse
Bus 004 Device 005: ID 05f3:0007 PI Engineering, Inc. Kinesis Advantage PRO MPC/USB Keyboard
Bus 002 Device 004: ID 0846:9021 NetGear, Inc. 

Here's output for lsusb -v but for the NetGear device only: (for all devices, lsusb -v said "Couldn't open device, some information will be missing")

Bus 002 Device 004: ID 0846:9021 NetGear, Inc. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0846 NetGear, Inc.
  idProduct          0x9021 
  bcdDevice            2.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
2
  • @Braiam, now I've added lsusb and lsusb -v. Given that output, is it possible to tell if I'm missing some driver? Or if I have the wrong version perhaps
    – KajMagnus
    Sep 29, 2013 at 14:53
  • The question was solved buying another functional USB wireless adapter.
    – Braiam
    Oct 3, 2013 at 13:01

2 Answers 2

1

Here is resolv.conf: (Why does it specify localhost???? — I suppose that's (parts of) the reason Google isn't ping:able?)

You are right in the track. For some reason your DHCP (?) offers localhost instead of a valid DNS or maybe Network Manager was set to do so. I would go to network manager configuration tool, right click to the network applet besides your username, select Network Settings, look for your wireless devices, click Options... button in the corner. Go to the ipv4 tab and check the DNS entries. If the method says "Automatic (DHCP)" and the DNS field I would blame a broken DHCP server. Change the method to "Automatic (DHCP) addresses only" and use another DNS servers (Google's, OpenDNS's, etc).

If the value indeed has 127.0.0.1 then maybe someone would like to play you a bad joke, remove the entry, set your Method in automatic and ready to go.

6
  • Thanks for the suggestion. However, today, after a shutdown and restart, it's not possible to establish a connection at all. Actually, I had already tested what you suggested, but it didn't work — either the computer insisted on using 127.0.0.1, or it was not possible to establish a connection at all that time, I do not remember. — Interestingly enough, when starting a Kubuntu live CD, Kubuntu 12.04 was unable to connect via the USB network card. But connecting via a cable to my hub was okay. I suppose I'll have to use a wired connection instead.
    – KajMagnus
    Sep 29, 2013 at 11:19
  • Hmm, I'll try to find out if I'm missing some drivers or if there's some incompatibility with Netgear's N300 Wireless Mini USB Adapter and Ubuntu ...
    – KajMagnus
    Sep 29, 2013 at 11:28
  • 3
    This answer is incorrect. It is correct to have nameserver 127.0.0.1 in /etc/resolv.conf if a local forwarding nameserver is running which listens at 127.0.0.1. Dnsmasq is an example of such a local nameserver.
    – jdthood
    Oct 3, 2013 at 8:14
  • 2
    The question submitter cannot ping the router by IP address, so there must be a problem that lies deeper than DNS configuration.
    – jdthood
    Oct 3, 2013 at 8:15
  • 1
    @Braiam Ubuntu 12.10 and later starts (by default, so long as dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf) a local forwarding nameserver which listens at loopback address 127.0.1.1. Ubuntu 12.04 does the same except that the local forwarding nameserver listens at 127.0.0.1. Beyond that, local nameservers such as dnsmasq and pdnsd listen at 127.0.0.1 too, and when they start they register their listen address with resolvconf and cause resolvconf to put nameserver 127.0.0.1 in resolv.conf. (Bind9 does this too but only if RESOLVCONF=yes in /etc/default/bind9 — not the default.)
    – jdthood
    Oct 4, 2013 at 8:32
0

The wireless USB network adapter apparently requires drivers that are provided for MS Windows only. So I can try to use something like NDISwrapper, or buy another USB adapter that works with Linux/Ubuntu.

Here is information on buying a computer with a network card that supports Linux: https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported

Here is a discussion / info-about-how-to install Windows drivers for Netgear's N300 Wireless Mini USB Adapter on Ubuntu: http://ubuntuforums.org/showthread.php?t=1830237
However following all these instructions seems to take a few days (??) and requires access to a Windows computer and finding some drivers in C:\Windows\system32??\...somewhere...\..., or requires downloading Windows driver files via old broken links.

I suppose I'll buy a USB network adapter that's compatible with Ubuntu. Here is a link to blog posts about some drivers that might work:
https://www.google.se/search?q=best+usb+wireless+adapter+for+ubuntu+12.04

Update 2013-09-30: I bought a wireless bridge ~= wireless access point ~= receiver, and connected it wirelessly to the router. Then I connected another router that I have to this wireless bridge, so now I have my own private network and everything works fine :-)

The next time I'll never ever buy a wireless adapter that lists "Windows" only :-(

1
  • @jdthood Thanks for the tips. StackExchange required me to wait 2 days or something before I could accept it, but then during those 2 days I forgot about it.
    – KajMagnus
    Oct 3, 2013 at 16:23

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