/[baselayout]/branches/baselayout-1_12/net-scripts/conf.d/wireless.example
Gentoo

Contents of /branches/baselayout-1_12/net-scripts/conf.d/wireless.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1798 - (show annotations) (download)
Tue Jan 10 12:43:34 2006 UTC (8 years, 3 months ago) by uberlord
File size: 11922 byte(s)
Fixed bonding module, improved wireless with rt2500 and WPA
1 # /etc/conf.d/wireless:
2 # Global wireless config file for net.* rc-scripts
3
4 ##############################################################################
5 # IMPORTANT
6 # linux-wlan-ng is not supported as they have their own configuration program
7 # ensure that /etc/conf.d/net has the entry "!iwconfig" in it's modules line
8 # Try and use an alternative driver if you need to use this - hostap-driver
9 # supports non-usb linux-wlan-ng driven devices
10 ##############################################################################
11
12 ##############################################################################
13 # HINTS
14 ##############################################################################
15 # Remember to change eth0 to your wireless interface which may be
16 # eth0, eth1, wlan0, ath0 - you get the idea. If you're not sure
17 # you can type "iwconfig" at the command prompt and it will tell you which
18 # interfaces are wireless.
19 # Say that your wireless interface is ath0 - the line
20 # #essid_eth0="any"
21 # becomes
22 # #essid_ath0="any"
23 #
24 # Remember to change ESSID to your ESSID.
25 # Say that your ESSID is My NET - the line
26 # #key_ESSID="s:passkey"
27 # becomes
28 # #key_My_NET="s:passkey"
29 # Notice that the space has changed to an underscore - do the same with all
30 # characters not in a-z A-Z (english alphabet) 0-9. This only applies to
31 # variables and not values.
32 #
33 # Any ESSID's in values like essid_eth0="My NET" may need to be escaped
34 # This means placing the character \ before the character
35 # \" need to be escaped for example
36 # So if your ESSID is
37 # My "\ NET
38 # it becomes
39 # My \"\\ NET
40 # for example
41 # #essid_eth0="My\"\\NET"
42 #
43 # So using the above we can use
44 # #dns_domain_My____NET="My\"\\NET"
45 # which is an invalid dns domain, but shows the how to use the variable
46 # structure
47 #
48 # As a final note, most users will just need to set the following options
49 # key_ESSID1="s:yourkeyhere enc open" # s: means a text key
50 # key_ESSID2="aaaa-bbbb-cccc-dd" # no s: means a hex key
51 # preferred_aps=( "ESSID1" "ESSID2" )
52 #
53 # Clear? Good. Now configure your wireless network below
54 #########################################################
55
56 ##############################################################################
57 # SETTINGS
58 ##############################################################################
59 # Hard code an ESSID to an interface - leave this unset if you wish the driver
60 # to scan for available Access Points
61 # Set to "any" to connect to any ESSID - the driver picks an Access Point
62 # This needs to be done when the driver doesn't support scanning
63 # This may work for drivers that don't support scanning but you need automatic
64 # AP association
65 # I would only set this as a last resort really - use the preferred_aps
66 # setting at the bottom of this file
67
68 # However, using ad-hoc (without scanning for APs) and master mode
69 # do require the ESSID to be set - do this here
70 #essid_eth0="any"
71
72 # Set the mode of the interface (managed, ad-hoc, master or auto)
73 # The default is auto
74 # If it's ad-hoc or master you also may need to specify the channel below
75 #mode_eth0="auto"
76
77 # If managed mode fails, drop to ad-hoc mode with the below ESSID?
78 #adhoc_essid_eth0="WLAN"
79
80 #Channel can be set (1-14), but defaults to 3 if not set.
81 #
82 # The below is taken verbatim from the BSD wavelan documentation found at
83 # http://www.netbsd.org/Documentation/network/wavelan.html
84 # There are 14 channels possible; We are told that channels 1-11 are legal for
85 # North America, channels 1-13 for most of Europe, channels 10-13 for France,
86 # and only channel 14 for Japan. If in doubt, please refer to the documentation
87 # that came with your card or access point. Make sure that the channel you
88 # select is the same channel your access point (or the other card in an ad-hoc
89 # network) is on. The default for cards sold in North America and most of Europe
90 # is 3; the default for cards sold in France is 11, and the default for cards
91 # sold in Japan is 14.
92 #channel_eth0="3"
93
94 # Setup any other config commands. This is basically the iwconfig argument
95 # without the iwconfig $iface.
96 #iwconfig_eth0=""
97
98 # Set private driver ioctls. This is basically the iwpriv argument without
99 # the iwpriv $iface. If you use the rt2500 driver (not the rt2x00 one) then
100 # you can set WPA here, below is an example.
101 #iwpriv_eth0=""
102 #iwpriv_ESSID=(
103 # "set AuthMode=WPAPSK"
104 # "set EncrypType=TKIP"
105 # "set WPAPSK=yourpasskey"
106 #)
107 #NOTE: Even though you can use WPA like so, you may have to set a WEP key
108 #if your driver claims the AP is encrypted. The WEP key itself will not be
109 #used though.
110
111 # Seconds to wait before scanning
112 # Some drivers need to wait until they have finished "loading"
113 # before they can scan - otherwise they error and claim that they cannot scan
114 # or resource is unavailable. The default is to wait zero seconds
115 #sleep_scan_eth0="1"
116
117 # Seconds to wait until associated. The default is to wait 10 seconds.
118 # 0 means wait indefinitely. WARNING: this can cause an infinite delay when
119 # booting.
120 #associate_timeout_eth0="5"
121
122 # By default a successful association in Managed mode sets the MAC
123 # address of the AP connected to. However, some drivers (namely
124 # the ipw2100) don't set an invalid MAC address when association
125 # fails - so we need to check on link quality which some drivers
126 # don't report properly either.
127 # So if you have connection problems try flipping this setting
128 # Valid options are MAC, quality and all - defaults to MAC
129 #associate_test_eth0="MAC"
130
131 # Some driver/card combinations need to scan in Ad-Hoc mode
132 # After scanning, the mode is reset to the one defined above
133 #scan_mode_eth0="Ad-Hoc"
134
135 # Below you can define private ioctls to run before and after scanning
136 # Format is the same as the iwpriv_eth0 above
137 # This is needed for the HostAP drivers
138 #iwpriv_scan_pre_eth0="host_roaming 2"
139 #iwpriv_scan_post_eth0="host_roaming 0"
140
141 # Define a WEP key per ESSID or MAC address (of the AP, not your card)
142 # The encryption type (open or restricted) must match the
143 # encryption type on the Access Point
144 # You can't use "any" for an ESSID here
145 #key_ESSID="1234-1234-1234-1234-1234-1234-56"
146 # or you can use strings. Passphrase IS NOT supported
147 # To use a string, prefix it with s:
148 # Note - this example also sets the encryption method to open
149 # which is regarded as more secure than restricted
150 #key_ESSID="s:foobar enc open"
151 #key_ESSID="s:foobar enc restricted"
152
153 # If you have whitespace in your key, here's how to set it and use other
154 # commands like using open encryption.
155 #key_ESSID="s:'foo bar' enc open"
156
157 # WEP key for the AP with MAC address 001122334455
158 #key_001122334455="s:foobar"
159
160 # Here are some more examples of keys as some users find others work
161 # and some don't where they should all do the same thing
162 #key_ESSID="open s:foobar"
163 #key_ESSID="open 1234-5678-9012"
164 #key_ESSID="s:foobar enc open"
165 #key_ESSID="1234-5678-9012 enc open"
166
167 # You may want to set muliple keys - here's an example
168 # It sets 4 keys on the card and instructs to use key 2 by default
169 #key_ESSID="[1] s:passkey1 key [2] s:passkey2 key [3] s:passkey3 key [4] s:passkey4 key [2]"
170
171 # You can also override the interface settings found in /etc/conf.d/net
172 # per ESSID - which is very handy if you use different networks a lot
173 #config_ESSID=( "dhcp" )
174 #dhcpcd_ESSID="-t 5"
175 #routes_ESSID=()
176 #fallback_ESSID=()
177
178 # Setting name/domain server causes /etc/resolv.conf to be overwritten
179 # Note that if DHCP is used, and you want this to take precedence then
180 # please put -R in your dhcpcd options
181 #dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
182 #dns_domain_ESSID="some.domain"
183 #dns_search_path_ESSID="search.this.domain search.that.domain"
184 # Please check the man page for resolv.conf for more information
185 # as domain and search (searchdomains) are mutually exclusive and
186 # searchdomains takes precedence
187
188 # You can also set any of the /etc/conf.d/net variables per MAC address
189 # incase you use Access Points with the same ESSID but need different
190 # networking configs. Below is an example - of course you use the same
191 # method with other variables
192 #config_001122334455=( "dhcp" )
193 #dhcpcd_001122334455="-t 10"
194 #dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
195
196 # Map a MAC address to an ESSID
197 # This is used when the Access Point is not broadcasting it's ESSID
198 # WARNING: This will override the ESSID being broadcast due to some
199 # Access Points sending an ESSID even when they have been configured
200 # not to!
201 # Change 001122334455 to the MAC address and ESSID to the ESSID
202 # it should map to
203 #essid_001122334455="ESSID"
204
205 # This lists the preferred ESSIDs to connect to in order
206 # ESSID's can contain any characters here as they must match the broadcast
207 # ESSID exactly.
208 # Surround each ESSID with the " character and seperate them with a space
209 # If the first ESSID isn't found then it moves onto the next
210 # If this isn't defined then it connects to the first one found
211 #preferred_aps=( "ESSID 1" "ESSID 2" )
212
213 # You can also define a preferred_aps list per interface
214 #preferred_aps_eth0=( "ESSID 3" "ESSID 4" )
215
216 # You can also say whether we only connect to preferred APs or not
217 # Values are "any", "preferredonly", "forcepreferred", "forcepreferredonly" and "forceany"
218 # "any" means it will connect to visible APs in the preferred list and then any
219 # other available AP
220 # "preferredonly" means it will only connect to visible APs in the preferred list
221 # "forcepreferred" means it will forceably connect to APs in order if it does not find
222 # them in a scan
223 # "forcepreferredonly" means it forceably connects to the APs in order and does not bother
224 # to scan
225 # "forceany" does the same as forcepreferred + connects to any other available AP
226 # Default is "any"
227 #associate_order="any"
228 #associate_order_eth0="any"
229
230 # You can define blacklisted Access Points in the same way
231 #blacklist_aps=( "ESSID 1" "ESSID 2" )
232 #blacklist_aps_eth0=( "ESSID 3" ESSID 4" )
233
234 # If you have more than one wireless card, you can say if you want
235 # to allow each card to associate with the same Access Point or not
236 # Values are "yes" and "no"
237 # Default is "yes"
238 #unique_ap="yes"
239 #unique_ap_eth0="yes"
240
241 # IMPORTANT: preferred_only, blacklisted_aps and unique_ap only work when
242 # essid_eth0 is not set and your card is capable of scanning
243
244 # NOTE: preferred_aps list ignores blacklisted_aps - so if you have
245 # the same ESSID in both, well, you're a bit silly :p
246
247
248 ##############################################################################
249 # ADVANCED CONFIGURATION
250 #
251 # Two functions can be defined which will be called surrounding the
252 # associate function. The functions are called with the interface
253 # name first so that one function can control multiple adapters.
254 #
255 # The return values for the preassociate function should be 0
256 # (success) to indicate that configuration or deconfiguration of the
257 # interface can continue. If preassociate returns a non-zero value, then
258 # interface configuration will be aborted.
259 #
260 # The return value for the postassociate function is ignored
261 # since there's nothing to do if it indicates failure.
262
263 #preassociate() {
264 # # The below adds two configuration variables leap_user_ESSID
265 # # and leap_pass_ESSID. When they are both confiugred for the ESSID
266 # # being connected to then we run the CISCO LEAP script
267 #
268 # local user pass
269 # eval user=\"\$\{leap_user_${ESSIDVAR}\}\"
270 # eval pass=\"\$\{leap_pass_${ESSIDVAR}\}\"
271 #
272 # if [[ -n ${user} && -n ${pass} ]]; then
273 # if [[ ! -x /opt/cisco/bin/leapscript ]]; then
274 # eend "For LEAP support, please emerge net-misc/cisco-aironet-client-utils"
275 # return 1
276 # fi
277 # einfo "Waiting for LEAP Authentication on \"${ESSID//\\\\//}\""
278 # if /opt/cisco/bin/leapscript ${user} ${pass} | grep -q 'Login incorrect'; then
279 # ewarn "Login Failed for ${user}"
280 # return 1
281 # fi
282 # fi
283 #
284 # return 0
285 #}
286
287 #postassociate() {
288 # # This function is mostly here for completeness... I haven't
289 # # thought of anything nifty to do with it yet ;-)
290 # # Return 0 always
291 # return 0
292 #}

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20