Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 1 | Getting Started |
| 2 | =============== |
| 3 | |
| 4 | ## Installation |
| 5 | Please see [INSTALL.md](../INSTALL.md) for instructions on installing Mini-NDN and its dependencies. |
| 6 | |
| 7 | ## Running Mini-NDN |
| 8 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 9 | To run Mini-NDN with the default topology, `ndn_utils/topologies/default-topology.conf`, type: |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 10 | |
| 11 | sudo minindn |
| 12 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 13 | A full list of options can be printed by using: |
| 14 | |
| 15 | sudo minindn --help |
| 16 | |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 17 | To run Mini-NDN with a topology file, provide the filename as the first argument: |
| 18 | |
| 19 | sudo minindn my-topology.conf |
| 20 | |
| 21 | During set up, the list of nodes in the network will be listed as they are initialized: |
| 22 | |
| 23 | *** Adding hosts: |
| 24 | a b c d |
| 25 | |
| 26 | After set up, the command-line interface (CLI) will display a prompt. |
| 27 | |
Ashlesh Gawande | 95789cc | 2017-02-27 12:38:04 -0600 | [diff] [blame] | 28 | mini-ndn> |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 29 | |
| 30 | To interact with a node, first type the node's name and then the command to be executed: |
| 31 | |
Ashlesh Gawande | 95789cc | 2017-02-27 12:38:04 -0600 | [diff] [blame] | 32 | mini-ndn> a echo "Hello, world!" |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 33 | Hello, world! |
| 34 | |
| 35 | To see the status of the forwarder on the node: |
| 36 | |
Ashlesh Gawande | 95789cc | 2017-02-27 12:38:04 -0600 | [diff] [blame] | 37 | mini-ndn> a nfdc status report |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 38 | |
| 39 | To see the status of routing on the node: |
| 40 | |
Ashlesh Gawande | 95789cc | 2017-02-27 12:38:04 -0600 | [diff] [blame] | 41 | mini-ndn> a nlsrc status |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 42 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 43 | To exit Mini-NDN, type `quit` in the CLI: |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 44 | |
Ashlesh Gawande | 95789cc | 2017-02-27 12:38:04 -0600 | [diff] [blame] | 45 | mini-ndn> quit |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 46 | |
Ashlesh Gawande | 2763f19 | 2017-10-25 15:48:39 -0500 | [diff] [blame] | 47 | Another option to quit Mini-NDN is sending a SIGQUIT (ctrl+\). SIGINT (ctrl+c) |
| 48 | is reserved for the purpose of stopping applications initiated on the minindn command |
| 49 | line. |
| 50 | |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 51 | For a more in depth explanation of the CLI, please see the |
| 52 | [Mininet Walkthrough](http://mininet.org/walkthrough/). |
| 53 | |
| 54 | ## Command-line options |
| 55 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 56 | To run Mini-NDN with a replica of the NDN testbed, use the `--testbed` parameter: |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 57 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 58 | sudo minindn --testbed |
| 59 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 60 | To change the working directory from default `/tmp/minindn` following option can be used: |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 61 | |
| 62 | sudo minindn --work-dir /home/mydir/test |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 63 | |
| 64 | #### Routing options |
| 65 | |
dmcoomes | ecf9c5a | 2017-10-11 10:17:46 -0500 | [diff] [blame] | 66 | To run minindn without NLSR, use the `--no-nlsr` parameter: |
| 67 | |
| 68 | sudo minindn --no-nlsr |
| 69 | |
dmcoomes | 7adc7f7 | 2017-10-06 12:01:28 -0500 | [diff] [blame] | 70 | To run NLSR with hyperbolic routing enabled, use the `--routing` parameter: |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 71 | |
dmcoomes | 7adc7f7 | 2017-10-06 12:01:28 -0500 | [diff] [blame] | 72 | sudo minindn --routing hr |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 73 | |
dmcoomes | 7adc7f7 | 2017-10-06 12:01:28 -0500 | [diff] [blame] | 74 | Topology files given under ndn_utils/topologies/minindn* have hyperbolic coordinates configured |
| 75 | and can be used with this option. |
| 76 | |
| 77 | To run NLSR in dry-run mode, use the `--routing` parameter: |
| 78 | |
| 79 | sudo minindn --routing dry |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 80 | |
| 81 | To configure the max number of faces added by NLSR to reach each name prefix, use the `--faces` |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 82 | parameter: |
| 83 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 84 | sudo minindn --faces 3 |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 85 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 86 | `--faces` can be an integer from 0 to 60; 0 indicates NLSR can add all available faces. |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 87 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 88 | To run Mini-NDN with NLSR security configured |
Vince Lehman | d367dbb | 2015-07-14 15:59:29 -0500 | [diff] [blame] | 89 | |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 90 | sudo minindn --nlsr-security |
| 91 | |
| 92 | ## Working Directory Structure |
| 93 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 94 | Currently Mini-NDN uses /tmp/minindn as the working directory if not specified otherwise by using |
| 95 | the option --work-dir. |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 96 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 97 | Each node is given a HOME directory under /tmp/minindn/node-name |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 98 | where node-name is the name of the node specified in the [nodes] section of the conf file. |
| 99 | |
| 100 | ### NFD |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 101 | NFD conf file is stored at `/tmp/minindn/node-name/node-name.conf` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 102 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 103 | NFD log file is stored at `/tmp/minindn/node-name/node-name.log` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 104 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 105 | `.ndn` folder is stored at `/tmp/minindn/node-name/.ndn` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 106 | |
| 107 | ### NLSR |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 108 | NLSR conf file is stored at `/tmp/minindn/node-name/nlsr.conf` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 109 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 110 | NLSR log file is stored at `/tmp/minindn/node-name/log/nlsr.log` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 111 | |
dmcoomes | 80eeea1 | 2017-10-27 12:49:10 -0500 | [diff] [blame] | 112 | When security is enabled, NLSR security certificates are stored in: `/tmp/minindn/node-name/security` |
Ashlesh Gawande | e626b63 | 2016-08-12 16:50:14 -0500 | [diff] [blame] | 113 | Note that no NLSR publishes the root certificate, Mini-NDN installs root.cert in security folder for each NLSR. |