- Replace flags used for LCP/IPCP with state machine.
[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.12 2005-07-31 10:04:14 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 random_device
55 Path to random data source (default
56 .BR /dev/urandom ).
57 Use "" to use the rand() library function.
58 .TP
59 .B l2tp_secret
60 The secret used by
61 .B l2tpns
62 for authenticating tunnel request.  Must be the same as the LAC, or
63 authentication will fail.  Only actually be used if the LAC requests
64 authentication.
65 .TP
66 .B ppp_restart_time
67 Restart timer for PPP protocol negotiation in seconds (default: 3).
68 .TP
69 .B ppp_max_configure
70 Number of configure requests to send before giving up (default: 10).
71 .TP
72 .B ppp_max_failure
73 Number of Configure-Nak requests to send before sending a
74 Configure-Reject (default: 5).
75 .TP
76 .BR primary_dns , " secondary_dns"
77 Whenever a PPP connection is established, DNS servers will be sent to the
78 user, both a primary and a secondary.  If either is set to 0.0.0.0, then that
79 one will not be sent.
80 .TP
81 .BR primary_radius , " secondary_radius"
82 Sets the RADIUS servers used for both authentication and accounting. 
83 If the primary server does not respond, then the secondary RADIUS
84 server will be tried.
85 .TP
86 .BR primary_radius_port , " secondary_radius_port"
87 Sets the authentication ports for the primary and secondary RADIUS
88 servers.  The accounting port is one more than the authentication
89 port.  If no ports are given, authentication defaults to 1645, and
90 accounting to 1646.
91 .TP
92 .B radius_accounting
93 If set to true, then RADIUS accounting packets will be sent.  A
94 .B Start
95 record will be sent when the session is successfully authenticated,
96 and a
97 .B Stop
98 record when the session is closed.
99 .TP
100 .B radius_interim
101 If
102 .B radius_accounting
103 is on, defines the interval between sending of RADIUS interim
104 accounting records (in seconds).
105 .TP
106 .B radius_secret
107 Secret to be used in RADIUS packets.
108 .TP
109 .B radius_authtypes
110 A comma separated list of supported RADIUS authentication methods
111 ("pap" or "chap"), in order of preference (default "pap").
112 .TP
113 .B radius_dae_port
114 Port for DAE RADIUS (Packet of Death/Disconnect, Change of Authorization)
115 requests (default: 3799).
116 .TP
117 .B allow_duplicate_users
118 Allow multiple logins with the same username.  If false (the default),
119 any prior session with the same username will be dropped when a new
120 session is established.
121 .TP
122 .B bind_address
123 When the tun interface is created, it is assigned the address
124 specified here.  If no address is given, 1.1.1.1 is used.  Packets
125 containing user traffic should be routed via this address if given,
126 otherwise the primary address of the machine.
127 .TP
128 .B peer_address
129 Address to send to clients as the default gateway.
130 .TP
131 .B send_garp
132 Determines whether or not to send a gratuitous ARP for the
133 .B bind_address
134 when the server is ready to handle traffic (default: true).  This
135 setting is ignored if BGP is configured.
136 .TP
137 .B throttle_speed
138 Sets the default speed (in kbits/s) which sessions will be limited to.
139 .TP
140 .B throttle_buckets
141 Number of token buckets to allocate for throttling.  Each throttled
142 session requires two buckets (in and out).
143 .TP
144 .B accounting_dir
145 If set to a directory, then every 5 minutes the current usage for
146 every connected use will be dumped to a file in this directory.
147 .TP
148 .B setuid
149 After starting up and binding the interface, change UID to this.  This
150 doesn't work properly.
151 .TP
152 .B dump_speed
153 If set to true, then the current bandwidth utilization will be logged
154 every second.  Even if this is disabled, you can see this information
155 by running the
156 .B uptime
157 command on the CLI.
158 .TP
159 .B multi_read_count
160 Number of packets to read off each of the UDP and TUN fds when
161 returned as readable by select (default: 10).  Avoids incurring the
162 unnecessary system call overhead of select on busy servers.
163 .TP
164 .B scheduler_fifo
165 Sets the scheduling policy for the
166 .B l2tpns
167 process to
168 .BR SCHED_FIFO .
169 This causes the kernel to immediately preempt any currently running
170 .B SCHED_OTHER
171 (normal) process in favour of
172 .B l2tpns
173 when it becomes runnable. 
174 .br
175 Ignored on uniprocessor systems.
176 .TP
177 .B lock_pages
178 Keep all pages mapped by the
179 .B l2tpns
180 process in memory.
181 .TP
182 .B icmp_rate
183 Maximum number of host unreachable ICMP packets to send per second.
184 .TP
185 .B packet_limit
186 Maximum number of packets of downstream traffic to be handled each
187 tenth of a second per session.  If zero, no limit is applied (default: 
188 0).  Intended as a DoS prevention mechanism and not a general
189 throttling control (packets are dropped, not queued).
190 .TP
191 .B cluster_address
192 Multicast cluster address (default: 239.192.13.13).
193 .TP
194 .B cluster_interface
195 Interface for cluster packets (default: eth0).
196 .TP
197 .B cluster_hb_interval
198 Interval in tenths of a second between cluster heartbeat/pings.
199 .TP
200 .B cluster_hb_timeout
201 Cluster heartbeat timeout in tenths of a second.  A new master will be
202 elected when this interval has been passed without seeing a heartbeat
203 from the master.
204 .TP
205 .B cluster_master_min_adv
206 Determines the minumum number of up to date slaves required before the
207 master will drop routes (default: 1).
208 .TP
209 .B ipv6_prefix
210 Enable negotiation of IPv6.  This forms the the first 64 bits of the
211 client allocated address.  The remaining 64 come from the allocated
212 IPv4 address and 4 bytes of 0s.
213 .RE
214 .SS BGP ROUTING
215 The routing configuration section is entered by the command
216 .IP
217 .BI "router bgp " as
218 .PP
219 where
220 .I as
221 specifies the local AS number.
222 .PP
223 Subsequent lines prefixed with
224 .BI "neighbour " peer
225 define the attributes of BGP neighhbours.  Valid commands are:
226 .IP
227 .BI "neighbour " peer " remote-as " as
228 .br
229 .BI "neighbour " peer " timers " "keepalive hold"
230 .PP
231 Where
232 .I peer
233 specifies the BGP neighbour as either a hostname or IP address,
234 .I as
235 is the remote AS number and
236 .IR keepalive ,
237 .I hold
238 are the timer values in seconds.
239 .SS NAMED ACCESS LISTS
240 Named access lists may be defined with either of
241 .IP
242 .BI "ip access\-list standard " name
243 .br
244 .BI "ip access\-list extended " name
245 .PP
246 Subsequent lines starting with
247 .B permit
248 or
249 .B deny
250 define the body of the access\-list.
251 .PP
252 .B Standard Access Lists
253 .RS 4n
254 Standard access lists are defined with:
255 .IP
256 .RB { permit | deny }
257 .IR source " [" dest ]
258 .PP
259 Where
260 .I source
261 and
262 .I dest
263 specify IP matches using one of:
264 .IP
265 .I address
266 .I wildard
267 .br
268 .B host
269 .I address
270 .br
271 .B any
272 .PP
273 .I address
274 and
275 .I wildard
276 are in dotted-quad notation, bits in the
277 .I wildard
278 indicate which address bits in
279 .I address
280 are relevant to the match (0 = exact match; 1 = don't care).
281 .PP
282 The shorthand
283 .RB ' host
284 .IR address '
285 is equivalent to
286 .RI ' address
287 .BR 0.0.0.0 ';
288 .RB ' any '
289 to
290 .RB ' 0.0.0.0
291 .BR 255.255.255.255 '.
292 .RE
293 .PP
294 .B Extended Access Lists
295 .RS 4n
296 Extended access lists are defined with:
297 .IP
298 .RB { permit | deny }
299 .I proto
300 .IR source " [" ports "] " dest " [" ports "] [" flags ]
301 .PP
302 Where
303 .I proto
304 is one of
305 .BR ip ,
306 .B tcp
307 or
308 .BR udp ,
309 and
310 .I source
311 and
312 .I dest
313 are as described above for standard lists.
314 .PP
315 For TCP and UDP matches, source and destination may be optionally
316 followed by a
317 .I ports
318 specification:
319 .IP
320 .RB { eq | neq | gt | lt }
321 .I port
322 .br
323 .B
324 range
325 .I from to
326 .PP
327 .I flags
328 may be one of:
329 .RS
330 .HP
331 .RB { match\-any | match\-all }
332 .RB { + | - }{ fin | syn | rst | psh | ack | urg }
333 \&...
334 .br
335 Match packets with any or all of the tcp flags set
336 .RB ( + )
337 or clear
338 .RB ( - ).
339 .HP
340 .B established
341 .br
342 Match "established" TCP connections:  packets with
343 .B RST
344 or
345 .B ACK
346 set, and
347 .B SYN
348 clear.
349 .HP
350 .B fragments
351 .br
352 Match IP fragments.  May not be specified on rules with layer 4
353 matches.
354 .RE
355 .SH SEE ALSO
356 .BR l2tpns (8)