blob: 189f9b66a4d707b2667ebcfee2372177d301327f [file] [log] [blame] [view]
Davide Pesavento032c9802019-01-25 17:10:26 -05001# ndn-traffic-generator: Traffic Generator for NDN
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -08002
Davide Pesavento2a7f32b2017-09-02 13:48:13 -04003[![Build Status](https://travis-ci.org/named-data/ndn-traffic-generator.svg?branch=master)](https://travis-ci.org/named-data/ndn-traffic-generator)
4
jeraldabraham420dbf02014-04-25 22:58:31 -07005This tool is designed to generate Interest and Data traffic in an NDN network.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -08006The client and server tool accept traffic configuration files which can be
7used to specify the pattern of NDN traffic that is required to be generated.
Alexander Afanasyevfda32a32014-03-20 10:50:00 -07008Sample configuration files are provided which include instructions on how
9to configure various parameters.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080010
Davide Pesavento032c9802019-01-25 17:10:26 -050011
12## 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 Pesavento29db0fd2017-08-29 13:32:00 -0400161. ndn-cxx library <https://github.com/named-data/ndn-cxx>
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070017
Davide Pesavento29db0fd2017-08-29 13:32:00 -040018 For detailed installation instructions, please see
19 [`INSTALL.rst`](https://github.com/named-data/ndn-cxx/blob/master/docs/INSTALL.rst)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080020
Davide Pesavento29db0fd2017-08-29 13:32:00 -0400212. NDN forwarding daemon <https://github.com/named-data/NFD>
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080022
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080023
Davide Pesavento032c9802019-01-25 17:10:26 -050024## Compilation & Installation
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080025
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070026 ./waf configure
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080027 ./waf
28 sudo ./waf install
29
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040030
Davide Pesavento032c9802019-01-25 17:10:26 -050031## Command Line Options
32
33#### ndn-traffic-server
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080034
Davide Pesavento35185332019-01-14 04:00:15 -050035 Usage: ndn-traffic-server [options] <Traffic_Configuration_File>
36 Respond to Interests as per provided Traffic_Configuration_File.
jeraldabraham420dbf02014-04-25 22:58:31 -070037 Multiple prefixes can be configured for handling.
Davide Pesavento35185332019-01-14 04:00:15 -050038 Set the environment variable NDN_TRAFFIC_LOGFOLDER to redirect output to a log file.
39 Options:
40 -h [ --help ] print this help message and exit
41 -c [ --count ] arg maximum number of Interests to respond to
42 -d [ --delay ] arg (=0) wait this amount of milliseconds before responding to each Interest
43 -q [ --quiet ] turn off logging of Interest reception/Data generation
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080044
Davide Pesavento032c9802019-01-25 17:10:26 -050045#### ndn-traffic-client
46
47 Usage: ndn-traffic-client [options] <Traffic_Configuration_File>
Davide Pesavento35185332019-01-14 04:00:15 -050048 Generate Interest traffic as per provided Traffic_Configuration_File.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080049 Interests are continuously generated unless a total number is specified.
Davide Pesavento35185332019-01-14 04:00:15 -050050 Set the environment variable NDN_TRAFFIC_LOGFOLDER to redirect output to a log file.
51 Options:
52 -h [ --help ] print this help message and exit
53 -c [ --count ] arg total number of Interests to be generated
54 -i [ --interval ] arg (=1000) Interest generation interval in milliseconds
55 -q [ --quiet ] turn off logging of Interest generation/Data reception
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080056
Davide Pesavento032c9802019-01-25 17:10:26 -050057* These tools need not be used together and can be used individually as well.
58* Please refer to the sample configuration files provided for details on how to create your own.
59* Use the command line options shown above to adjust traffic configuration.
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080060
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080061
Davide Pesavento032c9802019-01-25 17:10:26 -050062### Sample Run Instructions
63
64##### ON MACHINE #1
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080065
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040066(NFD must be running)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080067
Davide Pesavento032c9802019-01-25 17:10:26 -050068Start the traffic server:
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080069
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070070 ndn-traffic-server ndn-traffic-server.conf
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080071
Davide Pesavento032c9802019-01-25 17:10:26 -050072##### ON MACHINE #2
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080073
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040074(NFD must be running)
Alexander Afanasyeva8f2a922014-02-26 14:21:56 -080075
Davide Pesavento2a7f32b2017-09-02 13:48:13 -040076Start the traffic client:
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070077
Davide Pesavento032c9802019-01-25 17:10:26 -050078 ndn-traffic-client ndn-traffic-client.conf