Connecting FreeBSD to a WPA Wireless Network
  Dec 09, 2009

This uses the new VAP interface setup that comes with FreeBSD 8.0 and newer.

  1. # vi /etc/rc.conf
  2. --- snip --- snip ---
  3. wlans_ath0="wlan0"
  4. ifconfig_wlan0="WPA DHCP"
  1. # vi /etc/wpa_supplicant.conf
  2. network={
  3.     ssid="ssid_goes_here"
  4.     key_mgmt=WPA-PSK
  5.     psk="password_here"
  6. }
  1. # /etc/rc.d/netif restart

Wait a few seconds for your wireless card to associate with the wireless device and see (1) if you are associated and (2) that you have an IP address.

  1. # ifconfig wlan0

If you have multiple access points around and want a certain one over the other, add priority=1 (you change number), to the host's block in /etc/wpa_supplicant.conf. The lower the number, the higher the priority.

Test IP connectivity to the public Internet.

  1. # ping 4.2.2.1

Test DNS resolution against a public hostname.

  1. # cat /etc/resolv.conf
  2. -- list of nameservers from DHCP lease --
  3. # ping www.google.com

If you happen to not have anything there, you can try using the 4.2.2.1 and 4.2.2.2 nameservers.

  1. # vi /etc/resolv.conf
  2. nameserver 4.2.2.1
  3. nameserver 4.2.2.2



Post a New Comment

Name

Message

Security
Code

        (case insensitive & space between words)


Posted Comments
anonymous  Feb 01, 2012
Hi! my name is Jully. I would like to meemeet respected urchin :) This is my homepage <a href=>http://jskdh5jkd7djh4.com/</a>l