# madwifi-ng fails to dhcp on unencrypted school network

## asarazan

Okay, so last semester I had madwifi all working with my school network, and things were happy. Now the new semester comes and I have yet to successfully associate with a school AP.

I do

```

iwconfig ath0 essid "IU Wireless" key off

dhcpcd ath0

```

I can tell from the lights on the card that it has found the network, and kwifimanager says it's got a huge signal, but it times out on the dhcp. Apart from the IU wireless points, I've had absolutely zero problems with this card recently. It has worked on my home WEP network, at a train station in Leipzig, Germany, as well as unencrypted at the Detroit airport.

I'm gonna try rolling back the drivers as far as I can, and see if that helps, but does anybody have any insight into this problem?

----------

## irwinr

Many schools are now requiring that your MAC address be registered with them before you can obtain an IP address.  If your wireless card works fine on other networks but not your schools, then it's probably something specific to your schools network security policy.

After doing "iwconfig ath0 essid "IU Wireless" key off"

if you look at iwconfig, does it show that it associated to the "IU Wireless" access point?

-Jeremy

----------

## asarazan

Yeah it does, iirc (at home right now, so can't tell for sure).

I believe we've always had that policy. It would let you DHCP, then it would redirect all traffic to a page that let you register your MAC address, then you could connect via a VPN.

----------

## irwinr

Well, before I would try to troubleshoot your wireless card, which sounds like it works fine everywhere else.  I would try to determine what's unique about your school's access point that is preventing you from getting an IP address.  Do you have Windows on a dual boot?  Can you try a livecd that supports wireless and see if that gets you anywhere?  Do you or a buddy have another wireless enabled laptop you can try out?

Maybe DHCP is simply down.  Can you try setting your IP statically and see if you can ping anything on your school network?

----------

## asarazan

Unfortunately, I don't have a dual-boot system. I used to, then I tried to boot into windows and it gave me a missing system file error and I said "psh, I don't need you", and that was that.

As far as what's unique about the school's system, I have no clue. I've emailed the school's unix tech support group and they don't know, and all my friends can dhcp fine, even the ones with Linux. As far as I know, I'm the only one using the madwifi drivers, though. As I said, I've done an emerge -f on all manner of rollbacks, and I'll try all of those out during class today.

If that doesn't work, shrug... Then I might just have to use my Orinoco card again.

----------

## GNUtoo

use dhclient

----------

## asarazan

I've used both dhcp and udhcp, every rollback of madwifi-ng (and even tried madwifi-old), iwconfig and wpa_supplicant and they all get the same response. I guess I can try dhclient, any particular reason?

One thing that I really should have been doing was to try different kernels, I'll emerge a 2.6.15 or so and see where that gets me. Until then, any other suggestions?

----------

## GNUtoo

dhcpcd client didn´t work on some routers and dhclient does

----------

## asarazan

I shall give it a shot, then.

----------

## asarazan

dhclient failed, and an older kernel (2.6.15-r1) failed. So now, as far as I can tell, every single option that could possibly be available to me, has failed (except windows but screw that).

I think it's time to take it up with UITS and figure out what the hell makes their network so much gimpier than every other network on Earth  :Sad: 

----------

## irwinr

One last thing you could try, just to rule out DHCP in general, is to set your interface with a static IP.  (Look at the ifconfig and route list from another Wireless PC, or ipconfig /all if on Windows, and copy that info, just change the last number on the Ip address.)

After you set yourself with a static IP, try to ping the default router and see if it answers.  If so, it's a DHCP problem, if not, your wireless card and the access point are not associating.

-Jeremy

----------

## asarazan

I'll give that a shot, I suppose. I'm not sure how the scheme works for 10.x networks though. I tried setting it to 10.0.0.253 and pinging 10.0.0.1, but I honestly couldn't remember if that's how it usually goes or not.

From the output I got from dhclient, it would send a couple requests, then de-associate and start doing discover broadcasts. Rinse and repeat.

----------

## irwinr

You have to have the correct IP set, so if your buddies wireless laptop gets an ip of 10.0.0.100, try setting yours to 10.0.0.199.  The netmask is usually 255.255.255.0, and the default gateway is usually 10.0.0.1 in this case.

However, that may not be the case.  Make sure you look at someone elses wireless ifconfig and route list (OR "ipconfig /all" on Windows).

As long as you copy those exactly, you should be in good shape.  Then ping the default gateway (On Linux this is listed under "route", under Windows it's listed under ipconfig /all)

-Jeremy

----------

## asarazan

I shall give it a try.

----------

## slackeast

I have the exact same issue.  I just started a new system about a week ago and my madwifi-ng system was working fine.  I then updated the system emerge --update world and next time I rebooted my dhcpcd fails to find an ip address.   using the same network but different computer my dhcpcd works fine (this computer wasn't upgraded).  when I updated world, i noticed two of the updates were to baselayout and kernel-headers.   I always get woried updating the baselayout (due to past issues) so i'm thinking that somehow broke dhcpcd.  

i'll let you know if I figure anything out.

----------

## asarazan

Sounds good. It should also be noted that ndiswrapper with the atheros drivers works fine. It was also able to connect without a problem a day or two ago, was really strange. The next day it was back to failure, however.

----------

## slackeast

check out this thread.   https://forums.gentoo.org/viewtopic-p-3562915.html#3562915

if you are on baselayout 1.12.4-r7 you might want to go back to 1.11.15-r3.

----------

## jeffus

Hi,

Had a similar problem upgrding madwifi-ng from 0.0.1531.20060427 to 0.9.2. I noticed that the wireless ESSID was being identified but the "AccessPoint" in iwconfig was all zeroes. Then I noticed that the channel chosen by the driver was incorrect, even though I defined it in the net file in conf.d. I rolled back the driver and everything was fine!!

Jeff

----------

## solamour

 *jeffus wrote:*   

> Hi,
> 
> Had a similar problem upgrding madwifi-ng from 0.0.1531.20060427 to 0.9.2. I noticed that the wireless ESSID was being identified but the "AccessPoint" in iwconfig was all zeroes. Then I noticed that the channel chosen by the driver was incorrect, even though I defined it in the net file in conf.d. I rolled back the driver and everything was fine!!
> 
> Jeff

 

I'm having the exactly same problem, and even if I mask out 0.9.2 and go back to 0.0.1531.20060427, "AccessPoint" is still all zeros and the channel is wrong. Perhaps I didn't do it properly, so would you take a look at what I did and let me know if there is anything out of ordinary? Here is what I did.

1) emerge --unmerge madwifi-ng madwifi-ng-tools

2) /etc/portage/package.mask

   ~net-wireless/madwifi-ng-0.9.2

   ~net-wireless/madwifi-ng-tools-0.9.2

3) emerge -v madwifi-ng madwifi-ng-tools

Well, I got tired of fiddling around, so I went ahead and replaced Netgear WGR614 with Linksys WRT54GC, which works without a problem with madwifi 0.9.2. I like WRT54GC, because it's quite small, but I still want to go back to the old version of madwifi and keep Netgear WGR614. I'd appreciate any help.

__

sol

----------

