Tux

...making Linux just a little more fun!

Mandriva 2007 - WiFi cards cannot find network

OS [osavill at uklinux.net]


Thu, 8 Mar 2007 21:56:26 +0000

I have taken some Ethereal logs

In Mand 2007 it does repeated DHCP Discovers over and over again and gets nothing back.

In Mand 2006 it does a single DHCP Request and gets a DHCP ACK back with its inet address.

I don't know the mechanics of who sends these DHCP signals but I am guessing that DHCP Discover is in some way incorrect for my setup. Does anyone know how to get it to send DHCP Request instead ?

Thanks, Owen


Top    Back


OS [osavill at uklinux.net]


Fri, 9 Mar 2007 20:33:35 +0000

Well, a workaround really. I went back to first principles. I removed the WiFi configuration from DrakConf. Inserting the card produced an ath0 and a wifi0 unconfigured interfaces. I then entered

iwconfig ath0 essid "xxxx" key xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
dhclient ath0
and everything works, I can get onto the internet etc..

I then removed and re-inserted the card, went into "kcmshell kcmwifi" entered the settings and pressed Activate. The results were exactly as seen prior to today. I.e everything went okay but no inet address is obtained. Entering "dhclient ath0" makes the interface work. The same results are seen when using DrakConf.

So there is a workaround. Are kcmwifi and DrakConf not calling dhclient correctly. MadWiFi creates two interfaces, ath0 and wifi0. Apparently wifi0 is a virtual i/f to allow multiple access point attachments. Is it possible that "dhclient wifi0" is being called instead of "dhclient ath0" ?

Hope all this helps, Owen


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Fri, 9 Mar 2007 16:08:52 -0500

On Fri, Mar 09, 2007 at 08:33:35PM +0000, OS wrote:

> Well, a workaround really. I went back to first principles. I removed the WiFi 
> configuration from DrakConf. Inserting the card produced an ath0 and a wifi0 
> unconfigured interfaces. I then entered 
> iwconfig ath0 essid "xxxx" key xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
> dhclient ath0
> 
> and everything works, I can get onto the internet etc..

Good job finding the answer! Since I don't know how Mandrake handles this stuff "under the hood", I can't give you a specific recommendation on how to script this - but if it was a Debian system, I'd be off to '/etc/network/interfaces' like a shot. One stanza, and I'd be done.

iface ath0 inet dhcp
    pre-up iwconfig ath0 essid "xxxxx" key xxxxxxxxxxxxxxxxxxxxxxxxxx mode Managed
You might want to look around your '/etc' directory just to see what you can find.

> I then removed and re-inserted the card, went into "kcmshell kcmwifi" entered 
> the settings and pressed Activate. The results were exactly as seen prior to 
> today. I.e everything went okay but no inet address is obtained. 
> Entering "dhclient ath0" makes the interface work. The same results are seen 
> when using DrakConf. 
> 
> So there is a workaround. Are kcmwifi and DrakConf not calling dhclient 
> correctly. MadWiFi creates two interfaces, ath0 and wifi0. Apparently wifi0 is 
> a virtual i/f to allow multiple access point attachments. Is it possible 
> that "dhclient wifi0" is being called instead of "dhclient ath0" ?

Oh-oh... I feel it... I feel it comin' on... :)

<rant="ON"> As is always the case with GUIs, anything (read "anything bad") is possible - and extremely difficult to troubleshoot, unless you're willing to download and read the source (for the GUIs, not for the thing you're troubleshooting.) Personally, I find that a ridiculous and unnecessary hassle.

Some people consider me old-fashioned because I steadfastly stick to doing everything I can on the command line. The actual fact is that I like glitzy, pretty interfaces as much as anyone; I just don't want to rely on them for critical system operations, since I've seen the kind of problem you describe over and over and over. When you're working with the actual utilities that do the job, you get one of two things: either a successful result or notification of failure. Given that you're working at the most basic level - "going back to first principles", as you say - it's possible to build and follow a troubleshooting tree. When the GUI doesn't work, there are very few avenues to explore - it just comes down to "the GUI doesn't work" - at which point, unless you know what utilities it was invoking and in what order (and with what arguments), you're stuck. </rant>

If you suspect that the interface is simply being called by the wrong name, just install 'ifrename' and modify '/etc/iftab' as described in the 'iftab' man page. Your interface will then come up with whatever name you prefer.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 9 Mar 2007 14:52:54 -0800

Hello,

On Fri, 09 Mar 2007, Ben Okopnik wrote:

> Good job finding the answer! Since I don't know how Mandrake handles
> this stuff "under the hood", I can't give you a specific recommendation
> on how to script this - but if it was a Debian system, I'd be off to
> '/etc/network/interfaces' like a shot. One stanza, and I'd be done.
> 
> ```
> iface ath0 inet dhcp
>     pre-up iwconfig ath0 essid "xxxxx" key xxxxxxxxxxxxxxxxxxxxxxxxxx mode Managed
> '''

Actually, the "lateesht" solution in Debian is to use:

 iface ath0 inet dhcp
     wireless-essid "xxxxx"
     wireless-mode Managed
     wireless-defaultkey xxxxxxxxxxxxxxxxx
etc.

This does mean that you depend on "someone-else" to make the correct calls to iwconfig but has the advantage of keeping only the config information in the config file.

> If you suspect that the interface is simply being called by the wrong
> name, just install 'ifrename' and modify '/etc/iftab' as described in
> the 'iftab' man page. Your interface will then come up with whatever
> name you prefer.

There is also "nameif" and /etc/mactab...another alternative is everyone's bugbear --- udev.

Regards,

Kapil. --


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Fri, 9 Mar 2007 19:48:42 -0500

On Fri, Mar 09, 2007 at 02:52:54PM -0800, Kapil Hari Paranjape wrote:

> Hello,
> 
> On Fri, 09 Mar 2007, Ben Okopnik wrote:
> > Good job finding the answer! Since I don't know how Mandrake handles
> > this stuff "under the hood", I can't give you a specific recommendation
> > on how to script this - but if it was a Debian system, I'd be off to
> > '/etc/network/interfaces' like a shot. One stanza, and I'd be done.
> > 
> > ```
> > iface ath0 inet dhcp
> >     pre-up iwconfig ath0 essid "xxxxx" key xxxxxxxxxxxxxxxxxxxxxxxxxx mode Managed
> > '''
> 
> Actually, the "lateesht" solution in Debian is to use:
>  iface ath0 inet dhcp
>      wireless-essid "xxxxx"
>      wireless-mode Managed
>      wireless-defaultkey xxxxxxxxxxxxxxxxx
> etc.

You know, I tried that back when I first started playing around with 'interfaces'. It didn't work. Since there was an alternate mechanism (i.e., 'pre-up', etc.), I never bothered to trace it down - but it's nice to hear that it works now.

> This does mean that you depend on "someone-else" to make the correct
> calls to iwconfig but has the advantage of keeping only the config
> information in the config file.

...and you could always go back if you needed to. Not a bad setup at all.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back