Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 1 | # NDN Traffic Generator |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 2 | |
Davide Pesavento | ab6ac5d | 2021-10-05 23:23:53 -0400 | [diff] [blame] | 3 | [](https://github.com/named-data/ndn-traffic-generator/actions/workflows/ci.yml) |
| 4 |  |
Davide Pesavento | 2a7f32b | 2017-09-02 13:48:13 -0400 | [diff] [blame] | 5 | |
jeraldabraham | 420dbf0 | 2014-04-25 22:58:31 -0700 | [diff] [blame] | 6 | This tool is designed to generate Interest and Data traffic in an NDN network. |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 7 | The client and server tool accept traffic configuration files which can be |
| 8 | used to specify the pattern of NDN traffic that is required to be generated. |
Alexander Afanasyev | fda32a3 | 2014-03-20 10:50:00 -0700 | [diff] [blame] | 9 | Sample configuration files are provided which include instructions on how |
| 10 | to configure various parameters. |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 11 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 12 | ## Prerequisites |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 13 | |
Alexander Afanasyev | fda32a3 | 2014-03-20 10:50:00 -0700 | [diff] [blame] | 14 | Compiling and running ndn-traffic-generator requires the following dependencies: |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 15 | |
Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 16 | 1. [ndn-cxx and its dependencies](https://named-data.net/doc/ndn-cxx/current/INSTALL.html) |
| 17 | 2. [NDN Forwarding Daemon (NFD)](https://named-data.net/doc/NFD/current/INSTALL.html) |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 18 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 19 | ## Compilation & Installation |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 20 | |
Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 21 | ``` |
| 22 | ./waf configure |
| 23 | ./waf |
| 24 | sudo ./waf install |
| 25 | ``` |
Davide Pesavento | 2a7f32b | 2017-09-02 13:48:13 -0400 | [diff] [blame] | 26 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 27 | ## Command Line Options |
| 28 | |
| 29 | #### ndn-traffic-server |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 30 | |
Davide Pesavento | 3518533 | 2019-01-14 04:00:15 -0500 | [diff] [blame] | 31 | Usage: ndn-traffic-server [options] <Traffic_Configuration_File> |
| 32 | Respond to Interests as per provided Traffic_Configuration_File. |
jeraldabraham | 420dbf0 | 2014-04-25 22:58:31 -0700 | [diff] [blame] | 33 | Multiple prefixes can be configured for handling. |
Davide Pesavento | 3518533 | 2019-01-14 04:00:15 -0500 | [diff] [blame] | 34 | Set the environment variable NDN_TRAFFIC_LOGFOLDER to redirect output to a log file. |
| 35 | Options: |
| 36 | -h [ --help ] print this help message and exit |
| 37 | -c [ --count ] arg maximum number of Interests to respond to |
| 38 | -d [ --delay ] arg (=0) wait this amount of milliseconds before responding to each Interest |
| 39 | -q [ --quiet ] turn off logging of Interest reception/Data generation |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 40 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 41 | #### ndn-traffic-client |
| 42 | |
| 43 | Usage: ndn-traffic-client [options] <Traffic_Configuration_File> |
Davide Pesavento | 3518533 | 2019-01-14 04:00:15 -0500 | [diff] [blame] | 44 | Generate Interest traffic as per provided Traffic_Configuration_File. |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 45 | Interests are continuously generated unless a total number is specified. |
Davide Pesavento | 3518533 | 2019-01-14 04:00:15 -0500 | [diff] [blame] | 46 | Set the environment variable NDN_TRAFFIC_LOGFOLDER to redirect output to a log file. |
| 47 | Options: |
| 48 | -h [ --help ] print this help message and exit |
| 49 | -c [ --count ] arg total number of Interests to be generated |
| 50 | -i [ --interval ] arg (=1000) Interest generation interval in milliseconds |
| 51 | -q [ --quiet ] turn off logging of Interest generation/Data reception |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 52 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 53 | * These tools need not be used together and can be used individually as well. |
| 54 | * Please refer to the sample configuration files provided for details on how to create your own. |
| 55 | * Use the command line options shown above to adjust traffic configuration. |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 56 | |
Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 57 | ## Example |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 58 | |
Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 59 | #### ON MACHINE #1 |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 60 | |
Davide Pesavento | 2a7f32b | 2017-09-02 13:48:13 -0400 | [diff] [blame] | 61 | (NFD must be running) |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 62 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 63 | Start the traffic server: |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 64 | |
Alexander Afanasyev | fda32a3 | 2014-03-20 10:50:00 -0700 | [diff] [blame] | 65 | ndn-traffic-server ndn-traffic-server.conf |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 66 | |
Davide Pesavento | 5b9c85a | 2020-04-09 21:10:54 -0400 | [diff] [blame] | 67 | #### ON MACHINE #2 |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 68 | |
Davide Pesavento | 2a7f32b | 2017-09-02 13:48:13 -0400 | [diff] [blame] | 69 | (NFD must be running) |
Alexander Afanasyev | a8f2a92 | 2014-02-26 14:21:56 -0800 | [diff] [blame] | 70 | |
Davide Pesavento | 2a7f32b | 2017-09-02 13:48:13 -0400 | [diff] [blame] | 71 | Start the traffic client: |
Alexander Afanasyev | fda32a3 | 2014-03-20 10:50:00 -0700 | [diff] [blame] | 72 | |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 73 | ndn-traffic-client ndn-traffic-client.conf |