| … | |
… | |
| 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.19 2010/11/07 20:16:49 nightmorph Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-wireless.xml,v 1.20 2011/08/14 16:12:13 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | Wireless configuration can be tricky. Hopefully we'll get you working! |
12 | Wireless configuration can be tricky. Hopefully we'll get you working! |
| 13 | </abstract> |
13 | </abstract> |
| 14 | |
14 | |
| 15 | <version>9.1</version> |
15 | <version>10</version> |
| 16 | <date>2010-11-07</date> |
16 | <date>2011-08-13</date> |
| 17 | |
17 | |
| 18 | <section> |
18 | <section> |
| 19 | <title>Introduction</title> |
19 | <title>Introduction</title> |
| 20 | <body> |
20 | <body> |
| 21 | |
21 | |
| … | |
… | |
| 111 | <c>wireless-tools</c> is the default). |
111 | <c>wireless-tools</c> is the default). |
| 112 | </p> |
112 | </p> |
| 113 | |
113 | |
| 114 | <pre caption="configure /etc/conf.d/net for wpa_supplicant"> |
114 | <pre caption="configure /etc/conf.d/net for wpa_supplicant"> |
| 115 | <comment># Prefer wpa_supplicant over wireless-tools</comment> |
115 | <comment># Prefer wpa_supplicant over wireless-tools</comment> |
| 116 | modules=( "wpa_supplicant" ) |
116 | modules="wpa_supplicant" |
| 117 | |
117 | |
| 118 | <comment># It's important that we tell wpa_supplicant which driver we should |
118 | <comment># It's important that we tell wpa_supplicant which driver we should |
| 119 | # be using as it's not very good at guessing yet</comment> |
119 | # be using as it's not very good at guessing yet</comment> |
| 120 | wpa_supplicant_eth0="-Dmadwifi" |
120 | wpa_supplicant_eth0="-Dmadwifi" |
| 121 | </pre> |
121 | </pre> |
| … | |
… | |
| 257 | link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
257 | link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
| 258 | </impo> |
258 | </impo> |
| 259 | |
259 | |
| 260 | <pre caption="sample iwconfig setup in /etc/conf.d/net"> |
260 | <pre caption="sample iwconfig setup in /etc/conf.d/net"> |
| 261 | <comment># Prefer iwconfig over wpa_supplicant</comment> |
261 | <comment># Prefer iwconfig over wpa_supplicant</comment> |
| 262 | modules=( "iwconfig" ) |
262 | modules="iwconfig" |
| 263 | |
263 | |
| 264 | <comment># Configure WEP keys for Access Points called ESSID1 and ESSID2</comment> |
264 | <comment># Configure WEP keys for Access Points called ESSID1 and ESSID2</comment> |
| 265 | <comment># You may configure up to 4 WEP keys, but only 1 can be active at |
265 | <comment># You may configure up to 4 WEP keys, but only 1 can be active at |
| 266 | # any time so we supply a default index of [1] to set key [1] and then |
266 | # any time so we supply a default index of [1] to set key [1] and then |
| 267 | # again afterwards to change the active key to [1] |
267 | # again afterwards to change the active key to [1] |
| … | |
… | |
| 276 | |
276 | |
| 277 | <comment># The below only work when we scan for available Access Points</comment> |
277 | <comment># The below only work when we scan for available Access Points</comment> |
| 278 | |
278 | |
| 279 | <comment># Sometimes more than one Access Point is visible so we need to |
279 | <comment># Sometimes more than one Access Point is visible so we need to |
| 280 | # define a preferred order to connect in</comment> |
280 | # define a preferred order to connect in</comment> |
| 281 | preferred_aps=( "ESSID1" "ESSID2" ) |
281 | preferred_aps="'ESSID1' 'ESSID2'" |
| 282 | </pre> |
282 | </pre> |
| 283 | |
283 | |
| 284 | </body> |
284 | </body> |
| 285 | </subsection> |
285 | </subsection> |
| 286 | <subsection> |
286 | <subsection> |
| … | |
… | |
| 338 | wireless interface can connect to the same Access Point as the first interface. |
338 | wireless interface can connect to the same Access Point as the first interface. |
| 339 | </p> |
339 | </p> |
| 340 | |
340 | |
| 341 | <pre caption="blacklist_aps and unique_ap example"> |
341 | <pre caption="blacklist_aps and unique_ap example"> |
| 342 | <comment># Sometimes you never want to connect to certain access points</comment> |
342 | <comment># Sometimes you never want to connect to certain access points</comment> |
| 343 | blacklist_aps=( "ESSID3" "ESSID4" ) |
343 | blacklist_aps="'ESSID3' 'ESSID4'" |
| 344 | |
344 | |
| 345 | <comment># If you have more than one wireless card, you can say if you want |
345 | <comment># If you have more than one wireless card, you can say if you want |
| 346 | # to allow each card to associate with the same Access Point or not |
346 | # to allow each card to associate with the same Access Point or not |
| 347 | # Values are "yes" and "no" |
347 | # Values are "yes" and "no" |
| 348 | # Default is "yes"</comment> |
348 | # Default is "yes"</comment> |
| … | |
… | |
| 498 | You <e>will</e> need to consult the <uri |
498 | You <e>will</e> need to consult the <uri |
| 499 | link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
499 | link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
| 500 | </impo> |
500 | </impo> |
| 501 | |
501 | |
| 502 | <pre caption="override network settings per ESSID"> |
502 | <pre caption="override network settings per ESSID"> |
| 503 | config_ESSID1=( "192.168.0.3/24 brd 192.168.0.255" ) |
503 | config_ESSID1="192.168.0.3/24 brd 192.168.0.255" |
| 504 | routes_ESSID1=( "default via 192.168.0.1" ) |
504 | routes_ESSID1="default via 192.168.0.1" |
| 505 | |
505 | |
| 506 | config_ESSID2=( "dhcp" ) |
506 | config_ESSID2="dhcp" |
| 507 | fallback_ESSID2=( "192.168.3.4/24" ) |
507 | fallback_ESSID2="192.168.3.4/24" |
| 508 | fallback_route_ESSID2=( "default via 192.168.3.1" ) |
508 | fallback_route_ESSID2="default via 192.168.3.1" |
| 509 | |
509 | |
| 510 | <comment># We can define nameservers and other things too</comment> |
510 | <comment># We can define nameservers and other things too</comment> |
| 511 | <comment># NOTE: DHCP will override these unless it's told not too</comment> |
511 | <comment># NOTE: DHCP will override these unless it's told not too</comment> |
| 512 | dns_servers_ESSID1=( "192.168.0.1" "192.168.0.2" ) |
512 | dns_servers_ESSID1="192.168.0.1 192.168.0.2" |
| 513 | dns_domain_ESSID1="some.domain" |
513 | dns_domain_ESSID1="some.domain" |
| 514 | dns_search_domains_ESSID1="search.this.domain search.that.domain" |
514 | dns_search_domains_ESSID1="search.this.domain search.that.domain" |
| 515 | |
515 | |
| 516 | <comment># You override by the MAC address of the Access Point |
516 | <comment># You override by the MAC address of the Access Point |
| 517 | # This handy if you goto different locations that have the same ESSID</comment> |
517 | # This handy if you goto different locations that have the same ESSID</comment> |
| 518 | config_001122334455=( "dhcp" ) |
518 | config_001122334455="dhcp" |
| 519 | dhcpcd_001122334455="-t 10" |
519 | dhcpcd_001122334455="-t 10" |
| 520 | dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" ) |
520 | dns_servers_001122334455="192.168.0.1 192.168.0.2" |
| 521 | </pre> |
521 | </pre> |
| 522 | |
522 | |
| 523 | </body> |
523 | </body> |
| 524 | </section> |
524 | </section> |
| 525 | </sections> |
525 | </sections> |