要在系统引导时加载这些模块, 需要在/boot/loader.conf 中加入下面的配置:
wlan_wep_load="YES"wlan_ccmp_load="YES"
wlan_tkip_load="YES"
如果存在多个无线访问点, 而您希望从中选择具体的一个, 则可以通过指定 SSID 来实现:
wlans_bwn0="wlan0"ifconfig_wlan0="WPA DHCP"
一步是修改配置文件 /etc/wpa_supplicant.conf, 并在其中加入在您网络上使用的 SSID 和事先分发的密钥:
network={ ssid="freebsdap" psk="freebsdmall" }# /etc/rc.d/netif start 启动网络
Starting wpa_supplicant.
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.0.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.254 -- renewal in 300 seconds.
wlan0: flags=8843 mtu 1500
ether 00:11:95:d5:43:62
inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
status: associated
ssid freebsdap channel 1 (2412 Mhz 11g) bssid 00:11:95:c3:0d:ac
country US ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF
AES-CCM 3:128-bit txpower 21.5 bmiss 7 scanvalid 450 bgscan
bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
wme burst roaming MANUAL