Manual:Tools/Traffic Generator: Difference between revisions
Line 100: | Line 100: | ||
If you require more low level packet or take full advantage of traffic generator, then please use [[#Raw_Packet_Template | raw-packet-template]] builder to build the packet. | If you require more low level packet or take full advantage of traffic generator, then please use [[#Raw_Packet_Template | raw-packet-template]] builder to build the packet. | ||
If same type of header is present in packet more than once then header field values are passed as comma separated list. (For example if there are two ip | |||
headers then source addresses are given like "ip-src=1.1.1.1,2.2.2.2"). | |||
For quicker header construction many of the header field values are assumed. For example if header stack is "mac,ip" then traffic generator can assume that mac-protocol value is "ip". Or if "port" or "interface" setting is specified traffic generator can assume "mac-src" to be MAC address of interface). | |||
Assumed values have distinct names that start with "assumed-" and are read only. Manually specified values override assumed ones. | |||
Revision as of 13:39, 28 September 2011
Applies to RouterOS: v5 +
Summary
Traffic Generator is a tool that allows to generate and send RAW packets over specific ports. Tool also collects latency and jitter values, tx/rx rates, it also counts lost packets and detects Out-of-Order packets. Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced status collection.
suggest
General
Sub-menu /tool traffic-generator
This menu allows to set general traffic generator properties and contains commands to quickly start and stop the tool.
Properties
Property | Description |
---|---|
latency-distribution-scale (integer [0..28]; Default: 10) | |
test-id (integer [0..255]; Default: 0) |
Read-Only Properties
Property | Description |
---|---|
latency-distribution-samples (integer) | |
latency-distribution-measure-interval (time) | |
running (yes | no) | Shows whether traffic generator tool is started. |
Commands
Property | Description |
---|---|
quick () | This command allows to quickly start packet generator and print the stats output to the terminal. Command also accept several parameters that overrides settings in packet template and stream settings. Accepted parameters are duration, entries-to-show, freeze-frame-interval, mbps, num, packet-size, port, pps, stream, test-id, tx-template
|
start () | Commands starts the traffic generator tool in the background. It accepts one parameter test-id |
stop () | Command stops the started traffic generator tool by start command. |
Packet Template
Sub-menu /tool traffic-generator packet-template
This sub menu allows to build packet based on provided parameters. Based on parameters you can build ip packet with vlan tags and set udp ports. Raw packet template is generated based on provided parameters.
If you require more low level packet or take full advantage of traffic generator, then please use raw-packet-template builder to build the packet.
If same type of header is present in packet more than once then header field values are passed as comma separated list. (For example if there are two ip
headers then source addresses are given like "ip-src=1.1.1.1,2.2.2.2").
For quicker header construction many of the header field values are assumed. For example if header stack is "mac,ip" then traffic generator can assume that mac-protocol value is "ip". Or if "port" or "interface" setting is specified traffic generator can assume "mac-src" to be MAC address of interface).
Assumed values have distinct names that start with "assumed-" and are read only. Manually specified values override assumed ones.
Properties
Property | Description |
---|---|
comment (string; Default: ) | Short description of packet you are building. |
data (incrementing | random | specific-byte | uninitialized; Default: uninitialized) | |
data-byte (hex [0..FF]]; Default: 0) | Byte that will be used to fill packet payload. |
interface (string; Default: ) | Optional parameter of packet template. This is mutually exclusive with "port" setting. Specifying "interface" allows user not to create a port entry for interface in port menu. In fact a port entry is created dynamically. This is useful for running quick tests. |
ip-dscp (integer[0..255][,integer [0..255],...]] (max 16 times); Default: ) | Single DSCP or list of DSCP values that will be set in IP header |
ip-dst (list of IP/Netmask (max 16 times); Default: ) | List of destination IP addresses that will be used when generating IP header. |
ip-frag-off (; Default: ) | |
ip-gateway (; Default: ) | |
ip-id (; Default: ) | |
ip-protocol (; Default: ) | |
ip-src (; Default: ) | |
ip-ttl (; Default: ) | |
mac-dst (; Default: ) | |
mac-protocol (; Default: ) | |
mac-src (; Default: ) | |
name (; Default: ) | |
port (; Default: ) | Optional parameter of packet template. This suggests a port through which packets generated using this template should be sent out. Port can also be specified in other places such as in stream settings. This is mutually exclusive with interface setting. |
raw-header (; Default: ) | |
udp-dst-port (; Default: ) | |
udp-src-port (; Default: ) | |
vlan-id (; Default: ) | |
vlan-priority (; Default: ) | |
vlan-protocol (; Default: ) | |
header-stack (; Default: ) | Sequence of headers that a generated packet should have.
Currently supports:
|
Port Configuration
Sub-menu /tool packet-generator port
This menu allows to configure ports that will be associated to specific interface and will be used to receive/send generated packets.
Properties
Property | Description |
---|---|
disabled (yes | no; Default: no) | Whether port is disabled and does not participate in receiving/sending of the packets |
name (string; Default: ) | Descriptive name of the port |
interface (string; Default: ) | Name of the interface associated with the port. |
Read-Only Properties
Property | Description |
---|---|
dynamic (yes | no) | Whether port configuration is generated automatically. |
first-header (ip | mac | raw | udp | vlan) | Shows suggested first header for packets to be sent out of specified interface. This is information can be used when creating packet templates. |
inactive (yes | no) | Whether port is inactive and can't participate in tx/rx of the packets. |
Stats
Sub-menu /tool traffic-generator stats
Properties
Property | Description |
---|---|
(; Default: ) |
Streams
Properties
Property | Description |
---|---|
disabled (yes | no; Default: no) | Whether stream is disabled |
mbps (integer [0..4294967295]; Default: 0) | Value in Mega bits per second that stream will try to generate. |
name (string; Default: ) | Descriptive name of the stream. |
num (integer [0..15]; Default: 0) | |
packet-size (integer[1..65535] [-integer[1..65535]]; Default: 0) | Generated size of the packets in bytes. Can be set as the range for random packet size generation. |
port (string; Default: ) | Name of the port from Port menu that will be used to transmit packets. |
pps (integer [0..4294967295]; Default: 0) | Packets per second that stream will try to generate. |
tx-template (string; Default: ) | Name of the packet template from packet-template or raw-packet-template menus used as the packet content source. |
Configuration Examples
[ Top | Back to Content ]