OpenWrt Forum Archive

Topic: DHCP not working for WiFi

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I've got a Linksys WRT54G3G router running WhiteRussian 0.9 Firmware. Everything works great (kudos to all participating) except for a DHCP issue.

If I connect my laptop with a cable to the router then the laptop receives an IP address from the DHCP range.
If I try to connect my laptop through the air (WiFi) to the router then the laptop (WinXP) tries to acquire a network-address, but does not seem to receive one. Weirdly enough, when performing the command "ipconfig /all" from a CMD prompt on the laptop, it shows a new IP address on the Wireless networkcard.

On the router performing "logread" shows the normal DHCPDISCOVER and DHCPOFFER messages (including the IP address and correct MAC address).
On the router performing "logread" shows (a lot of occurences) the following line:
Jan  1 01:12:04 (none) kern.warn dnsmasq[485]: Ignoring DHCP host name mymachine.mycompany.com because it has an illegal domain part

I'm not sure whether the above line causes Windows not to fully accept the network-address supplied. My laptop is connected to our work-domain. Connecting my laptop (wireless) to my Zyxel ADSL modem/router works without a problem.

My settings on the Linksys are mostly default. I only added the stuff to make my datacard operational.

Any ideas on how to get the laptop connected to the Linksys by WiFi?

Later,
Erik

Hi,

Stealth900 wrote:

If I try to connect my laptop through the air (WiFi) to the router then the laptop (WinXP) tries to acquire a network-address, but does not seem to receive one. Weirdly enough, when performing the command "ipconfig /all" from a CMD prompt on the laptop, it shows a new IP address on the Wireless networkcard.

It shows one but not the one advertised by the Router? So it probably shows one of these auto IPs (169.254.0.0/16 range)?

Stealth900 wrote:

On the router performing "logread" shows the normal DHCPDISCOVER and DHCPOFFER messages (including the IP address and correct MAC address).

Should look like this if working correctly:

dnsmasq[563]: DHCPDISCOVER(br0) MAC
dnsmasq[563]: DHCPOFFER(br0) IP_OFFERED MAC
dnsmasq[563]: DHCPDISCOVER(br0) MAC
dnsmasq[563]: DHCPOFFER(br0) IP_OFFERED MAC
dnsmasq[563]: DHCPREQUEST(br0) IP_OFFERED MAC
dnsmasq[563]: DHCPACK(br0) IP_OFFERED MAC Laptop's name
Stealth900 wrote:

On the router performing "logread" shows (a lot of occurences) the following line:
Jan  1 01:12:04 (none) kern.warn dnsmasq[485]: Ignoring DHCP host name mymachine.mycompany.com because it has an illegal domain part

AFAIK this means that dnsmasq is complaining because mycompany.com (which laptop offers as his domain name) is not matching your local domain - usually .lan or .local or something - and can be ignored.

cheers
dude

Hi Dude,

The IP 'obtained' on my laptop matches the one dnsmasq has offered. I tried giving the laptop a static IP based on its MAC address. This also works.... at least, it works in the fact that the IP address show up in "ipconfig /all" on the laptop:

Ethernet adapter Wireless Network Connection:

        Connection-specific DNS Suffix  . : mycompany.com
        Description . . . . . . . . . . . : Intel(R) PRO/Wireless 2200BG Network Connection
        Physical Address. . . . . . . . . : 00-11-22-33-44-55
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.1.149
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
        DHCP Server . . . . . . . . . . . : 192.168.1.1
        DNS Servers . . . . . . . . . . . : 192.168.1.1
        Lease Obtained. . . . . . . . . . : tuesday 17 april 2007 8:00:00
        Lease Expires . . . . . . . . . . : wednesday 17 april 2007 8:00:00
(The above is not a copy-paste of the screen, but the IP values and settings are valid).

So it's (at least to me ;-) very weird that the IP address shows up, but Windows XP complains about not being able to acquire a network address. The WiFi-connection is not setup correctly and therefore not usable.

About the dnsmasq message: "Ignoring DHCP host name mymachine.mycompany.com because it has an illegal domain part". Is dnsmasq really just ignoring the domain part or is it ignoring any packets received from my laptop? This last option might make the connection unusable.

Cheers,
Erik

I don't get it either. The IPs shows up but XP is complaining having problems to obtain one... weird. You say it's talking about the wireless connection not setup corerctly. Are you using WPA or WPA2? If the later try WPA... i had that one time that XP was not connecting due to that. Maybe that helps.
Otherwise i have no clue.

bye
dude

Hi Dude,

With "The wireless connection is not setup correctly" I mean: Windows XP does not have a working wireless connection (although the WiFi adapter has received the IP address supplied by the router) after requesting it from/negotiating it with the router.

I've used both non-secure, WPA and WPA2 as 'security' setting. The result does not differ. Still "limited or no connectivity" as the Windows XP response.

My laptop is secured by PointSec (http://www.pointsec.com) not sure whether that may influence the laptops behaviour. My laptop will connect to my ADSL modem/router through WiFi, so it can do it...

Cheers,
Erik

I'm not running any new firewalls on my 0.9 WhiteRussian box, and I'm seeing the very same thing:  XP sees the router, appears to have decent comms to it, but cannot acquire a usable address via dhcp.  I need to confirm whether DHCP traffic is even being recorded on that port at all!  I spent a goodly hour after upgrading an RC5 to 0.9 and getting wireless going.  In that case, it's still not going.

my new box is a WL500gP, and it's seeing the same behaviour:  see the AP, make the connection, but the dance of DHCP is a failure.  I'm sick of seeing machines on the stupid 169.254 (or so) addresses!  :-)

So if you want an independent testbed, my AP was flashed within the last day and the testy laptop was working known-good with RC5.  Tell me how I can help (maybe mail me at gmail;  fora enrage me because I'm over 12)

Edit:  -----------vv-------
Fixed my own problem.  MAYBE I need to
nvram set lan_dhcp=1
nvram commit

but I DEFINITELY needed to
ipkg install nas

and reboot.  It Just Came Up.  Had I not left myself a note on this very thing for a (few) WRT54GLs, and had I not seen the nas package in early setup but specifically avoided installing it because I 'would remember later', I wouldn't feel nearly so sheepish.  I need to make a meta-ipkg with ntp-client, noip, nas, vtun, pipsec, TZ and profile:  setup would be two-step affair and I wouldn't embarrass myself so much.

My box saw its 32Mb RAM immediately, btw, and I did not need to rejigger the vlan interfaces at all.

And I still think fora are for kids.

(Last edited by bishopolis on 21 Apr 2007, 07:13)

Same problem as original poster:
Apr 22 15:37:01 (none) kern.warn dnsmasq[756]: Ignoring DHCP host name laptop.mydomain.ca because it has an illegal domain part
Apr 22 15:37:01 (none) kern.info dnsmasq[756]: DHCPREQUEST(br0) 192.168.1.101 00:xx:xx:xx:xx:xx
Apr 22 15:37:01 (none) kern.info dnsmasq[756]: DHCPACK(br0) 192.168.1.101 00:xx:xx:xx:xx:xx

But I'm still connecting eventually, possibly because I'm assigning a static IP based on /etc/ethers.  Still annoying, as it appears to drop my connection for awhile while it tries to renew.

Think I solved my own problem.  Editted dnsmasq.conf, set domain=mydomain.ca and local=/mydomain.ca/dns.mydomain.ca (Running a Win2k3 DNS server at "dns.mydomain.ca").  Laptop appears to renew without illegal domain warning.  Referred to man page at http://www.thekelleys.org.uk/dnsmasq/do … q-man.html

Hope this helps.  Don't forget to stop/start dnsmasq, as SIGHUP won't reread config.

(Last edited by fer on 22 Apr 2007, 22:06)

I was having a similar problem today while trying to get encryption working. I was able to connect to the router just fine using wired and wireless connections but with no encryption. Whenever I tried to use encryption the wireless connection didn't work. Just on a hunch I tried this:

bishopolis wrote:

but I DEFINITELY needed to
ipkg install nas

and reboot.  It Just Came Up.

It worked! It doesn't seem as if encryption works until nas on the router. I'm now using
WPA (PSK)
WPA1
AES

and it's working just fine.

thanks!

jamis

Hi all,

This weekend I got mine working too. Not sure what the problem was though. The nas package was not my problem since I wasn't using any encypted connections (yet). I tried to keep things simple....uhu...

Finally did a 'mtd erase nvram' and reconfigured the whole thing from scratch. That did the trick. Forgot to save the settings before the erasure, so not sure which settings where 'bad'.

After firing it up again (after erase and reconfig) it worked like a charm. Have configured the encrypted connections now. And yes, don't forget to install 'nas' package ;-).

I'm probably going to add a cron job which changes the password for WPA/TKIP every month. A script with prerecorded passwords for the coming months will be on the router. Are there any off-the-shelf solutions for this? It will require some handling (getting the current date on the router, restarting the nas service) but nothing to difficult I suppose. But any OTS is appreciated.

Bye,
Erik

The discussion might have continued from here.