docs: update docs
refs: #3670
Change-Id: I4a90df1cf5b28d05fd81877bf4d51659e21b1119
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index b463756..ebf14cd 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -14,7 +14,7 @@
a: _
b: _
-Additionaly each node can take the following paramteres:
+Additionally each node can take the following parameters:
* app : Default application(s) to be started on a node (specify '_' if no app needs to be started - required).
The app is the only parameter which needs double quotes (see example below).
@@ -44,7 +44,7 @@
This would create a link between a and b. 'b:a' would also result in the same.
The following parameters can be configured for a node:
-* delay : Delay paramter is a required paramter which defines the delay of the link (1-1000ms)
+* delay : Delay parameter is a required parameter which defines the delay of the link (1-1000ms)
* bw : Bandwidth of a link (<1-1000> Mbps)
@@ -58,5 +58,7 @@
[links]
a:b delay=10ms bw=100
-See ``ndn_utils/topologies`` for more sample files
+Note that `sampleApp1` and `sampleApp2` must be either installed in the system (ex: /usr/bin)
+or an absolute path needs to be given.
+See `ndn_utils/topologies` for more sample files
diff --git a/docs/CONNECT-TO-OUTSIDE.md b/docs/CONNECT-TO-OUTSIDE.md
index 5ff19b8..438e4db 100644
--- a/docs/CONNECT-TO-OUTSIDE.md
+++ b/docs/CONNECT-TO-OUTSIDE.md
@@ -11,10 +11,15 @@
c----a----b----d
-If we want node "a" to connect to the host machine, we need to add a "root" node which has a link with
-node "a."
+If we want node "a" to connect to the host machine, we need to add a "root" node which has a link with node "a."
-To do so, the following lines can be added to bin/minindn before net.start():
+To do so, we need to add the following import statement at the top of `bin/minindn`:
+
+```python
+from mininet.node import Node
+```
+
+Then the following lines can be added to `bin/minindn` before net.start():
```python
root = Node( 'root', inNamespace=False )
diff --git a/docs/EXPERIMENTS.md b/docs/EXPERIMENTS.md
index 341062f..1b85fa5 100644
--- a/docs/EXPERIMENTS.md
+++ b/docs/EXPERIMENTS.md
@@ -8,15 +8,15 @@
## Running existing experiments
Mini-NDN includes three example experiments that can be used to test the network or as reference
-for custom experiment implementations. ``ndn-tools`` must be installed to run the example
-experiments as each experiment uses both ``ndnpingserver`` and ``ndnping``. Please see
-[INSTALL.md](../INSTALL.md) for instructions on installing ``ndn-tools``.
+for custom experiment implementations. `ndn-tools` must be installed to run the example
+experiments as each experiment uses both `ndnpingserver` and `ndnping`. Please see
+[INSTALL.md](../INSTALL.md) for instructions on installing `ndn-tools`.
-To see a list of the available experiments, run Mini-NDN using the ``--list-experiments`` parameter:
+To see a list of the available experiments, run Mini-NDN using the `--list-experiments` parameter:
minindn --list-experiments
-To run an experiment, provide the experiment name as an argument to the ``--experiment`` parameter:
+To run an experiment, provide the experiment name as an argument to the `--experiment` parameter:
sudo minindn --experiment=pingall
@@ -32,16 +32,29 @@
#### Common experiment parameters
-The time allowed for convergence (in seconds) can be configured using the ``--ctime`` parameter:
+The time allowed for convergence (in seconds) can be configured using the `--ctime` parameter:
sudo minindn --ctime=30 ...
After the experiment has finished running, the command-line interface (CLI) will be launched and the
user can then interact with the test environment. To disable the CLI and instead exit Mini-NDN
-as soon as the experiment has finished, use the ``--no-cli`` parameter:
+as soon as the experiment has finished, use the `--no-cli` parameter:
sudo minindn --no-cli ...
+To ping only a percentage of nodes `--pct-traffic` can be set.
+
+ sudo minindn --pct-traffic=0.5 ...
+
+The above command will ping only 50% of other nodes from each node.
+The default value is 1 i.e. ping every other node.
+
+To move the experiment results to a results directory from the working directory
+after the experiment is complete (either --no-cli or quit) the following option
+can be used:
+
+ sudo minindn --result-dir /home/mydir/result-dir ...
+
The included experiments are described in detail below along with additional
parameters that can be provided to modify the execution of the experiments.
@@ -50,13 +63,13 @@
**Scenario**: Each node in the network simultaneously pings every other node in the network at a
one second interval.
-**Experiment ID**: ``--pingall``
+**Experiment ID**: `--pingall`
-The number of pings sent in the experiment can be configured using the ``--nPings`` parameter:
+The number of pings sent in the experiment can be configured using the `--nPings` parameter:
sudo minindn --experiment=pingall --nPings=120
-By default, ``--nPings`` is 300 for the Pingall experiment.
+By default, `--nPings` is 300 for the Pingall experiment.
### Failure experiment
@@ -65,9 +78,9 @@
left in a failed state for 120 seconds while the other nodes continue pinging. After this period,
the failed node is recovered and pings are collected for an additional 90 seconds.
-**Experiment ID**: ``--failure``
+**Experiment ID**: `--failure`
-``--nPings`` is 300 for the Failure experiment and cannot be modified.
+`--nPings` is 300 for the Failure experiment and cannot be modified.
### Multiple failure experiment
@@ -78,12 +91,24 @@
failure and recovery process. Once every node in the network has gone through the failure and
recovery process, the experiment will end.
-**Experiment ID**: ``--multiple-failure``
+**Experiment ID**: `--multiple-failure`
-``--nPings`` is dependent on the size of the topology being tested. 120 pings are scheduled for
+`--nPings` is dependent on the size of the topology being tested. 120 pings are scheduled for
each node's failure/recovery period as well as an additional 60 pings for the initial collection
period.
+### MCN failure experiment
+
+**Scenario**: This is exactly like the failure experiment but instead of failing the node named "csu" it fails the most connected node (MCN) i.e the node with the most links.
+
+Experiment ID: `--failure-mcn`
+
+### Experiment data
+
+The ping data is stored at `/tmp/node-name/ping-data`.
+
+The ping server log is stored at `/tmp/node-name/ping-server`
+
## Creating custom experiments
Mini-NDN provides a simple Python based framework which allows a user to define their own experiment
@@ -91,12 +116,12 @@
To create an experiment, follow these steps:
-1. Create a Python source file for the experiment in the ``ndn/experiments`` directory.
+1. Create a Python source file for the experiment in the `ndn/experiments` directory.
- e.g.) ``ndn/experiments/example.py``
+ e.g.) `ndn/experiments/example.py`
-2. Derive the experiment from the ``Experiment`` base class defined in
- ``ndn/experiments/experiment.py``.
+2. Derive the experiment from the `Experiment` base class defined in
+ `ndn/experiments/experiment.py`.
#!/usr/bin/python
@@ -106,7 +131,7 @@
def __init__(self, args):
Experiment.__init__(self, args)
-3. Override the ``setup()`` method to define how the experiment should be initialized
+3. Override the `setup()` method to define how the experiment should be initialized
e.g.) Run an ndnping server in the background on each node
@@ -115,7 +140,7 @@
host.cmd("ndnpingserver host.name &")
-4. Override the ``run()`` method to define how the experiment should behave
+4. Override the `run()` method to define how the experiment should behave
e.g.) Obtain the NFD status of each node and save it to file
@@ -123,7 +148,7 @@
for host in self.net.hosts:
host.cmd("nfd-status > status.txt")
-5. Register the experiment with the ``ExperimentManager`` to make the experiment runnable from the
+5. Register the experiment with the `ExperimentManager` to make the experiment runnable from the
command line.
Experiment.register("example-name", ExampleExperiment)
@@ -149,6 +174,8 @@
def run(self):
for host in self.net.hosts:
+ # By default status.txt would be stored
+ # at /tmp/host/status.txt
host.cmd("nfd-status > status.txt")
Experiment.register("example-name", ExampleExperiment)
diff --git a/docs/GETTING-STARTED.md b/docs/GETTING-STARTED.md
index c8c5763..5921579 100644
--- a/docs/GETTING-STARTED.md
+++ b/docs/GETTING-STARTED.md
@@ -6,10 +6,14 @@
## Running Mini-NDN
-To run Mini-NDN with the default topology, ``ndn_utils/topologies/default-topology.conf``, type:
+To run Mini-NDN with the default topology, `ndn_utils/topologies/default-topology.conf`, type:
sudo minindn
+A full list of options can be printed by using:
+
+ sudo minindn --help
+
To run Mini-NDN with a topology file, provide the filename as the first argument:
sudo minindn my-topology.conf
@@ -36,7 +40,7 @@
mininet> a nlsrc status
-To exit Mini-NDN, type ``quit`` in the CLI:
+To exit Mini-NDN, type `quit` in the CLI:
mininet> quit
@@ -45,21 +49,51 @@
## Command-line options
-To run Mini-NDN with a replica of the NDN testbed, use the ``--testbed`` parameter:
+To run Mini-NDN with a replica of the NDN testbed, use the `--testbed` parameter:
- sudo mini-ndn --testbed
+ sudo minindn --testbed
+
+To change the working directory from default `/tmp` following option can be used:
+
+ sudo minindn --work-dir /home/mydir/test
#### Routing options
-To run NLSR with hyperbolic routing enabled, use the ``--hr`` parameter:
+To run NLSR with hyperbolic routing enabled, use the `--hr` parameter:
- sudo mini-ndn --hr
+ sudo minindn --hr
-To configure the max number of faces added by NLSR to reach each name prefix, use the ``--faces``
+Topology files given under ndn_utils/topologies/minindn* have hyperbolic coordinates configured and can be used with this option.
+
+To configure the max number of faces added by NLSR to reach each name prefix, use the `--faces`
parameter:
- sudo mini-ndn --faces 3
+ sudo minindn --faces 3
-``--faces`` can be an integer from 0 to 60; 0 indicates NLSR can add all available faces.
+`--faces` can be an integer from 0 to 60; 0 indicates NLSR can add all available faces.
+To run Mini-NDN with NLSR security configured
+ sudo minindn --nlsr-security
+
+## Working Directory Structure
+
+Currently Mini-NDN uses /tmp as the working directory if not specified otherwise by using the option --work-dir.
+
+Each node is given a HOME directory under /tmp/node-name
+where node-name is the name of the node specified in the [nodes] section of the conf file.
+
+### NFD
+NFD conf file is stored at `/tmp/node-name/node-name.conf`
+
+NFD log file is stored at `/tmp/node-name/node-name.log`
+
+`.ndn` folder is stored at `/tmp/node-name/.ndn`
+
+### NLSR
+NLSR conf file is stored at `/tmp/node-name/nlsr.conf`
+
+NLSR log file is stored at `/tmp/node-name/log/nlsr.log`
+
+When security is enabled, NLSR security certificates are stored in: `/tmp/node-name/security`
+Note that no NLSR publishes the root certificate, Mini-NDN installs root.cert in security folder for each NLSR.
diff --git a/docs/GUI.md b/docs/GUI.md
index a465269..b190eeb 100644
--- a/docs/GUI.md
+++ b/docs/GUI.md
@@ -13,21 +13,21 @@
There are two file formats used by Mini-NDN edit.
-* ``.mnndn`` files store topology information used by the GUI. Mini-NDN Edit can open and
-save ``.mnndn`` files.
+* `.mnndn` files store topology information used by the GUI. Mini-NDN Edit can open and
+save `.mnndn` files.
-* ``.conf`` files are used by Mini-NDN to create and run topologies. Mini-NDN Edit can generate a
-``.conf`` file from a ``.mnndn`` file. Mini-NDN edit cannot open ``.conf`` files. Please see
-[CONFIG-FILE.md](CONFIG.md) for more information on the content and format of ``.conf`` files.
+* `.conf` files are used by Mini-NDN to create and run topologies. Mini-NDN Edit can generate a
+`.conf` file from a `.mnndn` file. Mini-NDN edit cannot open `.conf` files. Please see
+[CONFIG-FILE.md](CONFIG.md) for more information on the content and format of `.conf` files.
#### File menu

* **New** - Erase the current canvas and provide a new empty topology
-* **Open** - Open a ``.mnndn`` topology file
-* **Save** - Save the current topology as a ``.mnndn`` topology file
-* **Generate** - Convert the current topology to a ``.conf`` file runnable by Mini-NDN
+* **Open** - Open a `.mnndn` topology file
+* **Save** - Save the current topology as a `.mnndn` topology file
+* **Generate** - Convert the current topology to a `.conf` file runnable by Mini-NDN
* **Run** - Run the current topology in Mini-NDN. The GUI will disappear and Mini-NDN will run on
the command-line.
* **Quit** - Exit Mini-NDN edit
@@ -38,7 +38,7 @@

The *cursor tool* is used to select and move nodes in the topology. A selected node or link can be
-removed from the topology using the ``backspace`` key or by selecting ``edit/cut``.
+removed from the topology using the `backspace` key or by selecting `edit/cut`.
### Host tool

@@ -63,7 +63,7 @@
#### Editing host information
To edit a host's information and configuration, right-click on the desired node and select
-``Host Options``.
+`Host Options`.
The *Host Options* window will include tabs to modify the node's properties as well as the
configuration files for NFD and NLSR on that node.
@@ -74,7 +74,7 @@
#### Editing link configuration
-To edit a link's configuration, right-click on the desired link and select ``Link Options``.
+To edit a link's configuration, right-click on the desired link and select `Link Options`.
The *Link Options* window will allow configuration of the link's bandwidth, delay, and loss rate.