remove unmaintained "save_state" option
[l2tpns.git] / Docs / startup-config.5
1 .\" -*- nroff -*-
2 .de Id
3 .ds Dt \\$4 \\$5
4 ..
5 .Id $Id: startup-config.5,v 1.5 2005-02-09 00:16:21 bodea Exp $
6 .TH STARTUP-CONFIG 5 "\*(Dt" L2TPNS "File Formats and Conventions"
7 .SH NAME
8 startup\-config \- configuration file for l2tpns
9 .SH SYNOPSIS
10 /etc/l2tpns/startup-config
11 .SH DESCRIPTION
12 .B startup-config
13 is the configuration file for
14 .BR l2tpns .
15 .PP
16 The format is plain text, in the same format as accepted by the
17 configuration mode of
18 .BR l2tpns 's
19 telnet administrative interface.  Comments are indicated by either the
20 character
21 .B #
22 or
23 .BR ! .
24 .SS SETTINGS
25 Settings are specified with
26 .IP
27 .BI "set " "variable value"
28 .PP
29 The following
30 .IR variable s
31 may be set:
32 .RS
33 .TP
34 .B debug
35 Set the level of debugging messages written to the log file.  The
36 value should be between 0 and 5, with 0 being no debugging, and 5
37 being the highest.
38 .TP
39 .B log_file
40 This will be where all logging and debugging information is written
41 to.  This may be either a filename, such as
42 .BR /var/log/l2tpns ,
43 or the string
44 .BR syslog : \fIfacility\fR ,
45 where
46 .I facility
47 is any one of the syslog logging facilities, such as
48 .BR local5 .
49 .TP
50 .B pid_file
51 If set, the process id will be written to the specified file.  The
52 value must be an absolute path.
53 .TP
54 .B l2tp_secret
55 The secret used by
56 .B l2tpns
57 for authenticating tunnel request.  Must be the same as the LAC, or
58 authentication will fail.  Only actually be used if the LAC requests
59 authentication.
60 .TP
61 .BR primary_dns , " secondary_dns"
62 Whenever a PPP connection is established, DNS servers will be sent to the
63 user, both a primary and a secondary.  If either is set to 0.0.0.0, then that
64 one will not be sent.
65 .TP
66 .BR primary_radius , " secondary_radius"
67 Sets the RADIUS servers used for both authentication and accounting. 
68 If the primary server does not respond, then the secondary RADIUS
69 server will be tried.
70 .TP
71 .BR primary_radius_port , " secondary_radius_port"
72 Sets the authentication ports for the primary and secondary RADIUS
73 servers.  The accounting port is one more than the authentication
74 port.  If no ports are given, authentication defaults to 1645, and
75 accounting to 1646.
76 .TP
77 .B radius_accounting
78 If set to true, then RADIUS accounting packets will be sent.  A
79 .B Start
80 record will be sent when the session is successfully authenticated,
81 and a
82 .B Stop
83 record when the session is closed.
84 .TP
85 .B radius_secret
86 Secret to be used in RADIUS packets.
87 .TP
88 .B bind_address
89 When the tun interface is created, it is assigned the address
90 specified here.  If no address is given, 1.1.1.1 is used.  Packets
91 containing user traffic should be routed via this address if given,
92 otherwise the primary address of the machine.
93 .TP
94 .B peer_address
95 Address to send to clients as the default gateway.
96 .TP
97 .B send_garp
98 Determines whether or not to send a gratuitous ARP for the
99 .B bind_address
100 when the server is ready to handle traffic (default:  true).  This
101 setting is ignored if BGP is configured.
102 .TP
103 .B throttle_speed
104 Sets the default speed (in kbits/s) which sessions will be limited to.
105 .TP
106 .B throttle_buckets
107 Number of token buckets to allocate for throttling.  Each throttled
108 session requires two buckets (in and out).
109 .TP
110 .B accounting_dir
111 If set to a directory, then every 5 minutes the current usage for
112 every connected use will be dumped to a file in this directory.
113 .TP
114 .B setuid
115 After starting up and binding the interface, change UID to this.  This
116 doesn't work properly.
117 .TP
118 .B dump_speed
119 If set to true, then the current bandwidth utilization will be logged
120 every second.  Even if this is disabled, you can see this information
121 by running the
122 .B
123 uptime
124 command on the CLI.
125 .TP
126 .B cleanup_interval
127 Interval between regular cleanups (in seconds).
128 .TP
129 .B multi_read_count
130 Number of packets to read off each of the UDP and TUN fds when
131 returned as readable by select (default: 10).  Avoids incurring the
132 unnecessary system call overhead of select on busy servers.
133 .TP
134 .B scheduler_fifo
135 Sets the scheduling policy for the
136 .B l2tpns
137 process to
138 .BR SCHED_FIFO .
139 This causes the kernel to immediately preempt any currently running
140 .B SCHED_OTHER
141 (normal) process in favour of
142 .B l2tpns
143 when it becomes runnable. 
144 .br
145 Ignored on uniprocessor systems.
146 .TP
147 .B lock_pages
148 Keep all pages mapped by the
149 .B l2tpns
150 process in memory.
151 .TP
152 .B icmp_rate
153 Maximum number of host unreachable ICMP packets to send per second.
154 .TP
155 .B packet_limit
156 Maximum number of packets of downstream traffic to be handled each
157 tenth of a second per session.  If zero, no limit is applied (default: 
158 0).  Intended as a DoS prevention mechanism and not a general
159 throttling control (packets are dropped, not queued).
160 .TP
161 .B cluster_address
162 Multicast cluster address (default: 239.192.13.13).
163 .TP
164 .B cluster_interface
165 Interface for cluster packets (default: eth0).
166 .TP
167 .B cluster_hb_interval
168 Interval in tenths of a second between cluster heartbeat/pings.
169 .TP
170 .B cluster_hb_timeout
171 Cluster heartbeat timeout in tenths of a second.  A new master will be
172 elected when this interval has been passed without seeing a heartbeat
173 from the master.
174 .RE
175 .SS BGP ROUTING
176 The routing configuration section is entered by the command
177 .IP
178 .BI "router bgp " as
179 .PP
180 where
181 .I as
182 specifies the local AS number.
183 .PP
184 Subsequent lines prefixed with
185 .BI "neighbour " peer
186 define the attributes of BGP neighhbours.  Valid commands are:
187 .IP
188 .BI "neighbour " peer " remote-as " as
189 .br
190 .BI "neighbour " peer " timers " "keepalive hold"
191 .PP
192 Where
193 .I peer
194 specifies the BGP neighbour as either a hostname or IP address,
195 .I as
196 is the remote AS number and
197 .IR keepalive ,
198 .I hold
199 are the timer values in seconds.
200 .SS NAMED ACCESS LISTS
201 Named access lists may be defined with either of
202 .IP
203 .BI "ip access\-list standard " name
204 .br
205 .BI "ip access\-list extended " name
206 .PP
207 Subsequent lines starting with
208 .B permit
209 or
210 .B deny
211 define the body of the access\-list.
212 .PP
213 .B Standard Access Lists
214 .RS 4n
215 Standard access lists are defined with:
216 .IP
217 .RB { permit | deny }
218 .IR source " [" dest ]
219 .PP
220 Where
221 .I source
222 and
223 .I dest
224 specify IP matches using one of:
225 .IP
226 .I address
227 .I wildard
228 .br
229 .B host
230 .I address
231 .br
232 .B any
233 .PP
234 .I address
235 and
236 .I wildard
237 are in dotted-quad notation, bits in the
238 .I wildard
239 indicate which address bits in
240 .I address
241 are relevant to the match (0 = exact match; 1 = don't care).
242 .PP
243 The shorthand
244 .RB ' host
245 .IR address '
246 is equivalent to
247 .RI ' address
248 .BR 0.0.0.0 ';
249 .RB ' any '
250 to
251 .RB ' 0.0.0.0
252 .BR 255.255.255.255 '.
253 .RE
254 .PP
255 .B Extended Access Lists
256 .RS 4n
257 Extended access lists are defined with:
258 .IP
259 .RB { permit | deny }
260 .I proto
261 .IR source " [" ports "] " dest " [" ports "] [" flags ]
262 .PP
263 Where
264 .I proto
265 is one of
266 .BR ip ,
267 .B tcp
268 or
269 .BR udp ,
270 and
271 .I source
272 and
273 .I dest
274 are as described above for standard lists.
275 .PP
276 For TCP and UDP matches, source and destination may be optionally
277 followed by a
278 .I ports
279 specification:
280 .IP
281 .RB { eq | neq | gt | lt }
282 .I port
283 .br
284 .B
285 range
286 .I from to
287 .PP
288 .I flags
289 may be one of:
290 .RS
291 .HP
292 .RB { match\-any | match\-all }
293 .RB { + | - }{ fin | syn | rst | psh | ack | urg }
294 \&...
295 .br
296 Match packets with any or all of the tcp flags set
297 .RB ( + )
298 or clear
299 .RB ( - ).
300 .HP
301 .B established
302 .br
303 Match "established" TCP connections:  packets with
304 .B RST
305 or
306 .B ACK
307 set, and
308 .B SYN
309 clear.
310 .HP
311 .B fragments
312 .br
313 Match IP fragments.  May not be specified on rules with layer 4
314 matches.
315 .RE
316 .SH SEE ALSO
317 .BR l2tpns (8)