blob: 7c87b4c558b83abf75ef64fa0388250185fd870c [file] [log] [blame] [view]
Davide Pesavento5b9c85a2020-04-09 21:10:54 -04001# NDN Traffic Generator
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -08002
Davide Pesavento5b9c85a2020-04-09 21:10:54 -04003![Language](https://img.shields.io/badge/C%2B%2B-14-blue.svg)
Davide Pesavento2a7f32b2017-09-02 13:48:13 -04004[![Build Status](https://travis-ci.org/named-data/ndn-traffic-generator.svg?branch=master)](https://travis-ci.org/named-data/ndn-traffic-generator)
5
jeraldabraham420dbf02014-04-25 22:58:31 -07006This tool is designed to generate Interest and Data traffic in an NDN network.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -08007The client and server tool accept traffic configuration files which can be
8used to specify the pattern of NDN traffic that is required to be generated.
Alexander Afanasyevfda32a32014-03-20 10:50:00 -07009Sample configuration files are provided which include instructions on how
10to configure various parameters.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080011
Davide Pesavento032c9802019-01-25 17:10:26 -050012## Prerequisites
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080013
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070014Compiling and running ndn-traffic-generator requires the following dependencies:
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080015
Davide Pesavento5b9c85a2020-04-09 21:10:54 -0400161. [ndn-cxx and its dependencies](https://named-data.net/doc/ndn-cxx/current/INSTALL.html)
172. [NDN Forwarding Daemon (NFD)](https://named-data.net/doc/NFD/current/INSTALL.html)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080018
Davide Pesavento032c9802019-01-25 17:10:26 -050019## Compilation & Installation
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080020
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040021```
22./waf configure
23./waf
24sudo ./waf install
25```
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040026
Davide Pesavento032c9802019-01-25 17:10:26 -050027## Command Line Options
28
29#### ndn-traffic-server
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080030
Davide Pesavento35185332019-01-14 04:00:15 -050031 Usage: ndn-traffic-server [options] <Traffic_Configuration_File>
32 Respond to Interests as per provided Traffic_Configuration_File.
jeraldabraham420dbf02014-04-25 22:58:31 -070033 Multiple prefixes can be configured for handling.
Davide Pesavento35185332019-01-14 04:00:15 -050034 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 Afanasyeva8f2a922014-02-26 14:21:56 -080040
Davide Pesavento032c9802019-01-25 17:10:26 -050041#### ndn-traffic-client
42
43 Usage: ndn-traffic-client [options] <Traffic_Configuration_File>
Davide Pesavento35185332019-01-14 04:00:15 -050044 Generate Interest traffic as per provided Traffic_Configuration_File.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080045 Interests are continuously generated unless a total number is specified.
Davide Pesavento35185332019-01-14 04:00:15 -050046 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 Afanasyeva8f2a922014-02-26 14:21:56 -080052
Davide Pesavento032c9802019-01-25 17:10:26 -050053* 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 Afanasyeva8f2a922014-02-26 14:21:56 -080056
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040057## Example
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080058
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040059#### ON MACHINE #1
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080060
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040061(NFD must be running)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080062
Davide Pesavento032c9802019-01-25 17:10:26 -050063Start the traffic server:
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080064
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070065 ndn-traffic-server ndn-traffic-server.conf
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080066
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040067#### ON MACHINE #2
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080068
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040069(NFD must be running)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080070
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040071Start the traffic client:
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070072
Davide Pesavento032c9802019-01-25 17:10:26 -050073 ndn-traffic-client ndn-traffic-client.conf