← Documents Documentation/networking/mac80211_hwsim/mac80211_hwsim.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

mac80211_hwsim

가상 IEEE 802.11 radio로 mac80211, hostapd와 wpa_supplicant를 반복 가능한 환경에서 시험하는 방법입니다.

Source pathDocumentation/networking/mac80211_hwsim/mac80211_hwsim.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

mac80211_hwsim.rst:1-80

같은 channel의 가상 radio 사이에 frame을 복사하고 mac80211 software encryption을 적용합니다. 기본 두 radio로 AP와 station을 구성하며 `radios` parameter로 규모를 늘릴 수 있습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 :orphan:
2
3 .. SPDX-License-Identifier: GPL-2.0
4 .. include:: <isonum.txt>
5
6 ===================================================================
7 mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
8 ===================================================================
9
10 :Copyright: |copy| 2008, Jouni Malinen <[email protected]>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License version 2 as
14 published by the Free Software Foundation.
15
16
17 Introduction
18 ============
19
20 mac80211_hwsim is a Linux kernel module that can be used to simulate
21 arbitrary number of IEEE 802.11 radios for mac80211. It can be used to
22 test most of the mac80211 functionality and user space tools (e.g.,
23 hostapd and wpa_supplicant) in a way that matches very closely with
24 the normal case of using real WLAN hardware. From the mac80211 view
25 point, mac80211_hwsim is yet another hardware driver, i.e., no changes
26 to mac80211 are needed to use this testing tool.
27
28 The main goal for mac80211_hwsim is to make it easier for developers
29 to test their code and work with new features to mac80211, hostapd,
30 and wpa_supplicant. The simulated radios do not have the limitations
31 of real hardware, so it is easy to generate an arbitrary test setup
32 and always reproduce the same setup for future tests. In addition,
33 since all radio operation is simulated, any channel can be used in
34 tests regardless of regulatory rules.
35
36 mac80211_hwsim kernel module has a parameter 'radios' that can be used
37 to select how many radios are simulated (default 2). This allows
38 configuration of both very simply setups (e.g., just a single access
39 point and a station) or large scale tests (multiple access points with
40 hundreds of stations).
41
42 mac80211_hwsim works by tracking the current channel of each virtual
43 radio and copying all transmitted frames to all other radios that are
44 currently enabled and on the same channel as the transmitting
45 radio. Software encryption in mac80211 is used so that the frames are
46 actually encrypted over the virtual air interface to allow more
47 complete testing of encryption.
48
49 A global monitoring netdev, hwsim#, is created independent of
50 mac80211. This interface can be used to monitor all transmitted frames
51 regardless of channel.
52
53
54 Simple example
55 ==============
56
57 This example shows how to use mac80211_hwsim to simulate two radios:
58 one to act as an access point and the other as a station that
59 associates with the AP. hostapd and wpa_supplicant are used to take
60 care of WPA2-PSK authentication. In addition, hostapd is also
61 processing access point side of association.
62
63 ::
64
65
66 # Build mac80211_hwsim as part of kernel configuration
67
68 # Load the module
69 modprobe mac80211_hwsim
70
71 # Run hostapd (AP) for wlan0
72 hostapd hostapd.conf
73
74 # Run wpa_supplicant (station) for wlan1
75 wpa_supplicant -Dnl80211 -iwlan1 -c wpa_supplicant.conf
76
77
78 More test cases are available in hostap.git:
79 git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
80 (http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)
81

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

가상 802.11 radio

1-53

`mac80211_hwsim`은 mac80211을 위한 임의 개수의 IEEE 802.11 radio를 simulation하는 Linux kernel module입니다. hostapd와 wpa_supplicant 같은 사용자 공간 도구를 실제 WLAN hardware와 매우 가까운 방식으로 시험할 수 있고, mac80211에서는 별도 변경 없이 또 하나의 hardware driver로 보입니다.

실제 hardware 제약이 없어 원하는 topology를 반복 재현할 수 있고 regulatory rule과 관계없이 시험 channel을 선택할 수 있습니다. module parameter `radios`가 가상 radio 수를 정하며 기본값은 2입니다. 단일 AP와 station부터 여러 AP와 수백 station까지 구성할 수 있습니다.

각 가상 radio의 현재 channel을 추적하고 송신 frame을 같은 channel에서 활성화된 다른 radio로 복사합니다. mac80211 software encryption을 사용하므로 virtual air interface에서도 frame이 실제로 암호화되어 encryption path까지 시험할 수 있습니다. channel과 관계없이 모든 송신 frame을 보는 전역 monitor netdev `hwsim#`도 생성됩니다.

:orphan:

.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

===================================================================
mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
===================================================================

:Copyright: |copy| 2008, Jouni Malinen <[email protected]>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.


Introduction
============

mac80211_hwsim is a Linux kernel module that can be used to simulate
arbitrary number of IEEE 802.11 radios for mac80211. It can be used to
test most of the mac80211 functionality and user space tools (e.g.,
hostapd and wpa_supplicant) in a way that matches very closely with
the normal case of using real WLAN hardware. From the mac80211 view
point, mac80211_hwsim is yet another hardware driver, i.e., no changes
to mac80211 are needed to use this testing tool.

The main goal for mac80211_hwsim is to make it easier for developers
to test their code and work with new features to mac80211, hostapd,
and wpa_supplicant. The simulated radios do not have the limitations
of real hardware, so it is easy to generate an arbitrary test setup
and always reproduce the same setup for future tests. In addition,
since all radio operation is simulated, any channel can be used in
tests regardless of regulatory rules.

mac80211_hwsim kernel module has a parameter 'radios' that can be used
to select how many radios are simulated (default 2). This allows
configuration of both very simply setups (e.g., just a single access
point and a station) or large scale tests (multiple access points with
hundreds of stations).

mac80211_hwsim works by tracking the current channel of each virtual
radio and copying all transmitted frames to all other radios that are
currently enabled and on the same channel as the transmitting
radio. Software encryption in mac80211 is used so that the frames are
actually encrypted over the virtual air interface to allow more
complete testing of encryption.

A global monitoring netdev, hwsim#, is created independent of
mac80211. This interface can be used to monitor all transmitted frames
regardless of channel.

AP와 station 예제

54-80

간단한 예는 두 radio 중 `wlan0`을 AP, `wlan1`을 station으로 사용합니다. kernel configuration에 `mac80211_hwsim`을 포함하고 module을 load한 뒤, `hostapd hostapd.conf`로 AP를 실행하고 `wpa_supplicant -Dnl80211 -iwlan1 -c wpa_supplicant.conf`로 station을 실행합니다.

hostapd는 AP 측 association과 WPA2-PSK authentication을 처리하고 wpa_supplicant는 station 측을 처리합니다. 더 많은 test case는 hostap repository의 `mac80211_hwsim/tests`에 있습니다.

Simple example
==============

This example shows how to use mac80211_hwsim to simulate two radios:
one to act as an access point and the other as a station that
associates with the AP. hostapd and wpa_supplicant are used to take
care of WPA2-PSK authentication. In addition, hostapd is also
processing access point side of association.

::


    # Build mac80211_hwsim as part of kernel configuration

    # Load the module
    modprobe mac80211_hwsim

    # Run hostapd (AP) for wlan0
    hostapd hostapd.conf

    # Run wpa_supplicant (station) for wlan1
    wpa_supplicant -Dnl80211 -iwlan1 -c wpa_supplicant.conf


More test cases are available in hostap.git:
git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
(http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)