/[gentoo]/xml/htdocs/doc/en/handbook/hb-net-wireless.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-net-wireless.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-wireless.xml,v 1.6 2005/12/21 13:16:02 jkt Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-wireless.xml,v 1.7 2005/12/22 19:55:49 jkt Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.2</version> 11<version>1.3</version>
12<date>2005-08-02</date> 12<date>2005-12-22</date>
13 13
14<section> 14<section>
15<title>Introduction</title> 15<title>Introduction</title>
16<body> 16<body>
17 17
18<p> 18<p>
19Currently we support wireless setup either by wireless-tools or wpa_supplicant. 19Currently we support wireless setup either by <c>wireless-tools</c> or
20The important thing to remember is that you configure for wireless networks on a 20<c>wpa_supplicant</c>. The important thing to remember is that you configure for
21global basis and not an interface basis. 21wireless networks on a global basis and not an interface basis.
22</p>
23
24<p> 22</p>
23
24<p>
25wpa_suppliant is the best choice, but it does not support all drivers. For a 25<c>wpa_suppliant</c> is the best choice, but it does not support all drivers.
26list of supported drivers, <uri 26For a list of supported drivers, <uri
27link="http://hostap.epitest.fi/wpa_supplicant">read the wpa_supplicant 27link="http://hostap.epitest.fi/wpa_supplicant">read the wpa_supplicant
28site</uri>. Also, wpa_supplicant can currently only connect to SSID's that 28site</uri>. Also, <c>wpa_supplicant</c> can currently only connect to SSID's
29you have configured for. 29that you have configured for.
30</p>
31
32<p> 30</p>
31
32<p>
33wireless-tools supports nearly all cards and drivers, but it cannot connect to 33<c>wireless-tools</c> supports nearly all cards and drivers, but it cannot
34WPA only Access Points. 34connect to WPA only Access Points.
35</p> 35</p>
36 36
37<warn> 37<warn>
38The linux-wlan-ng driver is not supported by baselayout at this time. This is 38The <c>linux-wlan-ng</c> driver is not supported by <c>baselayout</c> at this
39because linux-wlan-ng have their own setup and configuration which is completely 39time. This is because <c>linux-wlan-ng</c> have their own setup and
40different to everyone else's. The linux-wlan-ng devs are rumoured to be changing 40configuration which is completely different to everyone else's. The
41<c>linux-wlan-ng</c> devs are rumoured to be changing their setup over to
41their setup over to wireless-tools - when this happens you may use linux-wlan-ng 42<c>wireless-tools</c> - when this happens you may use <c>linux-wlan-ng</c>
42with baselayout. 43with <c>baselayout</c>.
43</warn> 44</warn>
44 45
45</body> 46</body>
46</section> 47</section>
47<section> 48<section>
57<pre caption="Install wpa_supplicant"> 58<pre caption="Install wpa_supplicant">
58# <i>emerge net-wireless/wpa_supplicant</i> 59# <i>emerge net-wireless/wpa_supplicant</i>
59</pre> 60</pre>
60 61
61<impo> 62<impo>
62You have to have CONFIG_PACKET enabled in your kernel for wpa_supplicant to 63You have to have <c>CONFIG_PACKET</c> enabled in your kernel for
63work. 64<c>wpa_supplicant</c> to work.
64</impo> 65</impo>
65 66
66<p> 67<p>
67Now we have to configure <path>/etc/conf.d/net</path> to so that we prefer 68Now we have to configure <path>/etc/conf.d/net</path> to so that we prefer
68wpa_supplicant over wireless-tools (if both are installed, wireless-tools is the 69<c>wpa_supplicant</c> over <c>wireless-tools</c> (if both are installed,
69default). 70<c>wireless-tools</c> is the default).
70</p> 71</p>
71 72
72<pre caption="configure /etc/conf.d/net for wpa_supplicant"> 73<pre caption="configure /etc/conf.d/net for wpa_supplicant">
73<comment># Prefer wpa_supplicant over wireless-tools</comment> 74<comment># Prefer wpa_supplicant over wireless-tools</comment>
74modules=( "wpa_supplicant" ) 75modules=( "wpa_supplicant" )
77# be using as it's not very good at guessing yet</comment> 78# be using as it's not very good at guessing yet</comment>
78wpa_supplicant_eth0="-Dmadwifi" 79wpa_supplicant_eth0="-Dmadwifi"
79</pre> 80</pre>
80 81
81<note> 82<note>
82If you're using the host-ap driver you will need to put the card in Managed mode 83If you're using the host-ap driver you will need to put the card in <e>Managed
83before it can be used with wpa_supplicant correctly. You can use 84mode</e> before it can be used with <c>wpa_supplicant</c> correctly. You can use
84<e>iwconfig_eth0="mode managed"</e> to achieve this in 85<e>iwconfig_eth0="mode managed"</e> to achieve this in
85<path>/etc/conf.d/net</path>. 86<path>/etc/conf.d/net</path>.
86</note> 87</note>
87 88
88<p> 89<p>
89That was simple wasn't it? However, we still have to configure wpa_supplicant 90That was simple wasn't it? However, we still have to configure
90itself which is a bit more tricky depending on how secure the Access Points are 91<c>wpa_supplicant</c> itself which is a bit more tricky depending on how secure
91that you are trying to connect to. The below example is taken and simplified 92the Access Points are that you are trying to connect to. The below example is
92from <path>/etc/wpa_supplicant.conf.example</path> which ships with 93taken and simplified from <path>/etc/wpa_supplicant.conf.example</path> which
93wpa_supplicant. 94ships with <c>wpa_supplicant</c>.
94</p> 95</p>
95 96
96<pre caption="an example /etc/wpa_supplicant.conf"> 97<pre caption="an example /etc/wpa_supplicant.conf">
97<comment># The below line not be changed otherwise we refuse to work</comment> 98<comment># The below line not be changed otherwise we refuse to work</comment>
98ctrl_interface=/var/run/wpa_supplicant 99ctrl_interface=/var/run/wpa_supplicant
256<tr> 257<tr>
257 <th>Value</th> 258 <th>Value</th>
258 <th>Description</th> 259 <th>Description</th>
259</tr> 260</tr>
260<tr> 261<tr>
261 <ti>any</ti> 262 <ti><c>any</c></ti>
262 <ti>Default behaviour</ti> 263 <ti>Default behaviour</ti>
263</tr> 264</tr>
264<tr> 265<tr>
265 <ti>preferredonly</ti> 266 <ti><c>preferredonly</c></ti>
266 <ti>We will only connect to visible APs in the preferred list</ti> 267 <ti>We will only connect to visible APs in the preferred list</ti>
267</tr> 268</tr>
268<tr> 269<tr>
269 <ti>forcepreferred</ti> 270 <ti><c>forcepreferred</c></ti>
270 <ti> 271 <ti>
271 We will forceably connect to APs in the preferred order if they are not 272 We will forceably connect to APs in the preferred order if they are not
272 found in a scan 273 found in a scan
273 </ti> 274 </ti>
274</tr> 275</tr>
275<tr> 276<tr>
276 <ti>forcepreferredonly</ti> 277 <ti><c>forcepreferredonly</c></ti>
277 <ti> 278 <ti>
278 Do not scan for APs - instead just try to connect to each one in order 279 Do not scan for APs - instead just try to connect to each one in order
279 </ti> 280 </ti>
280</tr> 281</tr>
281<tr> 282<tr>
282 <ti>forceany</ti> 283 <ti><c>forceany</c></ti>
283 <ti>Same as forcepreferred + connect to any other available AP</ti> 284 <ti>Same as forcepreferred + connect to any other available AP</ti>
284</tr> 285</tr>
285</table> 286</table>
286 287
287<p> 288<p>
288Finally we have some blacklist_aps and unique_ap selection. blacklist_aps works 289Finally we have some <c>blacklist_aps</c> and <c>unique_ap</c> selection.
289in a similar way to preferred_aps. unique_ap is a yes or no value that says if a 290<c>blacklist_aps</c> works in a similar way to <c>preferred_aps</c>.
290second wireless interface can connect to the same Access Point as the first 291<c>unique_ap</c> is a yes or no value that says if a second wireless interface
291interface. 292can connect to the same Access Point as the first interface.
292</p> 293</p>
293 294
294<pre caption="blacklist_aps and unique_ap example"> 295<pre caption="blacklist_aps and unique_ap example">
295<comment># Sometimes you never want to connect to certain access points</comment> 296<comment># Sometimes you never want to connect to certain access points</comment>
296blacklist_aps=( "ESSID3" "ESSID4" ) 297blacklist_aps=( "ESSID3" "ESSID4" )
367 <th>Variable</th> 368 <th>Variable</th>
368 <th>Default Value</th> 369 <th>Default Value</th>
369 <th>Description</th> 370 <th>Description</th>
370</tr> 371</tr>
371<tr> 372<tr>
372 <ti>iwconfig_eth0</ti> 373 <ti><c>iwconfig_eth0</c></ti>
373 <ti/> 374 <ti/>
374 <ti>See the iwconfig man page for details on what to send iwconfig</ti> 375 <ti>See the iwconfig man page for details on what to send <c>iwconfig</c></ti>
375</tr>
376<tr> 376</tr>
377<tr>
377 <ti>iwpriv_eth0</ti> 378 <ti><c>iwpriv_eth0</c></ti>
378 <ti/> 379 <ti/>
379 <ti>See the iwpriv man page for details on what to send iwpriv</ti> 380 <ti>See the iwpriv man page for details on what to send <c>iwpriv</c></ti>
380</tr>
381<tr> 381</tr>
382<tr>
382 <ti>sleep_scan_eth0</ti> 383 <ti><c>sleep_scan_eth0</c></ti>
383 <ti>0</ti> 384 <ti><c>0</c></ti>
384 <ti> 385 <ti>
385 The number of seconds to sleep before attempting to scan. This is needed 386 The number of seconds to sleep before attempting to scan. This is needed
386 when the driver/firmware needs more time to active before it can be used. 387 when the driver/firmware needs more time to active before it can be used.
387 </ti> 388 </ti>
388</tr> 389</tr>
389<tr> 390<tr>
390 <ti>sleep_associate_eth0</ti> 391 <ti><c>sleep_associate_eth0</c></ti>
391 <ti>5</ti> 392 <ti><c>5</c></ti>
392 <ti> 393 <ti>
393 The number of seconds to wait for the interface to associate with the 394 The number of seconds to wait for the interface to associate with the
394 Access Point before moving onto the next one 395 Access Point before moving onto the next one
395 </ti> 396 </ti>
396</tr> 397</tr>
397<tr> 398<tr>
398 <ti>associate_test_eth0</ti> 399 <ti><c>associate_test_eth0</c></ti>
399 <ti>MAC</ti> 400 <ti><c>MAC</c></ti>
400 <ti>
401 Some drivers do not reset the MAC address associated with to an
402 invalid one when they loose or attempt to associate.
403 Some drivers do not reset the quality level when they loose
404 or attempt assocciation.
405 Valid settings are MAC, quality and all.
406 </ti> 401 <ti>
407</tr> 402 Some drivers do not reset the MAC address associated with to an invalid one
403 when they loose or attempt to associate. Some drivers do not reset the
404 quality level when they loose or attempt assocciation. Valid settings are
405 <c>MAC</c>, <c>quality</c> and <c>all</c>.
406 </ti>
408<tr> 407</tr>
408<tr>
409 <ti>scan_mode_eth0</ti> 409 <ti><c>scan_mode_eth0</c></ti>
410 <ti/> 410 <ti/>
411 <ti> 411 <ti>
412 Some drivers have to scan in ad-hoc mode, so if scanning fails 412 Some drivers have to scan in ad-hoc mode, so if scanning fails
413 try setting ad-hoc here 413 try setting <c>ad-hoc</c> here
414 </ti> 414 </ti>
415</tr>
416<tr> 415</tr>
416<tr>
417 <ti>iwpriv_scan_pre_eth0</ti> 417 <ti><c>iwpriv_scan_pre_eth0</c></ti>
418 <ti/> 418 <ti/>
419 <ti> 419 <ti>
420 Sends some iwpriv commands to the interface before scanning. 420 Sends some <c>iwpriv</c> commands to the interface before scanning.
421 See the iwpriv man page for more details 421 See the iwpriv man page for more details.
422 </ti> 422 </ti>
423</tr>
424<tr> 423</tr>
424<tr>
425 <ti>iwpriv_scan_post_eth0</ti> 425 <ti><c>iwpriv_scan_post_eth0</c></ti>
426 <ti/> 426 <ti/>
427 <ti> 427 <ti>
428 Sends some iwpriv commands to the interface after scanning. 428 Sends some <c>iwpriv</c> commands to the interface after scanning.
429 See the iwpriv man page for more details 429 See the iwpriv man page for more details.
430 </ti> 430 </ti>
431</tr> 431</tr>
432</table> 432</table>
433 433
434</body> 434</body>
437<section> 437<section>
438<title>Defining network configuration per ESSID</title> 438<title>Defining network configuration per ESSID</title>
439<body> 439<body>
440 440
441<p> 441<p>
442Someones when you connect to ESSID1 you need a static IP and when you connect to 442Someones when you connect to <e>ESSID1</e> you need a static IP and when you
443ESSID2 you need DHCP. Infact most module variables we can change per ESSID. 443connect to <e>ESSID2</e> you need DHCP. Infact most module variables we can
444Here's how we do this. 444change per ESSID. Here's how we do this.
445</p> 445</p>
446 446
447<note> 447<note>
448These work if you're using WPA Supplicant or Wireless Tools. 448These work if you're using WPA Supplicant or Wireless Tools.
449</note> 449</note>
450 450
451<impo> 451<impo>
452You <e>will</e> need to consult the 452You <e>will</e> need to consult the <uri
453<uri link="?part=4&amp;chap=2#variable_name">variable name</uri> 453link="?part=4&amp;chap=2#variable_name">variable name</uri> documentation.
454documentation.
455</impo> 454</impo>
456 455
457<pre caption="override network settings per ESSID"> 456<pre caption="override network settings per ESSID">
458config_ESSID1=( "192.168.0.3/24 brd 192.168.0.255" ) 457config_ESSID1=( "192.168.0.3/24 brd 192.168.0.255" )
459routes_ESSID1=( "default via 192.168.0.1" ) 458routes_ESSID1=( "default via 192.168.0.1" )

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20