/[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.5 Revision 1.6
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.5 2005/08/02 07:41:26 swift Exp $ --> 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 $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.2</version> 11<version>1.2</version>
12<date>2005-08-02</date> 12<date>2005-08-02</date>
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 19Currently we support wireless setup either by wireless-tools or wpa_supplicant.
20wpa_supplicant. The important thing to remember is that you configure for 20The important thing to remember is that you configure for wireless networks on a
21wireless networks on a global basis and not an interface basis. 21global 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. 25wpa_suppliant is the best choice, but it does not support all drivers. For a
26For a list of supported drivers, 26list of supported drivers, <uri
27<uri link="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, wpa_supplicant can currently only connect to SSID's that
29you have configured for. 29you have configured for.
30</p> 30</p>
31 31
32<p> 32<p>
33wireless-tools supports nearly all cards and drivers, but it cannot connect 33wireless-tools supports nearly all cards and drivers, but it cannot connect to
34to WPA only Access Points. 34WPA 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. 38The linux-wlan-ng driver is not supported by baselayout at this time. This is
39This is because linux-wlan-ng have their own setup and configuration 39because linux-wlan-ng have their own setup and configuration which is completely
40which is completely different to everyone else's. The linux-wlan-ng devs 40different to everyone else's. The linux-wlan-ng devs are rumoured to be changing
41are rumoured to be changing their setup over to wireless-tools - when this 41their setup over to wireless-tools - when this happens you may use linux-wlan-ng
42happens you may use linux-wlan-ng with baselayout. 42with baselayout.
43</warn> 43</warn>
44 44
45</body> 45</body>
46</section> 46</section>
47<section> 47<section>
48<title>WPA Supplicant</title> 48<title>WPA Supplicant</title>
49<body> 49<body>
50 50
51<p> 51<p>
52<uri link="http://hostap.epitest.fi/wpa_supplicant">WPA Supplicant</uri> is 52<uri link="http://hostap.epitest.fi/wpa_supplicant">WPA Supplicant</uri> is a
53a package that allows you to connect to WPA enabled access points. It's setup 53package that allows you to connect to WPA enabled access points. It's setup is
54is fairly fluid as it is still in beta - however it works fine for the most 54fairly fluid as it is still in beta - however it works fine for the most part.
55part.
56</p> 55</p>
57 56
58<pre caption="Install wpa_supplicant"> 57<pre caption="Install wpa_supplicant">
59# <i>emerge net-wireless/wpa_supplicant</i> 58# <i>emerge net-wireless/wpa_supplicant</i>
60</pre> 59</pre>
64work. 63work.
65</impo> 64</impo>
66 65
67<p> 66<p>
68Now we have to configure <path>/etc/conf.d/net</path> to so that we prefer 67Now we have to configure <path>/etc/conf.d/net</path> to so that we prefer
69wpa_supplicant over wireless-tools (if both are installed, wireless-tools 68wpa_supplicant over wireless-tools (if both are installed, wireless-tools is the
70is the default). 69default).
71</p> 70</p>
72 71
73<pre caption="configure /etc/conf.d/net for wpa_supplicant"> 72<pre caption="configure /etc/conf.d/net for wpa_supplicant">
74<comment># Prefer wpa_supplicant over wireless-tools</comment> 73<comment># Prefer wpa_supplicant over wireless-tools</comment>
75modules=( "wpa_supplicant" ) 74modules=( "wpa_supplicant" )
78# be using as it's not very good at guessing yet</comment> 77# be using as it's not very good at guessing yet</comment>
79wpa_supplicant_eth0="-Dmadwifi" 78wpa_supplicant_eth0="-Dmadwifi"
80</pre> 79</pre>
81 80
82<note> 81<note>
83If you're using the host-ap driver you will need to put the card in Managed 82If you're using the host-ap driver you will need to put the card in Managed mode
84mode before it can be used with wpa_supplicant correctly. You can use 83before it can be used with wpa_supplicant correctly. You can use
85<e>iwconfig_eth0="mode managed"</e> to achieve this in 84<e>iwconfig_eth0="mode managed"</e> to achieve this in
86<path>/etc/conf.d/net</path>. 85<path>/etc/conf.d/net</path>.
87</note> 86</note>
88 87
89<p> 88<p>
90That was simple wasn't it? However, we still have to configure wpa_supplicant 89That was simple wasn't it? However, we still have to configure wpa_supplicant
91itself which is a bit more tricky depending on how secure the Access Points 90itself which is a bit more tricky depending on how secure the Access Points are
92are that you are trying to connect to. The below example is taken and 91that you are trying to connect to. The below example is taken and simplified
93simplified from <path>/etc/wpa_supplicant.conf.example</path> which ships 92from <path>/etc/wpa_supplicant.conf.example</path> which ships with
94with wpa_supplicant. 93wpa_supplicant.
95</p> 94</p>
96 95
97<pre caption="an example /etc/wpa_supplicant.conf"> 96<pre caption="an example /etc/wpa_supplicant.conf">
98<comment># The below line not be changed otherwise we refuse to work</comment> 97<comment># The below line not be changed otherwise we refuse to work</comment>
99ctrl_interface=/var/run/wpa_supplicant 98ctrl_interface=/var/run/wpa_supplicant
182<subsection> 181<subsection>
183<title>Initial setup and Managed Mode</title> 182<title>Initial setup and Managed Mode</title>
184<body> 183<body>
185 184
186<p> 185<p>
186<uri
187<uri link="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"> 187link="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html">Wireless
188Wireless Tools</uri> provide a generic way to configure basic wireless 188Tools</uri> provide a generic way to configure basic wireless interfaces up to
189interfaces up to the WEP security level. While WEP is a weak security method 189the WEP security level. While WEP is a weak security method it's also the most
190it's also the most prevalent. 190prevalent.
191</p>
192
193<p> 191</p>
192
193<p>
194Wireless Tools configuration is controlled by a few main variables. The 194Wireless Tools configuration is controlled by a few main variables. The sample
195sample configuration file below should describe all you need. One thing to 195configuration file below should describe all you need. One thing to bear in mind
196bear in mind is that no configuration means "connect to the strongest 196is that no configuration means "connect to the strongest unencrypted Access
197unencrypted Access Point" - we will always try and connect you to something. 197Point" - we will always try and connect you to something.
198</p> 198</p>
199 199
200<pre caption="Install wireless-tools"> 200<pre caption="Install wireless-tools">
201# <i>emerge net-wireless/wireless-tools</i> 201# <i>emerge net-wireless/wireless-tools</i>
202</pre> 202</pre>
206<path>/etc/conf.d/wireless</path> this guide recommends you store them in 206<path>/etc/conf.d/wireless</path> this guide recommends you store them in
207<path>/etc/conf.d/net</path> 207<path>/etc/conf.d/net</path>
208</note> 208</note>
209 209
210<impo> 210<impo>
211You <e>will</e> need to consult the 211You <e>will</e> need to consult the <uri
212<uri link="?part=4&amp;chap=2#variable_name">variable name</uri> 212link="?part=4&amp;chap=2#variable_name">variable name</uri> documentation.
213documentation.
214</impo> 213</impo>
215 214
216<pre caption="sample iwconfig setup in /etc/conf.d/net"> 215<pre caption="sample iwconfig setup in /etc/conf.d/net">
217<comment># Prefer iwconfig over wpa_supplicant</comment> 216<comment># Prefer iwconfig over wpa_supplicant</comment>
218modules=( "iwconfig" ) 217modules=( "iwconfig" )
240<subsection> 239<subsection>
241<title>Fine tune Access Point Selection</title> 240<title>Fine tune Access Point Selection</title>
242<body> 241<body>
243 242
244<p> 243<p>
245You can add some extra options to fine-tune your Access Point selection, 244You can add some extra options to fine-tune your Access Point selection, but
246but these are not normally required. 245these are not normally required.
247</p>
248
249<p> 246</p>
247
248<p>
250You can decide whether we only connect to preferred Access Points or not. 249You can decide whether we only connect to preferred Access Points or not. By
251By default if everything configured has failed and we can connect to an 250default if everything configured has failed and we can connect to an unencrypted
252unencrypted Access Point then we will. This can be controlled by the 251Access Point then we will. This can be controlled by the <c>associate_order</c>
253<c>associate_order</c> variable. Here's a table of values and how they 252variable. Here's a table of values and how they control this.
254control this.
255</p> 253</p>
256 254
257<table> 255<table>
258<tr> 256<tr>
259 <th>Value</th> 257 <th>Value</th>
285 <ti>Same as forcepreferred + connect to any other available AP</ti> 283 <ti>Same as forcepreferred + connect to any other available AP</ti>
286</tr> 284</tr>
287</table> 285</table>
288 286
289<p> 287<p>
290Finally we have some blacklist_aps and unique_ap selection. blacklist_aps 288Finally we have some blacklist_aps and unique_ap selection. blacklist_aps works
291works in a similar way to preferred_aps. unique_ap is a yes or no value 289in a similar way to preferred_aps. unique_ap is a yes or no value that says if a
292that says if a second wireless interface can connect to the same Access 290second wireless interface can connect to the same Access Point as the first
293Point as the first interface. 291interface.
294</p> 292</p>
295 293
296<pre caption="blacklist_aps and unique_ap example"> 294<pre caption="blacklist_aps and unique_ap example">
297<comment># Sometimes you never want to connect to certain access points</comment> 295<comment># Sometimes you never want to connect to certain access points</comment>
298blacklist_aps=( "ESSID3" "ESSID4" ) 296blacklist_aps=( "ESSID3" "ESSID4" )
309<subsection> 307<subsection>
310<title>Ad-Hoc and Master Modes</title> 308<title>Ad-Hoc and Master Modes</title>
311<body> 309<body>
312 310
313<p> 311<p>
314If you want to set yourself up as an Ad-Hoc node if you fail to connect to 312If you want to set yourself up as an Ad-Hoc node if you fail to connect to any
315any Access Point in managed mode, you can do that too. 313Access Point in managed mode, you can do that too.
316</p> 314</p>
317 315
318<pre caption="fallback to ad-hoc mode"> 316<pre caption="fallback to ad-hoc mode">
319adhoc_essid_eth0="This Adhoc Node" 317adhoc_essid_eth0="This Adhoc Node"
320</pre> 318</pre>
321 319
322<p> 320<p>
323What about connecting to Ad-Hoc networks or running in Master mode to become 321What about connecting to Ad-Hoc networks or running in Master mode to become an
324an Access Point? Here's a configuration just for that! You may need to 322Access Point? Here's a configuration just for that! You may need to specify WEP
325specify WEP keys as shown above. 323keys as shown above.
326</p> 324</p>
327 325
328<pre caption="sample ad-hoc/master configuration"> 326<pre caption="sample ad-hoc/master configuration">
329<comment># Set the mode - can be managed (default), ad-hoc or master 327<comment># Set the mode - can be managed (default), ad-hoc or master
330# Not all drivers support all modes</comment> 328# Not all drivers support all modes</comment>
338<comment># We use channel 3 if you don't specify one</comment> 336<comment># We use channel 3 if you don't specify one</comment>
339channel_eth0="9" 337channel_eth0="9"
340</pre> 338</pre>
341 339
342<impo> 340<impo>
343The below is taken verbatim from the BSD wavelan documentation found at 341The below is taken verbatim from the BSD wavelan documentation found at <uri
344<uri link="http://www.netbsd.org/Documentation/network/wavelan.html"> 342link="http://www.netbsd.org/Documentation/network/wavelan.html">the NetBSD
345the NetBSD documentation</uri>. 343documentation</uri>. There are 14 channels possible; We are told that channels
346There are 14 channels possible; We are told that channels 1-11 are legal for
347North America, channels 1-13 for most of Europe, channels 10-13 for France, 3441-11 are legal for North America, channels 1-13 for most of Europe, channels
348and only channel 14 for Japan. If in doubt, please refer to the documentation 34510-13 for France, and only channel 14 for Japan. If in doubt, please refer to
349that came with your card or access point. Make sure that the channel you 346the documentation that came with your card or access point. Make sure that the
350select is the same channel your access point (or the other card in an ad-hoc 347channel you select is the same channel your access point (or the other card in
351network) is on. The default for cards sold in North America and most of 348an ad-hoc network) is on. The default for cards sold in North America and most
352Europe is 3; the default for cards sold in France is 11, and the default for 349of Europe is 3; the default for cards sold in France is 11, and the default for
353cards sold in Japan is 14. 350cards sold in Japan is 14.
354</impo> 351</impo>
355 352
356</body> 353</body>
357</subsection> 354</subsection>
358<subsection> 355<subsection>
359<title>Troubleshooting Wireless Tools</title> 356<title>Troubleshooting Wireless Tools</title>
360<body> 357<body>
361 358
362<p> 359<p>
363There are some more variables you can use to help get your wireless up 360There are some more variables you can use to help get your wireless up and
364and running due to driver or environment problems. Here's a table of other 361running due to driver or environment problems. Here's a table of other things
365things you can try. 362you can try.
366</p> 363</p>
367 364
368<table> 365<table>
369<tr> 366<tr>
370 <th>Variable</th> 367 <th>Variable</th>
440<section> 437<section>
441<title>Defining network configuration per ESSID</title> 438<title>Defining network configuration per ESSID</title>
442<body> 439<body>
443 440
444<p> 441<p>
445Someones when you connect to ESSID1 you need a static IP and when you 442Someones when you connect to ESSID1 you need a static IP and when you connect to
446connect to ESSID2 you need DHCP. Infact most module variables we can 443ESSID2 you need DHCP. Infact most module variables we can change per ESSID.
447change per ESSID. Here's how we do this. 444Here's how we do this.
448</p> 445</p>
449 446
450<note> 447<note>
451These work if you're using WPA Supplicant or Wireless Tools. 448These work if you're using WPA Supplicant or Wireless Tools.
452</note> 449</note>

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

  ViewVC Help
Powered by ViewVC 1.1.20