Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireless fails to "up" IPv4 automatically, [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Terlisimo
n00b
n00b


Joined: 12 Jan 2013
Posts: 2

PostPosted: Sat Jan 12, 2013 2:15 am    Post subject: Wireless fails to "up" IPv4 automatically, [solved Reply with quote

Using wpa-supplicant.

I have net.eth0 and net.wlan0 set up to start up automatically by default.

If I run /etc/init.d/net.wlan0 restart manually as root, everything works fine.
However, *every* time the system boots up, connects to my AP, it self-assigns IPv6 address but it doesn't acquire an IPv4 address. Manually restarting net.wlan0 after that fixes the problem.

First I thought it was a dhcp issue so I entered a static IPv4 address... with exactly same result (I get v6, no v4).

Then I disabled IPv6 on all interfaces through sysctl.conf; didn't do anything except then wlan0 didn't get any addresses at all.

So I made /etc/local.d/wireless-repair.start with "sleep 10; /etc/init.d/net.wlan0 restart" in it... and still no IPv4 address. So I put another sleep and another restart in it... and STILL same result. Script was definitely executed, I could see output in console from restarting net.wlan0. It restarted wpa-supplicant, it connected and authenticated with an AP but got no IPv4 addr.


The thing that finally worked for me was this:


/etc/local.d/restart_wireless.start:
Code:
#!/bin/bash
/etc/local.d/restart_wireless_helper &



/etc/local.d/restart_wireless_helper:
Code:
#!/bin/bash
sleep 5
/etc/init.d/net.wlan0 restart



So... for some reason, my system simply refuses to bring up IPv4 on wlan0 if it's part of the init process... only scheduling restart as a background process worked. Weird.

So, it's fixed for now but it's quite an ugly hack.

I saw similar issues with WPA on this forum, hopefully this can provide clues whether this is a bug or a configuration issue.

If anyone wants to see my config files, logs, package versions or anything, just ask which ones you want.


Last edited by Terlisimo on Mon Jan 14, 2013 12:07 am; edited 1 time in total
Back to top
View user's profile Send private message
CrankyPenguin
Apprentice
Apprentice


Joined: 19 Jun 2003
Posts: 283

PostPosted: Sat Jan 12, 2013 7:14 am    Post subject: Reply with quote

You might look into DHCLIENT. I know that a number of people, myself included, have found that newer versions of dhcpcd are IPv6 specific. Current versions of DHCLIENT seem to do better with IPv4.
_________________
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Back to top
View user's profile Send private message
Terlisimo
n00b
n00b


Joined: 12 Jan 2013
Posts: 2

PostPosted: Mon Jan 14, 2013 12:11 am    Post subject: Reply with quote

Figured out the cause... my bad :)

I used a script in /etc/local.d/ to remount /tmp as zRam, that's when things went bad.

/etc/local.d scripts started after net.wlan0... and net.wlan0 puts a file in /tmp for internal purposes. After remounting that file was lost...

Solution was to load zRam module and remount /tmp as soon as possible in the boot process, before demons start putting their things in it (wpa-supplicant was the only one for me).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum