update ipv6_prefix description
[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.7 2005/05/10 11:59:25 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 ipv6_prefix
193 Enable negotiation of IPv6.  This forms the the first 64 bits of the
194 client allocated address.  The remaining 64 come from the allocated
195 IPv4 address and 4 bytes of 0s.
196 .RE
197 .SS BGP ROUTING
198 The routing configuration section is entered by the command
199 .IP
200 .BI "router bgp " as
201 .PP
202 where
203 .I as
204 specifies the local AS number.
205 .PP
206 Subsequent lines prefixed with
207 .BI "neighbour " peer
208 define the attributes of BGP neighhbours.  Valid commands are:
209 .IP
210 .BI "neighbour " peer " remote-as " as
211 .br
212 .BI "neighbour " peer " timers " "keepalive hold"
213 .PP
214 Where
215 .I peer
216 specifies the BGP neighbour as either a hostname or IP address,
217 .I as
218 is the remote AS number and
219 .IR keepalive ,
220 .I hold
221 are the timer values in seconds.
222 .SS NAMED ACCESS LISTS
223 Named access lists may be defined with either of
224 .IP
225 .BI "ip access\-list standard " name
226 .br
227 .BI "ip access\-list extended " name
228 .PP
229 Subsequent lines starting with
230 .B permit
231 or
232 .B deny
233 define the body of the access\-list.
234 .PP
235 .B Standard Access Lists
236 .RS 4n
237 Standard access lists are defined with:
238 .IP
239 .RB { permit | deny }
240 .IR source " [" dest ]
241 .PP
242 Where
243 .I source
244 and
245 .I dest
246 specify IP matches using one of:
247 .IP
248 .I address
249 .I wildard
250 .br
251 .B host
252 .I address
253 .br
254 .B any
255 .PP
256 .I address
257 and
258 .I wildard
259 are in dotted-quad notation, bits in the
260 .I wildard
261 indicate which address bits in
262 .I address
263 are relevant to the match (0 = exact match; 1 = don't care).
264 .PP
265 The shorthand
266 .RB ' host
267 .IR address '
268 is equivalent to
269 .RI ' address
270 .BR 0.0.0.0 ';
271 .RB ' any '
272 to
273 .RB ' 0.0.0.0
274 .BR 255.255.255.255 '.
275 .RE
276 .PP
277 .B Extended Access Lists
278 .RS 4n
279 Extended access lists are defined with:
280 .IP
281 .RB { permit | deny }
282 .I proto
283 .IR source " [" ports "] " dest " [" ports "] [" flags ]
284 .PP
285 Where
286 .I proto
287 is one of
288 .BR ip ,
289 .B tcp
290 or
291 .BR udp ,
292 and
293 .I source
294 and
295 .I dest
296 are as described above for standard lists.
297 .PP
298 For TCP and UDP matches, source and destination may be optionally
299 followed by a
300 .I ports
301 specification:
302 .IP
303 .RB { eq | neq | gt | lt }
304 .I port
305 .br
306 .B
307 range
308 .I from to
309 .PP
310 .I flags
311 may be one of:
312 .RS
313 .HP
314 .RB { match\-any | match\-all }
315 .RB { + | - }{ fin | syn | rst | psh | ack | urg }
316 \&...
317 .br
318 Match packets with any or all of the tcp flags set
319 .RB ( + )
320 or clear
321 .RB ( - ).
322 .HP
323 .B established
324 .br
325 Match "established" TCP connections:  packets with
326 .B RST
327 or
328 .B ACK
329 set, and
330 .B SYN
331 clear.
332 .HP
333 .B fragments
334 .br
335 Match IP fragments.  May not be specified on rules with layer 4
336 matches.
337 .RE
338 .SH SEE ALSO
339 .BR l2tpns (8)