You are not logged in.

#1 2016-02-13 12:09:13

universal
Member
Registered: 2016-02-13
Posts: 8

[Solved] Connected to WiFi but no internet connection

Hey everyone,

So I have a WiFi usb drive which I'm trying to use on an old laptop.
The usb drive requires me to use the windows driver with ndiswrapper, which works fine.

$ ndiswrapper -l
fwlan : driver installed
        device (057C:6201) present
$ lsusb
Bus 002 Device 003:  ID 057C:6201 AVM GmbH AVM Fritz!WLAN v1.1 [Texas Instruments TNETW1450]

But when I connect to a network using wifi-menu I still can't get a connection to the internet although iwconfig says that I'm connected

enp0s29f1u2 IEEE 802.11g ESSID:"(The network essid)"
$ ping google.com
ping: unknown host google.com
$ ping 8.8.8.8
connect: Network is unreachable

When I look at journalctl it constanly loops this output

# journalctl -f
Feb 13 11:49:50 ibm-t23 dhcpcd[261]: enp0s29f1u2: carrier lost
Feb 13 11:49:50 ibm-t23 dhcpcd[261]: enp0s29f1u2: carrier acquired
Feb 13 11:49:50 ibm-t23 dhcpcd[261]: enp0s29f1u2: IAID 4f:49:a4:d3
Feb 13 11:49:50 ibm-t23 dhcpcd[261]: enp0s29f1u2: solliciting a DHCP lease

It seems like it's requesting an ipv6 (Well I assume 4f:49:a4:d3 is an ipv6 tongue), so I tried to disable ipv6 by adding ipv6.disable_ipv6=1 as a parameter in syslinux and also
disabling it in /etc/sysctl.d/40-ipv6.conf like this:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.enp0s29f1u2.disable_ipv6 = 1

I also disabled it in /etc/dhcpcd.conf with 'noipv6rs' and 'noipv6' but the output is still the same.
The thing is that the usb drive works fine on my other computer, which is also running arch.
There the output of journalctl looks like this:

Feb 13 11:17:24 arch dhcpcd[334]: enp0s2f1u8: rebinding lease of 192.168.2.123
Feb 13 11:17:24 arch dhcpcd[334]: enp0s2f1u8: probing address 192.168.2.123/24
Feb 13 11:17:25 arch dhcpcd[334]: enp0s2f1u8: soliciting an IPv6 router
Feb 13 11:17:30 arch dhcpcd[334]: enp0s2f1u8: leased 192.168.2.123 for 86400 seconds
Feb 13 11:17:30 arch dhcpcd[334]: enp0s2f1u8: adding route to 192.168.2.0/24
Feb 13 11:17:30 arch dhcpcd[334]: enp0s2f1u8: adding default route via 192.168.2.1
Feb 13 11:17:30 arch dhcpcd[334]: enp0s2f1u8: removing route to 192.168.2.0/24
Feb 13 11:17:37 arch dhcpcd[334]: enp0s2f1u8: no IPv6 Routers available

Also the usb drive has worked on the same laptop, but with a different distro. So I assume that some of my configs might me wrong.

So that's it any help with this is appreciated big_smile

Last edited by universal (2016-02-14 11:10:01)

Offline

#2 2016-02-13 12:33:14

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 4,159
Website

Re: [Solved] Connected to WiFi but no internet connection

When you are connected, what's the output of

# ip addr
# ip route

and

cat /etc/resolv.conf

Offline

#3 2016-02-13 12:54:53

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

x33a wrote:

When you are connected, what's the output of

# ip addr
# ip route

and

cat /etc/resolv.conf

Alright here you go

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp0s29f1u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1a:4f:49:a4:d6 brd ff:ff:ff:ff:ff:ff
3: irda0: <NOARP> mtu 2048 qdisc noop state DOWN group default qlen 8
    link/irda 00:00:00:00 brd ff:ff:ff:ff
4: enp2s8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:02:8a:30:f3:6c brd ff:ff:ff:ff:ff:ff

$ cat /etc/resolv.con
# Generated by resolvconf
nameserver 192.168.2.1

ip route didn't return anything

EDIT: Wierd, after plugging in a lan cable, while the usb drive was connected the usb drive is able to connect to the internet, even after the lan cable was unplugged. But that only works until I restart sad (And I couldn't reproduce it)

Last edited by universal (2016-02-13 13:32:09)

Offline

#4 2016-02-13 12:56:37

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,350
Website

Re: [Solved] Connected to WiFi but no internet connection

Try connecting manually:
https://wiki.archlinux.org/index.php/Wi … nual_setup

If it still doesn't work, post any error messages verbatim.


.- .-. -.-. ..../.. .../- .... ./-... . ... -

Arch Linux Help Guide   •   How to report a problem

Offline

#5 2016-02-13 15:07:20

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

Head_on_a_Stick wrote:

Try connecting manually:
https://wiki.archlinux.org/index.php/Wi … nual_setup

If it still doesn't work, post any error messages verbatim.

So I tried to follow the instructions and since the network I'm trying to connect to uses WPA I used wpa_supplicant which continously outputs this:

# wpa_supplicant -D nl80211,wext -i enp0s29f1u2 -c <(wpa_passphrase "MyNetworkSSID" "MyNetworkKey")
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=enp0s29f1u2 disabled_11b_rates=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
enp0s29f1u2: Trying to associate with 18:83:bf:0f:7f:aa (SSID='EasyBox-0F7F34' freq=2437 MHz)
enp0s29f1u2: Associated with 18:83:bf:0f:7f:aa
enp0s29f1u2: WPA: Key negotiation completed with 18:83:bf:0f:7f:aa [PTK=CCMP GTK=TKIP]
enp0s29f1u2: CTRL-EVENT-CONNECTED - Connection to 18:83:bf:0f:7f:aa completed [id=0 id_str=]
enp0s29f1u2: CTRL-EVENT-DISCONNECTED bssid=18:83:bf:0f:7f:aa reason=0

Using iw to connected didn't work because it doesn't recognize the usb drive.

Last edited by universal (2016-02-13 16:43:50)

Offline

#6 2016-02-13 16:15:22

loqs
Member
Registered: 2014-03-06
Posts: 2,578

Re: [Solved] Connected to WiFi but no internet connection

Failed to open config file '/dev/fd/63', error: No such file or directory

Would expect that output if you were using sudo instead of running the command directly as root.

Offline

#7 2016-02-13 16:44:45

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

loqs wrote:
Failed to open config file '/dev/fd/63', error: No such file or directory

Would expect that output if you were using sudo instead of running the command directly as root.

Well I guess I have been using that '#' wrong^^. I used sudo.
When I execute the command logged in as root it continously outputs this:

Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=enp0s29f1u2 disabled_11b_rates=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
enp0s29f1u2: Trying to associate with 18:83:bf:0f:7f:aa (SSID='EasyBox-0F7F34' freq=2437 MHz)
enp0s29f1u2: Associated with 18:83:bf:0f:7f:aa
enp0s29f1u2: WPA: Key negotiation completed with 18:83:bf:0f:7f:aa [PTK=CCMP GTK=TKIP]
enp0s29f1u2: CTRL-EVENT-CONNECTED - Connection to 18:83:bf:0f:7f:aa completed [id=0 id_str=]
enp0s29f1u2: CTRL-EVENT-DISCONNECTED bssid=18:83:bf:0f:7f:aa reason=0

Last edited by universal (2016-02-13 16:45:16)

Offline

#8 2016-02-13 18:46:39

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,350
Website

Re: [Solved] Connected to WiFi but no internet connection

universal wrote:
nl80211: Driver does not support authentication/association or connect commands

https://wiki.archlinux.org/index.php/WP … e_hardware


.- .-. -.-. ..../.. .../- .... ./-... . ... -

Arch Linux Help Guide   •   How to report a problem

Offline

#9 2016-02-13 20:05:40

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

Head_on_a_Stick wrote:
universal wrote:
nl80211: Driver does not support authentication/association or connect commands

https://wiki.archlinux.org/index.php/WP … e_hardware

Oh, wow probably could've found that myself tongue
Following that I now only get that output:

# wpa_supplicant -D wext -B -i enp0s29f1u2 -c <(wpa_passphrase "MyNetworkSSID" "MyNetworkKey")
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

But I get that output on my other computer aswell when using wifi-menu.

Looking at journalctl -f I get a similar output continously again:

Feb 13 20:58:33 ibm-t23 dhcpcd[278]: enp0s29f1u2: carrier acquired
Feb 13 20:58:33 ibm-t23 dhcpcd[278]: enp0s29f1u2: IAID 4f:49:a4:d3
Feb 13 20:58:33 ibm-t23 dhcpcd[278]: enp0s29f1u2: rebinding lease of 192.168.2.131
Feb 13 20:58:33 ibm-t23 dhcpcd[278]: enp0s29f1u2: carrier lost

Offline

#10 2016-02-13 20:12:36

jeremy31
Member
Registered: 2015-11-01
Posts: 139

Re: [Solved] Connected to WiFi but no internet connection

If you can, change the encryption settings on the wifi router to WPA2 only, no WEP or TKIP

Offline

#11 2016-02-13 20:38:48

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

jeremy31 wrote:

If you can, change the encryption settings on the wifi router to WPA2 only, no WEP or TKIP

The network is currently WPA2/WPA. And it can't be changed to only WPA2. But when I connect to the hotspot of my phone which is WPA2 I get the same issue.
So I guess that's not the cause of the problem.

Last edited by universal (2016-02-13 21:01:20)

Offline

#12 2016-02-14 11:09:18

universal
Member
Registered: 2016-02-13
Posts: 8

Re: [Solved] Connected to WiFi but no internet connection

So I fixed this thanks to this veery old thread.

Running

dhcpcd <interface> --nohook mtu

Fixed the issues
I added wpa_supplicant and dhcpcd to the sudoers file so it can be executed without a password and added this to my .xinitrc:

sudo dhcpcd <interface> --nohook mtu
sudo wpa_supplicant -D wext -B -i enp3s0 -c /home/user/.wpa.conf

So it connects on login.
So thanks everyone for your help big_smile

Offline

#13 2016-02-14 11:55:15

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 4,350
Website

Re: [Solved] Connected to WiFi but no internet connection

universal wrote:

I added wpa_supplicant and dhcpcd to the sudoers file so it can be executed without a password and added this to my .xinitrc:

sudo dhcpcd <interface> --nohook mtu
sudo wpa_supplicant -D wext -B -i enp3s0 -c /home/user/.wpa.conf

So it connects on login.

You can write a custom unit file for systemd to do that for you instead without having to mess with /etc/sudoers, you can adapt this example:
https://github.com/Head-on-a-Stick/conf … 40.service

Replace the `ip` lines with `dhcpcd --nohook mtu` and perhaps even make it a `--user` .service instead.

This would ensure a connection even if your graphical desktop doesn't load wink


.- .-. -.-. ..../.. .../- .... ./-... . ... -

Arch Linux Help Guide   •   How to report a problem

Offline

Board footer

Powered by FluxBB