Skip to content
MikroTik RouterOS Docs

Bandwidth Test

For the impatient: test bandwidth between two MikroTik routers.

On the server router:

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

On the client router:

/tool/bandwidth-test 192.168.88.1 user=admin password=yourpass direction=both duration=10s

What this does: The Bandwidth Test tool measures TCP and UDP throughput between a MikroTik router and another Bandwidth Test server (another MikroTik or compatible software). It’s useful for verifying link capacity, testing network performance, and troubleshooting throughput issues.

When to use this:

  • Verify actual throughput on a link
  • Test performance between two sites
  • Troubleshoot slow connections
  • Baseline network performance
  • Validate QoS configurations

Prerequisites:

  • Bandwidth Test server enabled on target router
  • Network connectivity between client and server
  • Authentication credentials (if server requires authentication)
  • Firewall allowing TCP port 2000 (control) and test ports

CPU Impact

Bandwidth Test is CPU-intensive. Running tests at high speeds can impact router performance and affect other traffic. Test during maintenance windows on production networks.

/tool/bandwidth-server/set enabled=yes
/tool/bandwidth-server/print

Default output:

enabled: yes
authenticate: yes
allocate-udp-ports-from: 2000
max-sessions: 100

Force users to authenticate before testing:

/tool/bandwidth-server/set authenticate=yes

When enabled, clients must provide valid RouterOS user credentials.

Set the starting port for UDP tests:

/tool/bandwidth-server/set allocate-udp-ports-from=2000

UDP tests use ports starting from this number.

Restrict how many simultaneous tests can run:

/tool/bandwidth-server/set max-sessions=10

Prevents resource exhaustion from too many concurrent tests.

Test to another MikroTik router:

/tool/bandwidth-test 192.168.88.1 user=admin password=secret

Test upload, download, or both:

# Download only (receive)
/tool/bandwidth-test 192.168.88.1 direction=receive user=admin password=secret
# Upload only (transmit)
/tool/bandwidth-test 192.168.88.1 direction=transmit user=admin password=secret
# Both directions simultaneously
/tool/bandwidth-test 192.168.88.1 direction=both user=admin password=secret

Run test for specific time:

/tool/bandwidth-test 192.168.88.1 duration=30s user=admin password=secret

Test with TCP or UDP:

# TCP test (default)
/tool/bandwidth-test 192.168.88.1 protocol=tcp user=admin password=secret
# UDP test
/tool/bandwidth-test 192.168.88.1 protocol=udp user=admin password=secret

Protocol differences:

  • TCP: More reliable results; reflects real-world TCP performance; affected by latency
  • UDP: Tests raw throughput capacity; not affected by TCP windowing; may show higher speeds

Send random data instead of zeros (more realistic):

/tool/bandwidth-test 192.168.88.1 random-data=yes user=admin password=secret

Random data tests compression performance on links with hardware compression.

Verify your ISP connection speed:

/tool/bandwidth-test isp-router.example.com protocol=tcp direction=both duration=20s \
user=admin password=secret

Measure throughput through a VPN tunnel:

/tool/bandwidth-test 10.0.0.1 protocol=tcp direction=both duration=30s \
user=admin password=secret

Run from one end of the tunnel to the other end’s internal IP.

If server allows unauthenticated tests:

/tool/bandwidth-test 192.168.88.1 protocol=tcp direction=both

Disabling authentication on the bandwidth server allows anyone to run tests, potentially impacting router performance. Only disable on trusted networks.

Test with specific UDP packet size:

/tool/bandwidth-test 192.168.88.1 protocol=udp direction=transmit \
local-udp-tx-size=1500 user=admin password=secret

Useful for testing MTU issues or specific application behavior.

Cap the test at a specific rate:

/tool/bandwidth-test 192.168.88.1 protocol=tcp direction=transmit \
local-tx-speed=50M user=admin password=secret

Prevents the test from consuming all available bandwidth.

Use multiple TCP connections for higher throughput:

/tool/bandwidth-test 192.168.88.1 protocol=tcp direction=both \
connection-count=5 user=admin password=secret

Multiple connections can overcome single-connection TCP limitations on high-latency links.

The graphical tools provide real-time graphs:

  1. Open Tools > Bandwidth Test
  2. Enter server address and credentials
  3. Select direction and protocol
  4. Click Start

Results display as a live graph showing throughput over time.

Test output shows:

status: running
duration: 10s
tx-current: 94.5Mbps
tx-10-second-average: 93.8Mbps
tx-total-average: 93.2Mbps
rx-current: 94.1Mbps
rx-10-second-average: 93.5Mbps
rx-total-average: 93.0Mbps
lost-packets: 0
random-data: no
direction: both
FieldDescription
tx-currentCurrent transmit rate
rx-currentCurrent receive rate
tx-10-second-averageRolling 10-second average (transmit)
rx-10-second-averageRolling 10-second average (receive)
tx-total-averageAverage over entire test (transmit)
rx-total-averageAverage over entire test (receive)
lost-packetsUDP packets lost (UDP only)

If bandwidth test isn’t working, allow the required ports:

/ip/firewall/filter/add chain=input protocol=tcp dst-port=2000 action=accept \
comment="Bandwidth Test control"
/ip/firewall/filter/add chain=input protocol=udp dst-port=2000-2100 action=accept \
comment="Bandwidth Test UDP"

Place these rules before any drop rules.

Confirm Bandwidth Test is working:

/tool/bandwidth-server/print

Expected: enabled: yes

/tool/bandwidth-server/session/print

Shows currently running tests.

From the router itself:

/tool/bandwidth-test 127.0.0.1 user=admin password=secret duration=5s

Tests local loopback (useful for verifying server is running).

SymptomCauseSolution
”connection refused”Server disabled or firewalledEnable server; check firewall rules
”login failure”Wrong credentialsVerify username/password; check authenticate setting
Low throughputCPU bottleneckCheck CPU usage; test with lower connection-count
CHR capped at ~400MbpsLicense level or VM configCheck CHR license tier; verify VM network settings (virtio)
UDP packet lossNetwork congestion or MTU issuesCheck for congestion; verify MTU settings
Test hangsFirewall blockingAllow TCP 2000 and UDP ports
Inconsistent resultsOther traffic on linkTest during low-usage periods
”no route to host”Routing issueVerify connectivity with ping
/system/resource/print

High CPU usage (>80%) limits throughput results.

/tool/bandwidth-server/session/print

Shows client IP and current throughput.

Common Mistakes

  • Testing through NAT - Bandwidth test requires direct IP connectivity or port forwarding
  • Forgetting authentication - Default requires credentials; provide user/password
  • Testing during production hours - Can saturate links and affect users
  • Comparing TCP vs UDP - Different protocols give different results; compare consistently
  • Ignoring CPU limits - Router CPU may be the bottleneck, not the link
PropertyTypeDefaultDescription
enabledyes/noyesEnable bandwidth test server
authenticateyes/noyesRequire user authentication
allocate-udp-ports-frominteger2000Starting port for UDP tests
max-sessionsinteger100Maximum concurrent sessions
ParameterTypeDefaultDescription
addressIP/hostname-Server address (required)
protocoltcp/udptcpTest protocol
directionreceive/transmit/bothreceiveTraffic direction
durationtimeunlimitedTest duration
intervaltime1sResult update interval
userstring-Authentication username
passwordstring-Authentication password
local-tx-speedrateunlimitedLimit transmit rate
remote-tx-speedrateunlimitedLimit remote transmit rate
local-udp-tx-sizeinteger1500UDP packet size
remote-udp-tx-sizeinteger1500Remote UDP packet size
connection-countinteger1Number of TCP connections
random-datayes/nonoUse random data
PortProtocolPurpose
2000TCPControl connection
2000+UDPUDP test traffic