]> git.pld-linux.org Git - projects/rc-scripts.git/blame - doc/net-scripts.txt
- grab $ACTION variable
[projects/rc-scripts.git] / doc / net-scripts.txt
CommitLineData
ec8b15cb 1$Id$
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
de1fc6ce 28 Called when any network device EXCEPT a SLIP (with dip) 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")
e8f24cde
JR
76 IPADDR= IP_AOPTS= IP_ROPTS= IP_LABEL=
77 IPADDR1= IP_AOPTS1= IP_ROPTS1= IP_LABEL1=
78 IP_ADDRx= IP_AOPTSx= IP_ROPTSx= IP_LABELx=
de1fc6ce 79 IP4_PRIM_IF= IP4_SRC_IF=
e8f24cde 80 IP6_PRIM_IF=
6e968d25 81 GATEWAY=
82 ONBOOT=yes|no
83 USERCTL=yes|no
63e8c567 84 BOOTPROTO=none|bootp|dhcp|pump
6e968d25 85
63e8c567 86 If BOOTPROTO is not "none", then the only other item that
6e968d25 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.
89
6e968d25 90 Ethernet-only items:
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
94
95 PPP/SLIP items:
96 PERSIST=yes|no
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)
102
103 PPP-specific items
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
120 together.
121
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)
de1fc6ce
JR
125 REMIP=<remote ip4 address, normally unspecified>
126 REMIP6=<remote ip6 address, normally unspecified>
6e968d25 127 MTU=
128 MRU=
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
138 AT&F0&C1&D2
ffe19b59 139 (PLD Linux rc-scripts specific option)
6e968d25 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)
ffe19b59 143 (PLD Linux rc-scripts specific option)
de1fc6ce
JR
144 PEERDNS=yes|no
145 IPV6_PPP=yes|no
146 use IPv6 for ppp
147 IPV6_CP_USEV4=yes|no
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
8772739e 152 ENABLE_6TO4=yes|no
153 configure a 6to4 tunnel, if the interface has a public
154 (non-RFC1918) IPv4 address
6e968d25 155 <anything>=<anything>
156 Variable name and it's value for use by chat script.
157 Note: You don't have to define variables here, if they are defined
158 in parent process enviroment they will be used.
159 in.ex. USERNAME usualy is.
160
161 IPIP/GRE/SIT tunnel-specific items
162 REMOTEIP=<ip_addres>
163 address of the remote end of tunnel
164 LOCALIP=<ip_addres>
165 address of the local end of tunnel
166
167
168
b967329f 169/etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!:
6e968d25 170
171 Template or backup file. This will not be interpreted
172 by net-scripts.
173
174/etc/sysconfig/interfaces/data/chat-<interface-name>:
175
176 chat script for PPP or SLIP connection intended to establish
177 the connection. For SLIP devices, a DIP script is written
178 from the chat script; for PPP devices, the chat script is used
179 directly.
ffe19b59 180 In PLD Linux version of rc-scripts, this file is parsed by shell
6e968d25 181 (actually by grep in firstplace to get rid of comments) before it
182 is passed to chat.
183 This allows you to substitute shell variables with their values
184 defined in <interface name> or more generally in current env.
185 If You wonder about purbose, imagine one chat-script for all links
186 at ISP's border router or computer in home where all users have own IPS's
187 accounts and want to pay only for themselfes.
188 Unfortunetly this parsing have impact on chat script syntax.
189 All characters that have special meaning for shell have to be escaped.
190
191
192/etc/sysconfig/interfaces/data/dip-<interface-name>
193
194 A write-only script created from the chat script by netcfg.
195 Do not modify this. In the future, this file may disappear
196 by default and created on-the-fly from the chat script if
197 it does not exist.
This page took 0.164101 seconds and 4 git commands to generate.