Pakete installieren
apt-get install rfkill apt-get install wireless-tools apt-get install wpasupplicant
Mit rfkill kann man softwareseitig Wireless-Device ein und ausschalten.
# rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: no
Hard blocked: no
3: tpacpi_wwan_sw: Wireless WAN
Soft blocked: no
Hard blocked: no
rfkill block wlan rfkill block bluetooth rfkill block wwan
Enthält programme zur wireless Einrichtung
# iwconfig
lo no wireless extensions.
usb0 no wireless extensions.
wlan0 IEEE 802.11abgn ESSID:"WLAN-BD6B04"
Mode:Managed Frequency:2.432 GHz Access Point: 7C:4F:B5:BD:6B:29
Bit Rate=180 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-36 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:8 Missed beacon:0
eth0 no wireless extensions.
Erst das Interface up nehmem
ifconfig wlan0 up ip link set wlan0 up ip a -> alle Interfaces anzeigen
WLAN-Netz abscannen.
iwlist wlan0 scan
Sind tools zum Verbindungsaufbau mit WPA/WPA2 Verschlüsselung.
Zum Verbindungsaufbau mit WLAN sollte das physikalische NIC down gesetzt werden:
ifdown eth0
wpa_passphrase <ROUTER_SSID> <password> > /root/wpa.conf wpa_supplicant -B -i wlan0 -c /root/wpa.conf
Eine IP-Adresse über dhcp beziehen:
dhclient -v wlan0
In /etc/network/interfaces kann auch das WLAN-NIC konfiguriert werden.
Dazu sollte ein key generiert werden
wpa_passphrase <Router-SSID> <password>
network={
ssid="Router-SSID"
#psk="password"
psk=key
}
iface wlan0 inet static
address <ip>
netmask <mask>
network <nw-ip>
broadcast <bcast>
gateway <gw-ip>
dns-nameservers <dns-ip>
dns-search <domain>
wpa-ssid <Router-SSID>
wpa-psk <key>
Da in /etc/network/interfaces der key enthalten ist:
chmod 600 /etc/network/interfaces
Wenn man zwischen verschiedenen WLAN-Netzen wechseln will, dann alle in /etc/network/interfaces mit einem alias eintragen:
iface wlan0-home inet dhcp
wpa-ssid <HOME_ROUTER>
wpa-psk home-key
iface wlan0-work inet dhcp
wpa-ssid <WORK_ROUTER>
wpa-psk work-key
Verbindung aufbauen:
ifup wlan0=wlan0-home
ifup wlan0=wlan0-WORK