--- wikisrc/tutorials/how_to_use_wpa_supplicant.mdwn 2016/04/14 20:33:04 1.5 +++ wikisrc/tutorials/how_to_use_wpa_supplicant.mdwn 2020/09/08 21:05:59 1.9 @@ -10,11 +10,11 @@ [Wired Equivalent Privacy (WEP)](https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy). Most "closed" or "locked" 802.11 wireless networks use WPA/WPA2 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. 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 `/usr/share/examples/wpa_supplicant/wpa_supplicant.conf`. The simplest case is a network, say `my favourite network`, with a @@ -29,14 +29,14 @@ For this case, fill your `/etc/wpa_suppl } 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 wpa_supplicant=YES - wpa_supplicant_flags="${wpa_supplicant_flags} -i iwn0" + wpa_supplicant_flags="-i iwn0 -c /etc/wpa_supplicant.conf" 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: # /etc/rc.d/wpa_supplicant start @@ -61,7 +61,7 @@ For a typical laptop, you will usually w 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. 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 `dhcpcd_flags` in `/etc/rc.conf`: @@ -108,9 +108,9 @@ Here is a configuration if you want to d wep_tx_keyidx=0 } -Note that you have to use wpa_supplicant to configure WEP: you can also - simply use - [ifconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?ifconfig+8+NetBSD-current): +Note that you don't have to use wpa_supplicant to configure WEP -- you + can also simply use + [ifconfig(8)](//man.NetBSD.org/ifconfig.8): ifconfig ath0 ssid MYWEAKLYENCRYPTEDWLAN nwkey 12345 @@ -129,6 +129,6 @@ This seems to be a common configuration # See also - * [wpa_supplicant(8)](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant+8+NetBSD-current) - * [wpa_supplicant.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?wpa_supplicant.conf+5+NetBSD-current) + * [wpa_supplicant(8)](//man.NetBSD.org/wpa_supplicant.8) + * [wpa_supplicant.conf(5)](//man.NetBSD.org/wpa_supplicant.conf.5) * [Official wpa_supplicant site](http://hostap.epitest.fi/wpa_supplicant/)