Network, Wireless
From FreeBSDwiki
(Difference between revisions)
(categories) |
|||
Line 3: | Line 3: | ||
==wpa supplicant== | ==wpa supplicant== | ||
This example shows a non-broadcasted network, and use of WPA2 with a preshared key. | This example shows a non-broadcasted network, and use of WPA2 with a preshared key. | ||
− | + | ||
+ | {{file|/etc/wpa_supplicant.conf}}: | ||
+ | ctrl_interface=/var/run/wpa_supplicant | ||
+ | eapol_version=2 | ||
+ | ap_scan=1 | ||
+ | fast_reauth=0 | ||
network={ | network={ | ||
− | + | bssid=''gatewaymacaddress'' | |
− | + | ssid="''networkidname''" | |
− | + | scan_ssid=1 | |
− | + | psk="''networkpassword''" | |
− | + | priority=9 | |
− | + | proto=RSN | |
− | + | key_mgmt=WPA_PSK | |
− | + | group=CCMP | |
− | + | pairwise=CCMP | |
} | } | ||
− | RSN signifies WPA2. key_mgmt, group, and pairwise are also common values to use WPA2. Giving the | + | RSN signifies WPA2. key_mgmt, group, and pairwise are also common values to use WPA2. Giving the {{code|ssid}} allows the network to be found when it is hidden from scans. |
− | Once the network is set up, | + | Once the network is set up, {{code|bssid}} can inserted later, it can be found by either |
% ifconfig | grep bssid | % ifconfig | grep bssid | ||
% ifconfig wlan0 list scan | % ifconfig wlan0 list scan | ||
Line 27: | Line 32: | ||
default_router="''ipaddress''" # example 192.168.1.254 | default_router="''ipaddress''" # example 192.168.1.254 | ||
− | Set the default network connection, to prevent it from guessing which network to use. Add | + | Set the default network connection, to prevent it from guessing which network to use. Add {{code|mode}}, {[ssid}}, and {{bssid}} in the {{code|ifconfig}} line. The values typically match what's in {{file|wpa_supplicant.conf}}. |
ifconfig_wlan0="mode ''11g'' ssid ''networkidname'' bssid ''macaddressofnetwork'' WPA DHCP" | ifconfig_wlan0="mode ''11g'' ssid ''networkidname'' bssid ''macaddressofnetwork'' WPA DHCP" | ||
− | Some settings can be found by typing, optionally using | + | Some settings can be found by typing, optionally using {{cmd|grep}} |
% ifconfig | grep mode | % ifconfig | grep mode | ||
Revision as of 06:11, 30 October 2015
Here is how to set up a wireless network. This example will demonstrate how to use WPA2-PSK method.
wpa supplicant
This example shows a non-broadcasted network, and use of WPA2 with a preshared key.
/etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant eapol_version=2 ap_scan=1 fast_reauth=0 network={ bssid=gatewaymacaddress ssid="networkidname" scan_ssid=1 psk="networkpassword" priority=9 proto=RSN key_mgmt=WPA_PSK group=CCMP pairwise=CCMP }
RSN signifies WPA2. key_mgmt, group, and pairwise are also common values to use WPA2. Giving the ssid allows the network to be found when it is hidden from scans.
Once the network is set up, bssid can inserted later, it can be found by either
% ifconfig | grep bssid % ifconfig wlan0 list scan
rc.conf
hostname="mycpomputerhostname" wlans_networkcarddriver0="wlan0" default_router="ipaddress" # example 192.168.1.254
Set the default network connection, to prevent it from guessing which network to use. Add mode, {[ssid}}, and Template:Bssid in the ifconfig line. The values typically match what's in wpa_supplicant.conf.
ifconfig_wlan0="mode 11g ssid networkidname bssid macaddressofnetwork WPA DHCP"
Some settings can be found by typing, optionally using grep
% ifconfig | grep mode
final steps
% service netif restart % wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf & % ifconfig