LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 12-18-2004, 10:07 PM   #1
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
wireless interface being renamed


OK, I've been using a laptop with a centrino chip and the ipw2100 driver for quite some time and within the last fews days I'm getting a strange problem. I am running Slackware 10.0 with the 2.6.8 kernel. The way things are configured I have a script that is called from rc.local to configure the wireless interface by assigning my home network's essid and WEP key. Everything cool. But recently on booting up the machine, the kernel is assigning the wrong if number to the wireless card. It should be called eth1 (with eth0 being I dunno what and eth2 being an ethernet card) and it seems to be recognized at a different time in the boot sequence and then gets the name eth2, and so my script fails to work and I am not connected to the router. But then when I manually configure the card (now called eth2) with essid and WEP key I can connect to the router but no longer to the internet. Can anyone help me out? I really have no idea why suddenly about 50% of the time I get different names for the network interfaces and why manually reconfiguring only solves half of my problem. If I reboot after getting these errors, everything seems to work fine once again.

Thanks,
geo

Last edited by geomatt; 12-18-2004 at 10:08 PM.
 
Old 12-19-2004, 11:23 PM   #2
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
I would suggest you use the MAC (hardware) address of your device as a way to determine the assigned device name, for instance, here is part of a script I use in /etc/hotplug/usb with an acx100 usb device (tested on Slackware 9.1 and 10):

### with the module loaded, we now have to find the device we're looking for ###
if test `$IFCONFIG -a | $GREP -ic $HWADDR` -eq 0; then log_msg "device $HWADDR not found, bailing.";exit 1; fi

### find our device's name based on user-supplied MAC address ###
DEV=`$IFCONFIG -a | $GREP -i $HWADDR | cut -f 1 -d ' '`
log_msg "found $HWADDR as device: $DEV"

HWADDR is user-defined earlier as the familiar string of 6 pairs of 2 hex digits separated by colons.

log_msg is a function defined earlier in the script, but an echo may also suffice depending on your logging requirements

This scheme is IMO quite effective (and necessary) for a usb device that can come and go numerous times and which may be anything from wlan0 to wlan2, depending on what other cards are in or out at the time it's plugged in, so it may work for you also.

if you can ping your router, but it's a no-go to the internet then this has to be a dns or default gateway issue, check the contents of /etc/resolv.conf, for a "nameserver xxxxxxxx" line that makes sense for your site. Typically, dhcp leases will overwrite that file, and if another interface comes up now before the wireless and is using dhcp *and* a different nameserver, then that file will be wrong for your device. Also, you may want to check route for a possible lack of default gw for your wireless device.

Last edited by akaBeaVis; 12-19-2004 at 11:59 PM.
 
Old 12-20-2004, 09:16 AM   #3
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Original Poster
Rep: Reputation: 30
Thanks for the reply.
Yes the MAC address idea sounds like it would work. I'll poke around in the hotplug scripts and see what I can figure out about where to put something similar to what you're using. I think the devices are being recognized by the kernel in different orders so attaching interface names to something more stable should prevent my problem from happening.
It's still a mystery to me why this never happened until quite recently and now happens often enough to be a pain. Epecially since this is a permanent piece of hardware - a 'mini pci card' somehow physically a part of the centrino chip. Shouldn't detection of this be more stable?

Cheers,
geomatt
 
Old 12-20-2004, 09:49 AM   #4
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
In your case, where the device is more non-removable than something usb, I wouldn't think the hotplug system is as appropriate. With Slack10 there is the rc.wireless, you may want to consider that as a location for these config statements as opposed to something invoked later like rc.local.

You are right about the detection issue, you would think it would be the same from boot to boot as long as nothing is added/removed. Obviously, something has to have changed from before to now, if nothing immediately comes to mind, then perhaps it's been a slow creeping kind of change to do with more/larger files accruing as you use the machine.
 
Old 12-20-2004, 10:10 AM   #5
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Original Poster
Rep: Reputation: 30
Thanks once again. I have been rooting around in the startup scripts and was considering using the rc.wireless and its configuration file as a way of configuring the card. My approach via rc.local is left over from a hack needed to get the card working way back in the days of Slack 9.1, and I've never really thought through whether it's still needed. Experimenting is called for....

It also seems to me that the slow creeping changes are more likely the source of the problem since I haven't changed anything lately having to do with the network setup. Can you tell me more about how the inevitable build-up of files might affect the functioning of start up scripts?

-geomatt
 
Old 12-20-2004, 10:58 AM   #6
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
it's probably a very loose connection at best, just musing that maybe one or more bootup tasks are taking longer now and that maybe that changes the timing of the other tasks.
 
Old 12-20-2004, 03:18 PM   #7
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Original Poster
Rep: Reputation: 30
OK.
Good news though - the problem seems to have subsided. I'll still try cleaning up the start up routines, as much as I am able without breaking anything

-geo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting applications to use wireless interface pafrica Linux - Wireless Networking 2 09-02-2005 07:28 AM
remove dupe wireless interface amp_man Ubuntu 2 03-31-2005 02:03 PM
slk10.1: no wireless interface rgiggs Slackware 3 03-31-2005 05:29 AM
Setup Wireless Interface Gerardoj Slackware 2 01-23-2005 03:46 PM
Monitor my wireless interface n00blar Linux - Laptop and Netbook 3 01-15-2005 09:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration