wireless.tex 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. The WiFi settings are configured in the file \texttt{/etc/config/wireless}
  2. (currently supported on Broadcom and Atheros). When booting the router for the first time
  3. it should detect your card and create a sample configuration file. By default '\texttt{option network lan}' is
  4. commented. This prevents unsecured sharing of the network over the wireless interface.
  5. \paragraph{Generic Broadcom wireless config:}
  6. \begin{Verbatim}
  7. config wifi-device "wl0"
  8. option type "broadcom"
  9. option channel "5"
  10. config wifi-iface
  11. option device "wl0"
  12. # option network lan
  13. option mode "ap"
  14. option ssid "OpenWrt"
  15. option hidden "0"
  16. option encryption "none"
  17. \end{Verbatim}
  18. \paragraph{Generic Atheros wireless config:}
  19. \begin{Verbatim}
  20. config wifi-device "wifi0"
  21. option type "atheros"
  22. option channel "5"
  23. option agmode "11g"
  24. config wifi-iface
  25. option device "wifi0"
  26. # option network lan
  27. option mode "ap"
  28. option ssid "OpenWrt"
  29. option hidden "0"
  30. option encryption "none"
  31. \end{Verbatim}
  32. \paragraph{Generic multi-radio Atheros wireless config:}
  33. \begin{Verbatim}
  34. config wifi-device wifi0
  35. option type atheros
  36. option channel 1
  37. config wifi-iface
  38. option device wifi0
  39. # option network lan
  40. option mode ap
  41. option ssid OpenWrt_private
  42. option hidden 0
  43. option encryption none
  44. config wifi-device wifi1
  45. option type atheros
  46. option channel 11
  47. config wifi-iface
  48. option device wifi1
  49. # option network lan
  50. option mode ap
  51. option ssid OpenWrt_public
  52. option hidden 1
  53. option encryption none
  54. \end{Verbatim}
  55. There are two types of config sections in this file. The '\texttt{wifi-device}' refers to
  56. the physical wifi interface and '\texttt{wifi-iface}' configures a virtual interface on top
  57. of that (if supported by the driver).
  58. A full outline of the wireless configuration file with description of each field:
  59. \begin{Verbatim}
  60. config wifi-device wifi device name
  61. option type broadcom, atheros
  62. option country us, uk, fr, de, etc.
  63. option channel 1-14
  64. option maxassoc 1-128 (broadcom only)
  65. option distance 1-n
  66. option agmode 11b, 11g, 11a, 11bg (atheros only)
  67. config wifi-iface
  68. option network the interface you want wifi to bridge with
  69. option device wifi0, wifi1, wifi2, wifiN
  70. option mode ap, sta, adhoc, or wds
  71. option ssid ssid name
  72. option bssid bssid address
  73. option encryption none, wep, psk, psk2, wpa, wpa2
  74. option key encryption key
  75. option key1 key 1
  76. option key2 key 2
  77. option key3 key 3
  78. option key4 key 4
  79. option server ip address
  80. option port port
  81. option hidden 0,1
  82. option isolate 0,1
  83. \end{Verbatim}
  84. \paragraph{Options for the \texttt{wifi-device}:}
  85. \begin{itemize}
  86. \item \texttt{type} \\
  87. The driver to use for this interface.
  88. \item \texttt{country} \\
  89. The country code used to determine the regulatory settings.
  90. \item \texttt{channel} \\
  91. The wifi channel (e.g. 1-14, depending on your country setting).
  92. \item \texttt{maxassoc} \\
  93. Optional: Maximum number of associated clients. This feature is supported only on the broadcom chipset.
  94. \item \texttt{distance} \\
  95. Optional: Distance between the ap and the furthest client in meters. This feature is supported only on the atheros chipset.
  96. \item \texttt{mode} \\
  97. The frequency band (\texttt{b}, \texttt{g}, \texttt{bg}, \texttt{a}). This feature is only supported on the atheros chipset.
  98. \end{itemize}
  99. \paragraph{Options for the \texttt{wifi-iface}:}
  100. \begin{itemize}
  101. \item \texttt{network} \\
  102. Selects the interface section from \texttt{/etc/config/network} to be
  103. used with this interface
  104. \item \texttt{device} \\
  105. Set the wifi device name.
  106. \item \texttt{mode} \\
  107. Operating mode:
  108. \begin{itemize}
  109. \item \texttt{ap} \\
  110. Access point mode
  111. \item \texttt{sta} \\
  112. Client mode
  113. \item \texttt{adhoc} \\
  114. Ad-Hoc mode
  115. \item \texttt{wds} \\
  116. WDS point-to-point link
  117. \end{itemize}
  118. \item \texttt{ssid}
  119. Set the SSID to be used on the wifi device.
  120. \item \texttt{bssid}
  121. Set the BSSID address to be used for wds to set the mac address of the other wds unit.
  122. \item \texttt{encryption} \\
  123. Encryption setting. Accepts the following values:
  124. \begin{itemize}
  125. \item \texttt{none}
  126. \item \texttt{wep}
  127. \item \texttt{psk}, \texttt{psk2} \\
  128. WPA(2) Pre-shared Key
  129. \item \texttt{wpa}, \texttt{wpa2} \\
  130. WPA(2) RADIUS
  131. \end{itemize}
  132. \item \texttt{key, key1, key2, key3, key4} (wep, wpa and psk) \\
  133. WEP key, WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
  134. \item \texttt{server} (wpa) \\
  135. The RADIUS server ip address
  136. \item \texttt{port} (wpa) \\
  137. The RADIUS server port
  138. \item \texttt{hidden} \\
  139. 0 broadcasts the ssid; 1 disables broadcasting of the ssid
  140. \item \texttt{isolate} \\
  141. Optional: Isolation is a mode usually set on hotspots that limits the clients to communicate only with the AP and not with other wireless clients.
  142. 0 disables ap isolation (default); 1 enables ap isolation.
  143. \end{itemize}
  144. \paragraph{Limitations:}
  145. There are certain limitations when combining modes.
  146. Only the following mode combinations are supported:
  147. \begin{itemize}
  148. \item \textbf{Broadcom}: \\
  149. \begin{itemize}
  150. \item 1x \texttt{sta}, 0-3x \texttt{ap}
  151. \item 1-4x \texttt{ap}
  152. \item 1x \texttt{adhoc}
  153. \end{itemize}
  154. WDS links can only be used in pure AP mode and cannot use WEP (except when sharing the
  155. settings with the master interface, which is done automatically).
  156. \item \textbf{Atheros}: \\
  157. \begin{itemize}
  158. \item 1x \texttt{sta}, 0-4x \texttt{ap}
  159. \item 1-4x \texttt{ap}
  160. \item 1x \texttt{adhoc}
  161. \end{itemize}
  162. \end{itemize}