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