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