You are not logged in.

#1 2012-02-14 16:27:48

narrakan
Member
From: Italy
Registered: 2012-02-06
Posts: 15

[SOLVED] Internet sharing problem using dhcpcd/dhclient

I'm trying to install Arch on my netbook, but I have problems setting up a working internet connection.

I have a laptop running Arch already, which has access to the net through eth0. I'm sharing this connection via wlan0 (using dnsmasq and iptables) to the rest of my devices (smartphone, iPod) and each of them works flawlessly (they receive a dynamic IP through dhcp).

The problem is that my netbook can't connect to this wireless network, and I can't figure out why. The ad-hoc wifi connection on the laptop is created through a script in rc.local:

ip link set wlan0 down
iwconfig wlan0 essid "Arch" mode Ad-Hoc key s:a1b2c
ifconfig wlan0 192.168.0.254 up

iptables and dnsmasq are already set up and running as daemons. When I try to connect with my netbook, this is what I get:

[root@archnet ~]# ip link set wlan0 down
[root@archnet ~]# iwconfig wlan0 essid "Arch" mode Ad-Hoc key s:a1b2c
[root@archnet ~]# ip link set wlan0 up
[root@archnet ~]# dhcpcd wlan0
dhcpcd[572]: version 5.5.4 starting
dhcpcd[572]: Kernel is not configured to accept IPv6 RAs
dhcpcd[572]: wlan0: broadcasting for a lease
dhcpcd[572]: timed out
[root@archnet ~]# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID: "Arch"
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 62:FB:B4:7F:3E:23
          Tx-Power=14 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:6131-6232-63
          Power management:on

[root@archnet ~]# 

Any thougths? As I said, it works fine with other devices, but not with this one.

UPDATE: I've just tried booting into Ubuntu Live using the same netbook, and even there the connection is painless and working. I wonder if it is a bug in my configuration. Or I'm just doing something wrong.

Last edited by narrakan (2012-02-14 23:42:27)

Offline

#2 2012-02-14 23:39:10

narrakan
Member
From: Italy
Registered: 2012-02-06
Posts: 15

Re: [SOLVED] Internet sharing problem using dhcpcd/dhclient

Well, I did something like five fresh installs, but at last I found the problem. There is a bug (?) in the Atheros modules, so you have to run this someway:

# modprobe ath9k nohwcrypt=1

You can do this by adding it to rc.local or creating a file inside /etc/modprobe.d (you can use modprobe.conf) with this line in it:

options ath9k nohwcrypt=1

Then you won't receive any error when trying to connect to an encrypted wireless network using dhcp. I still need to figure out why netcfg does not get a lease on the first try. I'm using the following configuration since I'm connected to an Ad-Hoc network (it's just a workaround since there seems to be no support yet):

CONNECTION="ethernet"
DESCRIPTION="wep encrypted wireless ad-hoc connection"
INTERFACE=wlan0
IP="dhcp"
TIMEOUT=30
PRE_UP="iwconfig wlan0 mode Ad-Hoc essid YOURESSID key s:password"

Reference: netcfg discussion on ArchWiki

I hope this will be helpful for who has been struggling with this card like me for an entire afternoon.

EDIT: Also, marking as solved, since the original problem is gone.

EDIT 2 (I hope it's the last one): Problem completely solved by increasing the timeout in netcfg (the last code snippet I posted is now the correct one).

Last edited by narrakan (2012-02-14 23:50:00)

Offline

#3 2012-02-15 06:26:07

atercor
Member
From: Oro Verde, E. R., Argentina
Registered: 2012-02-13
Posts: 28

Re: [SOLVED] Internet sharing problem using dhcpcd/dhclient

i'm having the same issue. I thought it was the ipv6 problem, but i'm trying to do a clean install and I've started all over again, so I didn't tried this solution yet. Probably tomorow I tell if the problem is gone.

Thanks in advance.

Offline

#4 2012-02-15 08:05:05

xstart
Member
From: Wisconsin, USA
Registered: 2011-03-31
Posts: 3

Re: [SOLVED] Internet sharing problem using dhcpcd/dhclient

Thank you, narrakan.  I have been having same problem.  Following your directions got me back online.

Offline

Board footer

Powered by FluxBB