# dhclient can not get ip with wpa ccmp !



## miniqq (Mar 29, 2010)

Hi,
   if the ap set to WEP, dhclient can automatic get ip from ap router. but when i change ap router to wpa+psk+ccmp, the dhclient not working ! os = freebsd 8 stable
   I have never met that before freebsd 8.0 .


----------



## SirDice (Mar 29, 2010)

Make sure the client is associating correctly with the AP.


----------



## miniqq (Mar 29, 2010)

Yes , wpa get connection with AP correctly ! and a windows xp client hadn't any problem to connect to AP too .

dhclient get a DHCPNOOFFERS message but no ip.


----------



## psycho (Mar 29, 2010)

[CMD=""]iwconfig[/CMD] ?


----------



## SirDice (Mar 29, 2010)

psycho said:
			
		

> [CMD=""]iwconfig[/CMD] ?



That's a linux command my friend. Try [cmd=]ifconfig[/cmd].


----------



## miniqq (Mar 30, 2010)

I said everything was ok but dhclient. and the linux box ,windows had no problem to connect the AP. 
my card now connect the AP,but the dhclient can't get ip. this is the question !
i try 
	
	



```
dhclient wlan0
```
it give me:

```
host# dhclient wlan0
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
```

And the thing has not been happened on my freebsd 7.0 7.2 boxes!


Who make the vlan?
It 's not so stable!

There is another question when i switch AP, if i restart netif, the system panic and auto reboot, if i restart wpa_suppliant , the  thing happend again -- Reboot !
and the driver report : 
	
	



```
Association request to the driver failed
```


----------



## DeliciousD (Mar 30, 2010)

I'm having this same issue while using the ral driver and wpa2-psk. I am not getting an IP address via DHCP even though wpa_supplicant has successfully associated with the AP. tcpdump on the wlan interface shows it is working as I see traffic from all the other hosts associated with the same AP. Perusing the documentation hasn't helped me yet, but I just upgraded to 8-STABLE (binary upgrade and then built from source 2/29/10) and I may have missed a configuration change from 7.2 to 8.0. Any pointers would be appreciated.


----------



## richardpl (Mar 30, 2010)

miniqq said:
			
		

> Who make the vlan?
> It 's not so stable!



Works for me.TM

You are using buggy driver. Before continuing using it, report bugs and aid developers to fix them.

Driver is buggy because nobody cared to test it in CURRENT.


----------



## DeliciousD (Apr 1, 2010)

I have been able to get the interface working by using a static IP address. The line I used in rc.conf was:


```
ifconfig_wlan0="WPA inet 192.168.x.y/24"
defaultrouter="192.168.x.z" # I have 2 nics, no not a router
```

Don't forget to manually add the correct information to resolv.conf

I tried implementing synchronous_dhclient="YES", as has been reported by some people to solve the problem, but my system hung on boot waiting for dhclient until I hit the power button. In one instance the wait was around 12 hours.

dhclient created a lease for the interface successfully, however the IP address is not being assigned to it. I have submitted a PR for dhclient.


----------

