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