Bandwidth Test
| Document revision: | 1.9 (Fri Nov 26 11:00:29 GMT 2004) |
| Applies to: | V2.9 |
General Information
Summary
The Bandwidth Tester can be used to monitor the throughput only to a remote MikroTik router (either wired or wireless) and thereby help to discover network "bottlenecks".
Specifications
Packages required: systemLicense required: Level1
Submenu level: /tool
Standards and Technologies: TCP (RFC 793), UDP (RFC768)
Hardware usage: significant
Related Documents
Description
Protocol DescriptionThe 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 packet. 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.
Usage NotesCaution! Bandwidth Test uses all available bandwidth (by default) and may impact network usability.
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:

Note that 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).
Server Configuration
Submenu level: /tool bandwidth-serverProperty Description
allocate-udp-ports-from - allocate UDP ports fromauthenticate (yes | no; default: yes) - communicate only with authenticated (by valid username and password) clientsenable (yes | no; default: no) - enable client connections for bandwidth testmax-sessions - maximal number of bandwidth-test clientsNotes
The list of current connections can be obtained in session submenu
Example
Bandwidth Server:
[admin@MikroTik] tool bandwidth-server> print
enabled: no
authenticate: yes
allocate-udp-ports-from: 2000
max-sessions: 10
[admin@MikroTik] tool>
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>
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: 10
[admin@MikroTik] tool>
Client Configuration
Command name: /tool bandwidth-testProperty Description
address (IP address) - IP address of destination hostassume-lost-time (time; default: 0s) - assume that connection is lost if Bandwidth Server is not responding for that timedirection (receive / transmit / both; default: receive) - the direction of the testdo (name | string; default: "") - script sourceduration (time; default: 0s) - duration of the testExample
To run 15-second long bandwidth-test to the 10.0.0.211 host sending and receiving 1000-byte UDP packets and using username admin to connect
[admin@MikroTik] tool> bandwidth-test 10.0.0.211 duration=15s direction=both \
\... size=1000 protocol=udp user=admin
status: done testing
duration: 15s
tx-current: 3.62Mbps
tx-10-second-average: 3.87Mbps
tx-total-average: 3.53Mbps
rx-current: 3.33Mbps
rx-10-second-average: 3.68Mbps
rx-total-average: 3.49Mbps
[admin@MikroTik] tool>
