Merge pull request #17586 from benpicco/dist/tools/topogen-doc

tools/zep_dispatch: document topogen usage
This commit is contained in:
benpicco 2022-01-31 11:49:26 +01:00 committed by GitHub
commit 361d41db05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 5 deletions

View File

@ -144,3 +144,20 @@ instance [0 | Iface: 7 | mop: 2 | ocp: 0 | mhri: 256 | mri 0]
``` ```
This should also be visible in Foren6. This should also be visible in Foren6.
Topology generation
-------------------
To generate a random topology use the `topogen.sh` script.
This will randomly distribute *N* nodes on on a *W* × *H* map.
Each node has a radio range *R* ± *V* where *V* is a random variance that can also be set to 0.
The further away a node is from a sending node, the higher the packet loss probability.
Nodes outside the sending radius have a zero probability of receiving a packet.
If you have `gnuplot` installed this will also generate a plot of the resulting node distribution:
![example topology](https://gist.githubusercontent.com/benpicco/6fd6f7c79a30cbbc41c3a65e53ed3682/raw/33afb859b65d949238129096858d14e2319fb5fb/network.topo.svg)
A light color means that a node only has a one-way connection to the network, gray means a node is
entirely isolated.

View File

@ -16,11 +16,11 @@ else
CRESET= CRESET=
fi fi
WIDTH=100 WIDTH=100 # X dimension of the simulated world
HEIGHT=100 HEIGHT=100 # Y dimension of the simulated world
RANGE=30 RANGE=30 # base node radio range
VARIANCE=15 VARIANCE=15 # random offset to radio range
NUM=10 NUM=10 # number of nodes
echo "writing to $FILE" echo "writing to $FILE"