2 ========================================
7 These are the only two scripts "in" this directory that should
8 be called directly; these two scripts call all the other
11 These scripts take one argument normally: the name of the device
12 (e.g. eth0). They are called with a second argument of "boot"
13 during the boot sequence so that devices that are not meant to
14 be brought up on boot (ONBOOT=no, see below) can be ignored at
17 /sbin/network-scripts/network-functions:
19 Not really a public file. Contains functions which the scripts use
20 for bringing interfaces up and down. In particular, it contains
21 most of the code for handling alternative interface configurations
22 and interface change notification through netreport.
24 /lib/rc-scripts/ifup-post
26 Called when any network device EXCEPT a SLIP (with dip) device comes
27 up. Calls /lib/rc-scripts/ifup-routes to
28 bring up static routes that depend on that device. Calls
29 /sbin/network-scripts/ifup-aliases to bring up
30 aliases for that device. Sets the hostname if it is not
31 already set and a hostname can be found for the IP for that
32 device. Sends SIGIO to any programs that have requested
33 notification of network events.
35 Could be extended to fix up nameservice configuration, call
36 arbitrary scripts, etc, as needed.
38 /lib/rc-scripts/ifup-routes
40 Set up static routes for a device.
42 /lib/rc-scripts/ifup-aliases
44 Bring up aliases for a device.
46 /lib/rc-scripts/ifdhcpc-done
48 Called by dhcpcd once dhcp configuration is complete; sets
49 up /etc/resolv.conf from the version dhcpcd dropped in
50 /etc/dhcpc/resolv.conf
52 Files in /etc/sysconfig/interfaces/
53 ========================================
55 /etc/sysconfig/interfaces/ifcfg-<interface-name> and
56 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<clone-name>:
58 The first defines an interface, and the second contains
59 only the parts of the definition that are different in a
60 "clone" (or alternative) interface. For example, the
61 network numbers might be different, but everything else
62 might be the same, so only the network numbers would be
63 in the clone file, but all the device information would
64 be in the base ifcfg file.
66 The items that can be defined in an ifcfg file depend on the
67 interface type. The really obvious ones I'm not going to
68 bother to define; you can figure out what "IPADDR" is, I
72 DEVICE=<name of physical device (except dynamically-allocated PPP
73 devices where it is the "logical name")
74 IPADDR= IP_AOPTS= IP_ROPTS= IP_LABEL=
75 IPADDR1= IP_AOPTS1= IP_ROPTS1= IP_LABEL1=
76 IP_ADDRx= IP_AOPTSx= IP_ROPTSx= IP_LABELx=
77 IP4_PRIM_IF= IP4_SRC_IF=
82 BOOTPROTO=none|bootp|dhcp|pump|zeroconf|auto
85 If BOOTPROTO is not "none", then the only other item that
86 must be set is the DEVICE item; all the rest will be determined
87 by the boot protocol. No "dummy" entries need to be created.
90 {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
91 configuration matrix for IPX. Only used if IPX is active.
92 Managed from /lib/rc-scripts/ifup-ipx
94 Deprecated, but supported:
96 Any device-specific options supported by ethtool. For example,
97 if you wanted to force 100Mb full duplex:
98 ETHTOOL_OPTS="speed 100 duplex full autoneg off"
99 Note that changing speed or duplex settings almost always
100 requires disabling autonegotiation with 'autoneg off'.
102 Long term, this should be done by sysadmin-written udev rules.
106 MODEMPORT=<device, say /dev/modem>
107 LINESPEED=<speed, say 115200>
108 DEFABORT=yes|no (tells netcfg whether or not to put default
109 abort strings in when creating/editing the chat script and/or
110 dip script for this interface)
113 DEFROUTE=yes|no (set this interface as default route?)
114 ESCAPECHARS=yes|no (simplified interface here doesn't let people
115 specify which characters to escape; almost everyone can use
116 asyncmap 00000000 anyway, and they can set PPPOPTIONS to
117 asyncmap foobar if they want to set options perfectly)
118 HARDFLOWCTL=yes|no (yes imples "modem crtscts" options)
119 PPPOPTIONS=<arbitrary option string; is placed last on the
120 command line, so it can override other options like asyncmap
121 that were specified differently>
122 PAPNAME=<"name $PAPNAME" on pppd command line> (note that
123 the "remotename" option is always specified as the logical
124 ppp device name, like "ppp0" (which might perhaps be the
125 physical device ppp1 if some other ppp device was brought
126 up earlier...), which makes it easy to manage pap/chap
127 files -- name/password pairs are associated with the
128 logical ppp device name so that they can be managed
131 In principal, I'm not aware of anything that would keep
132 the logical PPP device names from being "worldnet" or
133 "myISP" instead of ppp0-pppN)
134 REMIP=<remote ip4 address, normally unspecified>
135 REMIP6=<remote ip6 address, normally unspecified>
138 DISCONNECTTIMEOUT=<number of seconds, default currently 5>
139 (time to wait before re-establishing the connection after
140 a successfully-connected session terminates before attempting
141 to establish a new connection.)
142 RETRYTIMEOUT=<number of seconds, default currently 60>
143 (time to wait before re-attempting to establish a connection
144 after a previous attempt fails.)
145 INITSCRIPT=<modem command>
146 string which initialises your modem. Usualy something like
148 (TLD Linux rc-scripts specific option)
149 DATAFORCHAT=<list of variables>
150 List of variables which should be exported to chat script.
151 Used mostly for passing USERNAME and PASSWORD into it. (see below)
152 (TLD Linux rc-scripts specific option)
157 use local IPv4 mapped addresses as IPv6 addresses
158 IPV6_CP_PERSISTENT=yes|no
159 use EUI-48 addresses as IPv6 addresses
160 or by default use address specified by IP6_PRIM_IF and REMIP6
162 configure a 6to4 tunnel, if the interface has a public
163 (non-RFC1918) IPv4 address
164 <anything>=<anything>
165 Variable name and it's value for use by chat script.
166 Note: You don't have to define variables here, if they are defined
167 in parent process enviroment they will be used.
168 in.ex. USERNAME usualy is.
170 IPIP/GRE/SIT tunnel-specific items
172 address of the remote end of tunnel
174 address of the local end of tunnel
178 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!:
180 Template or backup file. This will not be interpreted
183 /etc/sysconfig/interfaces/data/chat-<interface-name>:
185 chat script for PPP or SLIP connection intended to establish
186 the connection. For SLIP devices, a DIP script is written
187 from the chat script; for PPP devices, the chat script is used
189 In TLD Linux version of rc-scripts, this file is parsed by shell
190 (actually by grep in firstplace to get rid of comments) before it
192 This allows you to substitute shell variables with their values
193 defined in <interface name> or more generally in current env.
194 If You wonder about purbose, imagine one chat-script for all links
195 at ISP's border router or computer in home where all users have own IPS's
196 accounts and want to pay only for themselfes.
197 Unfortunetly this parsing have impact on chat script syntax.
198 All characters that have special meaning for shell have to be escaped.
201 /etc/sysconfig/interfaces/data/dip-<interface-name>
203 A write-only script created from the chat script by netcfg.
204 Do not modify this. In the future, this file may disappear
205 by default and created on-the-fly from the chat script if