/[baselayout]/trunk/conf.d.Linux/net.example
Gentoo

Contents of /trunk/conf.d.Linux/net.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2626 - (show annotations) (download)
Thu Apr 19 10:52:37 2007 UTC (7 years, 2 months ago) by uberlord
File size: 41043 byte(s)
As pppd is mainly a link controller, move it's startup to pppd_pre_start and have pppd_start as a dummy function for old configs.
1 ##############################################################################
2 # QUICK-START
3 #
4 # The quickest start is if you want to use DHCP.
5 # In that case, everything should work out of the box, no configuration
6 # necessary, though the startup script will warn you that you haven't
7 # specified anything.
8
9 # WARNING :- some examples have a mixture of IPv4 (ie 192.168.0.1) and IPv6
10 # (ie 4321:0:1:2:3:4:567:89ab) internet addresses. They only work if you have
11 # the relevant kernel option enabled. So if you don't have an IPv6 enabled
12 # kernel then remove the IPv6 address from your config.
13
14 # If you want to use a static address or use DHCP explicitly, jump
15 # down to the section labelled INTERFACE HANDLERS.
16 #
17 # If you want to do anything more fancy, you should take the time to
18 # read through the rest of this file.
19
20
21 ##############################################################################
22 # VARIABLES
23 #
24 # We've changed from using arrays to evaluated strings.
25 # This has the benefit of being slightly more readable but more importantly it
26 # works across all shells.
27 # OLD
28 # config_eth0=( "192.168.0.24 netmask 255.255.255.0" "192.168.0.25/24" )
29 # NEW
30 # config_eth0="'192.168.0.24 netmask 255.255.255.0' 192.168.0.25/24"
31 # INVALID
32 # config_eth0='192.168.0.24 netmask 255.255.255.0'
33 #
34 # As the 1st value has spaces in it, it needs additional quoting. The 2nd
35 # value has no spaces, therefore no additional quoting is required.
36 # The last statement is invalid because when it is evaluated, it only has one
37 # set of quotes.
38
39 ##############################################################################
40 # MODULES
41 #
42 # We now support modular networking scripts which means we can easily
43 # add support for new interface types and modules while keeping
44 # compatability with existing ones.
45 #
46 # Modules load by default if the package they need is installed. If
47 # you specify a module here that doesn't have it's package installed
48 # then you get an error stating which package you need to install.
49 # Ideally, you only use the modules setting when you have two or more
50 # packages installed that supply the same service.
51 #
52 # In other words, you probably should DO NOTHING HERE...
53
54 # Prefer ifconfig over iproute2
55 #modules="ifconfig"
56
57 # You can also specify other modules for an interface
58 # In this case we prefer udhcpc over dhcpcd
59 #modules_eth0="udhcpc"
60
61 # You can also specify which modules not to use - for example you may be
62 # using a supplicant or linux-wlan-ng to control wireless configuration but
63 # you still want to configure network settings per SSID associated with.
64 #modules="!iwconfig !wpa_supplicant"
65 # IMPORTANT: If you need the above, please disable modules in that order
66
67
68 ##############################################################################
69 # INTERFACE HANDLERS
70 #
71 # We provide two interface handlers presently: ifconfig and iproute2.
72 # You need one of these to do any kind of network configuration.
73 # For ifconfig support, emerge sys-apps/net-tools
74 # For iproute2 support, emerge sys-apps/iproute2
75
76 # If you don't specify an interface then we prefer iproute2 if it's installed
77 # To prefer ifconfig over iproute2
78 #modules="ifconfig"
79
80 # For a static configuration, use something like this
81 # (They all do exactly the same thing btw)
82 #config_eth0="192.168.0.2/24"
83 #config_eth0="'192.168.0.2 netmask 255.255.255.0'"
84
85 # We can also specify a broadcast
86 #config_eth0="'192.168.0.2/24 brd 192.168.0.255'"
87 #config_eth0="'192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255'"
88
89 # If you need more than one address, you can use something like this
90 # NOTE: ifconfig creates an aliased device for each extra IPv4 address
91 # (eth0:1, eth0:2, etc)
92 # iproute2 does not do this as there is no need to
93 #config_eth0="'192.168.0.2/24' '192.168.0.3/24' '192.168.0.4/24'"
94 # Or you can use sequence expressions
95 #config_eth0="192.168.0.{2..4}/24" # FIXME - does it work?
96 # which does the same as above. Be careful though as if you use this and
97 # fallbacks, you have to ensure that both end up with the same number of
98 # values otherwise your fallback won't work correctly.
99
100 # You can also use IPv6 addresses
101 # (you should always specify a prefix length with IPv6 here)
102 #config_eth0="192.168.0.2/24 \
103 #4321:0:1:2:3:4:567:89ab/64 \
104 #4321:0:1:2:3:4:567:89ac/64"
105 #)
106
107 # If you wish to keep existing addresses + routing and the interface is up,
108 # you can specify a noop (no operation). If the interface is down or there
109 # are no addresses assigned, then we move onto the next step (default dhcp)
110 # This is useful when configuring your interface with a kernel command line
111 # or similar
112 #config_eth0="noop 192.168.0.2/24"
113
114 # If you don't want ANY address (only useful when calling for advanced stuff)
115 #config_eth0="null"
116
117 # Here's how to do routing if you need it
118 # We add an IPv4 default route, IPv4 subnet route and an IPv6 unicast route
119 #routes_eth0=" \
120 # 'default via 192.168.0.1' \
121 # '10.0.0.0/8 via 192.168.0.1' \
122 # '::/0' \
123 #"
124
125 # If a specified module fails (like dhcp - see below), you can specify a
126 # fallback like so
127 #fallback_eth0="'192.168.0.2 netmask 255.255.255.0'"
128 #fallback_route_eth0="'default via 192.168.0.1'"
129
130 # NOTE: fallback entry must match the entry location in config_eth0
131 # As such you can only have one fallback route.
132
133 # Some users may need to alter the MTU - here's how
134 #mtu_eth0="1500"
135
136 # Each module described below can set a default base metric, lower is
137 # preferred over higher. This is so we can prefer a wired route over a
138 # wireless route automaticaly. You can override this by setting
139 #metric_eth0="100"
140 # or on a global basis
141 #metric="100"
142 # The only downside of the global setting is that you have to ensure that
143 # there are no conflicting routes yourself. For users with large routing
144 # tables you may have to set a global metric as the due to a simple read of
145 # the routing table taking over a minute at a time.
146
147 ##############################################################################
148 # OPTIONAL MODULES
149
150 #-----------------------------------------------------------------------------
151 # WIRELESS (802.11 support)
152 # Wireless can be provided by iwconfig or wpa_supplicant
153
154 # iwconfig
155 # emerge net-wireless/wireless-tools
156 ###############################################
157 # HINTS
158 #
159 # Most users will just need to set the following options
160 # key_SSID1="s:yourkeyhere enc open" # s: means a text key
161 # key_SSID2="aaaa-bbbb-cccc-dd" # no s: means a hex key
162 # preferred_aps="'SSID 1' 'SSID 2'"
163 #
164 # Clear? Good. Now configure your wireless network below
165
166 ###############################################
167 # SETTINGS
168 # Hard code an SSID to an interface - leave this unset if you wish the driver
169 # to scan for available Access Points
170 # Set to "any" to connect to any SSID - the driver picks an Access Point
171 # This needs to be done when the driver doesn't support scanning
172 # This may work for drivers that don't support scanning but you need automatic
173 # AP association
174 # I would only set this as a last resort really - use the preferred_aps
175 # setting at the bottom of this file
176
177 # However, using ad-hoc (without scanning for APs) and master mode
178 # do require the SSID to be set - do this here
179 #essid_eth0="any"
180
181 # Set the mode of the interface (managed, ad-hoc, master or auto)
182 # The default is auto
183 # If it's ad-hoc or master you also may need to specify the channel below
184 #mode_eth0="auto"
185
186 # If managed mode fails, drop to ad-hoc mode with the below SSID?
187 #adhoc_essid_eth0="WLAN"
188
189 # Some drivers/hardware don't scan all that well. We have no control over this
190 # but we can say how many scans we want to do to try and get a better sweep of
191 # the area. The default is 1.
192 #scans_eth0="1"
193
194 #Channel can be set (1-14), but defaults to 3 if not set.
195 #
196 # The below is taken verbatim from the BSD wavelan documentation found at
197 # http://www.netbsd.org/Documentation/network/wavelan.html
198 # There are 14 channels possible; We are told that channels 1-11 are legal for
199 # North America, channels 1-13 for most of Europe, channels 10-13 for France,
200 # and only channel 14 for Japan. If in doubt, please refer to the documentation
201 # that came with your card or access point. Make sure that the channel you
202 # select is the same channel your access point (or the other card in an ad-hoc
203 # network) is on. The default for cards sold in North America and most of Europe
204 # is 3; the default for cards sold in France is 11, and the default for cards
205 # sold in Japan is 14.
206 #channel_eth0="3"
207
208 # Setup any other config commands. This is basically the iwconfig argument
209 # without the iwconfig $iface.
210 #iwconfig_eth0=""
211
212 # Set private driver ioctls. This is basically the iwpriv argument without
213 # the iwpriv $iface. If you use the rt2500 driver (not the rt2x00 one) then
214 # you can set WPA here, below is an example.
215 #iwpriv_eth0=""
216 #iwpriv_SSID=" \
217 # 'set AuthMode=WPAPSK' \
218 # 'set EncrypType=TKIP' \
219 # 'set WPAPSK=yourpasskey' \
220 #"
221 #NOTE: Even though you can use WPA like so, you may have to set a WEP key
222 #if your driver claims the AP is encrypted. The WEP key itself will not be
223 #used though.
224
225 # Seconds to wait before scanning
226 # Some drivers need to wait until they have finished "loading"
227 # before they can scan - otherwise they error and claim that they cannot scan
228 # or resource is unavailable. The default is to wait zero seconds
229 #sleep_scan_eth0="1"
230
231 # Seconds to wait until associated. The default is to wait 10 seconds.
232 # 0 means wait indefinitely. WARNING: this can cause an infinite delay when
233 # booting.
234 #associate_timeout_eth0="5"
235
236 # By default a successful association in Managed mode sets the MAC
237 # address of the AP connected to. However, some drivers (namely
238 # the ipw2100) don't set an invalid MAC address when association
239 # fails - so we need to check on link quality which some drivers
240 # don't report properly either.
241 # So if you have connection problems try flipping this setting
242 # Valid options are MAC, quality and all - defaults to MAC
243 #associate_test_eth0="MAC"
244
245 # Some driver/card combinations need to scan in Ad-Hoc mode
246 # After scanning, the mode is reset to the one defined above
247 #scan_mode_eth0="Ad-Hoc"
248
249 # Below you can define private ioctls to run before and after scanning
250 # Format is the same as the iwpriv_eth0 above
251 # This is needed for the HostAP drivers
252 #iwpriv_scan_pre_eth0="'host_roaming 2'"
253 #iwpriv_scan_post_eth0="'host_roaming 0'"
254
255 # Define a WEP key per SSID or MAC address (of the AP, not your card)
256 # The encryption type (open or restricted) must match the
257 # encryption type on the Access Point
258 # You can't use "any" for an SSID here
259 #key_SSID="1234-1234-1234-1234-1234-1234-56"
260 # or you can use strings. Passphrase IS NOT supported
261 # To use a string, prefix it with s:
262 # Note - this example also sets the encryption method to open
263 # which is regarded as more secure than restricted
264 #key_SSID="s:foobar enc open"
265 #key_SSID="s:foobar enc restricted"
266
267 # If you have whitespace in your key, here's how to set it and use other
268 # commands like using open encryption.
269 #key_SSID="s:'foo bar' enc open"
270
271 # WEP key for the AP with MAC address 001122334455
272 #mac_key_001122334455="s:foobar"
273
274 # Here are some more examples of keys as some users find others work
275 # and some don't where they should all do the same thing
276 #key_SSID="open s:foobar"
277 #key_SSID="open 1234-5678-9012"
278 #key_SSID="s:foobar enc open"
279 #key_SSID="1234-5678-9012 enc open"
280
281 # You may want to set muliple keys - here's an example
282 # It sets 4 keys on the card and instructs to use key 2 by default
283 #key_SSID="[1] s:passkey1 key [2] s:passkey2 key [3] s:passkey3 key [4] s:passkey4 key [2]"
284
285 # You can also override the interface settings found in /etc/conf.d/net
286 # per SSID - which is very handy if you use different networks a lot
287 #config_SSID="dhcp"
288 #dhcpcd_SSID="-t 5"
289 #routes_SSID=
290 #fallback_SSID=
291
292 # Setting name/domain server causes /etc/resolv.conf to be overwritten
293 # Note that if DHCP is used, and you want this to take precedence then
294 # please put -R in your dhcpcd options
295 #dns_servers_SSID="192.168.0.1 192.168.0.2"
296 #dns_domain_SSID="some.domain"
297 #dns_search_path_SSID="search.this.domain search.that.domain"
298 # Please check the man page for resolv.conf for more information
299 # as domain and search (searchdomains) are mutually exclusive and
300 # searchdomains takes precedence
301
302 # You can also set any of the /etc/conf.d/net variables per MAC address
303 # incase you use Access Points with the same SSID but need different
304 # networking configs. Below is an example - of course you use the same
305 # method with other variables
306 #config_001122334455="dhcp"
307 #dhcpcd_001122334455="-t 10"
308 #dns_servers_001122334455="192.168.0.1 192.168.0.2"
309
310 # Map a MAC address to an SSID
311 # This is used when the Access Point is not broadcasting it's SSID
312 # WARNING: This will override the SSID being broadcast due to some
313 # Access Points sending an SSID even when they have been configured
314 # not to!
315 # Change 001122334455 to the MAC address and SSID to the SSID
316 # it should map to
317 #mac_essid_001122334455="SSID"
318
319 # This lists the preferred SSIDs to connect to in order
320 # SSID's can contain any characters here as they must match the broadcast
321 # SSID exactly.
322 # Surround each SSID with the " character and seperate them with a space
323 # If the first SSID isn't found then it moves onto the next
324 # If this isn't defined then it connects to the first one found
325 #preferred_aps="'SSID 1' 'SSID 2'"
326
327 # You can also define a preferred_aps list per interface
328 #preferred_aps_eth0="'SSID 3' 'SSID 4'"
329
330 # You can also say whether we only connect to preferred APs or not
331 # Values are "any", "preferredonly", "forcepreferred", "forcepreferredonly" and "forceany"
332 # "any" means it will connect to visible APs in the preferred list and then any
333 # other available AP
334 # "preferredonly" means it will only connect to visible APs in the preferred list
335 # "forcepreferred" means it will forceably connect to APs in order if it does not find
336 # them in a scan
337 # "forcepreferredonly" means it forceably connects to the APs in order and does not bother
338 # to scan
339 # "forceany" does the same as forcepreferred + connects to any other available AP
340 # Default is "any"
341 #associate_order="any"
342 #associate_order_eth0="any"
343
344 # You can define blacklisted Access Points in the same way
345 #blacklist_aps="'SSID 1' 'SSID 2'"
346 #blacklist_aps_eth0="'SSID 3' 'SSID 4'"
347
348 # If you have more than one wireless card, you can say if you want
349 # to allow each card to associate with the same Access Point or not
350 # Values are "yes" and "no"
351 # Default is "yes"
352 #unique_ap="yes"
353 #unique_ap_eth0="yes"
354
355 # IMPORTANT: preferred_only, blacklisted_aps and unique_ap only work when
356 # essid_eth0 is not set and your card is capable of scanning
357
358 # NOTE: preferred_aps list ignores blacklisted_aps - so if you have
359 # the same SSID in both, well, you're a bit silly :p
360
361
362 ############################################################
363 # wpa_supplicant
364 # emerge net-wireless/wpa-supplicant
365 # Wireless options are held in /etc/wpa_supplicant/wpa_supplicant.conf
366 # Console the wpa_supplicant.conf.example that is installed in
367 # /usr/share/doc/wpa_supplicant
368 # To configure wpa_supplicant
369 #wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
370 # Consult wpa_supplicant for more drivers - the default is -Dwext which should
371 # work for most cards.
372
373 # By default we don't wait for wpa_suppliant to associate and authenticate.
374 # If you need to change this behaviour then you don't know how our scripts work
375 # and setting this value could cause strange things to happen.
376 # If you would like to, so can specify how long in seconds.
377 #associate_timeout_eth0=60
378 # A value of 0 means wait forever.
379
380 # You can also override any settings found here per SSID - which is very
381 # handy if you use different networks a lot. See below for using the SSID
382 # in our variables
383 #config_SSID="dhcp"
384 # See the System module below for setting dns/nis/ntp per SSID
385
386 # You can also override any settings found here per MAC address of the AP
387 # in case you use Access Points with the same SSID but need different
388 # networking configs. Below is an example - of course you use the same
389 # method with other variables
390 #mac_config_001122334455="dhcp"
391 #mac_dns_servers_001122334455="192.168.0.1 192.168.0.2"
392
393 # When an interface has been associated with an Access Point, a global
394 # variable called SSID is set to the Access Point's SSID for use in the
395 # pre/post user functions below (although it's not available in preup as you
396 # won't have associated then)
397
398 # If you're using anything else to configure wireless on your interface AND
399 # you have installed wpa_supplicant, you need to disable wpa_supplicant
400 #modules="!iwconfig !wpa_supplicant"
401 #or
402 #modules="!wireless"
403
404 ##############################################################################
405 # WIRELESS SSID IN VARIABLES
406 ##############################################################################
407 # Remember to change SSID to your SSID.
408 # Say that your SSID is My NET - the line
409 # #key_SSID="s:passkey"
410 # becomes
411 # #key_My_NET="s:passkey"
412 # Notice that the space has changed to an underscore - do the same with all
413 # characters not in a-z A-Z (English alphabet) 0-9. This only applies to
414 # variables and not values.
415 #
416 # Any SSID's in values like essid_eth0="My NET" may need to be escaped
417 # This means placing the character \ before the character
418 # \" need to be escaped for example
419 # So if your SSID is
420 # My "\ NET
421 # it becomes
422 # My \"\\ NET
423 # for example
424 # #essid_eth0="My\"\\NET"
425 #
426 # So using the above we can use
427 # #dns_domain_My____NET="My\"\\NET"
428 # which is an invalid dns domain, but shows the how to use the variable
429 # structure
430 #########################################################
431
432
433 #-----------------------------------------------------------------------------
434 # DHCP
435 # DHCP can be provided by dhclient, dhcpcd, pump or udhcpc.
436 #
437 # dhclient: emerge net-misc/dhcp
438 # dhcpcd: emerge net-misc/dhcpcd
439 # pump: emerge net-misc/pump
440 # udhcpc: emerge net-misc/udhcp
441
442 # If you have more than one DHCP client installed, you need to specify which
443 # one to use - otherwise we default to dhcpcd if available.
444 #modules=( "dhclient" ) # to select dhclient over dhcpcd
445 #
446 # Notes:
447 # - All clients send the current hostname to the DHCP server by default
448 # - dhcpcd does not daemonize when the lease time is infinite
449 # - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
450 # - pump does not support getting NIS servers
451 # - DHCP tends to erase any existing device information - so add
452 # static addresses after dhcp if you need them
453 # - dhclient and udhcpc can set other resolv.conf options such as "option"
454 # and "sortlist"- see the System module for more details
455
456 # Regardless of which DHCP client you prefer, you configure them the
457 # same way using one of following depending on which interface modules
458 # you're using.
459 #config_eth0="dhcp"
460
461 # For passing custom options to dhcpcd use something like the following. This
462 # example reduces the timeout for retrieving an address from 60 seconds (the
463 # default) to 10 seconds.
464 #dhcpcd_eth0="-t 10"
465
466 # dhclient, udhcpc and pump don't have many runtime options
467 # You can pass options to them in a similar manner to dhcpcd though
468 #dhclient_eth0="..."
469 #udhcpc_eth0="..."
470 #pump_eth0="..."
471
472 # GENERIC DHCP OPTIONS
473 # Set generic DHCP options like so
474 #dhcp_eth0="release nodns nontp nonis nogateway nosendhost"
475
476 # This tells the dhcp client to release it's lease when it stops, not to
477 # overwrite dns, ntp and nis settings, not to set a default route and not to
478 # send the current hostname to the dhcp server and when it starts.
479 # You can use any combination of the above options - the default is not to
480 # use any of them.
481
482 #-----------------------------------------------------------------------------
483 # For APIPA support, emerge net-misc/iputils or net-analyzer/arping
484
485 # APIPA is a module that tries to find a free address in the range
486 # 169.254.0.0-169.254.255.255 by arping a random address in that range on the
487 # interface. If no reply is found then we assign that address to the interface
488
489 # This is only useful for LANs where there is no DHCP server and you don't
490 # connect directly to the internet.
491 #config_eth0="dhcp"
492 #fallback_eth0="apipa"
493
494 #-----------------------------------------------------------------------------
495 # ARPING Gateway configuration
496 # and
497 # Automatic Private IP Addressing (APIPA)
498 # For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
499 #
500 # This is a module that tries to find a gateway IP. If it exists then we use
501 # that gateways configuration for our own. For the configuration variables
502 # simply ensure that each octet is zero padded and the dots are removed.
503 # Below is an example.
504 #
505 #gateways_eth0="192.168.0.1 10.0.0.1"
506 #config_192168000001="192.168.0.2/24"
507 #routes_192168000001="'default via 192.168.0.1'"
508 #dns_servers_192168000001="192.168.0.1"
509 #config_010000000001="10.0.0.254/8"
510 #routes_010000000001="default via 10.0.0.1"
511 #dns_servers_010000000001="10.0.0.1"
512
513 # We can also specify a specific MAC address for each gateway if different
514 # networks have the same gateway.
515 #gateways_eth0="192.168.0.1,00:11:22:AA:BB:CC 10.0.0.1,33:44:55:DD:EE:FF"
516 #config_192168000001_001122AABBCC="192.168.0.2/24"
517 #routes_192168000001_001122AABBCC="default via 192.168.0.1"
518 #dns_servers_192168000001_001122AABBCC="192.168.0.1"
519 #config_010000000001_334455DDEEFF="10.0.0.254/8"
520 #routes_010000000001_334455DDEEFF="default via 10.0.0.1"
521 #dns_servers_010000000001_334455DDEEFF="10.0.0.1"
522
523 # If we don't find any gateways (or there are none configured) then we try and
524 # use APIPA to find a free address in the range 169.254.0.0-169.254.255.255
525 # by arping a random address in that range on the interface. If no reply is
526 # found then we assign that address to the interface.
527
528 # This is only useful for LANs where there is no DHCP server.
529 #config_eth0="arping"
530
531 # or if no DHCP server can be found
532 #config_eth0="dhcp"
533 #fallback_eth0="arping"
534
535 # NOTE: We default to sleeping for 1 second the first time we attempt an
536 # arping to give the interface time to settle on the LAN. This appears to
537 # be a good default for most instances, but if not you can alter it here.
538 #arping_sleep=5
539 #arping_sleep_lan=7
540
541 # NOTE: We default to waiting 3 seconds to get an arping response. You can
542 # change the default wait like so.
543 #arping_wait=3
544 #arping_wait_lan=2
545
546 #-----------------------------------------------------------------------------
547 # VLAN (802.1q support)
548 # For VLAN support, emerge net-misc/vconfig
549
550 # Specify the VLAN numbers for the interface like so
551 # Please ensure your VLAN IDs are NOT zero-padded
552 #vlans_eth0="1 2"
553
554 # You may not want to assign an IP the the physical interface, but we still
555 # need it up.
556 #config_eth0="null"
557
558 # You can also configure the VLAN - see for vconfig man page for more details
559 #vconfig_eth0="'set_name_type VLAN_PLUS_VID_NO_PAD'"
560 #vconfig_vlan1="'set_flag 1' 'set_egress_map 2 6'"
561 #config_vlan1="'172.16.3.1 netmask 255.255.254.0'"
562 #config_vlan2="'172.16.2.1 netmask 255.255.254.0'"
563
564 # NOTE: Vlans can be configured with a . in their interface names
565 # When configuring vlans with this name type, you need to replace . with a _
566 #config_eth0.1="dhcp" - does not work
567 #config_eth0_1="dhcp" - does work
568
569 # NOTE: Vlans are controlled by their physical interface and not per vlan
570 # This means you do not need to create init scripts in /etc/init.d for each
571 # vlan, you must need to create one for the physical interface.
572 # If you wish to control the configuration of each vlan through a separate
573 # script, or wish to rename the vlan interface to something that vconfig
574 # cannot then you need to do this.
575 #vlan_start_eth0="no"
576
577 # If you do the above then you may want to depend on eth0 like so
578 # RC_NEED_vlan1="net.eth0"
579 # NOTE: depend functions only work in /etc/conf.d/net
580 # and not in profile configs such as /etc/conf.d/net.foo
581
582 #-----------------------------------------------------------------------------
583 # Bonding
584 # For link bonding/trunking emerge net-misc/ifenslave
585
586 # To bond interfaces together
587 #slaves_bond0="eth0 eth1 eth2"
588 #config_bond0="null" # You may not want to assign an IP the the bond
589
590 # If any of the slaves require extra configuration - for example wireless or
591 # ppp devices - we need to depend function on the bonded interfaces
592 #RC_NEED_bond0="net.eth0 net.eth1"
593
594
595 #-----------------------------------------------------------------------------
596 # Classical IP over ATM
597 # For CLIP support emerge net-dialup/linux-atm
598
599 # Ensure that you have /etc/atmsigd.conf setup correctly
600 # Now setup each clip interface like so
601 #clip_atm0=( "peer_ip [if.]vpi.vci [opts]" ... )
602 # where "peer_ip" is the IP address of a PVC peer (in case of an ATM connection
603 # with your ISP, your only peer is usually the ISP gateway closest to you),
604 # "if" is the number of the ATM interface which will carry the PVC, "vpi.vci"
605 # is the ATM VC address, and "opts" may optionally specify VC parameters like
606 # qos, pcr, and the like (see "atmarp -s" for further reference). Please also
607 # note quoting: it is meant to distinguish the VCs you want to create. You may,
608 # in example, create an atm0 interface to more peers, like this:
609 #clip_atm0="'1.1.1.254 0.8.35' 1.1.1.253 1.8.35'"
610
611 # By default, the PVC will use the LLC/SNAP encapsulation. If you rather need a
612 # null encapsulation (aka "VC mode"), please add the keyword "null" to opts.
613
614
615 #-----------------------------------------------------------------------------
616 # PPP
617 # For PPP support, emerge net-dialup/ppp
618 # PPP is used for most dialup connections, including ADSL.
619 # The older ADSL module is documented below, but you are encouraged to try
620 # this module first.
621 #
622 # You need to create the PPP net script yourself. Make it like so
623 #ln -s net.lo /etc/init.d/net.ppp0
624 #
625 # Each PPP interface requires an interface to use as a "Link"
626 #link_ppp0="/dev/ttyS0" # Most PPP links will use a serial port
627 #link_ppp0="eth0" # PPPoE requires an ethernet interface
628 #link_ppp0="[itf.]vpi.vci" # PPPoA requires the ATM VC's address
629 #link_ppp0="/dev/null" # ISDN links should have this
630 #link_ppp0="pty 'your_link_command'" # PPP links over ssh, rsh, etc
631 #
632 # Here you should specify what pppd plugins you want to use
633 # Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
634 # radattr, radrealms and winbind
635 #plugins_ppp0="pppoe" # Required plugin for PPPoE
636 #plugins_ppp0="pppoa vc-encaps" # Required plugin for PPPoA with an option
637 #plugins_ppp0="capi" # Required plugin for ISDN
638 #
639 # PPP requires at least a username. You can optionally set a password here too
640 # If you don't, then it will use the password specified in /etc/ppp/*-secrets
641 # against the specified username
642 #username_ppp0='user'
643 #password_ppp0='password'
644 # NOTE: You can set a blank password like so
645 #password_ppp0=
646 #
647 # The PPP daemon has many options you can specify - although there are many
648 # and may seem daunting, it is recommended that you read the pppd man page
649 # before enabling any of them
650 #pppd_ppp0=(
651 # "maxfail 0" # WARNING: It's not recommended you use this
652 # # if you don't specify maxfail then we assume 0
653 # "updetach" # If not set, "/etc/init.d/net.ppp0 start" will return
654 # # immediately, without waiting the link to come up
655 # # for the first time.
656 # # Do not use it for dial-on-demand links!
657 # "debug" # Enables syslog debugging
658 # "noauth" # Do not require the peer to authenticate itself
659 # "defaultroute" # Make this PPP interface the default route
660 # "usepeerdns" # Use the DNS settings provided by PPP
661 #
662 # On demand options
663 # "demand" # Enable dial on demand
664 # "idle 30" # Link goes down after 30 seconds of inactivity
665 # "10.112.112.112:10.112.112.113" # Phony IP addresses
666 # "ipcp-accept-remote" # Accept the peers idea of remote address
667 # "ipcp-accept-local" # Accept the peers idea of local address
668 # "holdoff 3" # Wait 3 seconds after link dies before re-starting
669 #
670 # Dead peer detection
671 # "lcp-echo-interval 15" # Send a LCP echo every 15 seconds
672 # "lcp-echo-failure 3" # Make peer dead after 3 consective
673 # # echo-requests
674 #
675 # Compression options - use these to completely disable compression
676 # noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
677 #
678 # Dial-up settings
679 # "lock" # Lock serial port
680 # "115200" # Set the serial port baud rate
681 # "modem crtscts" # Enable hardware flow control
682 # "192.168.0.1:192.168.0.2" # Local and remote IP addresses
683 #)
684 #
685 # Dial-up PPP users need to specify at least one telephone number
686 #phone_number_ppp0=( "12345689" ) # Maximum 2 phone numbers are supported
687 # They will also need a chat script - here's a good one
688 #chat_ppp0=(
689 # 'ABORT' 'BUSY'
690 # 'ABORT' 'ERROR'
691 # 'ABORT' 'NO ANSWER'
692 # 'ABORT' 'NO CARRIER'
693 # 'ABORT' 'NO DIALTONE'
694 # 'ABORT' 'Invalid Login'
695 # 'ABORT' 'Login incorrect'
696 # 'TIMEOUT' '5'
697 # '' 'ATZ'
698 # 'OK' 'AT' # Put your modem initialization string here
699 # 'OK' 'ATDT\T'
700 # 'TIMEOUT' '60'
701 # 'CONNECT' ''
702 # 'TIMEOUT' '5'
703 # '~--' ''
704 #)
705
706 # If the link require extra configuration - for example wireless or
707 # RFC 268 bridge - we need to depend on the bridge so they get
708 # configured correctly.
709 #RC_NEED_ppp0="net.nas0"
710
711 #WARNING: if MTU of the PPP interface is less than 1500 and you use this
712 #machine as a router, you should add the following rule to your firewall
713 #
714 #iptables -I FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
715
716 #-----------------------------------------------------------------------------
717 # ADSL
718 # For ADSL support, emerge net-dialup/rp-pppoe
719 # WARNING: This ADSL module is being deprecated in favour of the PPP module
720 # above.
721 # You should make the following settings and also put your
722 # username/password information in /etc/ppp/pap-secrets
723
724 # Configure the interface to use ADSL
725 #config_eth0="adsl"
726
727 # You probably won't need to edit /etc/ppp/pppoe.conf if you set this
728 #adsl_user_eth0="my-adsl-username"
729
730 #-----------------------------------------------------------------------------
731 # ISDN
732 # For ISDN support, emerge net-dialup/isdn4k-utils
733 # You should make the following settings and also put your
734 # username/password information in /etc/ppp/pap-secrets
735
736 # Configure the interface to use ISDN
737 #config_ippp0="dhcp"
738 # It's important to specify dhcp if you need it!
739 #config_ippp0="192.168.0.1/24"
740 # Otherwise, you can use a static IP
741
742 # NOTE: The interface name must be either ippp or isdn followed by a number
743
744 # You may need this option to set the default route
745 #ipppd_eth0="defaultroute"
746
747 #-----------------------------------------------------------------------------
748 # MAC changer
749 # To set a specific MAC address
750 #mac_eth0="00:11:22:33:44:55"
751
752 # For changing MAC addresses using the below, emerge net-analyzer/macchanger
753 # - to randomize the last 3 bytes only
754 #mac_eth0="random-ending"
755 # - to randomize between the same physical type of connection (e.g. fibre,
756 # copper, wireless) , all vendors
757 #mac_eth0="random-samekind"
758 # - to randomize between any physical type of connection (e.g. fibre, copper,
759 # wireless) , all vendors
760 #mac_eth0="random-anykind"
761 # - full randomization - WARNING: some MAC addresses generated by this may NOT
762 # act as expected
763 #mac_eth0="random-full"
764 # custom - passes all parameters directly to net-analyzer/macchanger
765 #mac_eth0="some custom set of parameters"
766
767 # You can also set other options based on the MAC address of your network card
768 # Handy if you use different docking stations with laptops
769 #config_001122334455="dhcp"
770
771 #-----------------------------------------------------------------------------
772 # TUN/TAP
773 # For TUN/TAP support emerge net-misc/openvpn or sys-apps/usermode-utilities
774 #
775 # You must specify if we're a tun or tap device. Then you can give it any
776 # name you like - such as vpn
777 #tuntap_vpn="tun"
778 #config_vpn="192.168.0.1/24"
779
780 # Or stick wit the generic names - like tap0
781 #tuntap_tap0="tap"
782 #config_tap0="192.168.0.1/24"
783
784 # For passing custom options to tunctl use something like the following. This
785 # example sets the owner to adm
786 #tunctl_tun1="-u adm"
787 # When using openvpn, there are no options
788
789 #-----------------------------------------------------------------------------
790 # Bridging (802.1d)
791 # For bridging support emerge net-misc/bridge-utils
792
793 # To add ports to bridge br0
794 #bridge_br0="eth0 eth1"
795 # or dynamically add them when the interface comes up
796 #bridge_add_eth0="br0"
797 #bridge_add_eth1="br0"
798
799 # You need to configure the ports to null values so dhcp does not get started
800 #config_eth0="null"
801 #config_eth1="null"
802
803 # Finally give the bridge an address - dhcp or a static IP
804 #config_br0="dhcp" # may not work when adding ports dynamically
805 #config_br0="192.168.0.1/24"
806
807 # If any of the ports require extra configuration - for example wireless or
808 # ppp devices - we need to depend on them like so.
809 #RC_NEED_br0="net.eth0 net.eth1"
810
811 # Below is an example of configuring the bridge
812 # Consult "man brctl" for more details
813 #brctl_br0="'setfd 0' 'sethello 0' 'stp off'"
814
815 #-----------------------------------------------------------------------------
816 # RFC 2684 Bridge Support
817 # For RFC 2684 bridge support emerge net-misc/br2684ctl
818
819 # Interface names have to be of the form nas0, nas1, nas2, etc.
820 # You have to specify a VPI and VCI for the interface like so
821 #br2684ctl_nas0="-a 0.38" # UK VPI and VCI
822
823 # You may want to configure the encapsulation method as well by adding the -e
824 # option to the command above (may need to be before the -a command)
825 # -e 0 # LLC (default)
826 # -e 1 # VC mux
827
828 # Then you can configure the interface as normal
829 #config_nas0="'192.168.0.1/24'"
830
831 #-----------------------------------------------------------------------------
832 # Tunnelling
833 # WARNING: For tunnelling it is highly recommended that you
834 # emerge sys-apps/iproute2
835 #
836 # For GRE tunnels
837 #iptunnel_vpn0="mode gre remote 207.170.82.1 key 0xffffffff ttl 255"
838
839 # For IPIP tunnels
840 #iptunnel_vpn0="mode ipip remote 207.170.82.2 ttl 255"
841
842 # To configure the interface
843 #config_vpn0="'192.168.0.2 pointopoint 192.168.1.2'" # ifconfig style
844 #config_vpn0="'192.168.0.2 peer 192.168.1.1'" # iproute2 style
845
846 # 6to4 Tunnels allow IPv6 to work over IPv4 addresses, provided you
847 # have a non-private address configured on an interface.
848 # link_6to4="eth0" # Interface to base it's addresses on
849 # config_6to4="ip6to4"
850 # You may want to depend on eth0 like so
851 #RC_NEED_6to4="net.eth0"
852 # To ensure that eth0 is configured before 6to4. Of course, the tunnel could be
853 # any name and this also works for any configured interface.
854 # NOTE: If you're not using iproute2 then your 6to4 tunnel has to be called
855 # sit0 - otherwise use a different name like 6to4 in the example above.
856
857 # You can also specify a relay and suffix if you like.
858 # The default relay is 192.88.99.1 and the defualt suffix is :1
859 #relay_6to4="192.168.3.2"
860 #suffix_6to4=":ff"
861
862
863 #-----------------------------------------------------------------------------
864 # System
865 # For configuring system specifics such as domain, dns, ntp and nis servers
866 # It's rare that you would need todo this, but you can anyway.
867 # This is most benefit to wireless users who don't use DHCP so they can change
868 # their configs based on SSID.
869
870 # To use dns settings such as these, dns_servers_eth0 must be set!
871 # If you omit the _eth0 suffix, then it applies to all interfaces unless
872 # overridden by the interface suffix.
873 #dns_domain_eth0="your.domain"
874 #dns_servers_eth0="192.168.0.2 192.168.0.3"
875 #dns_search_eth0="this.domain that.domain"
876 #dns_options_eth0="'timeout 1' rotate"
877 #dns_sortlist_eth0="130.155.160.0/255.255.240.0 130.155.0.0"
878 # See the man page for resolv.conf for details about the options and sortlist
879 # directives
880
881 #ntp_servers_eth0="192.168.0.2 192.168.0.3"
882
883 #nis_domain_eth0="domain"
884 #nis_servers_eth0="192.168.0.2 192.168.0.3"
885
886 # NOTE: Setting any of these will stamp on the files in question. So if you
887 # don't specify dns_servers but you do specify dns_domain then no nameservers
888 # will be listed in /etc/resolv.conf even if there were any there to start
889 # with.
890 # If this is an issue for you then maybe you should look into a resolv.conf
891 # manager like resolvconf-gentoo to manage this file for you. All packages
892 # that baselayout supports use resolvconf-gentoo if installed.
893
894 #-----------------------------------------------------------------------------
895 # Cable in/out detection
896 # Sometimes the cable is in, others it's out. Obviously you don't want to
897 # restart net.eth0 every time when you plug it in either.
898 #
899 # netplug is a package that detects this and requires no extra configuration
900 # on your part.
901 # emerge sys-apps/netplug
902 # or
903 # emerge sys-apps/ifplugd
904 # and you're done :)
905
906 # By default we don't wait for netplug/ifplugd to configure the interface.
907 # If you would like it to wait so that other services now that network is up
908 # then you can specify a timeout here.
909 #plug_timeout="10"
910 # A value of 0 means wait forever.
911
912 # If you don't want to use netplug on a specific interface but you have it
913 # installed, you can disable it for that interface via the modules statement
914 #modules_eth0="!netplugd"
915 # You can do the same for ifplugd
916 #
917 # You can disable them both with the generic plug
918 #modules_eth0="!plug"
919
920 # To use specific ifplugd options, fex specifying wireless mode
921 #ifplugd_eth0="--api-mode=wlan"
922 # man ifplugd for more options
923
924 ##############################################################################
925 # ADVANCED CONFIGURATION
926 #
927 # Four functions can be defined which will be called surrounding the
928 # start/stop operations. The functions are called with the interface
929 # name first so that one function can control multiple adapters. An extra two
930 # functions can be defined when an interface fails to start or stop.
931 #
932 # The return values for the preup and predown functions should be 0
933 # (success) to indicate that configuration or deconfiguration of the
934 # interface can continue. If preup returns a non-zero value, then
935 # interface configuration will be aborted. If predown returns a
936 # non-zero value, then the interface will not be allowed to continue
937 # deconfiguration.
938 #
939 # The return values for the postup, postdown, failup and faildown functions are
940 # ignored since there's nothing to do if they indicate failure.
941 #
942 # ${IFACE} is set to the interface being brought up/down
943 # ${IFVAR} is ${IFACE} converted to variable name bash allows
944
945 #preup() {
946 # # Test for link on the interface prior to bringing it up. This
947 # # only works on some network adapters and requires the mii-diag
948 # # package to be installed.
949 # if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
950 # ewarn "No link on ${IFACE}, aborting configuration"
951 # return 1
952 # fi
953 #
954 # # Test for link on the interface prior to bringing it up. This
955 # # only works on some network adapters and requires the ethtool
956 # # package to be installed.
957 # if ethtool "${IFACE}" | grep -q 'Link detected: no'; then
958 # ewarn "No link on ${IFACE}, aborting configuration"
959 # return 1
960 # fi
961 #
962 #
963 # # Remember to return 0 on success
964 # return 0
965 #}
966
967 #predown() {
968 # # The default in the script is to test for NFS root and disallow
969 # # downing interfaces in that case. Note that if you specify a
970 # # predown() function you will override that logic. Here it is, in
971 # # case you still want it...
972 # if is_net_fs /; then
973 # eerror "root filesystem is network mounted -- can't stop ${IFACE}"
974 # return 1
975 # fi
976 #
977 # # Remember to return 0 on success
978 # return 0
979 #}
980
981 #postup() {
982 # # This function could be used, for example, to register with a
983 # # dynamic DNS service. Another possibility would be to
984 # # send/receive mail once the interface is brought up.
985
986 # # Here is an example that allows the use of iproute rules
987 # # which have been configured using the rules_eth0 variable.
988 # #rules_eth0=" \
989 # # 'from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100' \
990 # # 'from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100' \
991 # #"
992 # eval set -- $\rules_${IFVAR}
993 # if [ -n "$@" ] ; then
994 # einfo "Adding IP policy routing rules"
995 # eindent
996 # # Ensure that the kernel supports policy routing
997 # if ! ip rule list | grep -q "^" ; then
998 # eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
999 # eerror "in your kernel to use ip rules"
1000 # else
1001 # for x in "$@" ; do
1002 # ebegin "${x}"
1003 # ip rule add ${x} dev "${IFACE}"
1004 # eend $?
1005 # done
1006 # fi
1007 # eoutdent
1008 # # Flush the cache
1009 # ip route flush cache dev "${IFACE}"
1010 # fi
1011
1012 #}
1013
1014 #postdown() {
1015 # # Enable Wake-On-LAN for every interface except for lo
1016 # # Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc
1017 # # as well ;)
1018 # [[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol g
1019
1020 # Automatically erase any ip rules created in the example postup above
1021 # if interface_exists "${IFACE}" ; then
1022 # # Remove any rules for this interface
1023 # local rule
1024 # ip rule list | grep " iif ${IFACE}[ ]*" | {
1025 # while read rule ; do
1026 # rule="${rule#*:}"
1027 # ip rule del ${rule}
1028 # done
1029 # }
1030 # # Flush the route cache
1031 # ip route flush cache dev "${IFACE}"
1032 # fi
1033
1034 # # Return 0 always
1035 # return 0
1036 #}
1037
1038 #failup() {
1039 # # This function is mostly here for completeness... I haven't
1040 # # thought of anything nifty to do with it yet ;-)
1041 #}
1042
1043 #faildown() {
1044 # # This function is mostly here for completeness... I haven't
1045 # # thought of anything nifty to do with it yet ;-)
1046 #}

  ViewVC Help
Powered by ViewVC 1.1.20