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

  ViewVC Help
Powered by ViewVC 1.1.20