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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20