]> git.pld-linux.org Git - projects/rc-scripts.git/blame - doc/net-scripts.txt
added abilities for setup static RARP table by
[projects/rc-scripts.git] / doc / net-scripts.txt
CommitLineData
b967329f 1$Id: net-scripts.txt,v 1.4 1999/10/07 00:49:51 kloczek Exp $
6e968d25 2
b967329f 3rc-scripts files:
6e968d25 4========================================
5
b967329f 6/sbin/ifup:
7/sbin/ifdown:
6e968d25 8
6e968d25 9 These are the only two scripts "in" this directory that should
10 be called directly; these two scripts call all the other
b967329f 11 scripts as needed.
6e968d25 12
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
17 that time.
18
19/sbin/network-scripts/network-functions:
20
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.
25
b967329f 26/etc/sysconfig/network-scripts/ifup-post
6e968d25 27
28 Called when any network device EXCEPT a SLIP device comes
b967329f 29 up. Calls /etc/sysconfig/network-scripts/ifup-routes to
6e968d25 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.
36
37 Could be extended to fix up nameservice configuration, call
38 arbitrary scripts, etc, as needed.
39
b967329f 40/etc/sysconfig/network-scripts/ifup-routes
6e968d25 41
42 Set up static routes for a device.
43
b967329f 44/etc/sysconfig/network-scripts/ifup-aliases
6e968d25 45
46 Bring up aliases for a device.
47
b967329f 48/etc/sysconfig/network-scripts/ifdhcpc-done
6e968d25 49
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
53
54Files in /etc/sysconfig/interfaces/
55========================================
56
b967329f 57/etc/sysconfig/interfaces/ifcfg-<interface-name> and
58/etc/sysconfig/interfaces/ifcfg-<interface-name>-<clone-name>:
6e968d25 59
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.
67
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
71 think... :-)
72
73 Base items:
74 DEVICE=<name of physical device (except dynamically-allocated PPP
75 devices where it is the "logical name")
76 IPADDR=
77 IPV6ADDRS=<blank separated list of ipv6 addresses>
80fd83b6 78 PREFIX=
6e968d25 79 GATEWAY=
80 ONBOOT=yes|no
81 USERCTL=yes|no
82 BOOTPROTO=none|bootp|dhcp
83
84 If BOOTPROTO is not "none", then the only other item that
85 must be set is the DEVICE item; all the rest will be determined
86 by the boot protocol. No "dummy" entries need to be created.
87
88 Base items being deprecated:
89 NETWORK=<will be calculated automatically with ifcalc>
90 BROADCAST=<will be calculated automatically with ifcalc>
91
92 Ethernet-only items:
93 {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
94 configuration matrix for IPX. Only used if IPX is active.
95 Managed from /etc/sysconfig/network-scripts/ifup-ipx
96
97 PPP/SLIP items:
98 PERSIST=yes|no
99 MODEMPORT=<device, say /dev/modem>
100 LINESPEED=<speed, say 115200>
101 DEFABORT=yes|no (tells netcfg whether or not to put default
102 abort strings in when creating/editing the chat script and/or
103 dip script for this interface)
104
105 PPP-specific items
106 DEFROUTE=yes|no (set this interface as default route?)
107 ESCAPECHARS=yes|no (simplified interface here doesn't let people
108 specify which characters to escape; almost everyone can use
109 asyncmap 00000000 anyway, and they can set PPPOPTIONS to
110 asyncmap foobar if they want to set options perfectly)
111 HARDFLOWCTL=yes|no (yes imples "modem crtscts" options)
112 PPPOPTIONS=<arbitrary option string; is placed last on the
113 command line, so it can override other options like asyncmap
114 that were specified differently>
115 PAPNAME=<"name $PAPNAME" on pppd command line> (note that
116 the "remotename" option is always specified as the logical
117 ppp device name, like "ppp0" (which might perhaps be the
118 physical device ppp1 if some other ppp device was brought
119 up earlier...), which makes it easy to manage pap/chap
120 files -- name/password pairs are associated with the
121 logical ppp device name so that they can be managed
122 together.
123
124 In principal, I'm not aware of anything that would keep
125 the logical PPP device names from being "worldnet" or
126 "myISP" instead of ppp0-pppN)
127 REMIP=<remote ip address, normally unspecified>
128 MTU=
129 MRU=
130 DISCONNECTTIMEOUT=<number of seconds, default currently 5>
131 (time to wait before re-establishing the connection after
132 a successfully-connected session terminates before attempting
133 to establish a new connection.)
134 RETRYTIMEOUT=<number of seconds, default currently 60>
135 (time to wait before re-attempting to establish a connection
136 after a previous attempt fails.)
137 INITSCRIPT=<modem command>
138 string which initialises your modem. Usualy something like
139 AT&F0&C1&D2
140 (PLD rc-scripts specific option)
141 DATAFORCHAT=<list of variables>
142 List of variables which should be exported to chat script.
143 Used mostly for passing USERNAME and PASSWORD into it. (see below)
144 (PLD rc-scripts specific option)
145 <anything>=<anything>
146 Variable name and it's value for use by chat script.
147 Note: You don't have to define variables here, if they are defined
148 in parent process enviroment they will be used.
149 in.ex. USERNAME usualy is.
150
151 IPIP/GRE/SIT tunnel-specific items
152 REMOTEIP=<ip_addres>
153 address of the remote end of tunnel
154 LOCALIP=<ip_addres>
155 address of the local end of tunnel
156
157
158
b967329f 159/etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!:
6e968d25 160
161 Template or backup file. This will not be interpreted
162 by net-scripts.
163
164/etc/sysconfig/interfaces/data/chat-<interface-name>:
165
166 chat script for PPP or SLIP connection intended to establish
167 the connection. For SLIP devices, a DIP script is written
168 from the chat script; for PPP devices, the chat script is used
169 directly.
170 In PLD version of rc-scripts, this file is parsed by shell
171 (actually by grep in firstplace to get rid of comments) before it
172 is passed to chat.
173 This allows you to substitute shell variables with their values
174 defined in <interface name> or more generally in current env.
175 If You wonder about purbose, imagine one chat-script for all links
176 at ISP's border router or computer in home where all users have own IPS's
177 accounts and want to pay only for themselfes.
178 Unfortunetly this parsing have impact on chat script syntax.
179 All characters that have special meaning for shell have to be escaped.
180
181
182/etc/sysconfig/interfaces/data/dip-<interface-name>
183
184 A write-only script created from the chat script by netcfg.
185 Do not modify this. In the future, this file may disappear
186 by default and created on-the-fly from the chat script if
187 it does not exist.
This page took 0.098722 seconds and 4 git commands to generate.