Slackware 12.2: Wireless interface predefined instead of taken from rc.inet1.conf?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Slackware 12.2: Wireless interface predefined instead of taken from rc.inet1.conf?
Hi there,
due to some other problem (no sound) I reinstalled udev.
Since then I have no ath0 interface anymore for my wireless
setup. udev only allows wlan0.
Setting IFNAME[4]="wlan0" in /etc/rc.d/rc.inet1.conf brought back
my WPA2 encrypted connection. But I don't think this is the
correct behaviour.
I checked the files in /etc/udev/rules.d and found that indeed
there is only a rule for wlan0, but not for ath0. Renaming the
files and restarting udev gave the same result: No ath0.
Can anyone explain, what's going on here?
And how do I get back the expected support for ath0?
Thanks a lot again!
gargamel
Last edited by gargamel; 12-25-2008 at 12:45 PM.
Reason: Rewrite, to make it concise and clear
I did notice that on Slackware 12.1 my Ethernet card is known as eth0 and my wireless card as eth1 ; it's the opposite on Slackware 12.2 (both distros installed side by side on the same laptop).
And on another laptop with a fresh install of Slackware 12.2 the Ethernet card is known as eth0 and the wireless card as wlan0.
Doesn't hurt but if you try to setup your network with netconfig and you have in fact a wireless card on eth0: you'll need to make some tuning in /etc/rc.d/rc.inet1.conf and may be in /etc/wpa_supplicant.conf then.
For newcomers I would suggest to issue ifconfig -a, as you did, and iwconfig to make sure which one is or are your wireless card(s).
Edit:
Setting IFNAME[4]="wlan0" in /etc/rc.d/rc.inet1.conf *is* the good way to configure your connection -- replace wlan0 by the name of the interface(s) given by iwconfig.
Last edited by Didier Spaier; 12-25-2008 at 03:34 PM.
Reason: typos
I woudn't worry so much about that.
[...]
Doesn't hurt but if you try to setup your network with netconfig and you have in fact a wireless card on eth0: you'll need to make some tuning in /etc/rc.d/rc.inet1.conf and may be in /etc/wpa_supplicant.conf then.
I am not overly worried about it, but as far as I recall the madwifi docs there used to be wlan0 plus one more interface. Both could be used for one and the same device interchangably. While wlan0 is always there, the other names vary. In my case, it used to be ath0.
Quote:
For newcomers I would suggest to issue ifconfig -a, as you did, and iwconfig to make sure which one is or are your wireless card(s).
Edit:
Setting IFNAME[4]="wlan0" in /etc/rc.d/rc.inet1.conf *is* the good way to configure your connection -- replace wlan0 by the name of the interface(s) given by iwconfig.
[/QUOTE]
Here is, where I am *a little* worried, because my connection doesn't get an alias name. I only can use wlan0. Before reinstalling udev on my already functional and running Slackware 12.2 I had wlan0 *and* ath0. I just would like to know why it's gone.
As I said, I am not overly worried. Just a little bit...
EDIT: I was able to follow Alien Bob's excellent How-to and get a connection using ath0. This doesn't work anymore, after re-installing udev, and the question is: Why? http://alien.slackbook.org/dokuwiki/...eless_networks
Before you edited your answer I was about to send you the URL you added
If I understand well what Eric says, wlan0 is here only as an example; you could choose an other interface number (as long it's not greater than six and not yet allocated) and use anything_you_want as an alias for it instead of wlan0, as long as anything_you_want is the name given by udev.
The only problem I can think of is a change in the naming of interfaces by udev; but I don't think it can occur unless you add or remove a network card or change yourself udev's rules.
So, use the name given by udev (and printed by iwconfig) as an alias and it will work.
Last edited by Didier Spaier; 12-25-2008 at 05:09 PM.
Reason: typos
Before you edited your answer I was about to send you the URL you added
If I understand well what Eric says, wlan0 id here only as an example; you could choose an other interface number (as long it's not greater than six and not yet allocated) and use anything_you_want as an alias for it instead of wlan0, as long as anything_you_want is the name given by udev.
Not sure, if the number in the interface name is equivalent with the
index number in IFNAME[indexnumber] in /etc/rc.d/rc.inet1.conf, as the
index is incremented for each interface, while the number in the name
is only incremented if another interface of the same type is added.
Otherwise it would make sense to assume some correlation between the
two counters.
Quote:
The only problem I can think of is a change in the naming of interfaces
by udev; but I don't think it can occur unless you add or remove a
network card or change yourself udev's rules.
Possible, but unlikely, I think. Because with the same version of udev
on the same computer in a running 12.2 system I got ath0, before
installing udev a second time. Now I wonder what the difference in
behaviour is caused by.
The reason, why I am so stubborn with this tiny little cosmetic detail
is, that all my experience with *nix systems tells me that things like
these all too often are only symptoms of something fundamentally wrong
in the system. In fact, I don't expect a huge problem behind this, but
I'd rather make sure.
What is the difference between upgrading udev as part of a system
upgrade compared to reinstalling the package individually a
second time, after the system upgrade is complete?
1) If you upgrade udev as part of a system upgrade (e.g. from Slacware 12.1 to Slackware 12.2), then you'll have to take care of new and old configuration files.
For instance, as stated in CHANGES_AND_HINTS.TXT for Slackware 12.2:
Quote:
As usual, there are changes in udev packaging that need mentioning...
First, be sure to move the /etc/rc.d/rc.udev.new over - the old
/etc/rc.d/rc.udev will not work with the new udev package (and the new
one won't work with the old udev package).
The system udev rules now reside in /lib/udev/rules.d/ instead of
/etc/udev/rules.d/ in older versions. There should never be a reason
to edit anything in /lib/udev/rules.d/, so if you think you have a case
where this is required, either you're wrong or it needs to be addressed
in the upstream source. However, you can override default rules by
placing one with an identical name inside /etc/udev/rules.d/
The rules files in /etc/udev/rules.d/ are still intended to (maybe) be
edited as needed by local system administrators, and as such, the rules
for optical and network devices will still be placed there.
2) If you only reinstall a udev package (udev-118 in Slackware 12.2 case) nothing should change, provided you didn't edited any file in /lib/udev/rules.d/
Clearly, the naming of interfaces *can* change between two udev versions.
Last edited by Didier Spaier; 12-25-2008 at 05:25 PM.
Reason: typos
1) If you upgrade udev as part of a system upgrade (e.g. from Slacware 12.1 to Slackware 12.2), then you'll have to take care of new and old configuration files.
For instance, as stated in CHANGES_AND_HINTS.TXT for Slackware 12.2:[...]
Yes, of course. My initial problems regarding WLAN and sound in 12.2 may have had to do with this. That's why I re-installed udev.
Quote:
2) If you only reinstall a udev package (udev-118 in Slackware 12.2 case) nothing should change, provided you didn't edited any file in /lib/udev/rules.d/
Clearly, the naming of interfaces *can* change between two udev versions.
Yes, I wouldn't mind, although it makes updates a little more tedious,
when things like these change. But the re-installed version was
exactly the same as the version installed by the system upgrade.
And the name hasn't actually changed, because I could have used
wlan0 before, as it is always there. But I preferred ath0, which is
no longer available. But why?
Thanks, again. Yes, of course, I can make an alias rule. But this would be a workaround,
not really a solution.
I didn't have to make an alias rule for the same udev version in the same system on the
same hardware. I don't get it, why the behaviour of udev has changed. Why should I make
an alias by hand now, while this wasn't necessary before with --again-- the same version
of udev?
Interfaces' names are first given by the kernel then may be changed by udev rules.
To know who does what you can look into your /var/log/messages.
e.g. when I type "grep eth /var/log/messages" I get:
Code:
Dec 24 00:00:40 machine kernel: eth0: RealTek RTL8139 at 0xa000, 00:02:3f:07:a4:a5, IRQ 11
Dec 24 00:00:40 machine kernel: udev: renamed network interface eth1 to eth0
Dec 24 00:00:40 machine kernel: udev: renamed network interface eth0_rename to eth1
So in this case the name given by the kernel to my Ethernet card was eth0 and has been renamed by an udev rule as eth1.
To know which rule has been used for this renaming I could have a look in the /lib/udev and /etc/udev directories. I won't do that today, though
So you could grep your /var/log/messages file, looking for ath and wlan tokens, to see what happens.
If you are not satisfied with this behavior, it's very simple to change: look for your wireless card in /etc/rules.d/70-persistent-net-rules and edit that line, writing: NAME = "ath0"
Last edited by Didier Spaier; 12-26-2008 at 03:52 AM.
Thanks, this was helpful. Now I *know* that something is wrong in my system.
See:
Code:
# grep "Dec 27" /var/log/messages | grep -i ath
Dec 27 time machine kernel: md: multipath personality registered for
level -4
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: enabling device
(0000 -> 0002)
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: PCI INT A ->
Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: registered as 'phy0'
Dec 27 time machine kernel: ath5k phy0: Atheros AR2414 chip found
(MAC: xxxx)
# grep "Dec 27" /var/log/messages | grep -i wlan
Dec 27 time machine logger: /et/rc.d/rc.M:
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
Dec 27 time machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
# grep "Dec 27" /var/log/messages | grep -i udev
<no output/>
So the actual interface name appears to be phy0, but the kernel and the
network subsystem use wlan0. And although there's an udev rule for
naming the wireless interface wlan0, udev is not even involved, at all.
This conclusion is confirmed by a simple experiment. If everything was ok, I could remove my PC Card from the slot, re-insert it and expect a valid connection. But it doesn't work. When I remove the card, I get,
as expected:
Code:
# grep "Dec 27" /var/log/messages | grep -i ath
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: PCI INT A
disabled
However, re-inserting the card gives this:
Code:
# grep "Dec 27" /var/log/messages | grep -i ath0
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: enabling device
(0000 -> 0002)
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: PCI INT A ->
Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
Dec 27 time machine kernel: ath5k_pci 0000:02:00.0: registered as 'phy1'
Dec 27 time machine kernel: ath5k phy0: Atheros AR2414 chip found (MAC:
xxxx)
# grep "Dec 27" /var/log/messages | grep -i wlan
Dec 27 time machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 27 time machine logger: WPA authentication did not complete, try
running '/etc/rc.d/rc.inet1 wlan0_start' in a few seconds.
Dec 27 time machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 27 time machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Now restarting the interface doesn't help:
Code:
# /etc/rc.d/rc.inet1 wlan0_start
(waiting quite a long time, until the following output appears)
Polling for DHCP server on interface wlan0:
**** /sbin/dhcpcd: already running
**** /sbin/dhcpcd: if not then delete /etc/dhcpc/dhcpcd-wlan0.pid file
And udev is not involved, again. The output of
Code:
# grep "Dec 27" /var/log/messages | grep -i udev
is empty.
I guess, this means, that somehow the connections between kernel and
udev is broken (sorry, I don't know how to put this better). Otherwise
it should be possible to get a connection immediately after inserting
the wireless network PC Card.
Or am totally mistaken here?
gargamel
Last edited by gargamel; 12-27-2008 at 04:55 AM.
Reason: Text was too wide, make it more readable
[...]
To know which rule has been used for this renaming I could have a look in the /lib/udev and /etc/udev directories. I won't do that today, though
[...]
I am very grateful that already you took so much time for my little
system weirdnees on a day like this, at all. Thanks a lot!!!
I am very grateful that already you took so much time for my little
system weirdnees on a day like this, at all. Thanks a lot!!!
You're welcome. Trying to solve such problems is a hobby.
I didn't realize your wireless card is a PCI one, so it is removable.
I'm not sure Slackware 12.2 be able to automatically set or bring up a connection when you plug-in a network card (be it wireless or not, for that purpose). AlienBob could tell us, if he happens to see this post
Meanwhile, it could help to understand what happens if you unplug, then after a while plug in your PCI card: please do that then send all the lines in /var/log/messages beginning when you unplug it till the end of that file (don't worry if there are many lines, and don't edit it before sending).
Last edited by Didier Spaier; 12-27-2008 at 11:22 AM.
Ok, here is the message log. As you can see, the interface name is
kept constant as wlan0, but the system loses the connection, because
wpa_supplicant is not taken down along with DHCP, when the PC card is
removed from its slot.
This is less comfortable than it used to be, I have to say.
A typical scenario for laptop users is a business travel. In many
trains you can have wireless internet access, nowadays. Then, when
arriving at the meeting room or the hotel, there is often wired LAN
available. An optimum configuration allows me to remove my WLAN PC
card and use LAN. Then, on my trip home, I re-insert the card and have
WLAN access, again.
It shouldn't be necessary to restart /etc/rc.d/rc.inet1 every time.
It's not necessary in OpenSuSE and even MS Windows (actually I hate
these comparisons...), which I use on other systems with similar
hardware.
Note that the output below now is from a fresh install. So i don't
think my system is screwed. It's just not as comfortable as it could
be, I think. Comfortable enough for me, of course, but not quite up
to the current standards in "end-user experience." (Otherwise I have
a hundred plus reasons for preferring Slackware for most of my
systems).
Code:
Dec 28 02:55:09 machine kernel: pccard: card ejected from slot 0
Dec 28 02:55:30 machine kernel: pccard: CardBus card inserted into slot
0
Dec 28 02:55:30 machine kernel: ath5k_pci 0000:02:00.0: enabling device
(0000 -> 0002)
Dec 28 02:55:30 machine kernel: ath5k_pci 0000:02:00.0: registered
as 'phy1'
Dec 28 02:55:30 machine kernel: ath5k phy1: Atheros AR2414 chip found
(MAC: 0x79, PHY: 0x45)
Dec 28 02:55:31 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 02:55:34 machine logger: /etc/rc.d/rc.inet1: wpa_supplicant
found running already
Dec 28 02:56:39 machine logger: WPA authentication did not complete,
try running '/etc/rc.d/rc.inet1 wlan0_start' in a few seconds.
Dec 28 02:56:39 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 02:56:42 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 02:59:49 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d
wlan0
Dec 28 02:59:50 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
down
Dec 28 02:59:52 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
127.0.0.1
Dec 28 02:59:52 machine logger: /etc/rc.d/rc.inet1: /sbin/route
add -net 127.0.0.0 netmask 255.0.0.0 lo
Dec 28 02:59:53 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 02:59:56 machine logger: /etc/rc.d/rc.inet1:
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
Dec 28 02:59:56 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 02:59:57 machine kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link
becomes ready
Dec 28 03:00:01 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 03:00:01 machine dhcpcd[3091]: MAC address = 00:14:6c:08:f1:9a
Dec 28 03:00:03 machine dhcpcd[3091]: verified 192.x.x.26 address is
not in use
Dec 28 03:00:03 machine dhcpcd[3091]: Your IP address = 192.x.x.26
Dec 28 03:00:03 machine dhcpcd[3091]: Original hostname = machine
Dec 28 03:01:02 machine kernel: pccard: card ejected from slot 0
Dec 28 03:01:16 machine kernel: pccard: CardBus card inserted into slot
0
Dec 28 03:01:16 machine kernel: ath5k_pci 0000:02:00.0: enabling device
(0000 -> 0002)
Dec 28 03:01:16 machine kernel: ath5k_pci 0000:02:00.0: registered
as 'phy2'
Dec 28 03:01:16 machine kernel: ath5k phy2: Atheros AR2414 chip found
(MAC: 0x79, PHY: 0x45)
Dec 28 03:01:17 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:01:20 machine logger: /etc/rc.d/rc.inet1: wpa_supplicant
found running already
Dec 28 03:01:21 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d
wlan0
Dec 28 03:01:22 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
down
Dec 28 03:01:24 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
127.0.0.1
Dec 28 03:01:24 machine logger: /etc/rc.d/rc.inet1: /sbin/route
add -net 127.0.0.0 netmask 255.0.0.0 lo
Dec 28 03:01:25 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:01:28 machine logger: /etc/rc.d/rc.inet1:
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
Dec 28 03:01:28 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:01:29 machine kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link
becomes ready
Dec 28 03:01:33 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 03:01:33 machine dhcpcd[3373]: MAC address = 00:14:6c:08:f1:9a
Dec 28 03:01:33 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 03:01:33 machine dhcpcd[3376]: MAC address = 00:14:6c:08:f1:9a
Dec 28 03:01:34 machine dhcpcd[3373]: verified 192.x.x.26 address is
not in use
Dec 28 03:01:34 machine dhcpcd[3373]: Your IP address = 192.x.x.26
Dec 28 03:01:34 machine dhcpcd[3373]: Original hostname = machine
Dec 28 03:01:36 machine dhcpcd[3376]: verified 192.x.x.29 address is
not in use
Dec 28 03:01:36 machine dhcpcd[3376]: Your IP address = 192.x.x.29
Dec 28 03:01:36 machine dhcpcd[3376]: Original hostname = machine
Dec 28 03:02:01 machine kernel: pccard: card ejected from slot 0
Dec 28 03:02:15 machine kernel: pccard: CardBus card inserted into slot
0
Dec 28 03:02:15 machine kernel: ath5k_pci 0000:02:00.0: enabling device
(0000 -> 0002)
Dec 28 03:02:15 machine kernel: ath5k_pci 0000:02:00.0: registered
as 'phy3'
Dec 28 03:02:15 machine kernel: ath5k phy3: Atheros AR2414 chip found
(MAC: 0x79, PHY: 0x45)
Dec 28 03:02:15 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:02:19 machine logger: /etc/rc.d/rc.inet1: wpa_supplicant
found running already
Dec 28 03:03:22 machine logger: WPA authentication did not complete,
try running '/etc/rc.d/rc.inet1 wlan0_start' in a few seconds.
Dec 28 03:03:22 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:03:25 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 03:05:33 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -k -d
wlan0
Dec 28 03:05:34 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
down
Dec 28 03:05:36 machine logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo
127.0.0.1
Dec 28 03:05:36 machine logger: /etc/rc.d/rc.inet1: /sbin/route
add -net 127.0.0.0 netmask 255.0.0.0 lo
Dec 28 03:05:37 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:05:40 machine logger: /etc/rc.d/rc.inet1:
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
Dec 28 03:05:40 machine kernel: ADDRCONF(NETDEV_UP): wlan0: link is not
ready
Dec 28 03:05:41 machine kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link
becomes ready
Dec 28 03:05:45 machine logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t
30 -h machine wlan0
Dec 28 03:05:45 machine dhcpcd[4012]: MAC address = 00:14:6c:08:f1:9a
Dec 28 03:05:47 machine dhcpcd[4012]: verified 192.x.x.29 address is
not in use
Dec 28 03:05:47 machine dhcpcd[4012]: Your IP address = 192.x.x.29
Dec 28 03:05:47 machine dhcpcd[4012]: Original hostname = machine
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.