|
1 <html> |
|
2 <head> |
|
3 <title> DTN2 Manual: dtnd Configuration </title> |
|
4 <link rel="stylesheet" type="text/css" href="manual.css" /> |
|
5 </head> |
|
6 <body> |
|
7 <h1>dtnd Configuration |
|
8 </h1> |
|
9 |
|
10 <p> |
|
11 <i>Note that lots of the info that should be on this page |
|
12 has not been written up yet. Please see <a href="todo.html">the to do |
|
13 list</a> for information on how you can help.</i> |
|
14 |
|
15 <p> |
|
16 At startup, dtnd creates an initializes a TCL interpreter. It then |
|
17 loads and evaluates the contents of the configuration file. For |
|
18 more info on the TCL language, see the <a href="http://www.tcl.tk"> |
|
19 TCL homepage</a>. |
|
20 |
|
21 <p> |
|
22 The name of the configuration file is usually set with the -c argument. If |
|
23 the -c argument is missing, dtnd will try to load |
|
24 <tt>/etc/dtn.conf</tt>. If that file is not readable, it will try to |
|
25 read <tt>daemon/dtn.conf</tt>. If that file is not readable, it |
|
26 will log a warning and continue without a configuration file. |
|
27 You may still configure dtnd by hand at the <tt>dtn%</tt> prompt. |
|
28 |
|
29 <p> |
|
30 Each of the commands that dtnd handles is described below. These are |
|
31 extensions to the normal TCL command set. You may always use TCL |
|
32 commands and other expressions in your dtn.conf configuration file. For an |
|
33 example of this, search for <tt>[info hostname]</tt> in the sample |
|
34 <tt>daemon/dtn.conf</tt> file. |
|
35 |
|
36 <a name="api"/> |
|
37 <h2> api </h2> |
|
38 |
|
39 <p> |
|
40 Syntax: <tt>api set <i>variable</i> <i>value</i> </tt> |
|
41 <br> |
|
42 Example: <tt>api set local_addr 10.0.0.1</tt> |
|
43 |
|
44 <p> |
|
45 Use the <tt>api</tt> command to configure the interface between |
|
46 dtnd and the DTN applications (like dtnping, dtncp, etc). |
|
47 See also <a href="environment.html">environment variables</a> |
|
48 which are used to control the behavior of the API clients. |
|
49 |
|
50 <p> |
|
51 <table> |
|
52 <tr> |
|
53 <th>Variable |
|
54 <th>Possible settings |
|
55 <th>Default |
|
56 <th>Comments |
|
57 |
|
58 <tr> |
|
59 <td><tt>local_addr</tt> |
|
60 <td>An IP address or a hostname. |
|
61 <td>127.0.0.1 |
|
62 <td>The IP address the API Server will listen to for requests from |
|
63 API clients. |
|
64 |
|
65 <tr> |
|
66 <td><tt>local_port</tt> |
|
67 <td>An IP port number |
|
68 <td>5010 |
|
69 <td>The IP port on which the API Server listens for requests from |
|
70 API clients. |
|
71 |
|
72 </table> |
|
73 |
|
74 <a name="bundle"/> |
|
75 <h2> bundle </h2> |
|
76 |
|
77 <p> You can use the <tt>bundle</tt> command to see the status of |
|
78 bundles currently being held by your dtnd. |
|
79 |
|
80 <p> |
|
81 Syntax: <tt>bundle <i>command</i> [<i>id</i>] </tt> |
|
82 <br> |
|
83 Example: <tt>storage set type berkeleydb</tt> |
|
84 |
|
85 <p> |
|
86 Use the <tt>bundle</tt> command to get high level information on the bundle and bundle daemon statistcs, |
|
87 |
|
88 <p> |
|
89 <table> |
|
90 <tr> |
|
91 <th>Command |
|
92 <th>Comments |
|
93 <tr> |
|
94 <td><tt>stats</tt> |
|
95 <td>list bundle statistics. |
|
96 |
|
97 <tr> |
|
98 <td><tt>daemon_stats</tt> |
|
99 <td>list bundle daemon statistics. |
|
100 |
|
101 <tr> |
|
102 <td><tt>reset_stats</tt> |
|
103 <td>reset bundle statistics. |
|
104 |
|
105 <tr> |
|
106 <td><tt>list</tt> |
|
107 <td>list all bundle. |
|
108 |
|
109 <tr> |
|
110 <td><tt>ids</tt> |
|
111 <td>list all bundle IDs. |
|
112 </table> |
|
113 |
|
114 <p>While testing a DTN, you can also inject bundles. |
|
115 <p> |
|
116 Syntax: <tt>bundle inject <i>src</i> <i>dest</i> <i>payload</i> <i>opt1=val1, opt2=val2 optN=valN...</tt> |
|
117 <br> |
|
118 Example: <tt>bundle inject dtn://source.dtn dtn://dest.dtn payload</tt> |
|
119 |
|
120 <a name="Getting bundle and bundle daemon statistics"/> |
|
121 <h3> Getting bundle and bundle daemon statistics </h3> |
|
122 |
|
123 <p>The <tt>bundle stats</tt> command shows the following counts: |
|
124 <ul> |
|
125 <li> pending |
|
126 <li> custody |
|
127 <li> received |
|
128 <li> delivered |
|
129 <li> generated |
|
130 <li> transmitted |
|
131 <li> expired |
|
132 <li> duplicate |
|
133 <li> deleted |
|
134 <li> injected |
|
135 </ul> |
|
136 |
|
137 <p>Pending is the current count of bundles in dtnd's store, which may |
|
138 be non-zero when the server starts if bundles are still in the store |
|
139 from the last time the server was running. All the other |
|
140 counters are zeroed when the server boots. Pending is |
|
141 practically limited by the storage system and the memory use of dtnd. |
|
142 The other counters are unsigned 32-bit integers, and will roll over |
|
143 accordingly. |
|
144 |
|
145 <p> bundle <i>reset_stats</i> may be used to reset currently maintained statistics. |
|
146 |
|
147 <p>The <tt>bundle daemon_stats</tt> command shows the following counts: |
|
148 <ul> |
|
149 <li> pending_events |
|
150 <li> processed_event |
|
151 <li> pending_timers |
|
152 </ul> |
|
153 <a name="Getting a list of pending bundles"/> |
|
154 <h3> Getting a list of pending bundles </h3> |
|
155 |
|
156 <p> |
|
157 The <tt>bundle list</tt> command shows a list of all pending |
|
158 bundles in the system. It looks like this: |
|
159 |
|
160 <blockquote><pre>dtn% bundle list |
|
161 Currently Pending Bundles (2): |
|
162 0 : dtn://mars/rover -> dtn://jpl/images length 8096266 |
|
163 1 : dtn://jpl/commands -> dtn://mars/rover length 18</pre></blockquote> |
|
164 |
|
165 <p>To the left of the colon is the bundle ID. This number is used |
|
166 internally by dtnd to keep track of bundles. Remote DTN |
|
167 implementations will never see the bundle ID. However, you can use |
|
168 the bundle ID with the following commands to inspect the bundles. |
|
169 |
|
170 <a name="Looking at a bundle"/> |
|
171 <h3> Looking at a bundle </h3> |
|
172 |
|
173 <p> Using <tt>bundle info <i>bundle-id</i></tt>, you can see more |
|
174 information about a bundle. Using <tt>bundle dump <i>bundle-id</i></tt>, |
|
175 you can see a hex dump of the bundle. If you know the bundle has only |
|
176 printable characters in it, you can see it formatted as a text |
|
177 file using <tt>bundle dump_ascii <i>bundle-id</i></tt>. |
|
178 |
|
179 <a name="Injecting a bundle"/> |
|
180 <h3> Injecting a bundle </h3> |
|
181 |
|
182 <p> |
|
183 Syntax: <tt>bundle inject <i>source</i> <i>dest</i> <i>payload</i> |
|
184 [ <i>length</i> ]</tt> |
|
185 <br> |
|
186 Example: <tt>bundle inject dtn://jpl/commands |
|
187 dtn://mars/rover "turn left 30 degrees, please"</tt> |
|
188 |
|
189 <p> You can use <tt>bundle inject</tt> to inject a synthetic bundle |
|
190 into dtnd. It will route and deliver that packet just like any other |
|
191 bundle, as long as it is valid. You have more control over bundles |
|
192 you add using the <a href="man/dtnsend">dtnsend</a> client |
|
193 application, so it is probably almost always a better choice, even |
|
194 for testing situations. |
|
195 |
|
196 <p><b>Note:</b> It is currently possible to crash the server using |
|
197 <tt>bundle inject</tt> with incorrect parameters. Please do not use |
|
198 this command unless you can tolerate a server crash. The crash comes |
|
199 from a failing assert, so the daemon notices the bad bundle, it just |
|
200 cannot proceed with the bad bundle in the store. Once it the bad |
|
201 bundle is in the store, you will need to use the "--tidy" option |
|
202 to remove it and any other pending bundles. |
|
203 |
|
204 <p>The length parameter is optional. If you inject a bundle without |
|
205 using it, the length of the bundle will simply be the length of the |
|
206 string you pass in as the payload. The length parameter can allow |
|
207 you to make huge bundles without having to use a huge payload |
|
208 string. The payload string is used for at the beginning of the |
|
209 bundle and the remainder of the bundle is filled with zeros. |
|
210 (But there's a bug that makes this not work right. Try dumping |
|
211 out a bundle you made this way to see an assert.) |
|
212 |
|
213 <a name="console"/> |
|
214 <h2> console </h2> |
|
215 <p> The <tt>console</tt> command is used spawn interpreter on |
|
216 stdin/stdout, set the console prompt string and set the console |
|
217 listening address and port number. |
|
218 |
|
219 <h4> console <i>cmd</i> </h4> |
|
220 <p> |
|
221 Syntax: <tt>console <i>set</i> <i>arg</i> </tt> |
|
222 <br> |
|
223 Example: <tt>console set prompt "$shorthostname dtn% "</i> </tt> |
|
224 <p> |
|
225 <table> |
|
226 <tr> |
|
227 <th>Variable |
|
228 <th>Possible settings |
|
229 <th>Default |
|
230 <th>Comments |
|
231 |
|
232 <tr> |
|
233 <td><tt>stdio</tt> |
|
234 <td>None |
|
235 <td>stdio |
|
236 <td>spawn interpreter on stdin/stdout |
|
237 |
|
238 <tr> |
|
239 <td><tt>addr</tt> |
|
240 <td>A.B.C.D |
|
241 <td>127.0.0.1 |
|
242 <td>console listening address |
|
243 |
|
244 <tr> |
|
245 <td><tt>port</tt> |
|
246 <td>number |
|
247 <td>0 |
|
248 <td>console listening port |
|
249 |
|
250 <tr> |
|
251 <td><tt>prompt</tt> |
|
252 <td>string |
|
253 <td>shorthostname [lindex [split [info hostname] .] 0] dtn% |
|
254 <td>console prompt string |
|
255 |
|
256 |
|
257 |
|
258 </table> |
|
259 |
|
260 <a name="debug"/> |
|
261 <h2> debug </h2> |
|
262 |
|
263 <p> The <tt>debug</tt> command exists in all versions of dtnd, but |
|
264 the subcommands are only available if you gave "--enable-debug-memory" |
|
265 to the configure script while building dtnd. It is not enabled by |
|
266 default. You can tell if your dtnd binary has memory debugging support |
|
267 by running <tt>help debug</tt>. |
|
268 |
|
269 <p> When memory use debugging is enabled, you can get a dump of memory |
|
270 in use using <tt>debug dump_memory</tt>. After doing one dump, you |
|
271 can get diffs with <tt>debug dump_memory_diffs</tt>. |
|
272 |
|
273 <p> For information on debugging and configuring logging of the dtn |
|
274 daemon please see the <a href="logging.html">logging</a> section and <a href="logging.html#dtndebug">.dtndebug</a> |
|
275 |
|
276 <a name="discovery"/> |
|
277 <h2> discovery </h2> |
|
278 |
|
279 <p> The <tt>discovery</tt> command is used to configure the abstraction |
|
280 of a neighbor discovery agent. Much like Interface, Discovery is generally |
|
281 created by the configuration file / console. Derived classes (such as |
|
282 IPDiscovery) typically bind to a UDP socket to listen for neighbor beacons. |
|
283 Bluetooth has built-in discovery mechanisms, so BluetoothDiscovery polls |
|
284 via Inquiry instead of listening on a socket. |
|
285 |
|
286 <p>To advertise a local convergence layer, register its local address (and port) |
|
287 by calling "discovery add". For each registered CL, Discovery will |
|
288 advertise (outbound) the CL's presence to neighbors,and distribute |
|
289 (inbound) each event of neighbor discovery to each CL. |
|
290 |
|
291 <a name="discovery_add"/> |
|
292 <h4> The discovery <i>add</i> command</h4> |
|
293 <p> |
|
294 This command is used to add a discovery agent. |
|
295 <p> |
|
296 Syntax: <tt>discovery <i>add</i> <i>discovery_name</i> <i>cl-type</i> [ <i>args</i> ]</tt> |
|
297 <br> |
|
298 <p> |
|
299 Example: <tt>discovery add udp0d ip port=9556</tt> |
|
300 <br> |
|
301 <p> |
|
302 Example : <tt>discovery add btd bt</tt> |
|
303 <br> |
|
304 <p> |
|
305 Example: <tt>discovery add bonjourd bonjour</tt> |
|
306 |
|
307 <p> |
|
308 <table> |
|
309 <tr> |
|
310 <th>Variable |
|
311 <th>Possible settings |
|
312 <th>Comments |
|
313 |
|
314 <tr> |
|
315 <td><tt>discovery_name</tt> |
|
316 <td>string |
|
317 <td> A name string to identify the discovery agent |
|
318 |
|
319 <tr> |
|
320 <td><tt>cl-type</tt> |
|
321 <td>bt | ip | bonjour |
|
322 <td> The convergence layer type. |
|
323 </table> |
|
324 |
|
325 |
|
326 <p> |
|
327 <table> |
|
328 <tr> |
|
329 <th>args |
|
330 <th>Possible settings |
|
331 <th>Comments |
|
332 |
|
333 <tr> |
|
334 <td><tt>port</tt> |
|
335 <td>number |
|
336 <td> Discovery port number if IP based |
|
337 |
|
338 <tr> |
|
339 <td><tt>continue_on_error</tt> |
|
340 <td>true or false |
|
341 <td> Whether to continue on an error |
|
342 |
|
343 <tr> |
|
344 <td><tt>addr</tt> |
|
345 <td>A.B.C.D |
|
346 <td> IPv4 address of .. |
|
347 |
|
348 <tr> |
|
349 <td><tt>local_addr</tt> |
|
350 <td>A.B.C.D |
|
351 <td> IPv4 address of .. |
|
352 |
|
353 <tr> |
|
354 <td><tt>multicast_ttl</tt> |
|
355 <td>number |
|
356 <td> Multicast time to live |
|
357 |
|
358 <tr> |
|
359 <td><tt>unicast</tt> |
|
360 <td>true or false |
|
361 <td> Whether is unicast |
|
362 </table> |
|
363 <a name="discovery_announce"/> |
|
364 <h4> The discovery <i>announce</i> command</h4> |
|
365 <p> |
|
366 This command is used to announce the address of a local interface (convergence layer). |
|
367 <p> |
|
368 Syntax: <tt>discovery <i>announce</i> <i>cl-name</i> <i>discovery_name</i> <i>cl-type</i> <interval=N> [ <i>args</i> ]</tt> |
|
369 <br> |
|
370 <p> |
|
371 Example <tt>discovery announce udp0 udp0d udp interval=10</tt> |
|
372 <br> |
|
373 <p> |
|
374 Example <tt>discovery announce bt0 btd bt interval=1</tt> |
|
375 <p> |
|
376 <table> |
|
377 <tr> |
|
378 <th>args |
|
379 <th>Possible settings |
|
380 <th>Comments |
|
381 |
|
382 <tr> |
|
383 <td><tt>cl_addr</tt> |
|
384 <td>A.B.C.D |
|
385 <td> IPv4 address of CL to announce |
|
386 |
|
387 <tr> |
|
388 <td><tt>cl_port</tt> |
|
389 <td>number (port) |
|
390 <td> port number of CL to announce |
|
391 </table> |
|
392 <a name="discovery_remove"/> |
|
393 <h4> The discovery <i>remove</i> command</h4> |
|
394 <p> |
|
395 This command is used to remove an announcement for a local interface. |
|
396 <p> |
|
397 Syntax: <tt>discovery <i>remove</i> <i>announce</i> <i>discovery_name</i></tt> |
|
398 <br> |
|
399 <p> |
|
400 Example: <tt>discovery remove bt0 btd</tt> |
|
401 <br> |
|
402 <a name="discovery_delete"/> |
|
403 <h4> The discovery <i>del</i> command</h4> |
|
404 <p> |
|
405 This command is used to delete a discovery agent. |
|
406 <p> |
|
407 Syntax: <tt>discovery <i>del</i> <i>discovery_name</i></tt> |
|
408 <br> |
|
409 <p> |
|
410 Example: <tt>discovery del btd</tt> |
|
411 <br> |
|
412 <a name="discovery_list"/> |
|
413 <h4> The discovery <i>list</i> command</h4> |
|
414 <p> |
|
415 This command is used to list agents and their announcement parameters. |
|
416 <p> |
|
417 Syntax: <tt>discovery <i>list</i></tt> |
|
418 <br> |
|
419 <p> |
|
420 Example: <tt>discovery list</tt> |
|
421 <br> |
|
422 |
|
423 |
|
424 <a name="ecla"/> |
|
425 <h2> ecla </h2> |
|
426 <p>The <tt>ecla</tt> command is used to control the external convergence layer (ECL) is the gateway between DTN2 and convergence layer adapters (CLAs) running outside of DTN2. Please see <a href="cl-extcl.html#ecla_cmd">ecla</a> for details. |
|
427 |
|
428 <p> |
|
429 Syntax: <tt>ecla <i>command</i> </tt> |
|
430 <br> |
|
431 Example: <tt>ecla set create_discovered_links</tt> |
|
432 |
|
433 <a name="gettimeofday"/> |
|
434 <h2> gettimeofday </h2> |
|
435 <p>The <tt>gettimeofday</tt> command is used to print the result of gettimeofday() in secs.usecs format. |
|
436 |
|
437 <p> |
|
438 Syntax: <tt>gettimeofday</tt> |
|
439 <br> |
|
440 Example: <tt>gettimeofday</tt> |
|
441 |
|
442 <a name="help"/> |
|
443 <h2> help </h2> |
|
444 |
|
445 <p> |
|
446 You can get help on any of the additional TCL commands in dtnd's |
|
447 TCL interpreter using the <tt>help</tt> command. |
|
448 <p> |
|
449 Syntax: <tt>help <i>command</i> </tt> |
|
450 <br> |
|
451 Example: <tt>help interface</tt |
|
452 |
|
453 <p> |
|
454 <table> |
|
455 <tr> |
|
456 <th>Command |
|
457 <th>Comments |
|
458 |
|
459 <tr> |
|
460 <td><a href="#bundle">bundle</a> |
|
461 <td>print bundle and bundle daemon statistics and interact with the bundle daemon. Also used to examine, dump, expire, cancel and inject bundles. |
|
462 |
|
463 <tr> |
|
464 <td><a href="#console">console</a> |
|
465 <td>set console parameters |
|
466 |
|
467 <tr> |
|
468 <td><a href="#debug">debug</a> |
|
469 <td>Command for memory debugging. Only available if "--enable-debug-memory" was given to the configure script. |
|
470 <tr> |
|
471 <td><a href="#discovery">discovery</a> |
|
472 <td>add, delete and list discovery agent and announce parameters |
|
473 |
|
474 <tr> |
|
475 <td><a href="#ecla">ecla</a> |
|
476 <td>list and set the external convergence layer adapter parameters |
|
477 |
|
478 <tr> |
|
479 <td><a href="#gettimeofday">gettimeofday</a> |
|
480 <td>print the result of gettimeofday() in secs.usecs format. |
|
481 |
|
482 <tr> |
|
483 <td><a href="#help">help</a> |
|
484 <td>print the help documentation for cmd. |
|
485 |
|
486 <tr> |
|
487 <td><a href="#interface">interface</a> |
|
488 <td>add, delete and list interface parameters. |
|
489 |
|
490 <tr> |
|
491 <td><a href="#link">link</a> |
|
492 <td>add, delete, reconfigure and list link parameters and statistics. Also used to modify default CLA parameters. |
|
493 |
|
494 <tr> |
|
495 <td><a href="#log">log</a> |
|
496 <td>set log and debug file pathname and level and prefix. Also used to rotate log file, reparse rule file and list filter rules. |
|
497 |
|
498 <tr> |
|
499 <td><a href="#param">param</a> |
|
500 <td>set various dtnd daemon parameters and policy. |
|
501 |
|
502 <tr> |
|
503 <td><a href="#prophet">prophet</a> |
|
504 <td>manipulate the prophet routing protocol. These parameters should be manipulated under the route command interface like other DTN routing algorithms and protocols. |
|
505 |
|
506 <tr> |
|
507 <td><a href="#quit">quit</a> |
|
508 <td>shutdown the daemon |
|
509 |
|
510 <tr> |
|
511 <td><a href="#registration">registration</a> |
|
512 <td>add, delete and list endpoint (EID) registrations and modify registration logger. |
|
513 |
|
514 <tr> |
|
515 <td><a href="#route">route</a> |
|
516 <td>add, delete, list routes, select and configure routing algorithms/protocols. Can be used to set various route parameters including setting of type, next hop routes, route priority, interaction with discovery, DTLSR parameters, and external route parameters. |
|
517 |
|
518 <tr> |
|
519 <td><a href="#shutdown">shutdown</a> |
|
520 <td>gracefully shutdown the dtnd daemon. |
|
521 |
|
522 <tr> |
|
523 <td><a href="#storage">storage</a> |
|
524 <td>set storage backend type, parameters and view statistics. |
|
525 |
|
526 <tr> |
|
527 <td><a href="#test">test</a> |
|
528 <td>Command for developer tests |
|
529 |
|
530 </table> |
|
531 |
|
532 </table> |
|
533 <a name="interface"/> |
|
534 <h2> interface </h2> |
|
535 |
|
536 <p>Use the interface command to add and delete interfaces to the |
|
537 networks that your dtnd will talk on. |
|
538 |
|
539 <a name="Adding an interface"/> |
|
540 <h3> Adding an interface </h3> |
|
541 |
|
542 <p> |
|
543 Syntax: <tt>interface add <i>interface-name</i> <i>convergence-layer</i> [ <i>args</i> ]</tt> |
|
544 <p> |
|
545 <br> |
|
546 Example: <tt>interface add tcp0 tcp</tt><br> |
|
547 <br> |
|
548 Example: <tt>interface add udp0 udp local_host=1.2.3.4 local_port=9999</tt><br> |
|
549 <br> |
|
550 Example: <tt>interface add bt0 bt channel=10</tt><br> |
|
551 <br> |
|
552 Example: <tt>interface add eth string://eth0 beacon_interval=1</tt><br> |
|
553 <br> |
|
554 Example: <tt>interface add null</tt><br> |
|
555 <p> When dtnd encounters an <tt>interface add</tt> command, it |
|
556 checks to make sure the named interface has not been created before. |
|
557 Next, it looks for a matching convergence layer. |
|
558 If both of those steps succeed, it |
|
559 passes the remaining arguments to the convergence layer to configure a new |
|
560 interface which will listen for incoming bundles. |
|
561 |
|
562 <p> |
|
563 The arguments, if they exist, are a list of strings (delimited by "", |
|
564 or {}, according to TCL syntax). Each string starts with the parameter |
|
565 name, then an equal sign ("="), then the value. |
|
566 |
|
567 <a name="cls"> |
|
568 <p> |
|
569 See the following pages on the different convergence layers, |
|
570 and what arguments they take. |
|
571 |
|
572 <ul> |
|
573 <li><a href="cl-tcp.html">tcp</a> |
|
574 <li><a href="cl-udp.html">udp</a> |
|
575 <li><a href="cl-eth.html">eth</a> |
|
576 <li><a href="cl-file.html">file</a> |
|
577 <li><a href="cl-bt.html">bt</a> |
|
578 <li><a href="cl-serial.html">serial</a> |
|
579 <li><a href="cl-norm.html">norm</a> |
|
580 <li><a href="cl-extcl.html">extcl</a> |
|
581 <li><a href="cl-null.html">null</a> |
|
582 |
|
583 </ul> |
|
584 |
|
585 <a name="Deleting an interface"/> |
|
586 <h3> Deleting an interface </h3> |
|
587 |
|
588 <p> |
|
589 Syntax: <tt>interface del <i>convergence-layer</i> </tt> |
|
590 <br> |
|
591 Example: <tt>interface del tcp0</tt> |
|
592 |
|
593 <p> |
|
594 Deletes an interface from the system. Each convergence layer |
|
595 handles this individually, but generally the convergence layer |
|
596 stops listening for new bundles and cleans up any resources it |
|
597 was using. |
|
598 |
|
599 <a name="Listing an interface"/> |
|
600 <h3> Listing the interfaces </h3> |
|
601 |
|
602 <p> |
|
603 Syntax: <tt>interface list</tt> |
|
604 <br> |
|
605 Example: <tt>interface list</tt> |
|
606 |
|
607 <p> |
|
608 Prints a list of the current interfaces. |
|
609 |
|
610 <a name="log"/> |
|
611 <h2> log </h2> |
|
612 |
|
613 <p> |
|
614 The <tt>log</tt> command deals with the log file, and the log messages |
|
615 in it. You can add messages of your own to the log file, or trigger |
|
616 various actions related to the log file. |
|
617 <a name="Logging a message of your own"/> |
|
618 <h3> Logging a message of your own </h3> |
|
619 <p> |
|
620 Syntax: <tt>log <i>log-path</i> <i>log-level</i> <i>log-string</i> </tt> |
|
621 <br> |
|
622 Example: <tt>log /dtnd info "dtnd parsing configuration..."</tt> |
|
623 |
|
624 <p> |
|
625 You can use the <tt>log</tt> command to add a log message to the dtnd |
|
626 log file. The log-path and log-level are used to filter out messages, |
|
627 as described in the section on <a href="logging.html">Logging</a>. |
|
628 |
|
629 <a name="Set the log prefix"/> |
|
630 <h3> Set the log prefix </h3> |
|
631 |
|
632 <p> |
|
633 Syntax: <tt>log prefix <i>prefix</i></tt> |
|
634 <br> |
|
635 Example: <tt>log prefix testing</tt> |
|
636 |
|
637 <p> |
|
638 The log prefix shows up in log entries after the left bracket, and |
|
639 before the timestamp. You can set it to any string. |
|
640 |
|
641 <a name="rotate"> |
|
642 <h3> Rotate the log file </h3> |
|
643 |
|
644 <p> |
|
645 Syntax: <tt>log rotate</tt> |
|
646 <br> |
|
647 Example: <tt>log rotate</tt> |
|
648 |
|
649 <p> |
|
650 Use this command to force dtnd to reopen the log file for writing. |
|
651 Under Unix, even after you have renamed the log file, dtnd will |
|
652 continue writing log entries into the file until it executes the |
|
653 <tt>log rotate</tt> command. |
|
654 |
|
655 <p> |
|
656 You can include a procedure like this in your dtnd.conf file |
|
657 to arrange for dtnd to make a new log file every hour: |
|
658 |
|
659 <blockquote><pre># Rotate the log every 3600 seconds (1 hour) |
|
660 # the initial call to rotate (after the proc) is required to |
|
661 # start the proc running every hour. |
|
662 proc rotate {} { |
|
663 set date [ clock format [ clock seconds ] -format "%Y-%m-%d-%H" ] |
|
664 set new "dtnd.$date.log" |
|
665 file rename "dtnd.log" $new |
|
666 |
|
667 log rotate |
|
668 |
|
669 after 3600000 rotate |
|
670 } |
|
671 rotate</pre></blockquote> |
|
672 |
|
673 <p> |
|
674 Of course, for this to work, you need to start dtnd in the directory |
|
675 where the log file will be, and use the "-o dtnd.log" argument to set |
|
676 the log file name. |
|
677 |
|
678 <a name="reparse_debug_file"/> |
|
679 <h3> Change log level </h3> |
|
680 |
|
681 <p> |
|
682 Syntax: <tt>log reparse_debug_file</tt> |
|
683 <br> |
|
684 Example: <tt>log reparse_debug_file</tt> |
|
685 |
|
686 <p> The system which dtnd uses to choose which messages to log and |
|
687 which to hide is described in the <a href="logging.html">Logging</a> |
|
688 section of the manual. This command forces dtnd to re-read the |
|
689 <tt>.dtndebug</tt> file and take into account any new rules that it |
|
690 finds for showing or hiding messages. |
|
691 |
|
692 |
|
693 <a name="param"/> |
|
694 <h2> param </h2> |
|
695 |
|
696 <p> |
|
697 The <tt>param</tt> command is used to configure policy parameters. |
|
698 <h4> param set </h4> |
|
699 <p> |
|
700 Syntax: <tt>param <i>set</i> <i>arg</i> <i>val</i></tt> |
|
701 <br> |
|
702 Example: <tt>param set link_min_retry_interval 30</tt> |
|
703 |
|
704 <p> |
|
705 <table> |
|
706 <tr> |
|
707 <th>arg |
|
708 <th>Possible settings |
|
709 <th>Default |
|
710 <th>Comments |
|
711 |
|
712 <tr> |
|
713 <td><tt>payload_test_no_remove</tt> |
|
714 <td>true or false |
|
715 <td>false |
|
716 <td>Whether not to remove bundles (for testing). |
|
717 |
|
718 <tr> |
|
719 <td><tt>early_deletion</tt> |
|
720 <td>true or false |
|
721 <td>true |
|
722 <td>Whether to delete forwarded / delivered bundles before they've expired |
|
723 |
|
724 <tr> |
|
725 <td><tt>suppress_duplicates</tt> |
|
726 <td>true or false |
|
727 <td>true |
|
728 <td>Whether to not route bundles that are a duplicate of any currently pending bundle |
|
729 |
|
730 <tr> |
|
731 <td><tt>accept_custody</tt> |
|
732 <td>true or false |
|
733 <td>true |
|
734 <td>Whether to accept custody when requested |
|
735 |
|
736 <tr> |
|
737 <td><tt>reactive_frag_enabled</tt> |
|
738 <td>true or false |
|
739 <td>true |
|
740 <td>Whether reactive fragmentation is enabled |
|
741 |
|
742 <tr> |
|
743 <td><tt>retry_reliable_unacked</tt> |
|
744 <td>true or false |
|
745 <td>true |
|
746 <td>Whether to retry unacked transmissions on reliable CLs |
|
747 |
|
748 <tr> |
|
749 <td><tt>test_permuted_delivery</tt> |
|
750 <td>true or false |
|
751 <td>false |
|
752 <td>Whether to permute the order of bundles before delivering to registrations. |
|
753 |
|
754 <tr> |
|
755 <td><tt>injected_bundles_in_memory</tt> |
|
756 <td>true or false |
|
757 <td>false |
|
758 <td>Whether injected bundles are held in memory by default. |
|
759 |
|
760 <tr> |
|
761 <td><tt>is_singleton_default</tt> |
|
762 <td>unknown|singleton|multinode |
|
763 <td>TBC |
|
764 <td>How to set the is_singleton bit for unknown schemes. |
|
765 |
|
766 <tr> |
|
767 <td><tt>glob_unknown_schemes</tt> |
|
768 <td>true or false |
|
769 <td>false |
|
770 <td>Whether unknown schemes use glob-based matching for registrations and routes. |
|
771 |
|
772 <tr> |
|
773 <td><tt>link_min_retry_interval</tt> |
|
774 <td>number (interval in seconds) |
|
775 <td>TBC |
|
776 <td>Default minimum connection retry interval for links. |
|
777 |
|
778 <tr> |
|
779 <td><tt>link_max_retry_interval</tt> |
|
780 <td>number (interval in seconds) |
|
781 <td>TBC |
|
782 <td>Default maximum connection retry interval for links. |
|
783 |
|
784 <tr> |
|
785 <td><tt>custody_timer_min</tt> |
|
786 <td>number (seconds) |
|
787 <td>TBC |
|
788 <td>Default value for custody timer min. |
|
789 |
|
790 <tr> |
|
791 <td><tt>custody_timer_lifetime_pct</tt> |
|
792 <td>number (per cent) |
|
793 <td>TBC |
|
794 <td>Default value for custody timer lifetime percentage |
|
795 |
|
796 <tr> |
|
797 <td><tt>custody_timer_max</tt> |
|
798 <td>number (seconds) |
|
799 <td>TBC |
|
800 <td>Default value for custody timer max. |
|
801 |
|
802 </table> |
|
803 |
|
804 <a name="prophet"/> |
|
805 <h2> prophet </h2> |
|
806 |
|
807 <p> |
|
808 The <tt>prophet</tt> command is used to configure the prophet router. This command should not be here but under <a href="#route">route</a> like all other DTN routing protocol and algorithm commands. |
|
809 Please see <a href="ro_prophet.html#prophet_cmd">prophet router</a> for detailed infomation. |
|
810 <a name="quit"/> |
|
811 <h2> quit </h2> |
|
812 |
|
813 <p> |
|
814 The <tt>quit</tt> command is used to shutdown the DTN2 daemon. It is the same as <a href="#shutdown">shutdown</a>. |
|
815 <p> |
|
816 Syntax: <tt>quit</tt> |
|
817 <br> |
|
818 Example: <tt>quit</tt> |
|
819 |
|
820 <a name="registration"/> |
|
821 <h2> registration </h2> |
|
822 <p> |
|
823 A registration is used to represent an "application" endpoint ID registration, loosely defined to also include internal router mechanisms that consume bundles. Registration state is stored persistently in the database. |
|
824 |
|
825 <p> |
|
826 The <tt> registration</tt> command is used add, delete and list EID registrations. |
|
827 <a name="registration_add"/> |
|
828 <h4> registration add </h4> |
|
829 <p> |
|
830 Syntax: <tt>registration <i>add</i> <i>opt</i> <i>endpoint</i> <i><args..></i></tt> |
|
831 <br> |
|
832 Example: <tt>registration add tcl dtn:alex</tt> |
|
833 <p> |
|
834 <table> |
|
835 <tr> |
|
836 <th>opt |
|
837 <th>Possible settings |
|
838 <th>Comments |
|
839 |
|
840 <tr> |
|
841 <td><tt>opt</tt> |
|
842 <td>logger or tcl |
|
843 <td>Whether to add a logger or tcl representation |
|
844 |
|
845 <tr> |
|
846 <td><tt>endpoint</tt> |
|
847 <td>An EID (URI) |
|
848 <td>The EID which you wish to add a registration for |
|
849 |
|
850 </table> |
|
851 |
|
852 <p> |
|
853 The logger option is used mostly for testing registrations. When created, this sets up a new registration within the daemon, and for any bundles that arrive, outputs logs of the bundle header fields as well as the payload data (if ascii). The implementation is structured as a thread that blocks (forever) waiting for bundles to arrive on the registration's bundle list, then logging the bundles and looping again. The logpath is set to /dtn/reg/logging/. |
|
854 <p> |
|
855 |
|
856 <a name="registration_delete"/> |
|
857 <h4> registration delete </h4> |
|
858 <p> |
|
859 Syntax: <tt>registration <i>del</i> <i>reg_id</i></tt> |
|
860 <br> |
|
861 Example: <tt>registration del 14</tt> |
|
862 |
|
863 <a name="registration_list"/> |
|
864 <h4> registration list </h4> |
|
865 <p> |
|
866 Syntax: <tt>registration <i>list</i></tt> |
|
867 <br> |
|
868 Example: <tt>registration list</tt> |
|
869 |
|
870 <a name="registration_dump"/> |
|
871 <h4> registration dump_tcl </h4> |
|
872 <p>dump_tcl is used to dump a tcl representation of the registration using its registration id. |
|
873 <p> |
|
874 Syntax: <tt>registration <i>dump_tcl</i> <i>reg_id</i></tt> |
|
875 <br> |
|
876 Example: <tt>registration dump_tcl 14</tt> |
|
877 |
|
878 <a name="shutdown"/> |
|
879 <h2> shutdown </h2> |
|
880 |
|
881 <p> |
|
882 The <tt>shutdown</tt> command is used to shutdown the DTN2 daemon. It is the same as <a href="#quit">quit</a>. |
|
883 <p> |
|
884 Syntax: <tt>shutdown</tt> |
|
885 <br> |
|
886 Example: <tt>shutdown</tt> |
|
887 |
|
888 |
|
889 <a name="storage"/> |
|
890 <h2> storage </h2> |
|
891 |
|
892 <p> |
|
893 Syntax: <tt>storage set <i>variable</i> <i>value</i> </tt> |
|
894 <br> |
|
895 Example: <tt>storage set type berkeleydb</tt> |
|
896 |
|
897 <p> |
|
898 Use the <tt>storage</tt> command to configure the manner in which |
|
899 DTN2 will store persistent state like registrations. You may set the |
|
900 following variables: |
|
901 |
|
902 <p> |
|
903 <table> |
|
904 <tr> |
|
905 <th>Variable |
|
906 <th>Possible settings |
|
907 <th>Default |
|
908 <th>Comments |
|
909 |
|
910 <tr> |
|
911 <td><tt>dbdir</tt> |
|
912 <td>directory |
|
913 <td>/var/dtn/db |
|
914 <td>The directory where the DB files will be stored. Only used for |
|
915 type BerkeleyDB. |
|
916 |
|
917 <tr> |
|
918 <td><tt>dbfile</tt> |
|
919 <td>name |
|
920 <td>DTN.db |
|
921 <td>The file name of the BerkeleyDB database. |
|
922 |
|
923 <tr> |
|
924 <td><tt>payloaddir</tt> |
|
925 <td>directory |
|
926 <td>/var/dtn/bundles |
|
927 <td>The directory where bundles in transit will be stored. |
|
928 |
|
929 <tr> |
|
930 <td><tt>payload_quota</tt> |
|
931 <td>number (bytes) |
|
932 <td>0 |
|
933 <td>storage quota for bundle payloads (0 is unlimited). |
|
934 |
|
935 <tr> |
|
936 <td><tt>payload_fd_cache_size</tt> |
|
937 <td>number |
|
938 <td>32 |
|
939 <td>number of payload file descriptors to keep open in a cache. |
|
940 |
|
941 <tr> |
|
942 <td><tt>server_port</tt> |
|
943 <td>number (port) |
|
944 <td>0 |
|
945 <td>TCP port for IPC to external data store. |
|
946 |
|
947 <tr> |
|
948 <td><tt>schema</tt> |
|
949 <td>name |
|
950 <td>none |
|
951 <td>File containing the XML schema for the external data store interface. |
|
952 |
|
953 <tr> |
|
954 <td><tt>type</tt> |
|
955 <td>berkeleydb, mysql, postgres, filesysdb, memorydb, filesysdb |
|
956 <td>berkeleydb |
|
957 <td>Which database backend will be used. |
|
958 |
|
959 <tr> |
|
960 <td><tt>dbname</tt> |
|
961 <td>name |
|
962 <td>DB |
|
963 <td>Set the database name (appended with .db as the filename in berkeleydb, used as-is for SQL variants. |
|
964 |
|
965 <tr> |
|
966 <td><tt>init_db</tt> |
|
967 <td>true, false |
|
968 <td>false |
|
969 <td>When true, dtnd initialize the database on startup. |
|
970 |
|
971 <tr> |
|
972 <td><tt>tidy</tt> |
|
973 <td>true, false |
|
974 <td>false |
|
975 <td>When true, dtnd cleans out the database and the bundle directories |
|
976 at startup. |
|
977 |
|
978 <tr> |
|
979 <td><tt>tidy_wait</tt> |
|
980 <td>number (seconds) |
|
981 <td>3 |
|
982 <td>How long to wait before really doing a tidy. |
|
983 |
|
984 <tr> |
|
985 <td><tt>leave_clean_file</tt> |
|
986 <td>true, false |
|
987 <td>true |
|
988 <td>Leave a .ds_clean file on clean. |
|
989 |
|
990 <tr> |
|
991 <td><tt>fs_fd_cache_size</tt> |
|
992 <td>number |
|
993 <td>0 |
|
994 <td>Number of open fds to cache - if > 0 then this # of open fds will be cached when using Filesystem DB. |
|
995 |
|
996 <tr> |
|
997 <td><tt>db_mpool</tt> |
|
998 <td>true, false |
|
999 <td>true |
|
1000 <td>Use mpool in Berkeley DB. |
|
1001 |
|
1002 <tr> |
|
1003 <td><tt>db_log</tt> |
|
1004 <td>true, false |
|
1005 <td>true |
|
1006 <td>Use logging in Berkeley DB. |
|
1007 |
|
1008 <tr> |
|
1009 <td><tt>db_txn</tt> |
|
1010 <td>true, false |
|
1011 <td>true |
|
1012 <td>Use transactions in Berkeley DB. |
|
1013 |
|
1014 <tr> |
|
1015 <td><tt>db_sharefile</tt> |
|
1016 <td>true, false |
|
1017 <td>false |
|
1018 <td>Use shared database file in Berkeley DB. |
|
1019 |
|
1020 <tr> |
|
1021 <td><tt>db_max_tx</tt> |
|
1022 <td>number |
|
1023 <td>0 |
|
1024 <td>Max # of active transactions in Berkeley DB. |
|
1025 |
|
1026 <tr> |
|
1027 <td><tt>db_max_locks</tt> |
|
1028 <td>number |
|
1029 <td>0 |
|
1030 <td>Max # of active locks in Berkeley DB. |
|
1031 |
|
1032 <tr> |
|
1033 <td><tt>db_max_lockers</tt> |
|
1034 <td>number |
|
1035 <td>0 |
|
1036 <td>Max # of active locking threads in Berkeley DB. |
|
1037 |
|
1038 <tr> |
|
1039 <td><tt>db_max_lockedobjs</tt> |
|
1040 <td>number |
|
1041 <td>0 |
|
1042 <td>Max # of active locked objects in Berkeley DB. |
|
1043 |
|
1044 <tr> |
|
1045 <td><tt>db_lockdetect</tt> |
|
1046 <td>number (frequency) |
|
1047 <td>5000 |
|
1048 <td>Frequency to check for Berkeley DB deadlocks (zero disables locking). |
|
1049 |
|
1050 </table> |
|
1051 <a name="Storage notes"/> |
|
1052 <h4>Storage Notes</h4> |
|
1053 |
|
1054 <p> Tidy is useful when there are pending bundles in the system that |
|
1055 you do not want dtnd to continue to try to deliver. If you allow dtnd |
|
1056 to tidy up when it has custody of a bundle, that bundle will be lost |
|
1057 for all time and the sending application will not be notified. |
|
1058 |
|
1059 <p> For SQL backends, it is not possible at this time to configure a |
|
1060 hostname, username, or password via the <tt>storage</tt> command. For |
|
1061 MySQL, the defaults are hostname "localhost", Unix user name, and no |
|
1062 password. For Postgres, the defaults are taken from the environment |
|
1063 variables described in the <a |
|
1064 href="http://www.postgresql.org/docs/8.0/interactive/libpq-envars.html">PostgreSQL |
|
1065 manual</a>. |
|
1066 |
|
1067 <a name="route"/> |
|
1068 <h2> route </h2> |
|
1069 |
|
1070 <p> |
|
1071 Syntax: <tt>route set <i>variable</i> <i>value</i> </tt> |
|
1072 <br> |
|
1073 Example: <tt>route set type static</tt> |
|
1074 |
|
1075 <p> |
|
1076 Use the <tt>route</tt> command to configure the manner in which |
|
1077 DTN2 will route. You may set the |
|
1078 following variables: |
|
1079 |
|
1080 <p> |
|
1081 <table> |
|
1082 <tr> |
|
1083 <th>Variable |
|
1084 <th>Possible settings |
|
1085 <th>Default |
|
1086 <th>Comments |
|
1087 |
|
1088 <tr> |
|
1089 <td><tt>type</tt> |
|
1090 <td>static, prophet, flood, dtlsr, tca_router, tca_gateway, external |
|
1091 <td>static |
|
1092 <td>Which routing algorithm to use. |
|
1093 |
|
1094 <tr> |
|
1095 <td><tt>add_nexthop_routes</tt> |
|
1096 <td>true, false |
|
1097 <td>true |
|
1098 <td>Whether or not to automatically add routes for next hop links . |
|
1099 |
|
1100 <tr> |
|
1101 <td><tt>add</tt> |
|
1102 <td>dest link/endpoint [opts] |
|
1103 <td>N/A |
|
1104 <td>Add a static route |
|
1105 |
|
1106 <tr> |
|
1107 <td><tt>del</tt> |
|
1108 <td>dest link/endpoint |
|
1109 <td>N/A |
|
1110 <td>Delete a static route |
|
1111 |
|
1112 <tr> |
|
1113 <td><tt>dump</tt> |
|
1114 <td>N/A |
|
1115 <td>N/A |
|
1116 <td>print all of the static routes |
|
1117 |
|
1118 <tr> |
|
1119 <td><tt>open_discovered_links</tt> |
|
1120 <td>true, false |
|
1121 <td>true |
|
1122 <td>Whether or not to automatically open discovered opportunistic links. |
|
1123 |
|
1124 <tr> |
|
1125 <td><tt>default_priority</tt> |
|
1126 <td>number |
|
1127 <td>0 |
|
1128 <td>Default priority for new routes. |
|
1129 |
|
1130 <tr> |
|
1131 <td><tt>max_route_to_chain</tt> |
|
1132 <td>number |
|
1133 <td>10 |
|
1134 <td>Maximum number of route_to links to follow. |
|
1135 |
|
1136 <tr> |
|
1137 <td><tt>subscription_timeout</tt> |
|
1138 <td>number |
|
1139 <td>600 |
|
1140 <td>Default timeout for upstream subscription. |
|
1141 |
|
1142 <tr> |
|
1143 <td><tt>dtlsr_area</tt> |
|
1144 <td>string |
|
1145 <td>tbc |
|
1146 <td>DTLSR Administrative area for the local node. |
|
1147 |
|
1148 <tr> |
|
1149 <td><tt>dtlsr_weight_fn</tt> |
|
1150 <td>number |
|
1151 <td>10 |
|
1152 <td>DTLSR weight function for the graph. |
|
1153 |
|
1154 <tr> |
|
1155 <td><tt>dtlsr_weight_shift</tt> |
|
1156 <td>number |
|
1157 <td>0 |
|
1158 <td>DTLSR scale factor to scale the weight on down links factor by which to age the cost of a link based on its uptimei. As a link's uptime goes to zero, the cost increases by 10x the original cost. |
|
1159 |
|
1160 <tr> |
|
1161 <td><tt>dtlsr_uptime_factor</tt> |
|
1162 <td>number |
|
1163 <td>10 |
|
1164 <td>DTLSR aging pct for cost of down links. |
|
1165 |
|
1166 <tr> |
|
1167 <td><tt>dtlsr_keep_down_links</tt> |
|
1168 <td>true or false |
|
1169 <td>true |
|
1170 <td>DTLSR whether or not to keep down links in the graph, marking them as stale. |
|
1171 |
|
1172 <tr> |
|
1173 <td><tt>dtlsr_recompute_delay</tt> |
|
1174 <td>number (seconds) |
|
1175 <td>1 |
|
1176 <td>DTLSR delay (in seconds) after receiving an LSA when we recompute the routes. Needed to prevent some flapping. |
|
1177 |
|
1178 <tr> |
|
1179 <td><tt>dtlsr_aging_interval</tt> |
|
1180 <td>number (seconds) |
|
1181 <td>5 |
|
1182 <td>DTLSR interval after which we locally recompute the routes to properly age links that we believe to be down. |
|
1183 |
|
1184 <tr> |
|
1185 <td><tt>dtlsr_lsa_interval</tt> |
|
1186 <td>number (seconds) |
|
1187 <td>3600 |
|
1188 <td>DTLSR interval at which we proactively send new LSA. Default is once per hour. |
|
1189 |
|
1190 <tr> |
|
1191 <td><tt>dtlsr_min_lsa_interval</tt> |
|
1192 <td>number (seconds) |
|
1193 <td>5 |
|
1194 <td>DTLSR minimum interval between LSA transmission. Default is once per five seconds. |
|
1195 |
|
1196 <tr> |
|
1197 <td><tt>dtlsr_lsa_lifetime</tt> |
|
1198 <td>number (seconds) |
|
1199 <td>86400 |
|
1200 <td>DTLSR expiration time for lsa announcements (default is 24 hours). |
|
1201 |
|
1202 <tr> |
|
1203 <td><tt>server_port</tt> |
|
1204 <td>number (port) |
|
1205 <td>8001 |
|
1206 <td>UDP port for IPC with external router(s) |
|
1207 |
|
1208 <tr> |
|
1209 <td><tt>hello_interval</tt> |
|
1210 <td>number (seconds) |
|
1211 <td>30 |
|
1212 <td>Seconds between hello messages with external router(s) |
|
1213 |
|
1214 <tr> |
|
1215 <td><tt>schema</tt> |
|
1216 <td>string (pathname) |
|
1217 <td>/router.xsd |
|
1218 <td>Location of the external router interface message schema |
|
1219 |
|
1220 <tr> |
|
1221 <td><tt>xml_server_validation</tt> |
|
1222 <td>true or false |
|
1223 <td>true |
|
1224 <td>Perform xml validation on plug-in interface messages when using external router(s) |
|
1225 |
|
1226 <tr> |
|
1227 <td><tt>xml_client_validation</tt> |
|
1228 <td>true or false |
|
1229 <td>false |
|
1230 <td>Include meta-info in xml messages so plug-in routers can perform validation when using external router(s) |
|
1231 |
|
1232 </table> |
|
1233 <a name="Router Notes"/> |
|
1234 <h4>Router Notes</h4> |
|
1235 |
|
1236 <p> TCARouter is an implementation of the TCA bundle routing algorithm. |
|
1237 A TCARouter is a specialized TableBasedRouter where the route |
|
1238 table is manipulated in response to certain control bundles |
|
1239 (for example, a "register" bundle, or a "change-of-address" bundle). |
|
1240 Specialized routing logic is then applied in order to route late-bound |
|
1241 bundles addressed to a mobile node, to the mobile's current location |
|
1242 in the network. |
|
1243 |
|
1244 The main interface point is the overridden handle_bundle_received |
|
1245 function which tests for the special TCA bundles (control bundles and |
|
1246 late-bound data bundles). |
|
1247 |
|
1248 <a name="link"/> |
|
1249 <h2> link </h2> |
|
1250 |
|
1251 <p> |
|
1252 A link is an abstraction for a DTN link, i.e. a one way communication channel to |
|
1253 a next hop node in the DTN overlay. Use the <tt>link</tt> command |
|
1254 to configure the manner in which DTN2 will establish a communications |
|
1255 channel to a next hop node. You may set the following variables: |
|
1256 |
|
1257 <p> |
|
1258 |
|
1259 |
|
1260 <h4> link <i>cmd</i></h4> |
|
1261 <p> |
|
1262 Syntax: <tt>link <i>cmd</i> <i>name</i> </tt> |
|
1263 <br> |
|
1264 Example: <tt>link delete <i>trinity_od</i> </tt> |
|
1265 <p> |
|
1266 <table> |
|
1267 <tr> |
|
1268 <th>cmd |
|
1269 <th>name |
|
1270 <th>Comments |
|
1271 |
|
1272 <tr> |
|
1273 <td><tt>Open</tt> |
|
1274 <td>String |
|
1275 <td>open a link |
|
1276 |
|
1277 <tr> |
|
1278 <td><tt>close</tt> |
|
1279 <td>String |
|
1280 <td>Close a link |
|
1281 |
|
1282 <tr> |
|
1283 <td><tt>delete</tt> |
|
1284 <td>String |
|
1285 <td>Delete a link |
|
1286 |
|
1287 <tr> |
|
1288 <td><tt>state</tt> |
|
1289 <td>String |
|
1290 <td>Get state of a link |
|
1291 |
|
1292 <tr> |
|
1293 <td><tt>stats</tt> |
|
1294 <td>String |
|
1295 <td>Get link statistics |
|
1296 |
|
1297 </table> |
|
1298 |
|
1299 <a name="link set available"/> |
|
1300 <h4> link set_available</h4> |
|
1301 <p> |
|
1302 Syntax: <tt>link set_available <i>name</i> <i>avail</i></tt> |
|
1303 <br> |
|
1304 Example: <tt>link set_available <i>trinity_od</i> <i>true</i> </tt> |
|
1305 |
|
1306 <p> |
|
1307 <table> |
|
1308 <tr> |
|
1309 <th>Variable |
|
1310 <th>Possible settings |
|
1311 <th>Default |
|
1312 <th>Comments |
|
1313 |
|
1314 <tr> |
|
1315 <td><tt>name</tt> |
|
1316 <td>String |
|
1317 <td>N/A |
|
1318 <td>Specify a name of a link |
|
1319 |
|
1320 <tr> |
|
1321 <td><tt>avail</tt> |
|
1322 <td>true or false |
|
1323 <td>true |
|
1324 <td>hacky way to make the link available (only used with <i>set_available</i>) |
|
1325 <tr> |
|
1326 |
|
1327 </table> |
|
1328 |
|
1329 <a name="link reconfigure"/> |
|
1330 <h4> link reconfigure</h4> |
|
1331 <p> |
|
1332 Syntax: <tt>link reconfigure <i>name</i> <i>opt=val opt2=val2 optN=valN</i></tt> |
|
1333 <br> |
|
1334 Example: <tt>link reconfigure <i>trinity_od</i> <i>mtu=1024 idle_close_time=35</i></tt> |
|
1335 |
|
1336 <a name="link set_cl_defaults"/> |
|
1337 <h4>link set_cl_defaults</h4> |
|
1338 <p> |
|
1339 Syntax: <tt>link set_cl_defaults <i>name</i> <i>conv_layer</i> <i>opt=val opt2=val2 optN=valN</i></tt> |
|
1340 <br> |
|
1341 Example: <tt>link set_cl_defaults <i>trinity_od</i> <i>tcp</i> <i>mtu=1024 idle_close_time=35</i></tt> |
|
1342 |
|
1343 <a name="link add"/> |
|
1344 <h4>link add</h4> |
|
1345 <p> |
|
1346 Syntax: <tt>link add <i>name</i> <i>nexthop</i> <i>type</i> <i>conv_layer</i> <i>opt=val opt2=val2 optN=valN</i> </tt> |
|
1347 <br> |
|
1348 Example: <tt>link add <i>trinity_od</i> <i>192.168.1.2</i> <i>ONDEMAND</i> <i>tcp</i> <i>mtu=1024 potential_downtime=25</i> </tt> |
|
1349 |
|
1350 <p> |
|
1351 <table> |
|
1352 <tr> |
|
1353 <th>Variable |
|
1354 <th>Possible settings |
|
1355 <th>Default |
|
1356 <th>Comments |
|
1357 |
|
1358 <tr> |
|
1359 <td><tt>name</tt> |
|
1360 <td>String |
|
1361 <td>N/A |
|
1362 <td>Specify a name of a link |
|
1363 |
|
1364 <tr> |
|
1365 <td><tt>nexthop</tt> |
|
1366 <td>String (address) |
|
1367 <td>N/A |
|
1368 <td>Specify the next hop node. For IP-based links (tcp or udp), |
|
1369 the nexthop should contain a DNS hostname or IP address, followed |
|
1370 optionally by a : and a port. If the port is not specified, the |
|
1371 default of 4556 is used. |
|
1372 |
|
1373 <tr> |
|
1374 <td><tt>type</tt> |
|
1375 <td>Link type (see note) |
|
1376 <td>ALLWAYSON, ONDEMAND, SCHEDULED, OPPORTUNISTIC |
|
1377 <td>Specify the link type |
|
1378 |
|
1379 <tr> |
|
1380 <td><tt>conv_layer</tt> |
|
1381 <td>udp, tcp, bt, file, eth, norm, null, extcl, serial |
|
1382 <td>N/A |
|
1383 <td>Specify a Convergence Layer Adapter (CLA) |
|
1384 <tr> |
|
1385 <th> opt |
|
1386 <th>Possible settings |
|
1387 <th>Default |
|
1388 <th>Comments |
|
1389 |
|
1390 <tr> |
|
1391 <td><tt>mtu</tt> |
|
1392 <td>number (MTU) |
|
1393 <td>Set by link type |
|
1394 <td>The MTU of the link, used to control proactive fragmentation. |
|
1395 |
|
1396 <tr> |
|
1397 <td><tt>min_retry_interval</tt> |
|
1398 <td>number (seconds) |
|
1399 <td>Set by link type |
|
1400 <td>The minimum amount to wait between attempts to re-open the link. Default is set by the various link types but can be overridden by configuration parameters. |
|
1401 |
|
1402 <tr> |
|
1403 <td><tt>max_retry_interval</tt> |
|
1404 <td>number (seconds) |
|
1405 <td>Set by link type |
|
1406 <td>The minimum amount to wait between attempts to re-open the link. Default is set by the various link types but can be overridden by configuration parameters. |
|
1407 |
|
1408 <tr> |
|
1409 <td><tt>idle_close_time</tt> |
|
1410 <td>number (seconds) |
|
1411 <td>30 for ONDEMAND or 0 for OPPORTUNISTIC & ALLWAYSON |
|
1412 <td>Idle time before the link is closed. MUST be zero for always on links (i.e. they are never closed). Default is 30 seconds for on demand links, zero for opportunistic links. |
|
1413 |
|
1414 <tr> |
|
1415 <td><tt>potential_downtime</tt> |
|
1416 <td>number (seconds) |
|
1417 <td>30 |
|
1418 <td>A conservative estimate of the maximum amount of time that the link may be down during 'normal' operation. Used by routing algorithms to determine how long to leave bundles queued on the down link before rerouting them. |
|
1419 |
|
1420 <tr> |
|
1421 <td><tt>prevhop_hdr</tt> |
|
1422 <td>true or false |
|
1423 <td>false |
|
1424 <td>Indicates whether or not to send the previous hop header on this link. |
|
1425 |
|
1426 <tr> |
|
1427 <td><tt>cost</tt> |
|
1428 <td>number (abstract cost) |
|
1429 <td>100 |
|
1430 <td>The abstract cost of the link, used by routing algorithms. |
|
1431 <tr> |
|
1432 <td><tt>qlimit_bundles_high</tt> |
|
1433 <td>number (bundles) |
|
1434 <td>tbc |
|
1435 <td> The high limits on the number of bundles that should be queued on the link. The high limits are used to indicate whether or not more bundles can be queued onto the link to effect backpressure from the convergence layers. |
|
1436 |
|
1437 <tr> |
|
1438 <td><tt>qlimit_bundles_low</tt> |
|
1439 <td>number (bundles) |
|
1440 <td>tbc |
|
1441 <td>The low limits on the number of bundles that should be queued on the link. The low limits can be used by the router to determine when to re-scan the pending bundle lists. |
|
1442 |
|
1443 <tr> |
|
1444 <td><tt>qlimit_bytes_high</tt> |
|
1445 <td>number (bytes) |
|
1446 <td>tbc |
|
1447 <td> The high limits on the number of bytes that should be queued on the link. The high limits are used to indicate whether or not more bundles can be queued onto the link to effect backpressure from the convergence layers. |
|
1448 |
|
1449 <tr> |
|
1450 <td><tt>qlimit_bytes_low</tt> |
|
1451 <td>number (bytes) |
|
1452 <td>tbc |
|
1453 <td>The low limits on the number of bytes that should be queued on the link. The low limits can be used by the router to determine when to re-scan the pending bundle lists. |
|
1454 |
|
1455 <tr> |
|
1456 <td><tt>retry_interval</tt> |
|
1457 <td>number (seconds) |
|
1458 <td>min_retry_interval |
|
1459 <td>The seconds to wait between attempts to re-open an unavailable link. Initially set to min_retry_interval, then doubles up to max_retry_interval |
|
1460 |
|
1461 </table> |
|
1462 |
|
1463 <a name="Link Notes"/> |
|
1464 <h4>Link Notes</h4> |
|
1465 |
|
1466 |
|
1467 <p>Links are of types as discussed in the DTN architecture |
|
1468 ALWAYSON, ONDEMAND, SCHEDULED, OPPORTUNISTIC. The key differences from an |
|
1469 implementation perspective are "who" and "when" manipulates |
|
1470 the link state regarding availability. |
|
1471 |
|
1472 <p>ONDEMAND links are initializd in the AVAILABLE state, as one would |
|
1473 expect. It remains in this state until a router explicitly opens |
|
1474 it. An ONDEMAND link can then be closed either due to connection |
|
1475 failure or because the link has been idle for too long, both |
|
1476 triggered by the convergence layer. If an ONDEMAND link is closed |
|
1477 due to connection failure, then the contact manager is notified of |
|
1478 this event and periodically tries to re-establish the link. |
|
1479 |
|
1480 <p>For OPPORTUNISTIC links the availability state is set by the code |
|
1481 which detects that there is a new link available to be used. SCHEDULED |
|
1482 links have their availability dictated by the schedule implementation. |
|
1483 |
|
1484 <p>All links in the OPEN state have an associated contact that |
|
1485 represents an actual connection. Every link has a unique name |
|
1486 associated with it which is used to identify it. The name is |
|
1487 configured explicitly when the link is created. |
|
1488 |
|
1489 <a name="Link stats"/> |
|
1490 <h3> Getting link statistics </h3> |
|
1491 |
|
1492 <p>The <tt>link dump </tt> command shows the following attributes for all links: |
|
1493 <ul> |
|
1494 <li> link |
|
1495 <li> nexthop |
|
1496 <li> remote eid |
|
1497 <li> type |
|
1498 <li> clayer |
|
1499 <li> state |
|
1500 </ul> |
|
1501 |
|
1502 <p>The <tt>link dump <i>name</i> </tt> command shows the following detailed attributes for a specified link: |
|
1503 <ul> |
|
1504 <li> Link |
|
1505 <li> clayer |
|
1506 <li> type |
|
1507 <li> state |
|
1508 <li> deleted |
|
1509 <li> nexthop |
|
1510 <li> remote eid |
|
1511 <li> mtu |
|
1512 <li> min_retry_interval |
|
1513 <li> max_retry_interval |
|
1514 <li> idle_close_time |
|
1515 <li> potential_downtime |
|
1516 <li> prevhop_hdr |
|
1517 <li> reactive_frag_enabled |
|
1518 <li> sendbuf_len |
|
1519 <li> recvbuf_len |
|
1520 <li> data_timeout |
|
1521 <li> test_read_delay |
|
1522 <li> test_write_delay |
|
1523 <li> test_recv_delay |
|
1524 <li> segment_ack_enabled |
|
1525 <li> negative_ack_enabled |
|
1526 <li> keepalive_interval |
|
1527 <li> segment_length |
|
1528 <li> local_addr |
|
1529 <li> remote_addr |
|
1530 <li> remote_port |
|
1531 </ul> |
|
1532 |
|
1533 <p>The <tt>link stats <i>name</i> </tt> command shows the following counts for a specified link: |
|
1534 <ul> |
|
1535 <li> contact_attempts |
|
1536 <li> contacts |
|
1537 <li> bundles_transmitted |
|
1538 <li> bytes_transmitted |
|
1539 <li> bundles_queued |
|
1540 <li> bytes_queued |
|
1541 <li> bundles_inflight |
|
1542 <li> bytes_inflight |
|
1543 <li> bundles_cancelled |
|
1544 <li> uptime |
|
1545 <li> throughput_bps |
|
1546 <li> bundles_deferred |
|
1547 </ul> |
|
1548 |
|
1549 <a name="test"/> |
|
1550 <h2> test </h2> |
|
1551 |
|
1552 <p> |
|
1553 The <tt>test</tt> command is used by developers to test the DTN2 daemon. It is capable of generating a segfault, triggering a panic or false assert. |
|
1554 <p> |
|
1555 Syntax: <tt>test <i>cmd</i></tt> |
|
1556 <br> |
|
1557 Example: <tt>test segfault</tt> |
|
1558 |
|
1559 </body> |
|
1560 </html> |
|
1561 |