You are not logged in.

#1 2008-12-01 16:51:30

jai134
Member
Registered: 2008-11-26
Posts: 234

wlan0 not up after boot

Hello. I'am new to Arch and have a question about wireless. My problem is that I have to bring my wlan0 up with ifconfig or iconfig after boot. I have a home-network without encryption. I use the mac-adress to authenticate my eeepc on the network.

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="sv_SE.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="Europe/Stockholm"
KEYMAP="sv-latin1"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(atl2 ath5k ath_hal ath_pci wlan snd-mixer-oss snd-pcm-oss
snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="eeepc"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
wlan0="dhcp"
eth0="dhcp"
wlan_wlan0="wlan0 essid xxxx" # unencrypted
INTERFACES=(wlan0 !eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond alsa hal fam)

Offline

#2 2008-12-01 17:14:58

Ekimino
Member
From: Maldonado, Uruguay
Registered: 2008-02-26
Posts: 69
Website

Re: wlan0 not up after boot

Try setting it up on /etc/conf.d/wireless . And check the wiki on Wireless Setup http://wiki.archlinux.org/index.php/Wir … .2Frc.conf

Last edited by Ekimino (2008-12-01 17:15:22)

Offline

#3 2008-12-01 18:31:30

jai134
Member
Registered: 2008-11-26
Posts: 234

Re: wlan0 not up after boot

I have to modify my question a little bit. I have found that the interface is up but it haven't got an IP. I have to run "dhcpcd wlan0" to connect to my network. No big problem but it would be nice to get it right. I will try to configure /etc/conf.d/wireless.
How can I read an error-message that I get during boot-up. It says something about WEP and TIME-OUT. It is shown just before the boot-promt and disappears before I am able to read and understand it.

Offline

#4 2008-12-10 14:57:02

los-t
Member
From: Russia, Moscow
Registered: 2008-12-10
Posts: 7

Re: wlan0 not up after boot

Hello. I'am a newbie and have the same (at least I suppose so) problem as the topicstarter.
I also have a wireless unencrypted network without a key. I tried setting it up in rc.conf and in conf.d/wireless - the effect is always the same. I get an error message like "Couldn't set essid because the interface is down." and then "ra0 timeout" while booting.

The only thing I have to do to get my WiFi working after startup is running (only!) dhcpcd manually each time. I mean the ra0 is up and running but has not obtained DHCP lease.

I suppose the problem is either in my system's boot sequence or in time ifconfig takes to start ra0.
And actually I don't know why dhcp is not working right after startup. Should I add some extra daemons/modules to my rc.conf?

Actually searching google and reading wiki made no help. The solutions are mostly the same (as in ArchWiki) but they don't work. By the way, what should be left in rc.conf if I configure my card in conf.d/wireless? Should there (in rc.conf) be anything like

wlan0="dhcp"
INTERFACES=(wlan0)

or nothing at all?

So here is what i have my rc.conf (assuming I configure my wlan there):

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(skge sky2 slhc snd-mixer-oss snd-pcm-oss snd-seq-oss snd-seq-device snd-seq-midi-event snd-seq snd-hwdep snd-page-alloc snd-pcm snd-rawmidi snd-timer snd snd-mpu401-uart snd-mpu401 snd-hda-intel soundcore fglrx fuse) 

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="lst_frm"

ra0="dhcp"                             # Does this require any daemons additionally loaded?
wlan_ra0="ra0 essid lst_net"
INTERFACES=(ra0)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
DAEMONS=(syslog-ng hal network netfs fam crond)

And this is what i get immediately after startup:

# Right after the system startup

# The ra0 interface is up and running
$ ifconfig ra0
ra0       Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX  
          inet6 addr: XXXX::XXX:XXXX:XXXX:XXXX/XX Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:311439 (304.1 Kb)  TX bytes:1836 (1.7 Kb)
          Interrupt:17 

#The wireless ra0 is associated with AP
$ iwconfig ra0
ra0       RT2860 Wireless  ESSID:"lst_net"  Nickname:"RT2860STA"
          Mode:Managed  Frequency=2.422 GHz  Access Point: XX:XX:XX:XX:XX:XX   
          Bit Rate=104 Mb/s   
          RTS thr:off   Fragment thr:off
          Link Quality=91/100  Signal level:-74 dBm  Noise level:-71 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

#No ping with google == means no DNS in resolv.conf == means no dhcp during startup
$ ping www.google.com
ping: unknown host www.google.com

#This is what I have to do manually each time after startup.
#And this definitely should be done automatically during system startup.
$ sudo dhcpcd ra0
ra0: dhcpcd 4.0.4 starting
ra0: broadcasting for a lease
ra0: offered 192.168.1.165 from 192.168.1.1
ra0: checking 192.168.1.165 is available on attached networks
ra0: acknowledged 192.168.1.165 from 192.168.1.1
ra0: leased 192.168.1.165 for 86400 seconds

Thanks in advance.

As an answer to previous post:
Logs are stored in /var/log/ their names speak for themselves.

Last edited by los-t (2008-12-10 15:05:05)

Offline

#5 2008-12-10 17:53:14

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: wlan0 not up after boot

I would recommend netcfg and net-profiles instead of the rc.conf-way of configuring your networks.

It also adds the possibility to use dhclient instead of dhcpd, which is not working for everyone at the moment.

If you don't want to switch to netcfg, you could add the dhcpd-command in one of the files that is always executed upon boot. But that is certainly not the best way to go...

Zl.

Offline

#6 2008-12-10 18:53:28

los-t
Member
From: Russia, Moscow
Registered: 2008-12-10
Posts: 7

Re: wlan0 not up after boot

zenlord wrote:

add the dhcpd-command in one of the files that is always executed upon boot. But that is certainly not the best way to go...

Totally agreed. Though it's almost the way I got used to. Seems netcfg is the only chance, but actually I don't need any profiles. They make no sense having only one network available (I'm on a desktop, not laptop).

I want it to work, though I can simply assign a static IP and reconfigure my router. I don't know why. Maybe because it should. :-)

P.S. Is dhclient really better? Just curious. Somewhere on this forum there was a topic or two about problems with dns server name and dhclient (writing to resolv.conf or smth). And my router doesn't send that name.

P.P.S. By the way why do I get the "wlan0 is down" error during boot? Maybe that is the main problem. I thought

ifconfig wlan0 up

would be done before iwconfig tries to assign essid. And it seems to be just the opposite way.

Last edited by los-t (2008-12-10 19:03:57)

Offline

#7 2008-12-10 20:42:59

los-t
Member
From: Russia, Moscow
Registered: 2008-12-10
Posts: 7

Re: wlan0 not up after boot

Well, netcfg did work and my network is up and running right after startup. But I used DHCLIENT="no" option (simply forgot to install and decided to give it a try).

I suppose, this means that the problem was not in dhcpcd. It did start... and stop because of interface timeout.
So generally this is not the solution of the problem.

And the problem seems to be something like this: iwconfig can't assign essid to interface (it is not up in time) and so dhcpcd can't broadcast (no essid set in time). Are they trying to do their jobs at the same time? (is it possible,huh?)

Suppose, that the net-profiles does it's job because it is put after network in DAEMONS section of rc.conf. Even though I get a [fail] on "starting network" line, the interface is already running.

Can anyone tell me why it happens like that? (I'm speaking not about netcfg solution, but about sequence of  network daemon.)

Offline

#8 2008-12-11 15:21:04

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: wlan0 not up after boot

in the DAEMONS-section of rc.conf you should specifiy either network or net-profiles, not both. Remove network.

Zl.

/EDIT: you can also safely comment out mostly everything under the 'NETWORKING'-section of rc.conf. Only the hostname-line is mandatory.

Last edited by zenlord (2008-12-11 15:25:06)

Offline

#9 2008-12-11 15:35:07

los-t
Member
From: Russia, Moscow
Registered: 2008-12-10
Posts: 7

Re: wlan0 not up after boot

Thanks zenlord.

But that's what the wiki actually says on http://wiki.archlinux.org/index.php/Netcfg#net-profiles:

You also need to add net-profiles to the DAEMONS=() line, eg: DAEMONS(... network net-profiles ...).

Is that a mistake? (Don't tell me that there could be anything else. Like hal for example. I understand that.) It seemed to me the same thing was in all rc.conf files with net-profiles i've seen so far.

Maybe someone should put your advice to wiki in some more clear form?

/EDIT: I've already commented out everything but hostname. And your advice does work: no more errors during boot. But it takes a couple of seconds though. Should put it like @net-profiles, i think.

Last edited by los-t (2008-12-11 15:41:53)

Offline

#10 2008-12-11 17:55:43

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: wlan0 not up after boot

The wiki has been changed apparently. I remember it wasn't like that when I first setup net-profiles. I don't feel authorative enough to just go ahead and change it back.

It is normal that requiring an IP-address is taking some seconds. If you move it to the background, than it is possible that other services will complain. But that you have to decide for yourself of course.

Zl.

Offline

Board footer

Powered by FluxBB