原文標題:WiFi configuration in FreeBSD (including WPA/WPA2)html
wireless device is called ndis0網絡
假設無線網卡爲ndis0less
assume that you are using WPA/WPA2 and DHCPthis
使用了WPA/WPA2加密方式,而且開啓了DHCP加密
add the following lines into /etc/rc.conf:rest
wlans_ndis0=」wlan0″
ifconfig_wlan0=」WPA DHCP」htm
將以上兩行參數,添加到文件/etc/rc.conf ci
assume we have 2 wireless networks for this – 「wifi1」 and 「wifi2」 which have the WPA/WPA2 keys of 「one」 and 「two」 respectively. We will prefer to connect to 「wifi1」 when possible.文檔
假設咱們有兩個無線網絡,wifi1和wifi2。而且密碼分別爲one和two。優先選擇wifi1。get
To setup WPA/WPA, edit (or create) the file /etc/wpa_supplicant.conf and add the following:
network={
priority=1
ssid=」wifi1″
psk=」one」
}network={
priority=2
ssid=」wifi2″
psk=」two」
}
設置WPA/WPA2。編輯(不存在則新建)/etc/wpa_supplicant.conf文件,添加以上內容到該文件中。
Next time you restart your computer, you will have a ‘wlan0’ interface which will attempt to connect to the listed networks (in order of priority). You can confirm it is associated withifconfig wlan0 – in my case, i get:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether xx:xx:xx:xx:xx:xx
inet 172.31.0.100 netmask 0xffffff00 broadcast 172.31.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
ssid wlan1 channel 7 (2442 Mhz 11g) bssid yy:yy:yy:yy:yy:yy
country US authmode WPA2/802.11i privacy OFF txpower 0 bmiss 7
mcastrate 0.5 mgmtrate 0.5 scanvalid 60 protmode CTS roaming MANUAL
bintval 0
下次啓動電腦,wlan0就會嘗試鏈接無線列表中的網絡。可使用ifconfig wlan0命令確認。
Now, although it says 「11g」, it actually achieves 802.11n speeds so you can ignore this.
儘管顯示的是11g類型,但確使用的11n方式的網速,能夠忽略掉。
官方配置文檔:
https://www.freebsd.org/doc/handbook/network-wireless.html
https://wiki.freebsd.org/WiFi