「Iwd」の版間の差分
Kusanaginoturugi (トーク | 投稿記録) (→EAP-PWD: 和訳) |
Kusanaginoturugi (トーク | 投稿記録) |
||
(同じ利用者による、間の27版が非表示) | |||
6行目: | 6行目: | ||
{{Related|ネットワーク設定}} |
{{Related|ネットワーク設定}} |
||
{{Related|ワイヤレス設定}} |
{{Related|ワイヤレス設定}} |
||
− | {{Related| |
+ | {{Related|WPA supplicant}} |
{{Related articles end}} |
{{Related articles end}} |
||
− | [https://iwd.wiki.kernel.org/ IWD] (iNet wireless daemon) は Intel によって書かれた Linux 用の無線デーモンで、 |
+ | [https://iwd.wiki.kernel.org/ IWD] (iNet wireless daemon) は Intel によって書かれた Linux 用の無線デーモンです。プロジェクトの中心的な目標は、外部ライブラリに依存せず、Linux カーネルが提供する機能を最大限に活用することにより、リソース使用率を最適化することです。 |
+ | iwd はスタンドアロンでも動作しますが [[ConnMan]]、[[systemd-networkd]] や [[NetworkManager]] のような包括的なネットワークマネージャーとの組み合わせて使うこともできます。 |
||
− | IWD には ELL という名前の独自の暗号ライブラリが付属しており、Linux カーネルの暗号機能と直接繋がるなど様々な改良がされています。IWD はシンプルかつセキュアで新しいアプローチを取っています。 |
||
== インストール == |
== インストール == |
||
23行目: | 23行目: | ||
=== iwctl === |
=== iwctl === |
||
+ | 対話型プロンプトを表示するには、次のようにします: |
||
− | To get an interactive prompt do: |
||
$ iwctl |
$ iwctl |
||
+ | 対話型プロンプトは、プレフィックスが、{{ic|[iwd]#}} と表示されます。 |
||
− | The interactive prompt is then displayed with a prefix of {{ic|[iwd]#}}. |
||
{{Tip| |
{{Tip| |
||
+ | * {{ic|iwctl}} プロンプトで、{{ic|Tab}} キーを押すとコマンドとデバイス名を補完できます。 |
||
− | * In the {{ic|iwctl}} prompt you can auto-complete commands and device names by hitting {{ic|Tab}}. |
||
− | * |
+ | * 対話型プロンプトを終了するには、{{ic|Ctrl+d}} を押して、 [[Wikipedia:EOF character|EOF]] を送信します。 |
+ | * 対話型プロンプトを使用せずに、すべてのコマンドをコマンドライン引数として使用できます。例:{{ic|iwctl device wlan0 show}}}} |
||
− | * You can use all commands as command line arguments without entering an interactive prompt. For example: {{ic|iwctl device wlan0 show}}. |
||
− | }} |
||
+ | 使用可能なすべてのコマンドの一覧を表示するには: |
||
− | To list all available commands: |
||
[iwd]# help |
[iwd]# help |
||
− | ==== |
+ | ==== ネットワークに接続する ==== |
+ | 先ず、ワイヤレスデバイス名がわからない場合は、すべての Wi-Fiデバイスを一覧表示します: |
||
− | First, if you do not know your wireless device name, list all Wi-Fi devices: |
||
[iwd]# device list |
[iwd]# device list |
||
+ | 次に、ネットワークをスキャンします: |
||
− | Then, to scan for networks: |
||
[iwd]# station ''device'' scan |
[iwd]# station ''device'' scan |
||
+ | 利用可能なすべてのネットワークを一覧表示できます: |
||
− | You can then list all available networks: |
||
[iwd]# station ''device'' get-networks |
[iwd]# station ''device'' get-networks |
||
+ | 最後に、ネットワークに接続するには: |
||
− | Finally, to connect to a network: |
||
[iwd]# station ''device'' connect ''SSID'' |
[iwd]# station ''device'' connect ''SSID'' |
||
+ | {{Tip|ユーザーインターフェイスはオートコンプリートをサポートしています。{{ic|station }} と入力し、{{ic|Tab}} {{ic|Tab}} を押すと、使用可能なデバイスが表示され、デバイスの最初の文字を入力し、{{ic|Tab}} を押して補完します。 同じように、{{ic|connect }} を入力し {{ic|Tab}} {{ic|Tab}} と押すと、利用可能なネットワークのリストを表示します。次に、使用するネットワークの最初の文字を入力して、{{ic|Tab}} キーを押して補完を完了します。}} |
||
− | {{Tip|The user interface supports autocomplete, by typing {{ic|station }} and {{ic|Tab}} {{ic|Tab}}, the available devices are displayed, type the first letters of the device and {{ic|Tab}} to complete. The same way, type {{ic|connect }} and {{ic|Tab}} {{ic|Tab}} in order to have the list of available networks displayed. Then, type the first letters of the chosen network followed by {{ic|Tab}} in order to complete the command.}} |
||
+ | パスフレーズが必要な場合は、入力を求められます。コマンドライン引数として指定することもできます: |
||
− | If a passphrase is required, you will be prompted to enter it. Alternatively, you can supply it as a command line argument: |
||
$ iwctl --passphrase ''passphrase'' station ''device'' connect ''SSID'' |
$ iwctl --passphrase ''passphrase'' station ''device'' connect ''SSID'' |
||
{{Note| |
{{Note| |
||
− | * {{ic|iwd}} |
+ | * {{ic|iwd}} はネットワークパスフレーズを {{ic|/var/lib/iwd}} ディレクトリに自動的に保存し、将来的にそれらを使用して自動接続します。 [[#Network configuration]] を参照してください。 |
+ | * SSID にスペースが含まれるネットワークに接続するには、接続時にネットワーク名をダブルクオートで囲む必要があります。 |
||
− | * To connect to a network with spaces in the SSID, the network name should be double quoted when connecting. |
||
− | * iwd |
+ | * iwd は、8〜63 文字の ASCII エンコード文字の PSK パスフレーズのみをサポートします。要件が満たされていない場合は次のエラーメッセージが表示されます: {{ic|PMK generation failed. Ensure Crypto Engine is properly configured}} |
}} |
}} |
||
+ | ==== WPS/WSC を使用してネットワークに接続する ==== |
||
− | ==== Connect to a network using WPS/WSC ==== |
||
+ | ボタンを押してネットワークに接続できるように設定されている場合 ([[Wikipedia:ja:Wi-Fi Protected Setup]]) は、まず、ネットワークデバイスがこのセットアップ手順を使用できることを確認してください。 |
||
− | If your network is configured such that you can connect to it by pressing a button ([[Wikipedia:Wi-Fi Protected Setup]]), check first that your network device is also capable of using this setup procedure. |
||
[iwd]# wsc list |
[iwd]# wsc list |
||
+ | 次に、デバイスが上記のリストに表示されている場合、 |
||
− | Then, provided that your device appeared in the above list, |
||
[iwd]# wsc ''device'' push-button |
[iwd]# wsc ''device'' push-button |
||
+ | それから、ルーターのボタンを押します。この手順は、2分以内にボタンを事前に押した場合にも機能します。 |
||
− | and push the button on your router. The procedure works also if the button was pushed beforehand, less than 2 minutes earlier. |
||
+ | ネットワークがその方法で接続するために、PIN 番号を検証する必要がある場合は、help コマンド出力をチェックして、{{ic|wsc}} コマンドに適切なオプションを提供する方法を確認してください。 |
||
− | If your network requires to validate a PIN number to connect that way, check the {{ic|help}} command output to see how to provide the right options to the {{ic|wsc}} command. |
||
− | ==== |
+ | ==== ネットワークから切断する ==== |
+ | ネットワークから切断するには: |
||
− | To disconnect from a network: |
||
[iwd]# station ''device'' disconnect |
[iwd]# station ''device'' disconnect |
||
+ | ==== デバイスと接続情報を表示する ==== |
||
− | ==== Show device and connection information ==== |
||
+ | MAC アドレスなどの WiFi デバイスの詳細を表示するには: |
||
− | To display the details of a WiFi device, like MAC address: |
||
[iwd]# device ''device'' show |
[iwd]# device ''device'' show |
||
+ | WiFi デバイスの接続ネットワークを含む接続状態を表示するには: |
||
− | To display the connection state, including the connected network of a Wi-Fi device: |
||
[iwd]# station ''device'' show |
[iwd]# station ''device'' show |
||
− | ==== |
+ | ==== 既知のネットワークの管理 ==== |
+ | 以前に接続したネットワークを一覧表示するには: |
||
− | To list networks you have connected to previously: |
||
[iwd]# known-networks list |
[iwd]# known-networks list |
||
+ | 既知のネットワークを忘れるには: |
||
− | To forget a known network: |
||
[iwd]# known-networks ''SSID'' forget |
[iwd]# known-networks ''SSID'' forget |
||
+ | == ネットワーク設定 == |
||
− | == Network configuration == |
||
+ | デフォルトでは、''iwd'' はネットワーク設定を {{ic|/var/lib/iwd}} ディレクトリに保存します。設定ファイルの名前は、{{ic|''network''.''type''}} となります。''network'' はネットワーク SSID で ''.type'' はネットワークタイプ(''.open''、''.wep''、''.psk'' または ''.8021x'')です。このファイルは暗号化された{{ic|事前共有鍵}}と、オプションでクリアテキストの{{ic|パスフレーズ}}を保存するために使用され、ユーザー iwctl を呼び出さずに作成することもできます。このファイルは、そのネットワーク SSID に関連する他の設定にも使用できます。詳細な設定については、{{man|5|iwd.network}} を参照してください。 |
||
− | By default, ''iwd'' stores the network configuration in the directory {{ic|/var/lib/iwd}}. The configuration file is named as {{ic|''network''.''type''}}, where ''network'' is the network SSID and ''.type'' is the network type, either ''.open'', ''.wep'', ''.psk'' or ''.8021x''. The file is used to store the encrypted {{ic|PreSharedKey}} and optionally the cleartext {{ic|Passphrase}} and can also be created by the user without invoking {{ic|iwctl}}. The file can be used for other configuration pertaining to that network SSID as well. For more settings, see {{man|5|iwd.network}}. |
||
=== WPA-PSK === |
=== WPA-PSK === |
||
+ | SSID "spaceship" とパスフレーズ "test1234" を使用して WPA-PSK または WPA2-PSK で保護されたネットワークに接続するための最小限のサンプルファイル: |
||
− | A minimal example file to connect to a WPA-PSK or WPA2-PSK secured network with SSID "spaceship" and passphrase "test1234": |
||
{{hc|/var/lib/iwd/spaceship.psk|2= |
{{hc|/var/lib/iwd/spaceship.psk|2= |
||
121行目: | 120行目: | ||
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295}} |
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295}} |
||
+ | {{Note|ネットワークの SSID は英数字のみまたは {{ic|- _}} のいずれかを含む場合のみファイル名として使用されます。他の文字が含まれている場合、名前は {{ic|1==}} 文字の後に16進数でエンコードされた SSID が代わりに使用されます。 |
||
− | {{Note|The SSID of the network is used as a filename only when it contains only alphanumeric characters or one of {{ic|- _}}. If it contains any other characters, the name will instead be an {{ic|1==}}-character followed by the hex-encoded version of the SSID. |
||
}} |
}} |
||
+ | パスフレーズから事前共有鍵を計算するには、次の二つの方法のいずれかを使用できます: |
||
− | To calculate the presharedkey from the passphrase, one of these two methods can be used: |
||
+ | |||
− | * Enter the passphrase in cleartext in the configuration file: |
||
+ | * 設定ファイルにクリアテキストでパスフレーズを入力します: |
||
{{hc|/var/lib/iwd/spaceship.psk|2= |
{{hc|/var/lib/iwd/spaceship.psk|2= |
||
[Security] |
[Security] |
||
Passphrase=test1234}} |
Passphrase=test1234}} |
||
+ | 事前共有鍵は、最初の接続時にファイルに追加されます。 |
||
− | The presharedkey will be appended to the file at the first connect: |
||
{{hc|/var/lib/iwd/spaceship.psk|2= |
{{hc|/var/lib/iwd/spaceship.psk|2= |
||
[Security] |
[Security] |
||
135行目: | 135行目: | ||
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295}} |
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295}} |
||
− | * |
+ | * もしくは、事前共有鍵は、''wpa_passphrase'' ({{Pkg|wpa_supplicant}} から) または {{AUR|wpa-psk}} を使用して、SSID とパスフレーズから計算できます。詳細については [[wpa_supplicant#wpa_passphrase で接続する]] を参照してください。 |
=== WPA Enterprise === |
=== WPA Enterprise === |
||
157行目: | 157行目: | ||
==== EAP-PEAP ==== |
==== EAP-PEAP ==== |
||
− | + | EAP-PWD と同様に、フォルダー内に {{ic|''essid''.8021x}} を作成する必要があります。設定ファイルの作成に奨む前に、組織が使用している CA 証明証を確認する良い機会でもあります。MSCHAPv2 を機能させるには、{{Pkg|ppp}} もインストールする必要があります。詳細については、[[Network_configuration/Wireless#MS-CHAPv2|MS-CHAPv2]] を参照してください。これは MSCHAPv2 パスワード認証を使用する設定ファイルの例です: |
|
{{hc|/var/lib/iwd/''essid''.8021x|2= |
{{hc|/var/lib/iwd/''essid''.8021x|2= |
||
173行目: | 173行目: | ||
}} |
}} |
||
− | {{Tip| |
+ | {{Tip|''eduroam'' の使用を計画している場合は、[[#Eduroam]] も参照してください。}} |
==== TTLS-PAP ==== |
==== TTLS-PAP ==== |
||
240行目: | 240行目: | ||
Autoconnect=false |
Autoconnect=false |
||
</nowiki>}} |
</nowiki>}} |
||
+ | |||
+ | === 利用可能なネットワークの定期スキャンを無効にする === |
||
+ | |||
+ | デフォルトでは、 {{ic|iwd}} は切断状態の場合、利用可能なネットワークを定期的にスキャンします。定期スキャンを無効にする(常に手動でスキャンする)には、{{ic|/etc/iwd/main.conf}} ファイルを作成/編集し、以下のセクションを追加します: |
||
+ | |||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [Scan] |
||
+ | DisablePeriodicScan=true |
||
+ | }} |
||
+ | |||
+ | === 内蔵ネットワーク設定の有効化 === |
||
+ | |||
+ | バージョン 0.19 以降、iwd は内蔵の DHCP クライアントまたは静的な設定を使用して、IPアドレスの割り当てとルートの設定を行うことができます。これは、[[ネットワーク設定#DHCP|スタンドアロン DHCP クライアント]]の良い代替手段です。 |
||
+ | |||
+ | iwd のネットワーク設定機能を有効にするには、/{{ic|/etc/iwd/main.conf}} を作成・編集し、以下のセクションを追加します: |
||
+ | |||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [General] |
||
+ | EnableNetworkConfiguration=true |
||
+ | }} |
||
+ | |||
+ | また、{{ic|RoutePriorityOffset}} でルートメトリックを設定する機能もあります: |
||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [Network] |
||
+ | RoutePriorityOffset=300 |
||
+ | }} |
||
+ | |||
+ | ==== IPv6 support ==== |
||
+ | |||
+ | バージョン 1.10 以降、iwd は IPv6 をサポートしていますが、デフォルトでは無効になっています。IPv6 を有効にするには、設定ファイルに以下を追加します: |
||
+ | |||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [Network] |
||
+ | EnableIPv6=true |
||
+ | }} |
||
+ | |||
+ | この設定は、DHCPv6 または 静的 IPv6 設定のどちらを使用する場合でも必要です。ネットワーク毎に設定することもできます。 |
||
+ | |||
+ | ==== ネットワーク構成での静的 IP アドレスの設定 ==== |
||
+ | |||
+ | 次のセクションを {{ic|/var/lib/iwd/''network''.''type''}} ファイルに追加します。例えば: |
||
+ | |||
+ | {{hc|/var/lib/iwd/spaceship.psk|2= |
||
+ | [IPv4] |
||
+ | Address=192.168.1.10 |
||
+ | Netmask=255.255.255.0 |
||
+ | Gateway=192.168.1.1 |
||
+ | Broadcast=192.168.1.255 |
||
+ | DNS=192.168.1.1 |
||
+ | }} |
||
+ | |||
+ | ==== DNS マネージャーの選択 ==== |
||
+ | |||
+ | 現在、iwd は [[systemd-resolved]] と [[Openresolv|resolvconf]] の二つの DNS マネージャーをサポートしています。 |
||
+ | |||
+ | {{ic|systemd-resolved}} の場合、次のセクションを {{ic|/etc/iwd/main.conf}} に追加します: |
||
+ | |||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [Network] |
||
+ | NameResolvingService=systemd |
||
+ | }} |
||
+ | |||
+ | {{ic|resolvconf}} の場合: |
||
+ | |||
+ | {{hc|/etc/iwd/main.conf|2= |
||
+ | [Network] |
||
+ | NameResolvingService=resolvconf |
||
+ | }} |
||
=== コンソール (ローカル) ユーザーが設定を変えられないようにする === |
=== コンソール (ローカル) ユーザーが設定を変えられないようにする === |
||
286行目: | 354行目: | ||
Check the iwd logs afterwards via {{ic|journalctl -u iwd.service}} |
Check the iwd logs afterwards via {{ic|journalctl -u iwd.service}} |
||
− | === |
+ | === 再起動後の接続の問題 === |
+ | エントロピープールが低いと、特に再起動後に顕著な接続の問題が発生する可能性があります。エントロピープールを増やすための提案については、[[乱数生成]] を参照してください。 |
||
− | A low entropy pool can cause connection problems in particular noticeable after reboot. See [[Random number generation]] for suggestions to increase the entropy pool. |
||
=== Wireless device is not renamed by udev === |
=== Wireless device is not renamed by udev === |
||
311行目: | 379行目: | ||
* [https://iwd.wiki.kernel.org/gettingstarted Getting Started with iwd] |
* [https://iwd.wiki.kernel.org/gettingstarted Getting Started with iwd] |
||
− | * [https:// |
+ | * [https://iwd.wiki.kernel.org/networkconfigurationsettings Network Configuration Settings] |
+ | * [https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/autotests More Examples for WPA Enterprise] |
||
+ | * [https://bbs.archlinux.org/viewtopic.php?id=237074 The IWD thread on the Arch Linux Forums] |
||
+ | * [https://www.youtube.com/watch?v=F2Q86cphKDo 2017 Update on new WiFi daemon for Linux by Marcel Holtmann - YouTube] |
||
+ | * [https://www.youtube.com/watch?v=QIqT2obSPDk The New Wi-Fi Experience for Linux - Marcel Holtmann, Intel - YouTube] |
2021年3月17日 (水) 16:54時点における版
IWD (iNet wireless daemon) は Intel によって書かれた Linux 用の無線デーモンです。プロジェクトの中心的な目標は、外部ライブラリに依存せず、Linux カーネルが提供する機能を最大限に活用することにより、リソース使用率を最適化することです。
iwd はスタンドアロンでも動作しますが ConnMan、systemd-networkd や NetworkManager のような包括的なネットワークマネージャーとの組み合わせて使うこともできます。
インストール
使用方法
iwd パッケージにはクライアントプログラムの iwctl
とデーモンの iwd
、そして Wi-Fi 監視ツールの iwmon
が含まれています。
iwd デーモンを実行したら (iwd.service
を起動・有効化)、iwctl
コマンドを使って制御することができます。
iwctl
対話型プロンプトを表示するには、次のようにします:
$ iwctl
対話型プロンプトは、プレフィックスが、[iwd]#
と表示されます。
使用可能なすべてのコマンドの一覧を表示するには:
[iwd]# help
ネットワークに接続する
先ず、ワイヤレスデバイス名がわからない場合は、すべての Wi-Fiデバイスを一覧表示します:
[iwd]# device list
次に、ネットワークをスキャンします:
[iwd]# station device scan
利用可能なすべてのネットワークを一覧表示できます:
[iwd]# station device get-networks
最後に、ネットワークに接続するには:
[iwd]# station device connect SSID
パスフレーズが必要な場合は、入力を求められます。コマンドライン引数として指定することもできます:
$ iwctl --passphrase passphrase station device connect SSID
WPS/WSC を使用してネットワークに接続する
ボタンを押してネットワークに接続できるように設定されている場合 (Wikipedia:ja:Wi-Fi Protected Setup) は、まず、ネットワークデバイスがこのセットアップ手順を使用できることを確認してください。
[iwd]# wsc list
次に、デバイスが上記のリストに表示されている場合、
[iwd]# wsc device push-button
それから、ルーターのボタンを押します。この手順は、2分以内にボタンを事前に押した場合にも機能します。
ネットワークがその方法で接続するために、PIN 番号を検証する必要がある場合は、help コマンド出力をチェックして、wsc
コマンドに適切なオプションを提供する方法を確認してください。
ネットワークから切断する
ネットワークから切断するには:
[iwd]# station device disconnect
デバイスと接続情報を表示する
MAC アドレスなどの WiFi デバイスの詳細を表示するには:
[iwd]# device device show
WiFi デバイスの接続ネットワークを含む接続状態を表示するには:
[iwd]# station device show
既知のネットワークの管理
以前に接続したネットワークを一覧表示するには:
[iwd]# known-networks list
既知のネットワークを忘れるには:
[iwd]# known-networks SSID forget
ネットワーク設定
デフォルトでは、iwd はネットワーク設定を /var/lib/iwd
ディレクトリに保存します。設定ファイルの名前は、network.type
となります。network はネットワーク SSID で .type はネットワークタイプ(.open、.wep、.psk または .8021x)です。このファイルは暗号化された事前共有鍵
と、オプションでクリアテキストのパスフレーズ
を保存するために使用され、ユーザー iwctl を呼び出さずに作成することもできます。このファイルは、そのネットワーク SSID に関連する他の設定にも使用できます。詳細な設定については、iwd.network(5) を参照してください。
WPA-PSK
SSID "spaceship" とパスフレーズ "test1234" を使用して WPA-PSK または WPA2-PSK で保護されたネットワークに接続するための最小限のサンプルファイル:
/var/lib/iwd/spaceship.psk
[Security] PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295
パスフレーズから事前共有鍵を計算するには、次の二つの方法のいずれかを使用できます:
- 設定ファイルにクリアテキストでパスフレーズを入力します:
/var/lib/iwd/spaceship.psk
[Security] Passphrase=test1234
事前共有鍵は、最初の接続時にファイルに追加されます。
/var/lib/iwd/spaceship.psk
[Security] Passphrase=test1234 PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295
- もしくは、事前共有鍵は、wpa_passphrase (wpa_supplicant から) または wpa-pskAUR を使用して、SSID とパスフレーズから計算できます。詳細については wpa_supplicant#wpa_passphrase で接続する を参照してください。
WPA Enterprise
EAP-PWD
EAP-PWD で保護されたエンタープライズアクセスポイントに接続するには /var/lib/iwd
フォルダに以下の内容で essid.8021x
という名前のファイルを作成する必要があります:
/var/lib/iwd/essid.8021x
[Security] EAP-Method=PWD EAP-Identity=your_enterprise_email EAP-Password=your_password [Settings] AutoConnect=True
アクセスポイントに自動接続したくない場合、Autoconnect オプションを False に設定して iwctl
で手動でアクセスポイントに接続してください。パスワードを平文で保存したくない場合は、ファイルからパスワードの設定を外してください。
EAP-PEAP
EAP-PWD と同様に、フォルダー内に essid.8021x
を作成する必要があります。設定ファイルの作成に奨む前に、組織が使用している CA 証明証を確認する良い機会でもあります。MSCHAPv2 を機能させるには、ppp もインストールする必要があります。詳細については、MS-CHAPv2 を参照してください。これは MSCHAPv2 パスワード認証を使用する設定ファイルの例です:
/var/lib/iwd/essid.8021x
[Security] EAP-Method=PEAP EAP-Identity=anonymous@realm.edu EAP-PEAP-CACert=/path/to/root.crt EAP-PEAP-ServerDomainMask=radius.realm.edu EAP-PEAP-Phase2-Method=MSCHAPV2 EAP-PEAP-Phase2-Identity=johndoe@realm.edu EAP-PEAP-Phase2-Password=hunter2 [Settings] AutoConnect=true
TTLS-PAP
Like EAP-PWD, you also need to create a essid.8021x
in the folder. Before you proceed to write the configuration file, this is also a good time to find out which CA certificate your organization uses. This is an example configuration file that uses PAP password authentication:
/var/lib/iwd/essid.8021x
[Security] EAP-Method=TTLS EAP-Identity=anonymous@uni-test.de EAP-TTLS-CACert=cert.pem EAP-TTLS-ServerDomainMask=*.uni-test.de EAP-TTLS-Phase2-Method=Tunneled-PAP EAP-TTLS-Phase2-Identity=user EAP-TTLS-Phase2-Password=password [Settings] AutoConnect=true
Eduroam
Eduroam offers a configuration assistant tool (CAT), which unfortunately does not support iwd. However, the installer, which you can download by clicking on the download button then selecting your university, is just a Python script. It is easy to extract the necessary configuration options, including the certificate and server domain mask.
The following table contains a mapping of iwd configuration options to eduroam CAT install script variables.
Iwd Configuration Option | CAT Script Variable |
---|---|
file name | one of Config.ssids
|
EAP-Method |
Config.eap_outer
|
EAP-Identity |
Config.anonymous_identity
|
EAP-PEAP-CACert |
Config.CA
|
EAP-PEAP-ServerDomainMask |
one of Config.servers
|
EAP-PEAP-Phase2-Method |
Config.eap_inner
|
EAP-PEAP-Phase2-Identity |
username@Config.user_realm
|
Other cases
More example tests can be found in the test cases of the upstream repository.
任意設定
メインの設定は /etc/iwd/main.conf
ファイルで行います。
ネットワーク (SSID) の設定は /var/lib/iwd
ディレクトリを使用します。
特定のネットワークで自動接続を無効化
/var/lib/iwd/network.type
ファイルを作成・編集してください (network はネットワークの SSID に、type は "open", "wep", "psk", "8021x" のどれかのネットワークタイプに置き換えてください)。そしてファイルに以下のセクションを追加してください:
/var/lib/iwd/spaceship.psk
[Settings] Autoconnect=false
利用可能なネットワークの定期スキャンを無効にする
デフォルトでは、 iwd
は切断状態の場合、利用可能なネットワークを定期的にスキャンします。定期スキャンを無効にする(常に手動でスキャンする)には、/etc/iwd/main.conf
ファイルを作成/編集し、以下のセクションを追加します:
/etc/iwd/main.conf
[Scan] DisablePeriodicScan=true
内蔵ネットワーク設定の有効化
バージョン 0.19 以降、iwd は内蔵の DHCP クライアントまたは静的な設定を使用して、IPアドレスの割り当てとルートの設定を行うことができます。これは、スタンドアロン DHCP クライアントの良い代替手段です。
iwd のネットワーク設定機能を有効にするには、//etc/iwd/main.conf
を作成・編集し、以下のセクションを追加します:
/etc/iwd/main.conf
[General] EnableNetworkConfiguration=true
また、RoutePriorityOffset
でルートメトリックを設定する機能もあります:
/etc/iwd/main.conf
[Network] RoutePriorityOffset=300
IPv6 support
バージョン 1.10 以降、iwd は IPv6 をサポートしていますが、デフォルトでは無効になっています。IPv6 を有効にするには、設定ファイルに以下を追加します:
/etc/iwd/main.conf
[Network] EnableIPv6=true
この設定は、DHCPv6 または 静的 IPv6 設定のどちらを使用する場合でも必要です。ネットワーク毎に設定することもできます。
ネットワーク構成での静的 IP アドレスの設定
次のセクションを /var/lib/iwd/network.type
ファイルに追加します。例えば:
/var/lib/iwd/spaceship.psk
[IPv4] Address=192.168.1.10 Netmask=255.255.255.0 Gateway=192.168.1.1 Broadcast=192.168.1.255 DNS=192.168.1.1
DNS マネージャーの選択
現在、iwd は systemd-resolved と resolvconf の二つの DNS マネージャーをサポートしています。
systemd-resolved
の場合、次のセクションを /etc/iwd/main.conf
に追加します:
/etc/iwd/main.conf
[Network] NameResolvingService=systemd
resolvconf
の場合:
/etc/iwd/main.conf
[Network] NameResolvingService=resolvconf
コンソール (ローカル) ユーザーが設定を変えられないようにする
デフォルトでは iwd
の D-Bus インターフェイスは (たとえユーザーが "root" でなくても) 誰でも iwd
デーモンに接続して設定を変更できるようになっています。
コンソールユーザーが設定を編集できないようにしたい場合、以下のように D-Bus 設定ファイルを作成してください:
/etc/dbus-1/system.d/iwd-strict.conf
<!-- prevent local users from changing iwd settings, but allow reading status information. overrides some part of /usr/share/dbus-1/system.d/iwd-dbus.conf. --> <!-- This configuration file specifies the required security policies for iNet Wireless Daemon to work. --> <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <policy at_console="true"> <deny send_destination="net.connman.iwd"/> <allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.Properties" send_member="GetAll" /> <allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.Properties" send_member="Get" /> <allow send_destination="net.connman.iwd" send_interface="org.freedesktop.DBus.ObjectManager" send_member="GetManagedObjects" /> <allow send_destination="net.connman.iwd" send_interface="net.connman.iwd.Device" send_member="RegisterSignalLevelAgent" /> <allow send_destination="net.connman.iwd" send_interface="net.connman.iwd.Device" send_member="UnregisterSignalLevelAgent" /> </policy> </busconfig>
Troubleshooting
Verbose TLS debugging
This can be useful, if you have trouble setting up MSCHAPv2 or TTLS. You can set the following environment variable via a drop-in snippet:
/etc/systemd/system/iwd.service.d/tls-debug.conf
[Service] Environment=IWD_TLS_DEBUG=TRUE
Check the iwd logs afterwards via journalctl -u iwd.service
再起動後の接続の問題
エントロピープールが低いと、特に再起動後に顕著な接続の問題が発生する可能性があります。エントロピープールを増やすための提案については、乱数生成 を参照してください。
Wireless device is not renamed by udev
Since version 1.0, iwd disables predictable renaming of wireless device. It installs the following systemd network link configuration file which prevents udev from renaming the interface to wlp#s#
:
/usr/lib/systemd/network/80-iwd.link
[Match] Type=wlan [Link] NamePolicy=keep kernel
As a result the wireless link name wlan#
is kept after boot. This resolved a race condition between iwd and udev on interface renaming as explained in iwd udev interface renaming.
If this results in issues try masking it with:
# ln -s /dev/null /etc/systemd/network/80-iwd.link