Fail to connect to internet with wifi key after connecting to router

I have d-link DWA-125 wifi key and a router I configured ti use WPA protocol with AES encryption. Now, in my system i can access to router via http://192.168.1.1 but I can't reach the internet, I use wpa_supplicant to perform a connection to router. Here is my configuration I used:
Code:
/etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="dlink"
#proto=RSN
#scan_ssid=1
wep_tx_keyidx=0 
key_mgmt=WPA-PSK
psk="my-password"
}
 
That's half of it. The other half is using DHCP to get an IP address. That's done in /etc/rc.conf.
 
I forget to say I tried to get an ip from DHCP server like so:
Code:
dhclient wlan0
With above command I can only reach the router.
 
What do you mean by "reach the router"? If you can communicate with the router wirelessly, then wireless networking is working and any remaining problems are in the router. The router might block pings or other useful stuff.
 
Back
Top