Skip to content
MikroTik RouterOS Docs

Bandwidth Test

Enable bandwidth test server:

/tool bandwidth-server set enabled=yes authenticate=no

Run a basic test to another router:

/tool bandwidth-test 192.168.1.1 protocol=udp direction=both duration=10s

Run authenticated test:

/tool bandwidth-test 192.168.1.1 user=admin password=mypass duration=10s

Quick speed test (ping + jitter + throughput):

/tool speed-test address=192.168.1.1 user=admin password=mypass

What this covers: Using the Bandwidth Test tool to measure network throughput between MikroTik devices for link verification, troubleshooting, and performance testing.

When to use this:

  • Verifying ISP link speeds after installation
  • Testing wireless link throughput
  • Measuring WAN connection performance
  • Identifying network bottlenecks
  • Validating QoS configurations

How it works:

  1. One router runs as a BTest server (listens on TCP port 2000)
  2. Another router runs the client to initiate the test
  3. Data flows in configured direction (transmit, receive, or both)
  4. Statistics report throughput, packet loss, and CPU usage

Key concepts:

  • Server: Listens for incoming test connections (/tool bandwidth-server)
  • Client: Initiates tests to a server (/tool bandwidth-test)
  • UDP mode: Best for measuring raw throughput (includes headers in stats)
  • TCP mode: Tests with acknowledgments (excludes headers from stats)
  • Speed Test: Simplified tool combining ping, jitter, and bandwidth (/tool speed-test)

Test Through, Not To/From

For accurate results, test through a router, not from or to it. Testing on the device itself skews results due to CPU overhead from generating/receiving test traffic.

Prerequisites:

  • BTest server enabled on target device
  • Firewall rules allowing TCP 2000 and UDP 2000-65535
  • Authentication credentials (if server requires them)

Without authentication (open testing):

/tool bandwidth-server set enabled=yes authenticate=no

With authentication (requires credentials):

/tool bandwidth-server set enabled=yes authenticate=yes
ParameterDefaultDescription
enabledyesEnable/disable the server
authenticateyesRequire client credentials
allocate-udp-ports-from2000Starting port for UDP allocation
max-sessions100Maximum concurrent test sessions
/tool bandwidth-server print

Example output:

enabled: yes
authenticate: yes
allocate-udp-ports-from: 2000
max-sessions: 100
/tool bandwidth-server session print

UDP mode gives the most accurate throughput measurement:

/tool bandwidth-test 192.168.1.1 protocol=udp direction=both duration=30s

Example output:

status: running
duration: 15s
tx-current: 487.2Mbps
tx-10-second-average: 485.1Mbps
tx-total-average: 483.8Mbps
rx-current: 491.3Mbps
rx-10-second-average: 489.7Mbps
rx-total-average: 488.2Mbps
lost-packets: 12
local-cpu-load: 45%
remote-cpu-load: 42%

When the server has authenticate=yes:

/tool bandwidth-test 192.168.1.1 user=admin password=mypassword duration=30s

TCP mode with parallel connections improves throughput on high-latency links:

/tool bandwidth-test 192.168.1.1 protocol=tcp connection-count=10 duration=30s

Avoid saturating the link during production hours:

/tool bandwidth-test 192.168.1.1 local-tx-speed=100M remote-tx-speed=100M duration=30s
ParameterDefaultDescription
address(required)Target server IP
directionreceiveData flow: both/receive/transmit
durationunlimitedTest duration (e.g., 30s, 1m)
protocoludpTransport: tcp or udp
user-Authentication username
password-Authentication password
local-tx-speed0 (unlimited)Local transmit limit
remote-tx-speed0 (unlimited)Remote transmit limit
connection-count1TCP parallel connections (1-255)
random-datanoUse incompressible random data

Speed Test provides a quick combined measurement of ping, jitter, and throughput:

/tool speed-test address=192.168.1.1 user=admin password=mypassword

Example output:

status: done
ping-min: 1.2ms
ping-avg: 1.8ms
ping-max: 3.1ms
jitter: 0.4ms
tcp-download: 892.3Mbps
tcp-upload: 876.1Mbps
udp-download: 941.2Mbps
udp-upload: 923.8Mbps

Speed Test runs 5 sequential tests (ping, TCP receive/send, UDP receive/send) totaling about 55 seconds.


/tool bandwidth-test 2001:db8::1 protocol=udp duration=30s

Include the interface suffix:

/tool bandwidth-test fe80::1%ether1 protocol=udp duration=30s

Allow incoming test connections:

/ip firewall filter add chain=input protocol=tcp dst-port=2000 action=accept \
comment="BTest TCP control"
/ip firewall filter add chain=input protocol=udp dst-port=2000-65535 action=accept \
comment="BTest UDP data"
/ipv6 firewall filter add chain=input protocol=tcp dst-port=2000 action=accept
/ipv6 firewall filter add chain=input protocol=udp dst-port=2000-65535 action=accept

:local result
/tool bandwidth-test 192.168.1.1 duration=10s user=admin password=pass do={
:set result $"rx-total-average"
}
:log info "Bandwidth: $($result / 1000000) Mbps"
:local txAvg
:local rxAvg
/tool bandwidth-test 192.168.1.1 duration=15s protocol=udp direction=both \
user=admin password=pass do={
:set txAvg $"tx-total-average"
:set rxAvg $"rx-total-average"
}
:log info "TX: $($txAvg / 1000000) Mbps, RX: $($rxAvg / 1000000) Mbps"
:global btestThreshold 50000000
:local result
/tool bandwidth-test 192.168.1.1 duration=10s user=admin password=pass do={
:set result $"rx-total-average"
}
:if ($result < $btestThreshold) do={
:log warning "Bandwidth below threshold: $($result / 1000000) Mbps"
}

Symptoms: Connection refused or timeout.

Causes:

  • BTest server disabled
  • Firewall blocking port 2000
  • Network routing issue

Solutions:

# Check server is enabled
/tool bandwidth-server print
# Verify connectivity
/ping 192.168.1.1
# Check firewall on server
/ip firewall filter print where dst-port=2000

Symptoms: “auth.failed” error despite correct credentials.

Cause: RouterOS 6.43+ uses EC-SRP5 authentication, incompatible with older versions.

Solutions:

  1. Ensure both devices run compatible RouterOS versions
  2. Or disable authentication: /tool bandwidth-server set authenticate=no

Symptoms: UDP test fails while TCP works.

Cause: Firewall blocking incoming UDP on non-established connections.

Solution:

/ip firewall filter add chain=input protocol=udp dst-port=2000-65535 action=accept

Symptoms: Measured speed much lower than expected.

Causes:

  • Testing on the device instead of through it
  • Single-core limitation (pre-6.44beta39)
  • CPU overload from test generation

Solutions:

  1. Test through the router using 3 devices:
    [Server] ←→ [Router Under Test] ←→ [Client]
  2. Upgrade to RouterOS 6.44+ for multi-core support
  3. Use shorter test durations

Symptom: Network slows down during test.

Cause: Bandwidth test uses all available bandwidth by default.

Solution: Set speed limits:

/tool bandwidth-test 192.168.1.1 local-tx-speed=50M remote-tx-speed=50M duration=30s

Symptom: TCP reports lower throughput than UDP.

Explanation: This is expected behavior:

  • TCP statistics count only payload data (excludes headers)
  • UDP statistics include IP + UDP headers
  • UDP better represents raw link throughput

FieldDescription
tx-currentCurrent transmit speed
tx-10-second-average10-second transmit average
tx-total-averageOverall transmit average
rx-currentCurrent receive speed
rx-10-second-average10-second receive average
rx-total-averageOverall receive average
lost-packetsDropped packets (UDP only)
local-cpu-loadLocal device CPU usage
remote-cpu-loadRemote device CPU usage
  • High CPU (>80%): Results may be limited by CPU, not network
  • Low CPU (<50%): Network is the limiting factor
  • If testing on the device itself, high CPU is expected and skews results

# Check server configuration
/tool bandwidth-server print
# View active test sessions
/tool bandwidth-server session print
# Quick connectivity test
/tool bandwidth-test 192.168.1.1 protocol=udp duration=5s
# Full speed test
/tool speed-test address=192.168.1.1 user=admin password=pass
# Server
/tool bandwidth-server set enabled=yes authenticate=no
/tool bandwidth-server print
/tool bandwidth-server session print
# Client - Basic tests
/tool bandwidth-test 192.168.1.1 protocol=udp duration=30s
/tool bandwidth-test 192.168.1.1 protocol=tcp connection-count=10 duration=30s
/tool bandwidth-test 192.168.1.1 user=admin password=pass duration=30s
# Speed test
/tool speed-test address=192.168.1.1 user=admin password=pass
# Limited speed test
/tool bandwidth-test 192.168.1.1 local-tx-speed=100M remote-tx-speed=100M duration=30s

Bandwidth Test measures network throughput between MikroTik devices:

  1. Server setup - Enable on target device with /tool bandwidth-server
  2. UDP tests - Best for raw throughput measurement
  3. TCP tests - Use with connection-count for high-latency links
  4. Speed Test - Quick combined ping + jitter + throughput
  5. Firewall rules - Open TCP 2000 and UDP 2000-65535

Key points:

  • Test through routers, not from/to them, for accurate results
  • UDP includes headers in stats; TCP excludes them
  • RouterOS 6.43+ uses different authentication (EC-SRP5)
  • Multi-core support requires RouterOS 6.44beta39+
  • Limit test speeds to avoid impacting production traffic