/[baselayout]/trunk/net-scripts/conf.d/net.example
Gentoo

Contents of /trunk/net-scripts/conf.d/net.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2050 - (show annotations) (download)
Fri Jun 2 20:02:40 2006 UTC (8 years, 2 months ago) by uberlord
File size: 31538 byte(s)
    Allow LC_* and LANG vars through to runscript.sh by default.

    net.lo now comes after bootmisc, #135118 thanks to Oldrich Jedlicka.

    arping.sh now has MAC address support, #134253 thanks to Oldrich Jedlicka.

    pppd.sh now updates secret files with a blank password, #134337

    Remove swapon call from /sbin/rc as localmount already calls it,
    partial fix for #134489
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 #
10 # WARNING :- some examples have a mixture of IPv4 (ie 192.168.0.1) and IPv6
11 # (ie 4321:0:1:2:3:4:567:89ab) internet addresses. They only work if you have
12 # the relevant kernel option enabled. So if you don't have an IPv6 enabled
13 # kernel then remove the IPv6 address from your config.
14 #
15
16 #
17 # If you want to use a static address or use DHCP explicitly, jump
18 # down to the section labelled INTERFACE HANDLERS.
19 #
20 # If you want to do anything more fancy, you should take the time to
21 # read through the rest of this file.
22
23 ##############################################################################
24 # MODULES
25 #
26 # We now support modular networking scripts which means we can easily
27 # add support for new interface types and modules while keeping
28 # compatability with existing ones.
29 #
30 # Modules load by default if the package they need is installed. If
31 # you specify a module here that doesn't have it's package installed
32 # then you get an error stating which package you need to install.
33 # Ideally, you only use the modules setting when you have two or more
34 # packages installed that supply the same service.
35 #
36 # In other words, you probably should DO NOTHING HERE...
37
38 # Prefer ifconfig over iproute2
39 #modules=( "ifconfig" )
40
41 # You can also specify other modules for an interface
42 # In this case we prefer udhcpc over dhcpcd
43 #modules_eth0=( "udhcpc" )
44
45 # You can also specify which modules not to use - for example you may be
46 # using a supplicant or linux-wlan-ng to control wireless configuration but
47 # you still want to configure network settings per ESSID associated with.
48 #modules=( "!iwconfig" "!wpa_supplicant" )
49 # IMPORTANT: If you need the above, please disable modules in that order
50
51
52 ##############################################################################
53 # INTERFACE HANDLERS
54 #
55 # We provide two interface handlers presently: ifconfig and iproute2.
56 # You need one of these to do any kind of network configuration.
57 # For ifconfig support, emerge sys-apps/net-tools
58 # For iproute2 support, emerge sys-apps/iproute2
59
60 # If you don't specify an interface then we prefer iproute2 if it's installed
61 # To prefer ifconfig over iproute2
62 #modules=( "ifconfig" )
63
64 # For a static configuration, use something like this
65 # (They all do exactly the same thing btw)
66 #config_eth0=( "192.168.0.2/24" )
67 #config_eth0=( "192.168.0.2 netmask 255.255.255.0" )
68
69 # We can also specify a broadcast
70 #config_eth0=( "192.168.0.2/24 brd 192.168.0.255" )
71 #config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" )
72
73 # If you need more than one address, you can use something like this
74 # NOTE: ifconfig creates an aliased device for each extra IPv4 address
75 # (eth0:1, eth0:2, etc)
76 # iproute2 does not do this as there is no need to
77 #config_eth0=(
78 # "192.168.0.2/24"
79 # "192.168.0.3/24"
80 # "192.168.0.4/24"
81 #)
82 # Or you can use sequence expresions
83 #config_eth0=( "192.168.0.{2..4}/24" )
84 # which does the same as above. Be careful though as if you use this and
85 # fallbacks, you have to ensure that both end up with the same number of
86 # values otherwise your fallback won't work correctly.
87
88 # You can also use IPv6 addresses
89 # (you should always specficy a prefix length with IPv6 here)
90 #config_eth0=(
91 # "192.168.0.2/24"
92 # "4321:0:1:2:3:4:567:89ab/64"
93 # "4321:0:1:2:3:4:567:89ac/64"
94 #)
95
96 # If you wish to keep existing addresses + routing and the interface is up,
97 # you can specify a noop (no operation). If the interface is down or there
98 # are no addresses assigned, then we move onto the next step (default dhcp)
99 # This is useful when configuring your interface with a kernel command line
100 # or similar
101 #config_eth0=( "noop" "192.168.0.2/24" )
102
103 # If you don't want ANY address (only useful when calling for advanced stuff)
104 #config_eth0=( "null" )
105
106 # Here's how todo routing if you need it
107 #routes_eth0=(
108 # "default via 192.168.0.1" # IPv4 default route
109 # "10.0.0.0/8 via 192.168.0.1" # IPv4 subnet route
110 # "::/0" # IPv6 unicast
111 #)
112
113 # If a specified module fails (like dhcp - see below), you can specify a
114 # fallback like so
115 #fallback_eth0=( "192.168.0.2 netmask 255.255.255.0" )
116 #fallback_route_eth0=( "default via 192.168.0.1" )
117
118 # NOTE: fallback entry must match the entry location in config_eth0
119 # As such you can only have one fallback route.
120
121 # Some users may need to alter the MTU - here's how
122 #mtu_eth0="1500"
123
124 ##############################################################################
125 # OPTIONAL MODULES
126
127 # INTERFACE RENAMING
128 # There is no consistent device renaming scheme for Linux.
129 # The preferred way of naming devices is via the kernel module directly or
130 # by using udev (http://www.reactivated.net/udevrules.php)
131
132 # If you are unable to write udev rules, then we do provide a way of renaming
133 # the interface based on it's MAC address, but it is not optimal.
134 # Here is how to rename an interface whose MAC address is 00:11:22:33:44:55
135 # to foo1
136 #rename_001122334455="foo1"
137
138 # You can also do this based on current device name - although this is not
139 # recommended. Here we rename eth1 to foo2.
140 #rename_eth1="foo2"
141
142 #-----------------------------------------------------------------------------
143 # WIRELESS (802.11 support)
144 # Wireless can be provided by iwconfig or wpa_supplicant
145
146 # iwconfig
147 # emerge net-wireless/wireless-tools
148 # Wireless options are held in /etc/conf.d/wireless - but could be here too
149 # Consult the sample file /etc/conf.d/wireless.example for instructions
150 # iwconfig is the default
151
152 # wpa_supplicant
153 # emerge net-wireless/wpa-supplicant
154 # Wireless options are held in /etc/wpa_supplicant.conf
155 # Consult the sample file /etc/wpa_supplicant.conf.example for instructions
156 # To choose wpa_supplicant over iwconfig
157 #modules=( "wpa_supplicant" )
158 # To configure wpa_supplicant
159 #wpa_supplicant_eth0="-Dwext" # For generic wireless
160 #wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
161 # Consult wpa_supplicant for more drivers
162 # By default don't wait for wpa_suppliant to associate and authenticate.
163 # If you would like to, so can specify how long in seconds
164 #associate_timeout_eth0=60
165 # A value of 0 means wait forever.
166
167 # GENERIC WIRELESS OPTIONS
168 # PLEASE READ THE INSTRUCTIONS IN /etc/conf.d/wireless.example FOR
169 # HOW TO USE THIS ESSID VARIABLE
170 # You can also override any settings found here per ESSID - which is very
171 # handy if you use different networks a lot
172 #config_ESSID=( "dhcp" )
173 #dhcpcd_ESSID="-t 5"
174
175 # Setting name/domain server causes /etc/resolv.conf to be overwritten
176 # Note that if DHCP is used, and you want this to take precedence then
177 # set dhcp_ESSID="nodns"
178 #dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
179 #dns_domain_ESSID="some.domain"
180 #dns_search_ESSID="search.this.domain search.that.domain"
181 # Please check the man page for resolv.conf for more information
182 # as domain and search are mutually exclusive.
183
184 # You can also override any settings found here per MAC address of the AP
185 # incase you use Access Points with the same ESSID but need different
186 # networking configs. Below is an example - of course you use the same
187 # method with other variables
188 #mac_config_001122334455=( "dhcp" )
189 #mac_dhcpcd_001122334455="-t 10"
190 #mac_dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
191
192 # When an interface has been associated with an Access Point, a global
193 # variable called ESSID is set to the Access Point's ESSID for use in the
194 # pre/post user functions below (although it's not available in preup as you
195 # won't have associated then)
196
197 # If you're using anything else to configure wireless on your interface AND
198 # you have installed any of the above packages, you need to disable them
199 #modules=( "!iwconfig" "!wpa_supplicant" )
200
201 #-----------------------------------------------------------------------------
202 # DHCP
203 # DHCP can be provided by dhclient, dhcpcd, pump or udhcpc.
204 #
205 # dhclient: emerge net-misc/dhcp
206 # dhcpcd: emerge net-misc/dhcpcd
207 # pump: emerge net-misc/pump
208 # udhcpc: emerge net-misc/udhcp
209
210 # If you have more than one DHCP client installed, you need to specify which
211 # one to use - otherwise we default to dhcpcd if available.
212 #modules=( "dhclient" ) # to select dhclient over dhcpcd
213 #
214 # Notes:
215 # - All clients send the current hostname to the DHCP server by default
216 # - dhcpcd does not daemonize when the lease time is infinite
217 # - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
218 # - pump does not support getting NIS servers
219 # - DHCP tends to erase any existing device information - so add
220 # static addresses after dhcp if you need them
221 # - dhclient and udhcpc can set other resolv.conf options such as "option"
222 # and "sortlist"- see the System module for more details
223
224 # Regardless of which DHCP client you prefer, you configure them the
225 # same way using one of following depending on which interface modules
226 # you're using.
227 #config_eth0=( "dhcp" )
228
229 # For passing custom options to dhcpcd use something like the following. This
230 # example reduces the timeout for retrieving an address from 60 seconds (the
231 # default) to 10 seconds.
232 #dhcpcd_eth0="-t 10"
233
234 # dhclient, udhcpc and pump don't have many runtime options
235 # You can pass options to them in a similar manner to dhcpcd though
236 #dhclient_eth0="..."
237 #udhcpc_eth0="..."
238 #pump_eth0="..."
239
240 # GENERIC DHCP OPTIONS
241 # Set generic DHCP options like so
242 #dhcp_eth0="release nodns nontp nonis nogateway nosendhost"
243
244 # This tells the dhcp client to release it's lease when it stops, not to
245 # overwrite dns, ntp and nis settings, not to set a default route and not to
246 # send the current hostname to the dhcp server and when it starts.
247 # You can use any combination of the above options - the default is not to
248 # use any of them.
249
250 #-----------------------------------------------------------------------------
251 # For APIPA support, emerge net-misc/iputils or net-analyzer/arping
252
253 # APIPA is a module that tries to find a free address in the range
254 # 169.254.0.0-169.254.255.255 by arping a random address in that range on the
255 # interface. If no reply is found then we assign that address to the interface
256
257 # This is only useful for LANs where there is no DHCP server and you don't
258 # connect directly to the internet.
259 #config_eth0=( "dhcp" )
260 #fallback_eth0=( "apipa" )
261
262 #-----------------------------------------------------------------------------
263 # ARPING Gateway configuration
264 # and
265 # Automatic Private IP Addressing (APIPA)
266 # For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
267 #
268 # This is a module that tries to find a gateway IP. If it exists then we use
269 # that gateways configuration for our own. For the configuration variables
270 # simply ensure that each ocet is zero padded and the dots are removed.
271 # Below is an example.
272 #
273 #gateways_eth0="192.168.0.1 10.0.0.1"
274 #config_192168000001=( "192.168.0.2/24" )
275 #routes_192168000001=( "default via 192.168.0.1" )
276 #dns_servers_192168000001=( "192.168.0.1" )
277 #config_010000000001=( "10.0.0.254/8" )
278 #routes_010000000001=( "default via 10.0.0.1" )
279 #dns_servers_010000000001=( "10.0.0.1" )
280
281 # We can also specify a specific MAC address for each gateway if different
282 # networks have the same gateway.
283 #gateways_eth0="192.168.0.1,00:11:22:AA:BB:CC 10.0.0.1,33:44:55:DD:EE:FF"
284 #config_192168000001_001122AABBCC=( "192.168.0.2/24" )
285 #routes_192168000001_001122AABBCC=( "default via 192.168.0.1" )
286 #dns_servers_192168000001_001122AABBCC=( "192.168.0.1" )
287 #config_010000000001_334455DDEEFF=( "10.0.0.254/8" )
288 #routes_010000000001_334455DDEEFF=( "default via 10.0.0.1" )
289 #dns_servers_010000000001_334455DDEEFF=( "10.0.0.1" )
290
291 # If we don't find any gateways (or there are none configured) then we try and
292 # use APIPA to find a free address in the range 169.254.0.0-169.254.255.255
293 # by arping a random address in that range on the interface. If no reply is
294 # found then we assign that address to the interface.
295
296 # This is only useful for LANs where there is no DHCP server.
297 #config_eth0=( "arping" )
298
299 # or if no DHCP server can be found
300 #config_eth0=( "dhcp" )
301 #fallback_eth0=( "arping" )
302
303 # NOTE: We default to sleeping for 1 second the first time we attempt an
304 # arping to give the interface time to settle on the LAN. This appears to
305 # be a good default for most instances, but if not you can alter it here.
306 #arping_sleep=5
307 #arping_sleep_lan=7
308
309 # NOTE: We default to waiting 3 seconds to get an arping response. You can
310 # change the default wait like so.
311 #arping_wait=3
312 #arping_wait_lan=2
313
314 #-----------------------------------------------------------------------------
315 # VLAN (802.1q support)
316 # For VLAN support, emerge net-misc/vconfig
317
318 # Specify the VLAN numbers for the interface like so
319 # Please ensure your VLAN IDs are NOT zero-padded
320 #vlans_eth0="1 2"
321
322 # You may not want to assign an IP the the physical interface, but we still
323 # need it up.
324 #config_eth0=( "null" )
325
326 # You can also configure the VLAN - see for vconfig man page for more details
327 #vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" )
328 #vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" )
329 #config_vlan1=( "172.16.3.1 netmask 255.255.254.0" )
330 #config_vlan2=( "172.16.2.1 netmask 255.255.254.0" )
331
332 # NOTE: Vlans can be configured with a . in their interface names
333 # When configuring vlans with this name type, you need to replace . with a _
334 #config_eth0.1=( "dhcp" ) - does not work
335 #config_eth0_1=( "dhcp" ) - does work
336
337 # NOTE: Vlans are controlled by their physical interface and not per vlan
338 # This means you do not need to create init scripts in /etc/init.d for each
339 # vlan, you must need to create one for the physical interface.
340 # If you wish to control the configuration of each vlan through a seperate
341 # script, or wish to rename the vlan interface to something that vconfig
342 # cannot then you need to do this.
343 #vlan_start_eth0="no
344
345 # If you do the above then you may want to depend on eth0 like so
346 # depend_vlan1() {
347 # need net.eth0
348 # }
349
350 #-----------------------------------------------------------------------------
351 # Bonding
352 # For link bonding/trunking emerge net-misc/ifenslave
353
354 # To bond interfaces together
355 #slaves_bond0="eth0 eth1 eth2"
356 #config_bond0=( "null" ) # You may not want to assign an IP the the bond
357
358 # If any of the slaves require extra configuration - for example wireless or
359 # ppp devices - we need to write a depend function for the bond so they get
360 # configured correctly.
361 # This is exactly the same as a depend() function in our init scripts
362 #depend_br0() {
363 # need net.eth0 net.eth1
364 #}
365
366
367 #-----------------------------------------------------------------------------
368 # PPP
369 # For PPP support, emerge net-dialup/ppp
370 # PPP is used for most dialup connections, including ADSL.
371 # The older ADSL module is documented below, but you are encouraged to try
372 # this module first.
373 #
374 # You need to create the PPP net script yourself. Make it like so
375 #cd /etc/init.d
376 #ln -s net.lo net.ppp0
377 #
378 # We have to instruct ppp0 to actually use ppp
379 #config_ppp0=( "ppp" )
380 #
381 # Each PPP interface requires an interface to use as a "Link"
382 #link_ppp0="/dev/ttyS0" # Most PPP links will use a serial port
383 #link_ppp0="eth0" # PPPoE requires an ethernet interface
384 #link_ppp0="/dev/null" # PPPoA and ISDN links should have this
385 #link_ppp0="pty 'your_link_command'" # PPP links over ssh, rsh, etc
386 #
387 # Here you should specify what pppd plugins you want to use
388 # Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
389 # radattr, radrealms and winbind
390 #plugins_ppp0=(
391 # "pppoe" # Required plugin for PPPoE
392 # "pppoa" # Required plugin for PPPoA
393 # "capi" # Required plugin for ISDN
394 #)
395 #
396 # PPP requires at least a username. You can optionally set a password here too
397 # If you don't, then it will use the password specified in /etc/ppp/*-secrets
398 # against the specified username
399 #username_ppp0='user'
400 #password_ppp0='password'
401 #
402 # NOTE: You can set a blank password like so
403 #password_ppp0=
404 #
405 # The PPP daemon has many options you can specify - although there are many
406 # and may seem daunting, it is recommended that you read the pppd man page
407 # before enabling any of them
408 #pppd_ppp0=(
409 # "updetach" # WARNING: If you don't specify this then we will
410 # # not wait for the actual PPP link to go up
411 # "maxfail 0" # WARNING: It's not recommended you use change this
412 # # if you don't specify maxfail then we assume 0
413 # "debug" # Enables syslog debugging
414 # "noauth" # Do not require the peer to authenticate itself
415 # "defaultroute" # Make this PPP interface the default route
416 # "usepeerdns" # Use the DNS settings provided by PPP
417 #
418 # On demand options
419 # "demand" # Enable dial on demand
420 # "idle 30" # Link goes down after 30 seconds of inactivity
421 # "10.112.112.112:10.112.112.113" # Phony IP addresses
422 # "ipcp-accept-remote" # Accept the peers idea of remote address
423 # "ipcp-accept-local" # Accept the peers idea of local address
424 # "holdoff 3" # Wait 3 seconds after link dies before re-starting
425 #
426 # Dead peer detection
427 # "lcp-echo-interval 15" # Send a LCP echo every 15 seconds
428 # "lcp-echo-failure 3" # Make peer dead after 3 consective
429 # # echo-requests
430 #
431 # Compression options - use these to completely disable compression
432 # noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
433 #
434 # Dial-up settings
435 # "lock" # Lock serial port
436 # "115200" # Set the serial port baud rate
437 # "modem crtscts" # Enable hardware flow control
438 # "192.168.0.1:192.168.0.2" # Local and remote IP addresses
439 #)
440 #
441 # Dial-up PPP users need to specify at least one telephone number
442 #phone_number_ppp0=( "12345689" ) # Maximum 2 phone numbers are supported
443 # They will also need a chat script - here's a good one
444 #chat_ppp0=(
445 # 'ABORT' 'BUSY'
446 # 'ABORT' 'ERROR'
447 # 'ABORT' 'NO ANSWER'
448 # 'ABORT' 'NO CARRIER'
449 # 'ABORT' 'NO DIALTONE'
450 # 'ABORT' 'Invalid Login'
451 # 'ABORT' 'Login incorrect'
452 # 'TIMEOUT' '5'
453 # '' 'ATZ'
454 # 'OK' 'AT' # Put your modem initialization string here
455 # 'OK' 'ATDT\T'
456 # 'TIMEOUT' '60'
457 # 'CONNECT' ''
458 # 'TIMEOUT' '5'
459 # '~--' ''
460 #)
461
462 # If the link require extra configuration - for example wireless or
463 # RFC 268 bridge - we need to write a depend function for the bridge so they get
464 # configured correctly.
465 # This is exactly the same as a depend() function in our init scripts
466 #depend_ppp0() {
467 # need net.nas0
468 #}
469
470 #-----------------------------------------------------------------------------
471 # ADSL
472 # For ADSL support, emerge net-dialup/rp-pppoe
473 # WARNING: This ADSL module is being deprecated in favour of the PPP module
474 # above.
475 # You should make the following settings and also put your
476 # username/password information in /etc/ppp/pap-secrets
477
478 # Configure the interface to use ADSL
479 #config_eth0=( "adsl" )
480
481 # You probably won't need to edit /etc/ppp/pppoe.conf if you set this
482 #adsl_user_eth0="my-adsl-username"
483
484 #-----------------------------------------------------------------------------
485 # ISDN
486 # For ISDN support, emerge net-dialup/isdn4k-utils
487 # You should make the following settings and also put your
488 # username/password information in /etc/ppp/pap-secrets
489
490 # Configure the interface to use ISDN
491 #config_ippp0=( "dhcp" )
492 # It's important to specify dhcp if you need it!
493 #config_ippp0=( "192.168.0.1/24" )
494 # Otherwise, you can use a static IP
495
496 # NOTE: The interface name must be either ippp or isdn followed by a number
497
498 # You may need this option to set the default route
499 #ipppd_eth0="defaultroute"
500
501 #-----------------------------------------------------------------------------
502 # MAC changer
503 # To set a specific MAC address
504 #mac_eth0="00:11:22:33:44:55"
505
506 # For changing MAC addresses using the below, emerge net-analyzer/macchanger
507 # - to randomize the last 3 bytes only
508 #mac_eth0="random-ending"
509 # - to randomize between the same physical type of connection (eg fibre,
510 # copper, wireless) , all vendors
511 #mac_eth0="random-samekind"
512 # - to randomize between any physical type of connection (eg fibre, copper,
513 # wireless) , all vendors
514 #mac_eth0="random-anykind"
515 # - full randomization - WARNING: some MAC addresses generated by this may NOT
516 # act as expected
517 #mac_eth0="random-full"
518 # custom - passes all parameters directly to net-analyzer/macchanger
519 #mac_eth0="some custom set of parameters"
520
521 # You can also set other options based on the MAC address of your network card
522 # Handy if you use different docking stations with laptops
523 #config_001122334455=( "dhcp" )
524
525 #-----------------------------------------------------------------------------
526 # TUN/TAP
527 # For TUN/TAP support emerge net-misc/openvpn or sys-apps/usermode-utilities
528 #
529 # You must specify if we're a tun or tap device. Then you can give it any
530 # name you like - such as vpn
531 #tuntap_vpn="tun"
532 #config_tun1=( "192.168.0.1/24")
533
534 # Or stick wit the generic names - like tap0
535 #tuntap_tap0="tap"
536 #config_tap0=( "192.168.0.1/24")
537
538 # For passing custom options to tunctl use something like the following. This
539 # example sets the owner to adm
540 #tunctl_tun1="-u adm"
541 # When using openvpn, there are no options
542
543 #-----------------------------------------------------------------------------
544 # Bridging (802.1d)
545 # For bridging support emerge net-misc/bridge-utils
546
547 # To add ports to bridge br0
548 #bridge_br0="eth0 eth1"
549 # or dynamically add them when the interface comes up
550 #bridge_add_eth0="br0"
551 #bridge_add_eth1="br0"
552
553 # You need to configure the ports to null values so dhcp does not get started
554 #config_eth0=( "null" )
555 #config_eth1=( "null" )
556
557 # Finally give the bridge an address - dhcp or a static IP
558 #config_br0=( "dhcp" ) # may not work when adding ports dynamically
559 #config_br0=( "192.168.0.1/24" )
560
561 # If any of the ports require extra configuration - for example wireless or
562 # ppp devices - we need to write a depend function for the bridge so they get
563 # configured correctly.
564 # This is exactly the same as a depend() function in our init scripts
565 #depend_br0() {
566 # need net.eth0 net.eth1
567 #}
568
569 # NOTE: This creates an interface called br0 - you can give the interface
570 # any name you like
571
572 # Below is an example of configuring the bridge
573 # Consult "man brctl" for more details
574 #brctl_br0=( "setfd 0" "sethello 0" "stp off" )
575
576 #-----------------------------------------------------------------------------
577 # RFC 2684 Bridge Support
578 # For RFC 2684 bridge support emerge net-misc/br2684ctl
579
580 # Interface names have to be of the form nas0, nas1, nas2, etc.
581 # You have to specify a VPI and VCI for the interface like so
582 #br2684ctl_nas0="-a 0.38" # UK VPI and VCI
583
584 # You may want to configure the encapulation method as well by adding the -e
585 # option to the command above (may need to be before the -a command)
586 # -e 0 # LLC (default)
587 # -e 1 # VC mux
588
589 # Then you can configure the interface as normal
590 #config_nas0=( "192.168.0.1/24" )
591
592 #-----------------------------------------------------------------------------
593 # Tunnelling
594 # WARNING: For tunnelling it is highly recommended that you
595 # emerge sys-apps/iproute2
596 #
597 # For GRE tunnels
598 #iptunnel_vpn0="mode gre remote 207.170.82.1 key 0xffffffff ttl 255"
599
600 # For IPIP tunnels
601 #iptunnel_vpn0="mode ipip remote 207.170.82.2 ttl 255"
602
603 # To configure the interface
604 #config_vpn0=( "192.168.0.2 pointopoint 192.168.1.2" ) # ifconfig style
605 #config_vpn0=( "192.168.0.2 peer 192.168.1.1" ) # iproute2 style
606
607 # 6to4 Tunnels allow IPv6 to work over IPv4 addresses, provided you
608 # have a non-private address configured on an interface.
609 # link_6to4="eth0" # Interface to base it's addresses on
610 # config_6to4=( "ip6to4" )
611 # You may want to depend on eth0 like so
612 # depend_6to4() {
613 # need net.eth0
614 # }
615 # To ensure that eth0 is configured before 6to4. Of course, the tunnel could be
616 # any name and this also works for any configured interface.
617 # NOTE: If you're not using iproute2 then your 6to4 tunnel has to be called
618 # sit0 - otherwise use a different name like 6to4 in the example above.
619
620 #-----------------------------------------------------------------------------
621 # System
622 # For configuring system specifics such as domain, dns, ntp and nis servers
623 # It's rare that you would need todo this, but you can anyway.
624 # This is most benefit to wireless users who don't use DHCP so they can change
625 # their configs based on ESSID. See wireless.example for more details
626
627 # To use dns settings such as these, dns_servers_eth0 must be set!
628 # If you omit the _eth0 suffix, then it applies to all interfaces unless
629 # overridden by the interface suffix.
630 #dns_domain_eth0="your.domain"
631 #dns_servers_eth0="192.168.0.2 192.168.0.3"
632 #dns_search_eth0="this.domain that.domain"
633 #dns_options_eth0=( "timeout 1" "rotate" )
634 #dns_sortlist_eth0="130.155.160.0/255.255.240.0 130.155.0.0"
635 # See the man page for resolv.conf for details about the options and sortlist
636 # directives
637
638 #ntp_servers_eth0="192.168.0.2 192.168.0.3"
639
640 #nis_domain_eth0="domain"
641 #nis_servers_eth0="192.168.0.2 192.168.0.3"
642
643 #-----------------------------------------------------------------------------
644 # Cable in/out detection
645 # Sometimes the cable is in, others it's out. Obviously you don't want to
646 # restart net.eth0 every time when you plug it in either.
647 #
648 # netplug is a package that detects this and requires no extra configuration
649 # on your part.
650 # emerge sys-apps/netplug
651 # or
652 # emerge sys-apps/ifplugd
653 # and you're done :)
654
655 # By default we don't wait for netplug/ifplugd to configure the interface.
656 # If you would like it to wait so that other services now that network is up
657 # then you can specify a timeout here.
658 #plug_timeout="10"
659 # A value of 0 means wait forever.
660
661 # If you don't want to use netplug on a specific interface but you have it
662 # installed, you can disable it for that interface via the modules statement
663 #modules_eth0=( "!netplug" )
664 # You can do the same for ifplugd
665 #
666 # You can disable them both with the generic plug
667 #modules_eth0=( "!plug" )
668
669 # To use specific ifplugd options, fex specifying wiress mode
670 #ifplugd_eth0="--api-mode wlan"
671 # man ifplugd for more options
672
673 ##############################################################################
674 # ADVANCED CONFIGURATION
675 #
676 # Four functions can be defined which will be called surrounding the
677 # start/stop operations. The functions are called with the interface
678 # name first so that one function can control multiple adapters. An extra two
679 # functions can be defined when an interface fails to start or stop.
680 #
681 # The return values for the preup and predown functions should be 0
682 # (success) to indicate that configuration or deconfiguration of the
683 # interface can continue. If preup returns a non-zero value, then
684 # interface configuration will be aborted. If predown returns a
685 # non-zero value, then the interface will not be allowed to continue
686 # deconfiguration.
687 #
688 # The return values for the postup, postdown, failup and faildown functions are
689 # ignored since there's nothing to do if they indicate failure.
690 #
691 # ${IFACE} is set to the interface being brought up/down
692 # ${IFVAR} is ${IFACE} converted to variable name bash allows
693
694 #preup() {
695 # # Test for link on the interface prior to bringing it up. This
696 # # only works on some network adapters and requires the mii-diag
697 # # package to be installed.
698 # if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
699 # ewarn "No link on ${IFACE}, aborting configuration"
700 # return 1
701 # fi
702 #
703 # # Test for link on the interface prior to bringing it up. This
704 # # only works on some network adapters and requires the ethtool
705 # # package to be installed.
706 # if ethtool "${IFACE}" | grep -q 'Link detected: no'; then
707 # ewarn "No link on ${IFACE}, aborting configuration"
708 # return 1
709 # fi
710 #
711 #
712 # # Remember to return 0 on success
713 # return 0
714 #}
715
716 #predown() {
717 # # The default in the script is to test for NFS root and disallow
718 # # downing interfaces in that case. Note that if you specify a
719 # # predown() function you will override that logic. Here it is, in
720 # # case you still want it...
721 # if is_net_fs /; then
722 # eerror "root filesystem is network mounted -- can't stop ${IFACE}"
723 # return 1
724 # fi
725 #
726 # # Remember to return 0 on success
727 # return 0
728 #}
729
730 #postup() {
731 # # This function could be used, for example, to register with a
732 # # dynamic DNS service. Another possibility would be to
733 # # send/receive mail once the interface is brought up.
734
735 # # Here is an example that allows the use of iproute rules
736 # # which have been configured using the rules_eth0 variable.
737 # #rules_eth0=(
738 # # "from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100"
739 # # "from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100"
740 # #)
741 # local x="rules_${IFVAR}[@]"
742 # local -a rules=( "${!x}" )
743 # if [[ -n ${rules} ]] ; then
744 # einfo "Adding IP policy routing rules"
745 # eindent
746 # # Ensure that the kernel supports policy routing
747 # if ! ip rule list | grep -q "^" ; then
748 # eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
749 # eerror "in your kernel to use ip rules"
750 # else
751 # for x in "${rules[@]}" ; do
752 # ebegin "${x}"
753 # ip rule add ${x} dev "${IFACE}"
754 # eend $?
755 # done
756 # fi
757 # eoutdent
758 # # Flush the cache
759 # ip route flush cache dev "${IFACE}"
760 # fi
761
762 #}
763
764 #postdown() {
765 # # Enable Wake-On-LAN for every interface except for lo
766 # # Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc
767 # # as well ;)
768 # [[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol g
769
770 # Automatically erase any ip rules created in the example postup above
771 # if interface_exists "${IFACE}" ; then
772 # # Remove any rules for this interface
773 # local rule
774 # ip rule list | grep " iif ${IFACE}[ ]*" | {
775 # while read rule ; do
776 # rule="${rule#*:}"
777 # ip rule del ${rule}
778 # done
779 # }
780 # # Flush the route cache
781 # ip route flush cache dev "${IFACE}"
782 # fi
783
784 # # Return 0 always
785 # return 0
786 #}
787
788 #failup() {
789 # # This function is mostly here for completeness... I haven't
790 # # thought of anything nifty to do with it yet ;-)
791 #}
792
793 #faildown() {
794 # # This function is mostly here for completeness... I haven't
795 # # thought of anything nifty to do with it yet ;-)
796 #}
797
798 ##############################################################################
799 # FORCING MODULES
800 # The Big Fat Warning :- If you use module forcing do not complain to us or
801 # file bugs about it not working!
802 #
803 # Loading modules is a slow afair - we have to check each one for the following
804 # 1) Code sanity
805 # 2) Has the required package been emerged?
806 # 3) Has it modified anything?
807 # 4) Have all the dependant modules been loaded?
808
809 # Then we have to strip out the conflicting modules based on user preference
810 # and default configuration and sort them into the correct order.
811 # Finally we check the end result for dependancies.
812
813 # This, of course, takes valuable CPU time so we provide module forcing as a
814 # means to speed things up. We still do *some* checking but not much.
815
816 # It is essential that you force modules in the correct order and supply all
817 # the modules you need. You must always supply an interface module - we
818 # supply ifconfig or iproute2.
819
820 # The Big Fat Warning :- If you use module forcing do not complain to us or
821 # file bugs about it not working!
822
823 # Now that we've warned you twice, here's how to do it
824 #modules_force=( "ifconfig" )
825 #modules_force=( "iproute2" "dhcpcd" )
826
827 # We can also apply this to a specific interface
828 #modules_force_eth1=( "iproute2" )
829
830 # The below will not work
831 #modules_force=( "dhcpcd" )
832 # No interface (ifconfig/iproute2)
833 #modules_force=( "ifconfig" "essidnet" "iwconfig" )
834 # Although it will not crash, essidnet will not work as it has to come after
835 # iwconfig
836 #modules_force=( "iproute2" "ifconfig" )
837 # The interface will be setup twice which will cause problems

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20