Ashlesh Gawande | 3a1b6e5 | 2015-07-14 17:47:10 -0500 | [diff] [blame] | 1 | Configuration |
| 2 | ============= |
| 3 | |
| 4 | Mini-NDN uses a configuration file describing the topology and its parameters to setup a network. |
| 5 | It can be generated by the GUI or written by hand or scripts. |
| 6 | |
| 7 | ## Configuration file format: |
| 8 | |
| 9 | ### The [nodes] section: |
| 10 | |
| 11 | At the bare minimum, the node section describes the nodes present in the topology. |
| 12 | |
| 13 | [nodes] |
| 14 | a: _ |
| 15 | b: _ |
| 16 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 17 | Additionally each node can take the following parameters: |
Ashlesh Gawande | 3a1b6e5 | 2015-07-14 17:47:10 -0500 | [diff] [blame] | 18 | |
| 19 | * app : Default application(s) to be started on a node (specify '_' if no app needs to be started - required). |
| 20 | The app is the only parameter which needs double quotes (see example below). |
| 21 | |
| 22 | * cpu : Amount of cpu available to a node (0.00 - 1.00), optional |
| 23 | |
| 24 | * mem : Amount of memory available to a node in KB |
| 25 | |
| 26 | * cache : Amount of cache memory available to a node in KB |
| 27 | |
| 28 | |
| 29 | e.g.) |
| 30 | |
| 31 | [nodes] |
| 32 | a: _ cpu=0.3 |
| 33 | b: app="sample app 1; sampleapp2.sh" cpu=0.3 |
| 34 | |
| 35 | ### The [links] section: |
| 36 | |
| 37 | The links section describes the links in the topology. |
| 38 | |
| 39 | e.g.) |
| 40 | |
| 41 | [links] |
| 42 | a:b delay=10ms |
| 43 | |
| 44 | This would create a link between a and b. 'b:a' would also result in the same. |
| 45 | The following parameters can be configured for a node: |
| 46 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 47 | * delay : Delay parameter is a required parameter which defines the delay of the link (1-1000ms) |
Ashlesh Gawande | 3a1b6e5 | 2015-07-14 17:47:10 -0500 | [diff] [blame] | 48 | |
| 49 | * bw : Bandwidth of a link (<1-1000> Mbps) |
| 50 | |
| 51 | * loss : Percentage of packet loss (<1-100>) |
| 52 | |
| 53 | ### Example configuration file |
| 54 | |
| 55 | [nodes] |
| 56 | a: _ cpu=0.3 |
| 57 | b: app="sampleApp1; ./sampleApp2.sh" cpu=0.3 |
| 58 | [links] |
| 59 | a:b delay=10ms bw=100 |
| 60 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 61 | Note that `sampleApp1` and `sampleApp2` must be either installed in the system (ex: /usr/bin) |
| 62 | or an absolute path needs to be given. |
Ashlesh Gawande | 3a1b6e5 | 2015-07-14 17:47:10 -0500 | [diff] [blame] | 63 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 64 | See `ndn_utils/topologies` for more sample files |