Configurant Wifi a OpenBSD 6.2

Configurant Wifi a OpenBSD 6.2

En el meu cas, la meua interfície de la xarxa sense fil és iwm0 que puc veure amb ifconfig com al següent exemple:

$ ifconfig
lo0: flags=8049 mtu 32768
index 4 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
em0: flags=8843 mtu 1500
lladdr 68:f7:28:91:c8:76
index 1 priority 0 llprio 3
media: Ethernet autoselect (none)
status: no carrier
iwm0: flags=8843 mtu 1500
lladdr 34:02:86:e7:01:a8
index 2 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect (OFDM24 mode 11g)
status: active
ieee80211: nwid dd-wrt chan 6 bssid 00:22:15:2f:78:9c 100% wpakey wpaprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher ccmp
inet 192.168.1.14 netmask 0xffffff00 broadcast 192.168.1.255
enc0: flags=0
index 3 priority 0 llprio 3
groups: enc
status: active
umb0: flags=8810 mtu 1500
index 5 priority 0 llprio 3
roaming disabled registration not registered
state open cell-class none
SIM not initialized PIN required
device KRD 131 30/123 - R1A IMEI 353980054105636 firmware R3C11 (Pro), R4A10 (App)
status: down
vlan0: flags=8843 mtu 1500
lladdr 68:f7:28:91:c8:76
index 6 priority 0 llprio 3
encap: vnetid none parent em0
groups: vlan
media: Ethernet autoselect (none)
status: no carrier
pflog0: flags=141 mtu 33136
index 7 priority 0 llprio 3
groups: pflog
$

Aleshores, afegiré la configuració a /etc/hostname.iwm0:


#nwid el_teu_wifi
wpakey "la_teua_contrasenya"
dhcp

I a continuació reiniciarem la iwn0:

sudo sh /etc/netstart iwn0