]> git.pld-linux.org Git - projects/rc-scripts.git/blob - doc/net-scripts.txt
- merge from TOTALNEW branch (see NEWS for more info)
[projects/rc-scripts.git] / doc / net-scripts.txt
1 $Id: net-scripts.txt,v 1.5 2001/05/15 16:03:36 baggins Exp $
2
3 rc-scripts files:
4 ========================================
5
6 /sbin/ifup:
7 /sbin/ifdown:
8
9   These are the only two scripts "in" this directory that should
10   be called directly; these two scripts call all the other
11   scripts as needed.
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
26 /etc/sysconfig/network-scripts/ifup-post
27
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.
36
37   Could be extended to fix up nameservice configuration, call
38   arbitrary scripts, etc, as needed.
39
40 /etc/sysconfig/network-scripts/ifup-routes
41
42   Set up static routes for a device.
43
44 /etc/sysconfig/network-scripts/ifup-aliases
45
46   Bring up aliases for a device.
47
48 /etc/sysconfig/network-scripts/ifdhcpc-done
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   
54 Files in /etc/sysconfig/interfaces/
55 ========================================
56
57 /etc/sysconfig/interfaces/ifcfg-<interface-name> and
58 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<clone-name>:
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=             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=
81     GATEWAY=
82     ONBOOT=yes|no
83     USERCTL=yes|no
84     BOOTMETHOD=none|bootp|dhcp|pump
85
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.
89
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)
125     REMIP=<remote ip4 address, normally unspecified>
126     REMIP6=<remote ip6 address, normally unspecified>
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
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)
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
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. 
157   
158   IPIP/GRE/SIT tunnel-specific items
159     REMOTEIP=<ip_addres>
160       address of the remote end of tunnel
161     LOCALIP=<ip_addres>
162       address of the local end of tunnel
163       
164
165
166 /etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!:
167
168   Template or backup file. This will not be interpreted
169   by net-scripts.
170
171 /etc/sysconfig/interfaces/data/chat-<interface-name>:
172
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
176   directly.
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
179   is passed to chat.
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.
187   
188   
189 /etc/sysconfig/interfaces/data/dip-<interface-name>
190
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
194   it does not exist.
This page took 0.041061 seconds and 3 git commands to generate.