Table Of Contents

Previous topic

1.4. Scripting

Next topic

1.6. Fake Address Ranges for Traffic Generation

This Page

1.5. Traffic Generation Basics

1.5.1. Source and Destination Address Pools

For all traffic generators the source and destination addresses can be dynamically picked from fake ranges on each node. These fake ranges are specified in the Fake Nets agent for the experiment. If no fake range is specified, the first IP address for the node is used.

1.5.2. Distribution Functions

Anywhere a distribution functions is specified it can be any string that can be eval’d by python, returning an int or float value. There are several function imported into the daemon from util/distributions.py that can be used in one of these variables:

minmax(min, max)
returns a value between min and max
gamma(alpha, rate, cap = None):
returns a sample frmo a gamma distribution, capping to cap if provided
pareto(alpha, scale = 1.0, cap = None):
return a sample from a pareto distribution, capping to cap if provided
expo(lambd, scale = 1.0, cap = None):
return a sample from an exponential distribution, capping to cap if provided

1.5.3. Connection Spacing

../_images/think.png

Most traffic agents have a ‘think’ variable. This function will determine the time the agent will sleep before starting another network connection. Depending on the length of each connection, either specified by a data size or a time length, connections may or may not overlap. This is determined by the variables specified.

1.5.4. Replay

Available for: Linux,BSD

The replay agent responds to object type REPLAY.

NODES(g)
set the nodes that will inject traffic from a dump file
file
the path to the dump file on the node
mult
the multiplier used by the injector to speed up or slow down replay relative to the original timestamps

To use replay, a tcpdump file must be loaded on each node that will become the replay agent. This can be done in several ways including disk images or tarfiles. Once the file is present, the injector at each node will extract packets from the dump file based on their specified fake address ranges or just their local address and inject them into the network. It will also install a filter to drop all traffic destined for these addresses so that the node does not reply with ICMP error messages.

Note

An injector binary compiled under mingw does exist for the Windows image, however, there is no current firewall control to drop incoming traffic from the other injectors.

1.5.5. Harpoon

Available for: Linux,BSD

The harpoon agent responds to object type HARPOON.

NODES(g)
set the nodes that will become client and servers
cesssions
set the client sessions variable list
sesssions
set the server sessions variable list
port
set the port used by the harpoon connections
think
a function used to write the harpoon interconnection times list
sizes
a function used to write the harpoon file sizes list

The harpoon agent groups sets up a number of nodes that use harpoon to generate TCP traffic. Each node is a client and a server using ‘’port’’ as the server port. Harpoon uses configuration files to determine interconnection times and file sizes. These files are written dynamically using the functions provided via the ‘’think’’ and ‘’sizes’’ variables. Harpoon also tries to keep a certain number of sessions open on each client and on each server. These values are controlled via the ‘’csesssions’’ and ‘’ssessions’’ variables. These two variables can be a comma separated list of numbers. Every 60 seconds, harpoon will move to the next value in the array.

todo
  • destination port diversity
  • separate client and server processes so nodes can be only one or the other
mytcp = messaging.newGroup('HARPOON', 'h1')
mytcp.nodes = 'net1 net2 net3'
mytcp.csessions = '30'
mytcp.ssessions = '4'
mytcp.port = '9090'
mytcp.think = 'expo(0.9, 1, 40)'
mytcp.sizes = 'pareto(1.4, 300, 500000)'
mytcp.START()

1.5.6. Ping

Available for: Linux,BSD,Windows

The ping agent responds to object type PING.

NODES(g)
set the clients that are used by the agent group
servers(g)
set the destinations for the ping requests
think
a function to determine inter request times
sizes
not currently used

The ping agent will periodically send an ICMP echo request to a set of servers, incrementing the ID as it goes.

myping = messaging.newGroup('PING', 'ping1')
myping.clients = 'net1 net3 net4'
myping.servers = 'net2'
myping.think = 'expo(0.8, 2, 8)'
myping.START()

1.5.7. DNS

Available for: Linux, BSD

The DNS agent responds to the object type DNS.

NODES(g)
set the clients that are used by the agent group
servers(g)
set the destinations for the DNS requests
badrequests
a value of 0.0 to 1.0 that determine the change of issues a request for an unknown name
think
a function to determine inter request times
sizes
not currently used

The DNS uses the local dig binary to make DNS requests to a set of BIND servers. It requests a single known address and a single unknown address to create valid and NXDOMAIN replies.

mydns = messaging.newGroup('DNS', 'dns1')
mydns.clients = 'net2'
mydns.servers = 'net1 net3'
mydns.badrequests = '0.01'
mydns.think = 'pareto(1.2, 1.2, 10)'
mydns.START()

1.5.8. HTTP

Available for: Linux, BSD, Windows (client only) The HTTP agent responds to the object type HTTP.

NODES(g)
set the clients that are used by the agent group
servers(g)
set the location for the apache web servers
think
a function to determine inter connection times
sizes
a function to determine the sizes of the requested files

The HTTP agent uses the local wget binary to make HTTP requests to a set of apache servers. The requested file is a script that allows the requester to specify the size of the returned file.

myweb = messaging.newGroup('HTTP', 'http1')
myweb.NODES = 'net1 net2'
myweb.servers = 'net3'
myweb.think = 'minmax(0.4,0.8)'
myweb.sizes = 'pareto(1.4,2000)'
myweb.START()

1.5.9. FTP

Available for: Linux, BSD, Windows (client only) The FTP agent responds to the object type FTP.

NODES(g)
set the clients that are used by the agent group
servers(g)
set the destinations for the FTP requests
think
a function to determine inter connection times
sizes
a function to determine the sizes of the requested files

The FTP agent uses the local wget binary to make FTP requests to a set of vsftpd servers. The vsftpd binary is modified so that requests for a number (digits only, no characters) return a generated file of that size.

myftp  messaging.newGroup('FTP', 'ftp1')
myftp.clients = 'net1 net2'
myftp.servers = 'net3'
myftp.think = 'minmax(0.4,2)'
myftp.sizes = 'pareto(1.4,5000)'
myftp.START()

1.5.10. SSH

Available for: Linux,BSD,Windows The SSH agent responds to the object type SSH.

NODES(g)
set the clients that are used by the agent group
servers(g)
set the destinations for the SSH sessions
think
a function to determine how long before the agent spawns another client
duration
a function to determine the length of each ssh session
typing
a function to determine the inter-key delay times for each command
msgtime
a function to determine time before starting another command
sizes
a function to determine the amount of data that is returned for each command

The SSH agent utilizes the local OpenSSH client and daemon to open a connection from a client to a server. The agent will launch clients based on a expect script. This client will ‘type’ commands across the connection, each command requests a certain amount of data be returned. Once its duration is met, the client will disconnect.

myssh = messaging.newGroup('SSH', 'ssh1')
myssh.clients =  'net1 net4'
myssh.servers =  'net3'
myssh.think =    'minmax(350,400)'
myssh.duration = 'minmax(300,300)'
myssh.typing =   'minmax(0.1,0.2)'
myssh.msgtime =  'pareto(2, 2, 20)'
myssh.sizes =    'expo(0.9, 100, 16384)'
myssh.START()

1.5.11. IRC

Available for: Linux, BSD, Windows (client only) The IRC agent responds to the object type IRC.

NODES(g)
set the clients for the agent group
servers(g)
set the nodes that will run an IRC daemon
think
a function to determine how long before the agent spawns another client
duration
a function to determine how long a client will connect for
msgtimes
a function to determine the amount of time a clients waiting before sending a message
sizes
a function to determine the amount of data that is sent in a message

The IRC agent utilizes a python based IRC client and IRCd hybrid to create an IRC network. The servers are current single servers and do not connect to each other. The agent will launch clients that connect to one of the servers. This client will receive messages normally and periodically send messages of its own.

myirc = messaging.newGroup('IRC', 'irc1')
myirc.clients =  'net1 net4'
myirc.servers =  'net3'
myirc.think =    'minmax(350,400)'
myirc.duration = 'minmax(300,300)'
myirc.msgtime =  'pareto(2, 2, 20)'
myirc.sizes =    'expo(0.9, 100, 16384)'
myirc.START()

1.5.12. Constant Bit Rate

Available for: Linux,BSD,Windows

The constant bit rate agent responds to the object type CBR.

NODES(g)
set the clients for the agent group
servers(g)
set the nodes that will run a sink
think
a function to determine how long before the agent spawns another client
pktinterval
number of microseconds between packets
pktcount
number of packets to send in a connection
pktlength
size of each packet

The constant bit rate client does as its name says, it sends a constant stream of UDP packets from one node to another.

mycbr = messaging.newGroup('CBR', 'data1')
mycbr.clients = 'net1 net3 net4'
mycbr.servers = 'net2'
mycbr.think = 'minmax(240,250)'
mycbr.pktinterval = '20000'
mycbr.pktcount = '5000'
mycbr.pktlength = '100'
mycbr.START()

1.5.13. Streaming Video

Available for: Linux,BSD,Windows

The streaming video agent responds to the object type VIDEO. As of version 1.2.1, you must also extract the tarfile /share/seer/seer-videodata.tgz onto any machine that you want to be a video server.

NODES(g)
set the clients for the agent group
servers(g)
set the nodes that will run a video server
think
a function to determine how long before the agent spawns another client
file
one of (run1100, run660, run370) which represents the ‘average’ bit rate of the file
time
a function to determine how long the requests file will stream for
type
one of (rtp, udp, tcp) which represents the type of transmission to use

The video client makes use of the Live555 video library to run a MPEG2 TS video server and clients. There are three short video clips that are run in loops to create the streamed data.

myvid = messaging.newGroup('VIDEO', 'stream1')
myvid.clients = 'net2 net3 net4'
myvid.servers = 'net1'
myvid.think =   'minmax(100,150)'
myvid.file =    'run1100'
myvid.time =    'minmax(70,80)'
myvid.type =    'rtp'
myvid.START()