Difference between revisions of "Manual:Tools/Bandwidth Test"

From MikroTik Wiki
Jump to: navigation, search
(Created page with '{{ ... }} {{Versions| v2.9, v3, v4+}} __TOC__ ==Summary== <p id="shbox"><b>Sub-menu:</b> <code>/tool</code> <br /> <b>Packages required:</b> <code>system</code> </p> <br /> <p> …')
 
(Bandwidth Test Client)
Line 87: Line 87:
 
==Bandwidth Test Client==
 
==Bandwidth Test Client==
 
<p id="shbox"><b>Command name:</b> <code>/tool bandwidth-test</code></p><br />
 
<p id="shbox"><b>Command name:</b> <code>/tool bandwidth-test</code></p><br />
 +
 +
<table class="styled_table">
 +
<tr>
 +
  <th width="47%">Property</th>
 +
  <th >Description</th>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>address</b></var> (<em>IP address</em>; Default:<b></b>)</td>
 +
    <td>IP address of host</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>direction</b></var> (<em>both | receive | transmit</em>; Default:<b> receive</b>)</td>
 +
    <td>Direction of data flow</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>duration</b></var> (<em>time</em>; Default:<b> </b>)</td>
 +
    <td>Duration of the test</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>interval</b></var> (<em>time: 20ms..5s</em>; Default:<b> 1s</b>)</td>
 +
    <td>Delay between reports (in seconds)</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>local-tx-speed</b></var> (<em>integer 0..4294967295</em>; Default: <b></b>)</td>
 +
    <td>Transfer test maximum speed (bits per second)</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>local-udp-tx-size</b></var> (<em>integer: 28..64000</em><b></b>)</td>
 +
    <td>Local transmit packet size in bytes</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>password</b></var> (<em>string</em>; Default: <b>""</b>)</td>
 +
    <td>Password for the remote user</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>protocol</b></var> (<em>udp | tcp</em>; Default: <b>udp</b>)</td>
 +
    <td>Protocol to use</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>random-data</b></var> (<em>yes | no</em>; Default: <b>no</b>)</td>
 +
    <td>If random-data is set to yes, the payload of the bandwidth test packets will have incompressible random data stream so that links that use data compression will not distort the results (this is CPU intensive and random-data should be set to no for low speed CPUs)</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>remote-tx-speed</b></var> (<em>integer 0..4294967295</em>; Default: <b></b>)</td>
 +
    <td>Receive test maximum speed (bits per second)</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>remote-udp-tx-size</b></var> (<em>integer: 28..64000</em><b></b>)</td>
 +
    <td>Remote transmit packet size in bytes</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>tcp-connection-count</b></var> (<em>integer 1..100</em>; Default: <b>20</b>)</td>
 +
    <td>Number of TCP connections to use</td>
 +
</tr>
 +
 +
<tr>
 +
    <td><var><b>user</b></var> (<em>string</em>; Default: <b>""</b>)</td>
 +
    <td>Remote user</td>
 +
</tr>
 +
 +
</table>
  
 
<h3>Example</h3>
 
<h3>Example</h3>
 +
<p>To run 15-second long bandwidth-test to the '''10.0.0.32''' host sending and receiving '''1000'''-byte UDP packets and using username '''admin''' to connect:</p>
 +
<pre>
 +
[admin@MikroTik] /tool> bandwidth-test 10.0.0.32 duration=15s \
 +
\... direction=both local-udp-tx-size=1000 protocol=udp \
 +
\... remote-udp-tx-size=1000 user=admin
 +
                status: done testing
 +
              duration: 15s
 +
            tx-current: 272.8Mbps
 +
  tx-10-second-average: 200.3Mbps
 +
      tx-total-average: 139.5Mbps
 +
            rx-current: 169.6Mbps
 +
  rx-10-second-average: 164.8Mbps
 +
      rx-total-average: 117.0Mbps
 +
          lost-packets: 373
 +
          random-data: no
 +
            direction: both
 +
              tx-size: 1000
 +
              rx-size: 1000
 +
[admin@MikroTik] /tool>
 +
</pre>

Revision as of 13:40, 17 May 2010

(needs editing)

Version.png

Applies to RouterOS: v2.9, v3, v4+

Summary

Sub-menu: /tool
Packages required: system


The Bandwidth Tester can be used to measure the throughput to another MikroTik router (either wired or wireless) and thereby help to discover network "bottlenecks". The TCP test uses the standard TCP protocol with acknowledgments and follows the TCP algorithm on how many packets to send according to latency, dropped packets, and other features in the TCP algorithm. Please review the TCP protocol for details on its internal speed settings and how to analyze its behavior. Statistics for throughput are calculated using the entire size of the TCP data stream. As acknowledgments are an internal working of TCP, their size and usage of the link are not included in the throughput statistics. Therefore this statistic is not as reliable as the UDP statistic when estimating throughput. The UDP tester sends 110% or more packets than currently reported as received on the other side of the link. To see the maximum throughput of a link, the packet size should be set for the maximum MTU allowed by the links which is usually 1500 bytes. There is no acknowledgment required by UDP; this implementation means that the closest approximation of the throughput can be seen.


Icon-note.png

Note: Bandwidth Test uses all available bandwidth (by default) and may impact network usability.


Icon-note.png

Note: Bandwidth Test uses much resources. If you want to test real throughput of a router, you should run bandwidth test through it not from or to it. To do this you need at least 3 routers connected in chain: the Bandwidth Server, the given router and the Bandwidth Client.


Icon-note.png

Note: If you use UDP protocol then Bandwidth Test counts IP header+UDP header+UDP data. In case if you use TCP then Bandwidth Test counts only TCP data (TCP header and IP header are not included).


Bandwidth Test Server

Sub-menu: /tool bandwidth-server


Property Description
allocate-udp-ports-from (integer 1000..64000; Default: 2000) Beginning of UDP port range
authenticate (yes | no; Default: yes) Communicate only with authenticated clients
enabled (yes | no; Default: yes) Defines whether bandwidth server is enabled or not
max-sessions (integer 1..1000; Default: 100) Maximal simultaneous test count

Example

Bandwidth Server:

[admin@MikroTik] /tool bandwidth-server> print                                  
                  enabled: yes                                                  
             authenticate: yes                                                  
  allocate-udp-ports-from: 2000                                                 
             max-sessions: 100                                                  
[admin@MikroTik] /tool bandwidth-server>

Active sessions:

[admin@MikroTik] /tool bandwidth-server session> print
  # CLIENT          PROTOCOL DIRECTION USER
  0 35.35.35.1      udp      send      admin
  1 25.25.25.1      udp      send      admin
  2 36.36.36.1      udp      send      admin
[admin@MikroTik] /tool bandwidth-server session>

To enable bandwidth-test server without client authentication:

[admin@MikroTik] /tool bandwidth-server> set enabled=yes authenticate=no        
[admin@MikroTik] /tool bandwidth-server> print                                  
                  enabled: yes                                                  
             authenticate: no                                                   
  allocate-udp-ports-from: 2000                                                 
             max-sessions: 100                                                  
[admin@MikroTik] /tool bandwidth-server>

Bandwidth Test Client

Command name: /tool bandwidth-test


Property Description
address (IP address; Default:) IP address of host
direction (both | receive | transmit; Default: receive) Direction of data flow
duration (time; Default: ) Duration of the test
interval (time: 20ms..5s; Default: 1s) Delay between reports (in seconds)
local-tx-speed (integer 0..4294967295; Default: ) Transfer test maximum speed (bits per second)
local-udp-tx-size (integer: 28..64000) Local transmit packet size in bytes
password (string; Default: "") Password for the remote user
protocol (udp | tcp; Default: udp) Protocol to use
random-data (yes | no; Default: no) If random-data is set to yes, the payload of the bandwidth test packets will have incompressible random data stream so that links that use data compression will not distort the results (this is CPU intensive and random-data should be set to no for low speed CPUs)
remote-tx-speed (integer 0..4294967295; Default: ) Receive test maximum speed (bits per second)
remote-udp-tx-size (integer: 28..64000) Remote transmit packet size in bytes
tcp-connection-count (integer 1..100; Default: 20) Number of TCP connections to use
user (string; Default: "") Remote user

Example

To run 15-second long bandwidth-test to the 10.0.0.32 host sending and receiving 1000-byte UDP packets and using username admin to connect:

[admin@MikroTik] /tool> bandwidth-test 10.0.0.32 duration=15s \
\... direction=both local-udp-tx-size=1000 protocol=udp \
\... remote-udp-tx-size=1000 user=admin
                status: done testing
              duration: 15s
            tx-current: 272.8Mbps
  tx-10-second-average: 200.3Mbps
      tx-total-average: 139.5Mbps
            rx-current: 169.6Mbps
  rx-10-second-average: 164.8Mbps
      rx-total-average: 117.0Mbps
          lost-packets: 373
           random-data: no
             direction: both
               tx-size: 1000
               rx-size: 1000
[admin@MikroTik] /tool>