# DHCP doesn't obtain IP address with hidden SSID

## Krotos

I recently updated my kernel from 3.2.12 to 3.3.8, running on an HP Mini netbook with an Intel Atom N270 processor.  After booting into the new kernel, I found that dhcpcd wasn't obtaining an IP address from my home wi-fi router, on which SSID broadcast was disabled.  Running dhcpcd in debug mode (option -d), I saw that it was getting stuck on the DISCOVER message:

```

dhcpcd[4190]: version 5.2.12 starting

dhcpcd[4190]: wlan0: using hwaddr [[my wireless card's mac ID]]

dhcpcd[4190]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT

dhcpcd[4190]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER

dhcpcd[4190]: wlan0: broadcasting for a lease

dhcpcd[4190]: wlan0: sending DISCOVER (xid 0x64ad76cd), next in 3.19 seconds

dhcpcd[4190]: wlan0: sending DISCOVER (xid 0x64ad76cd), next in 8.22 seconds

[[...dhcpcd gets stuck here and keeps sending DISCOVER messages over and over, eventually one each minute...]]

```

I eventually found out that if I turned on SSID broadcast, it worked:

```

dhcpcd[4190]: version 5.2.12 starting

dhcpcd[4190]: wlan0: using hwaddr [[my wireless card's mac ID]]

dhcpcd[4190]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT

dhcpcd[4190]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER

dhcpcd[4190]: wlan0: broadcasting for a lease

dhcpcd[4190]: wlan0: sending DISCOVER (xid 0x64ad76cd), next in 3.19 seconds

dhcpcd[4190]: wlan0: sending DISCOVER (xid 0x64ad76cd), next in 8.22 seconds

dhcpcd[4190]: wlan0: offered [[correct IP number]] from 192.168.0.1

dhcpcd[4190]: wlan0: sending REQUEST (xid 0x64ad76cd), next in 3.96 seconds

dhcpcd[4190]: wlan0: acknowledged [[correct IP number]] from 192.168.0.1

[[...dhcpcd continues normally...]]

```

The weird thing is that according to my router's logs, it was sending an offer of the IP address in both cases -- dhcpcd just didn't register the offer when SSID broacast was turned off.  I haven't experienced this issue with older kernels.

Admittedly SSID hiding isn't a very effective security measure, but it would be nice to have the option.  Does anyone know if something about the kernel config has changed?

My hardware specs:

Router:  D-Link DIR-825, Firmware version 2.06NA (allegedly the most recent available)

Wifi card:  Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] (rev 01)

I'm using the b43 driver and the most recent dhcpcd ebuild (5.2.12).  I copied my 3.2.12 .config and did make menuconfig before building the new kernel and modules, but otherwise have not done any modifications or merges.  Let me know if you'd like the current kernel options.

Thanks for any info!

----------

## VinzC

What if you set a static IP to your machine instead of using DHCP? Does a communication take place correctly, like ping or any other diagnosing command?

Do you use wpa_supplicant for wireless LAN? If yes, which version?

----------

## ulenrich

All about I heard some time ago: Hiding has serious security issues and should not be used.

wpa_supplicant has some options: for example not scan

----------

## VinzC

 *ulenrich wrote:*   

> All about I heard some time ago: Hiding has serious security issues and should not be used.
> 
> wpa_supplicant has some options: for example not scan

 

Well, I might be wrong but hidden wireless networks can't appear in scan results and must be associated by hand IIRC since the SSID is not broadcasted. Hence association must be forced, e.g. manually.

----------

## Jaglover

http://www.zdnet.com/blog/ou/the-six-dumbest-ways-to-secure-a-wireless-lan/43

The fact is the attacker may even not notice the SSID is hidden while breaking in.

----------

## VinzC

Don't read zdnet  :Very Happy:  !

Krotos wanted to know why DHCP doesn't work with a hidden SSID. I think we *first* should give him a solution for his problem. Let's point (if really needed) at why hiding his SSID is a bad idea *last* for the latter is a workaround, not a fix.

----------

## Jaglover

Right. I have no problem people doing weird stuff. I'm a maverick myself. Just if I punch a hole into my tire then I wouldn't complain about it being flat.   :Razz: 

----------

## VinzC

 *Jaglover wrote:*   

> Right. I have no problem people doing weird stuff. I'm a maverick myself. Just if I punch a hole into my tire then I wouldn't complain about it being flat.  

 

Of course  :Very Happy:  .

----------

