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