Gentoo Archives: gentoo-user-ru

From: marlboro <retaw@××××××.ru>
To: gentoo-user-ru@l.g.o
Subject: Re: [gentoo-user-ru] net.example
Date: Wed, 01 Feb 2012 17:06:33
Message-Id: 4F2970E6.1090908@ufamts.ru
In Reply to: [gentoo-user-ru] net.example by Anton Ananich
1 01.02.2012 23:00, Anton Ananich пишет:
2 > Здравствуйте!
3 >
4 > У меня пропал файл /etc/conf.d/net.example (возможно давно, я просто не заметил)
5 > Откуда его можно скачать?
6 >
7 > Спасибо,
8 > Антон
9
10 # For link bonding/trunking emerge net-misc/ifenslave
11
12 # To bond interfaces together
13 #slaves_bond0="eth0 eth1 eth2"
14 #config_bond0=( "null" ) # You may not want to assign an IP the the bond
15
16 # If any of the slaves require extra configuration - for example wireless or
17 # ppp devices - we need to depend function on the bonded interfaces
18 #RC_NEED_bond0="net.eth0 net.eth1"
19
20
21 #-----------------------------------------------------------------------------
22 # Classical IP over ATM
23 # For CLIP support emerge net-dialup/linux-atm
24
25 # Ensure that you have /etc/atmsigd.conf setup correctly
26 # Now setup each clip interface like so
27 #clip_atm0=( "peer_ip [if.]vpi.vci [opts]" ... )
28 # where "peer_ip" is the IP address of a PVC peer (in case of an ATM
29 connection
30 # with your ISP, your only peer is usually the ISP gateway closest to you),
31 # "if" is the number of the ATM interface which will carry the PVC,
32 "vpi.vci"
33 # is the ATM VC address, and "opts" may optionally specify VC
34 parameters like
35 # qos, pcr, and the like (see "atmarp -s" for further reference).
36 Please also
37 # note quoting: it is meant to distinguish the VCs you want to create.
38 You may,
39 # in example, create an atm0 interface to more peers, like this:
40 #clip_atm0=( "1.1.1.254 0.8.35" "1.1.1.253 1.8.35" )
41
42 # By default, the PVC will use the LLC/SNAP encapsulation. If you
43 rather need a
44 # null encapsulation (aka "VC mode"), please add the keyword "null" to
45 opts.
46
47
48 #-----------------------------------------------------------------------------
49 # PPP
50 # For PPP support, emerge net-dialup/ppp
51 # PPP is used for most dialup connections, including ADSL.
52 # The older ADSL module is documented below, but you are encouraged to try
53 # this module first.
54 #
55 # You need to create the PPP net script yourself. Make it like so
56 #ln -s net.lo /etc/init.d/net.ppp0
57 #
58 # We have to instruct ppp0 to actually use ppp
59 #config_ppp0=( "ppp" )
60 #
61 # Each PPP interface requires an interface to use as a "Link"
62 #link_ppp0="/dev/ttyS0" # Most PPP links will use a serial port
63 #link_ppp0="eth0" # PPPoE requires an ethernet interface
64 #link_ppp0="[itf.]vpi.vci" # PPPoA requires the ATM VC's address
65 #link_ppp0="/dev/null" # ISDN links should have this
66 #link_ppp0="pty 'your_link_command'" # PPP links over ssh, rsh, etc
67 #
68 # Here you should specify what pppd plugins you want to use
69 # Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
70 # radattr, radrealms and winbind
71 #plugins_ppp0=(
72 # "pppoe" # Required plugin for PPPoE
73 # "pppoa vc-encaps" # Required plugin for PPPoA with an option
74 # "capi" # Required plugin for ISDN
75 #)
76 #
77 # PPP requires at least a username. You can optionally set a password
78 here too
79 # If you don't, then it will use the password specified in
80 /etc/ppp/*-secrets
81 # against the specified username
82 #username_ppp0='user'
83 #password_ppp0='password'
84 # NOTE: You can set a blank password like so
85 #password_ppp0=
86 #
87 # The PPP daemon has many options you can specify - although there are many
88 # and may seem daunting, it is recommended that you read the pppd man page
89 # before enabling any of them
90 #pppd_ppp0=(
91 # "maxfail 0" # WARNING: It's not recommended you use this
92 # # if you don't specify maxfail then we assume 0
93 # "updetach" # If not set, "/etc/init.d/net.ppp0 start" will return
94 # # immediately, without waiting the link to come up
95 # # for the first time.
96 # # Do not use it for dial-on-demand links!
97 # "debug" # Enables syslog debugging
98 # "noauth" # Do not require the peer to authenticate itself
99 # "defaultroute" # Make this PPP interface the default route
100 # "usepeerdns" # Use the DNS settings provided by PPP
101 #
102 # On demand options
103 # "demand" # Enable dial on demand
104 # "idle 30" # Link goes down after 30 seconds of inactivity
105 # "10.112.112.112:10.112.112.113" # Phony IP addresses
106 # "ipcp-accept-remote" # Accept the peers idea of remote address
107 # "ipcp-accept-local" # Accept the peers idea of local address
108 # "holdoff 3" # Wait 3 seconds after link dies before re-starting
109 #
110 # Dead peer detection
111 # "lcp-echo-interval 15" # Send a LCP echo every 15 seconds
112 # "lcp-echo-failure 3" # Make peer dead after 3 consective
113 # # echo-requests
114 #
115 # Compression options - use these to completely disable compression
116 # noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
117 #
118 # Dial-up settings
119 # "lock" # Lock serial port
120 # "115200" # Set the serial port baud rate
121 # "modem crtscts" # Enable hardware flow control
122 # "192.168.0.1:192.168.0.2" # Local and remote IP addresses
123 #)
124 #
125 # Dial-up PPP users need to specify at least one telephone number
126 #phone_number_ppp0=( "12345689" ) # Maximum 2 phone numbers are supported
127 # They will also need a chat script - here's a good one
128 #chat_ppp0=(
129 # 'ABORT' 'BUSY'
130 # 'ABORT' 'ERROR'
131 # 'ABORT' 'NO ANSWER'
132 # 'ABORT' 'NO CARRIER'
133 # 'ABORT' 'NO DIALTONE'
134 # 'ABORT' 'Invalid Login'
135 # 'ABORT' 'Login incorrect'
136 # 'TIMEOUT' '5'
137 # '' 'ATZ'
138 # 'OK' 'AT' # Put your modem initialization string here
139 # 'OK' 'ATDT\T'
140 # 'TIMEOUT' '60'
141 # 'CONNECT' ''
142 # 'TIMEOUT' '5'
143 # '~--' ''
144 #)
145
146 # If the link require extra configuration - for example wireless or
147 # RFC 268 bridge - we need to depend on the bridge so they get
148 # configured correctly.
149 #RC_NEED_ppp0="net.nas0"
150
151 #WARNING: if MTU of the PPP interface is less than 1500 and you use this
152 #machine as a router, you should add the following rule to your firewall
153 #
154 #iptables -I FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS
155 --clamp-mss-to-pmtu
156
157 #-----------------------------------------------------------------------------
158 # ADSL
159 # For ADSL support, emerge net-dialup/rp-pppoe
160 # WARNING: This ADSL module is being deprecated in favour of the PPP module
161 # above.
162 # You should make the following settings and also put your
163 # username/password information in /etc/ppp/pap-secrets
164
165 # Configure the interface to use ADSL
166 #config_eth0=( "adsl" )
167
168 # You probably won't need to edit /etc/ppp/pppoe.conf if you set this
169 #adsl_user_eth0="my-adsl-username"
170
171 #-----------------------------------------------------------------------------
172 # ISDN
173 # For ISDN support, emerge net-dialup/isdn4k-utils
174 # You should make the following settings and also put your
175 # username/password information in /etc/ppp/pap-secrets
176
177 # Configure the interface to use ISDN
178 #config_ippp0=( "dhcp" )
179 # It's important to specify dhcp if you need it!
180 #config_ippp0=( "192.168.0.1/24" )
181 # Otherwise, you can use a static IP
182
183 # NOTE: The interface name must be either ippp or isdn followed by a number
184
185 # You may need this option to set the default route
186 #ipppd_eth0="defaultroute"
187
188 #-----------------------------------------------------------------------------
189 # MAC changer
190 # To set a specific MAC address
191 #mac_eth0="00:11:22:33:44:55"
192
193 # For changing MAC addresses using the below, emerge net-analyzer/macchanger
194 # - to randomize the last 3 bytes only
195 #mac_eth0="random-ending"
196 # - to randomize between the same physical type of connection (e.g. fibre,
197 # copper, wireless) , all vendors
198 #mac_eth0="random-samekind"
199 # - to randomize between any physical type of connection (e.g. fibre,
200 copper,
201 # wireless) , all vendors
202 #mac_eth0="random-anykind"
203 # - full randomization - WARNING: some MAC addresses generated by this
204 may NOT
205 # act as expected
206 #mac_eth0="random-full"
207 # custom - passes all parameters directly to net-analyzer/macchanger
208 #mac_eth0="some custom set of parameters"
209
210 # You can also set other options based on the MAC address of your
211 network card
212 # Handy if you use different docking stations with laptops
213 #config_001122334455=( "dhcp" )
214
215 #-----------------------------------------------------------------------------
216 # TUN/TAP
217 # For TUN/TAP support emerge net-misc/openvpn or sys-apps/usermode-utilities
218 #
219 # You must specify if we're a tun or tap device. Then you can give it any
220 # name you like - such as vpn
221 #tuntap_vpn="tun"
222 #config_vpn=( "192.168.0.1/24")
223
224 # Or stick wit the generic names - like tap0
225 #tuntap_tap0="tap"
226 #config_tap0=( "192.168.0.1/24")
227
228 # For passing custom options to tunctl use something like the following.
229 This
230 # example sets the owner to adm
231 #tunctl_tun1="-u adm"
232 # When using openvpn, there are no options
233
234 #-----------------------------------------------------------------------------
235 # Bridging (802.1d)
236 # For bridging support emerge net-misc/bridge-utils
237
238 # To add ports to bridge br0
239 #bridge_br0="eth0 eth1"
240 # or dynamically add them when the interface comes up
241 #bridge_add_eth0="br0"
242 #bridge_add_eth1="br0"
243
244 # You need to configure the ports to null values so dhcp does not get
245 started
246 #config_eth0=( "null" )
247 #config_eth1=( "null" )
248
249 # Finally give the bridge an address - dhcp or a static IP
250 #config_br0=( "dhcp" ) # may not work when adding ports dynamically
251 #config_br0=( "192.168.0.1/24" )
252
253 # If any of the ports require extra configuration - for example wireless or
254 # ppp devices - we need to depend on them like so.
255 #RC_NEED_br0="net.eth0 net.eth1"
256
257 # Below is an example of configuring the bridge
258 # Consult "man brctl" for more details
259 #brctl_br0=( "setfd 0" "sethello 0" "stp off" )
260
261 #-----------------------------------------------------------------------------
262 # RFC 2684 Bridge Support
263 # For RFC 2684 bridge support emerge net-misc/br2684ctl
264
265 # Interface names have to be of the form nas0, nas1, nas2, etc.
266 # You have to specify a VPI and VCI for the interface like so
267 #br2684ctl_nas0="-a 0.38" # UK VPI and VCI
268
269 # You may want to configure the encapsulation method as well by adding
270 the -e
271 # option to the command above (may need to be before the -a command)
272 # -e 0 # LLC (default)
273 # -e 1 # VC mux
274
275 # Then you can configure the interface as normal
276 #config_nas0=( "192.168.0.1/24" )
277
278 #-----------------------------------------------------------------------------
279 # Tunnelling
280 # WARNING: For tunnelling it is highly recommended that you
281 # emerge sys-apps/iproute2
282 #
283 # For GRE tunnels
284 #iptunnel_vpn0="mode gre remote 207.170.82.1 key 0xffffffff ttl 255"
285
286 # For IPIP tunnels
287 #iptunnel_vpn0="mode ipip remote 207.170.82.2 ttl 255"
288
289 # To configure the interface
290 #config_vpn0=( "192.168.0.2 pointopoint 192.168.1.2" ) # ifconfig style
291 #config_vpn0=( "192.168.0.2 peer 192.168.1.1" ) # iproute2 style
292
293 # 6to4 Tunnels allow IPv6 to work over IPv4 addresses, provided you
294 # have a non-private address configured on an interface.
295 # link_6to4="eth0" # Interface to base it's addresses on
296 # config_6to4=( "ip6to4" )
297 # You may want to depend on eth0 like so
298 #RC_NEED_6to4="net.eth0"
299 # To ensure that eth0 is configured before 6to4. Of course, the tunnel
300 could be
301 # any name and this also works for any configured interface.
302 # NOTE: If you're not using iproute2 then your 6to4 tunnel has to be called
303 # sit0 - otherwise use a different name like 6to4 in the example above.
304
305
306 #-----------------------------------------------------------------------------
307 # System
308 # For configuring system specifics such as domain, dns, ntp and nis servers
309 # It's rare that you would need todo this, but you can anyway.
310 # This is most benefit to wireless users who don't use DHCP so they can
311 change
312 # their configs based on ESSID. See wireless.example for more details
313
314 # To use dns settings such as these, dns_servers_eth0 must be set!
315 # If you omit the _eth0 suffix, then it applies to all interfaces unless
316 # overridden by the interface suffix.
317 #dns_domain_eth0="your.domain"
318 #dns_servers_eth0="192.168.0.2 192.168.0.3"
319 #dns_search_eth0="this.domain that.domain"
320 #dns_options_eth0=( "timeout 1" "rotate" )
321 #dns_sortlist_eth0="130.155.160.0/255.255.240.0 130.155.0.0"
322 # See the man page for resolv.conf for details about the options and
323 sortlist
324 # directives
325
326 #ntp_servers_eth0="192.168.0.2 192.168.0.3"
327
328 #nis_domain_eth0="domain"
329 #nis_servers_eth0="192.168.0.2 192.168.0.3"
330
331 # NOTE: Setting any of these will stamp on the files in question. So if you
332 # don't specify dns_servers but you do specify dns_domain then no
333 nameservers
334 # will be listed in /etc/resolv.conf even if there were any there to start
335 # with.
336 # If this is an issue for you then maybe you should look into a resolv.conf
337 # manager like resolvconf-gentoo to manage this file for you. All packages
338 # that baselayout supports use resolvconf-gentoo if installed.
339
340 #-----------------------------------------------------------------------------
341 # Cable in/out detection
342 # Sometimes the cable is in, others it's out. Obviously you don't want to
343 # restart net.eth0 every time when you plug it in either.
344 #
345 # netplug is a package that detects this and requires no extra configuration
346 # on your part.
347 # emerge sys-apps/netplug
348 # or
349 # emerge sys-apps/ifplugd
350 # and you're done :)
351
352 # By default we don't wait for netplug/ifplugd to configure the interface.
353 # If you would like it to wait so that other services now that network is up
354 # then you can specify a timeout here.
355 #plug_timeout="10"
356 # A value of 0 means wait forever.
357
358 # If you don't want to use netplug on a specific interface but you have it
359 # installed, you can disable it for that interface via the modules statement
360 #modules_eth0=( "!netplug" )
361 # You can do the same for ifplugd
362 #
363 # You can disable them both with the generic plug
364 #modules_eth0=( "!plug" )
365
366 # To use specific ifplugd options, fex specifying wireless mode
367 #ifplugd_eth0="--api-mode=wlan"
368 # man ifplugd for more options
369
370 ##############################################################################
371 # ADVANCED CONFIGURATION
372 #
373 # Four functions can be defined which will be called surrounding the
374 # start/stop operations. The functions are called with the interface
375 # name first so that one function can control multiple adapters. An
376 extra two
377 # functions can be defined when an interface fails to start or stop.
378 #
379 # The return values for the preup and predown functions should be 0
380 # (success) to indicate that configuration or deconfiguration of the
381 # interface can continue. If preup returns a non-zero value, then
382 # interface configuration will be aborted. If predown returns a
383 # non-zero value, then the interface will not be allowed to continue
384 # deconfiguration.
385 #
386 # The return values for the postup, postdown, failup and faildown
387 functions are
388 # ignored since there's nothing to do if they indicate failure.
389 #
390 # ${IFACE} is set to the interface being brought up/down
391 # ${IFVAR} is ${IFACE} converted to variable name bash allows
392
393 #preup() {
394 # # Test for link on the interface prior to bringing it up. This
395 # # only works on some network adapters and requires the mii-diag
396 # # package to be installed.
397 # if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
398 # ewarn "No link on ${IFACE}, aborting configuration"
399 # return 1
400 # fi
401 #
402 # # Test for link on the interface prior to bringing it up. This
403 # # only works on some network adapters and requires the ethtool
404 # # package to be installed.
405 # if ethtool "${IFACE}" | grep -q 'Link detected: no'; then
406 # ewarn "No link on ${IFACE}, aborting configuration"
407 # return 1
408 # fi
409 #
410 #
411 # # Remember to return 0 on success
412 # return 0
413 #}
414
415 #predown() {
416 # # The default in the script is to test for NFS root and disallow
417 # # downing interfaces in that case. Note that if you specify a
418 # # predown() function you will override that logic. Here it is, in
419 # # case you still want it...
420 # if is_net_fs /; then
421 # eerror "root filesystem is network mounted -- can't stop ${IFACE}"
422 # return 1
423 # fi
424 #
425 # # Remember to return 0 on success
426 # return 0
427 #}
428
429 #postup() {
430 # # This function could be used, for example, to register with a
431 # # dynamic DNS service. Another possibility would be to
432 # # send/receive mail once the interface is brought up.
433
434 # # Here is an example that allows the use of iproute rules
435 # # which have been configured using the rules_eth0 variable.
436 # #rules_eth0=(
437 # # "from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100"
438 # # "from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100"
439 # #)
440 # local x="rules_${IFVAR}[@]"
441 # local -a rules=( "${!x}" )
442 # if [[ -n ${rules} ]] ; then
443 # einfo "Adding IP policy routing rules"
444 # eindent
445 # # Ensure that the kernel supports policy routing
446 # if ! ip rule list | grep -q "^" ; then
447 # eerror "You need to enable IP Policy Routing
448 (CONFIG_IP_MULTIPLE_TABLES)"
449 # eerror "in your kernel to use ip rules"
450 # else
451 # for x in "${rules[@]}" ; do
452 # ebegin "${x}"
453 # ip rule add ${x}
454 # eend $?
455 # done
456 # fi
457 # eoutdent
458 # # Flush the cache
459 # ip route flush cache dev "${IFACE}"
460 # fi
461
462 #}
463
464 #postdown() {
465 # # Enable Wake-On-LAN for every interface except for lo
466 # # Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc
467 # # as well ;)
468 # [[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol g
469
470 # Automatically erase any ip rules created in the example postup above
471 # if interface_exists "${IFACE}" ; then
472 # # Remove any rules for this interface
473 # local rule
474 # ip rule list | grep " iif ${IFACE}[ ]*" | {
475 # while read rule ; do
476 # rule="${rule#*:}"
477 # ip rule del ${rule}
478 # done
479 # }
480 # # Flush the route cache
481 # ip route flush cache dev "${IFACE}"
482 # fi
483
484 # # Return 0 always
485 # return 0
486 #}
487
488 #failup() {
489 # # This function is mostly here for completeness... I haven't
490 # # thought of anything nifty to do with it yet ;-)
491 #}
492
493 #faildown() {
494 # # This function is mostly here for completeness... I haven't
495 # # thought of anything nifty to do with it yet ;-)
496 #}
497
498 ##############################################################################
499 # FORCING MODULES
500 # The Big Fat Warning :- If you use module forcing do not complain to us or
501 # file bugs about it not working!
502 #
503 # Loading modules is a slow affair - we have to check each one for the
504 following
505 # 1) Code sanity
506 # 2) Has the required package been emerged?
507 # 3) Has it modified anything?
508 # 4) Have all the dependant modules been loaded?
509
510 # Then we have to strip out the conflicting modules based on user preference
511 # and default configuration and sort them into the correct order.
512 # Finally we check the end result for dependencies.
513
514 # This, of course, takes valuable CPU time so we provide module forcing as a
515 # means to speed things up. We still do *some* checking but not much.
516
517 # It is essential that you force modules in the correct order and supply all
518 # the modules you need. You must always supply an interface module - we
519 # supply ifconfig or iproute2.
520
521 # The Big Fat Warning :- If you use module forcing do not complain to us or
522 # file bugs about it not working!
523
524 # Now that we've warned you twice, here's how to do it
525 #modules_force=( "ifconfig" )
526 #modules_force=( "iproute2" "dhcpcd" )
527
528 # We can also apply this to a specific interface
529 #modules_force_eth1=( "iproute2" )
530
531 # The below will not work
532 #modules_force=( "dhcpcd" )
533 # No interface (ifconfig/iproute2)
534 #modules_force=( "ifconfig" "essidnet" "iwconfig" )
535 # Although it will not crash, essidnet will not work as it has to come after
536 # iwconfig
537 #modules_force=( "iproute2" "ifconfig" )
538 # The interface will be setup twice which will cause problems

Replies

Subject Author
Re: [gentoo-user-ru] net.example Taz <taz.inside@×××××.com>