1 $Id: net-scripts.txt,v 1.5 2001/05/15 16:03:36 baggins Exp $
4 ========================================
9 These are the only two scripts "in" this directory that should
10 be called directly; these two scripts call all the other
13 These scripts take one argument normally: the name of the device
14 (e.g. eth0). They are called with a second argument of "boot"
15 during the boot sequence so that devices that are not meant to
16 be brought up on boot (ONBOOT=no, see below) can be ignored at
19 /sbin/network-scripts/network-functions:
21 Not really a public file. Contains functions which the scripts use
22 for bringing interfaces up and down. In particular, it contains
23 most of the code for handling alternative interface configurations
24 and interface change notification through netreport.
26 /etc/sysconfig/network-scripts/ifup-post
28 Called when any network device EXCEPT a SLIP (with dip) device comes
29 up. Calls /etc/sysconfig/network-scripts/ifup-routes to
30 bring up static routes that depend on that device. Calls
31 /sbin/network-scripts/ifup-aliases to bring up
32 aliases for that device. Sets the hostname if it is not
33 already set and a hostname can be found for the IP for that
34 device. Sends SIGIO to any programs that have requested
35 notification of network events.
37 Could be extended to fix up nameservice configuration, call
38 arbitrary scripts, etc, as needed.
40 /etc/sysconfig/network-scripts/ifup-routes
42 Set up static routes for a device.
44 /etc/sysconfig/network-scripts/ifup-aliases
46 Bring up aliases for a device.
48 /etc/sysconfig/network-scripts/ifdhcpc-done
50 Called by dhcpcd once dhcp configuration is complete; sets
51 up /etc/resolv.conf from the version dhcpcd dropped in
52 /etc/dhcpc/resolv.conf
54 Files in /etc/sysconfig/interfaces/
55 ========================================
57 /etc/sysconfig/interfaces/ifcfg-<interface-name> and
58 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<clone-name>:
60 The first defines an interface, and the second contains
61 only the parts of the definition that are different in a
62 "clone" (or alternative) interface. For example, the
63 network numbers might be different, but everything else
64 might be the same, so only the network numbers would be
65 in the clone file, but all the device information would
66 be in the base ifcfg file.
68 The items that can be defined in an ifcfg file depend on the
69 interface type. The really obvious ones I'm not going to
70 bother to define; you can figure out what "IPADDR" is, I
74 DEVICE=<name of physical device (except dynamically-allocated PPP
75 devices where it is the "logical name")
76 IPADDR= IP_AOPTS= IP_ROPTS=
77 IPADDR1= IP_AOPTS1= IP_ROPTS1=
78 IP_ADDRx= IP_AOPTSx= IP_ROPTSx=
79 IP4_PRIM_IF= IP4_SRC_IF=
80 IP6_PRIM_IF= IP6_SRC_IF=
84 BOOTMETHOD=none|bootp|dhcp|pump
86 If BOOTMETHOD is not "none", then the only other item that
87 must be set is the DEVICE item; all the rest will be determined
88 by the boot protocol. No "dummy" entries need to be created.
91 {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
92 configuration matrix for IPX. Only used if IPX is active.
93 Managed from /etc/sysconfig/network-scripts/ifup-ipx
97 MODEMPORT=<device, say /dev/modem>
98 LINESPEED=<speed, say 115200>
99 DEFABORT=yes|no (tells netcfg whether or not to put default
100 abort strings in when creating/editing the chat script and/or
101 dip script for this interface)
104 DEFROUTE=yes|no (set this interface as default route?)
105 ESCAPECHARS=yes|no (simplified interface here doesn't let people
106 specify which characters to escape; almost everyone can use
107 asyncmap 00000000 anyway, and they can set PPPOPTIONS to
108 asyncmap foobar if they want to set options perfectly)
109 HARDFLOWCTL=yes|no (yes imples "modem crtscts" options)
110 PPPOPTIONS=<arbitrary option string; is placed last on the
111 command line, so it can override other options like asyncmap
112 that were specified differently>
113 PAPNAME=<"name $PAPNAME" on pppd command line> (note that
114 the "remotename" option is always specified as the logical
115 ppp device name, like "ppp0" (which might perhaps be the
116 physical device ppp1 if some other ppp device was brought
117 up earlier...), which makes it easy to manage pap/chap
118 files -- name/password pairs are associated with the
119 logical ppp device name so that they can be managed
122 In principal, I'm not aware of anything that would keep
123 the logical PPP device names from being "worldnet" or
124 "myISP" instead of ppp0-pppN)
125 REMIP=<remote ip4 address, normally unspecified>
126 REMIP6=<remote ip6 address, normally unspecified>
129 DISCONNECTTIMEOUT=<number of seconds, default currently 5>
130 (time to wait before re-establishing the connection after
131 a successfully-connected session terminates before attempting
132 to establish a new connection.)
133 RETRYTIMEOUT=<number of seconds, default currently 60>
134 (time to wait before re-attempting to establish a connection
135 after a previous attempt fails.)
136 INITSCRIPT=<modem command>
137 string which initialises your modem. Usualy something like
139 (PLD rc-scripts specific option)
140 DATAFORCHAT=<list of variables>
141 List of variables which should be exported to chat script.
142 Used mostly for passing USERNAME and PASSWORD into it. (see below)
143 (PLD rc-scripts specific option)
148 use local IPv4 mapped addresses as IPv6 addresses
149 IPV6_CP_PERSISTENT=yes|no
150 use EUI-48 addresses as IPv6 addresses
151 or by default use address specified by IP6_PRIM_IF and REMIP6
152 <anything>=<anything>
153 Variable name and it's value for use by chat script.
154 Note: You don't have to define variables here, if they are defined
155 in parent process enviroment they will be used.
156 in.ex. USERNAME usualy is.
158 IPIP/GRE/SIT tunnel-specific items
160 address of the remote end of tunnel
162 address of the local end of tunnel
166 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!:
168 Template or backup file. This will not be interpreted
171 /etc/sysconfig/interfaces/data/chat-<interface-name>:
173 chat script for PPP or SLIP connection intended to establish
174 the connection. For SLIP devices, a DIP script is written
175 from the chat script; for PPP devices, the chat script is used
177 In PLD version of rc-scripts, this file is parsed by shell
178 (actually by grep in firstplace to get rid of comments) before it
180 This allows you to substitute shell variables with their values
181 defined in <interface name> or more generally in current env.
182 If You wonder about purbose, imagine one chat-script for all links
183 at ISP's border router or computer in home where all users have own IPS's
184 accounts and want to pay only for themselfes.
185 Unfortunetly this parsing have impact on chat script syntax.
186 All characters that have special meaning for shell have to be escaped.
189 /etc/sysconfig/interfaces/data/dip-<interface-name>
191 A write-only script created from the chat script by netcfg.
192 Do not modify this. In the future, this file may disappear
193 by default and created on-the-fly from the chat script if