blob: 12912e4615d80d0655d83e75b077cd57605e9f7d [file] [log] [blame] [view]
Vince Lehmand367dbb2015-07-14 15:59:29 -05001Getting Started
2===============
3
4## Installation
5Please see [INSTALL.md](../INSTALL.md) for instructions on installing Mini-NDN and its dependencies.
6
7## Running Mini-NDN
8
Ashlesh Gawandee626b632016-08-12 16:50:14 -05009To run Mini-NDN with the default topology, `ndn_utils/topologies/default-topology.conf`, type:
Vince Lehmand367dbb2015-07-14 15:59:29 -050010
11 sudo minindn
12
Ashlesh Gawandee626b632016-08-12 16:50:14 -050013A full list of options can be printed by using:
14
15 sudo minindn --help
16
Vince Lehmand367dbb2015-07-14 15:59:29 -050017To run Mini-NDN with a topology file, provide the filename as the first argument:
18
19 sudo minindn my-topology.conf
20
21During 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
26After set up, the command-line interface (CLI) will display a prompt.
27
Ashlesh Gawande95789cc2017-02-27 12:38:04 -060028 mini-ndn>
Vince Lehmand367dbb2015-07-14 15:59:29 -050029
30To interact with a node, first type the node's name and then the command to be executed:
31
Ashlesh Gawande95789cc2017-02-27 12:38:04 -060032 mini-ndn> a echo "Hello, world!"
Vince Lehmand367dbb2015-07-14 15:59:29 -050033 Hello, world!
34
35To see the status of the forwarder on the node:
36
Ashlesh Gawande95789cc2017-02-27 12:38:04 -060037 mini-ndn> a nfdc status report
Vince Lehmand367dbb2015-07-14 15:59:29 -050038
39To see the status of routing on the node:
40
Ashlesh Gawande95789cc2017-02-27 12:38:04 -060041 mini-ndn> a nlsrc status
Vince Lehmand367dbb2015-07-14 15:59:29 -050042
Ashlesh Gawandee626b632016-08-12 16:50:14 -050043To exit Mini-NDN, type `quit` in the CLI:
Vince Lehmand367dbb2015-07-14 15:59:29 -050044
Ashlesh Gawande95789cc2017-02-27 12:38:04 -060045 mini-ndn> quit
Vince Lehmand367dbb2015-07-14 15:59:29 -050046
Ashlesh Gawande2763f192017-10-25 15:48:39 -050047Another option to quit Mini-NDN is sending a SIGQUIT (ctrl+\). SIGINT (ctrl+c)
48is reserved for the purpose of stopping applications initiated on the minindn command
49line.
50
Vince Lehmand367dbb2015-07-14 15:59:29 -050051For 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 Gawandee626b632016-08-12 16:50:14 -050056To run Mini-NDN with a replica of the NDN testbed, use the `--testbed` parameter:
Vince Lehmand367dbb2015-07-14 15:59:29 -050057
Ashlesh Gawandee626b632016-08-12 16:50:14 -050058 sudo minindn --testbed
59
dmcoomes80eeea12017-10-27 12:49:10 -050060To change the working directory from default `/tmp/minindn` following option can be used:
Ashlesh Gawandee626b632016-08-12 16:50:14 -050061
62 sudo minindn --work-dir /home/mydir/test
Vince Lehmand367dbb2015-07-14 15:59:29 -050063
64#### Routing options
65
dmcoomesecf9c5a2017-10-11 10:17:46 -050066To run minindn without NLSR, use the `--no-nlsr` parameter:
67
68 sudo minindn --no-nlsr
69
dmcoomes7adc7f72017-10-06 12:01:28 -050070To run NLSR with hyperbolic routing enabled, use the `--routing` parameter:
Vince Lehmand367dbb2015-07-14 15:59:29 -050071
dmcoomes7adc7f72017-10-06 12:01:28 -050072 sudo minindn --routing hr
Vince Lehmand367dbb2015-07-14 15:59:29 -050073
dmcoomes7adc7f72017-10-06 12:01:28 -050074Topology files given under ndn_utils/topologies/minindn* have hyperbolic coordinates configured
75and can be used with this option.
76
77To run NLSR in dry-run mode, use the `--routing` parameter:
78
79 sudo minindn --routing dry
Ashlesh Gawandee626b632016-08-12 16:50:14 -050080
81To configure the max number of faces added by NLSR to reach each name prefix, use the `--faces`
Vince Lehmand367dbb2015-07-14 15:59:29 -050082parameter:
83
Ashlesh Gawandee626b632016-08-12 16:50:14 -050084 sudo minindn --faces 3
Vince Lehmand367dbb2015-07-14 15:59:29 -050085
Ashlesh Gawandee626b632016-08-12 16:50:14 -050086`--faces` can be an integer from 0 to 60; 0 indicates NLSR can add all available faces.
Vince Lehmand367dbb2015-07-14 15:59:29 -050087
Ashlesh Gawandee626b632016-08-12 16:50:14 -050088To run Mini-NDN with NLSR security configured
Vince Lehmand367dbb2015-07-14 15:59:29 -050089
Ashlesh Gawandee626b632016-08-12 16:50:14 -050090 sudo minindn --nlsr-security
91
92## Working Directory Structure
93
dmcoomes80eeea12017-10-27 12:49:10 -050094Currently Mini-NDN uses /tmp/minindn as the working directory if not specified otherwise by using
95the option --work-dir.
Ashlesh Gawandee626b632016-08-12 16:50:14 -050096
dmcoomes80eeea12017-10-27 12:49:10 -050097Each node is given a HOME directory under /tmp/minindn/node-name
Ashlesh Gawandee626b632016-08-12 16:50:14 -050098where node-name is the name of the node specified in the [nodes] section of the conf file.
99
100### NFD
dmcoomes80eeea12017-10-27 12:49:10 -0500101NFD conf file is stored at `/tmp/minindn/node-name/node-name.conf`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500102
dmcoomes80eeea12017-10-27 12:49:10 -0500103NFD log file is stored at `/tmp/minindn/node-name/node-name.log`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500104
dmcoomes80eeea12017-10-27 12:49:10 -0500105`.ndn` folder is stored at `/tmp/minindn/node-name/.ndn`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500106
107### NLSR
dmcoomes80eeea12017-10-27 12:49:10 -0500108NLSR conf file is stored at `/tmp/minindn/node-name/nlsr.conf`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500109
dmcoomes80eeea12017-10-27 12:49:10 -0500110NLSR log file is stored at `/tmp/minindn/node-name/log/nlsr.log`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500111
dmcoomes80eeea12017-10-27 12:49:10 -0500112When security is enabled, NLSR security certificates are stored in: `/tmp/minindn/node-name/security`
Ashlesh Gawandee626b632016-08-12 16:50:14 -0500113Note that no NLSR publishes the root certificate, Mini-NDN installs root.cert in security folder for each NLSR.