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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20