version 1.8, 2017/04/15 05:51:41
|
version 1.9, 2020/09/08 21:05:59
|
Line 10
|
Line 10
|
[Wired Equivalent Privacy (WEP)](https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy). |
[Wired Equivalent Privacy (WEP)](https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy). |
Most "closed" or "locked" 802.11 wireless networks use WPA/WPA2 |
Most "closed" or "locked" 802.11 wireless networks use WPA/WPA2 |
authentication. |
authentication. |
On NetBSD, the [wpa_supplicant(8)](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant+8+NetBSD-current) |
On NetBSD, the [wpa_supplicant(8)](//man.NetBSD.org/wpa_supplicant.8) |
daemon handles WPA/WPA2. |
daemon handles WPA/WPA2. |
|
|
To configure WPA/WPA2, you must create the file |
To configure WPA/WPA2, you must create the file |
[`/etc/wpa_supplicant.conf`](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant.conf+5+NetBSD-current). |
[`/etc/wpa_supplicant.conf`](//man.NetBSD.org/wpa_supplicant.conf.5). |
You can find examples for `/etc/wpa_supplicant.conf` in |
You can find examples for `/etc/wpa_supplicant.conf` in |
`/usr/share/examples/wpa_supplicant/wpa_supplicant.conf`. |
`/usr/share/examples/wpa_supplicant/wpa_supplicant.conf`. |
The simplest case is a network, say `my favourite network`, with a |
The simplest case is a network, say `my favourite network`, with a |
Line 29 For this case, fill your `/etc/wpa_suppl
|
Line 29 For this case, fill your `/etc/wpa_suppl
|
} |
} |
|
|
Then enable wpa_supplicant on your network interface device, say |
Then enable wpa_supplicant on your network interface device, say |
`iwn0`, by editing [`/etc/rc.conf`](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant.conf+5+NetBSD-current) |
`iwn0`, by editing [`/etc/rc.conf`](//man.NetBSD.org/wpa_supplicant.conf.5) |
to add |
to add |
|
|
wpa_supplicant=YES |
wpa_supplicant=YES |
wpa_supplicant_flags="-i iwn0 -c /etc/wpa_supplicant.conf" |
wpa_supplicant_flags="-i iwn0 -c /etc/wpa_supplicant.conf" |
|
|
If your LAN is configured with DHCP, you will likely also want |
If your LAN is configured with DHCP, you will likely also want |
`dhcpcd=YES` in `/etc/rc.conf` to run [dhcpcd](http://netbsd.gw.com/cgi-bin/man-cgi?dhcpcd+8+NetBSD-current). |
`dhcpcd=YES` in `/etc/rc.conf` to run [dhcpcd](//man.NetBSD.org/dhcpcd.8). |
Then start wpa_supplicant with the shell command: |
Then start wpa_supplicant with the shell command: |
|
|
# /etc/rc.d/wpa_supplicant start |
# /etc/rc.d/wpa_supplicant start |
Line 61 For a typical laptop, you will usually w
|
Line 61 For a typical laptop, you will usually w
|
In that case, when you're booting up, you don't want to have to wait |
In that case, when you're booting up, you don't want to have to wait |
until you can associate with the network and get a DHCP lease. |
until you can associate with the network and get a DHCP lease. |
You can pass the `-b` flag to |
You can pass the `-b` flag to |
[dhcpcd](http://netbsd.gw.com/cgi-bin/man-cgi?dhcpcd+8+NetBSD-current) |
[dhcpcd](//man.NetBSD.org/dhcpcd.8) |
to make it immediately go into the background, by setting |
to make it immediately go into the background, by setting |
`dhcpcd_flags` in `/etc/rc.conf`: |
`dhcpcd_flags` in `/etc/rc.conf`: |
|
|
Line 110 Here is a configuration if you want to d
|
Line 110 Here is a configuration if you want to d
|
|
|
Note that you don't have to use wpa_supplicant to configure WEP -- you |
Note that you don't have to use wpa_supplicant to configure WEP -- you |
can also simply use |
can also simply use |
[ifconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?ifconfig+8+NetBSD-current): |
[ifconfig(8)](//man.NetBSD.org/ifconfig.8): |
|
|
ifconfig ath0 ssid MYWEAKLYENCRYPTEDWLAN nwkey 12345 |
ifconfig ath0 ssid MYWEAKLYENCRYPTEDWLAN nwkey 12345 |
|
|
Line 129 This seems to be a common configuration
|
Line 129 This seems to be a common configuration
|
|
|
# See also |
# See also |
|
|
* [wpa_supplicant(8)](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant+8+NetBSD-current) |
* [wpa_supplicant(8)](//man.NetBSD.org/wpa_supplicant.8) |
* [wpa_supplicant.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant.conf+5+NetBSD-current) |
* [wpa_supplicant.conf(5)](//man.NetBSD.org/wpa_supplicant.conf.5) |
* [Official wpa_supplicant site](http://hostap.epitest.fi/wpa_supplicant/) |
* [Official wpa_supplicant site](http://hostap.epitest.fi/wpa_supplicant/) |