Speed Test
Speed Test
Section titled âSpeed TestâTL;DR (Quick Start)
Section titled âTL;DR (Quick Start)âFor the impatient: run a comprehensive speed test to another MikroTik router.
On the server router:
/tool/bandwidth-server/set enabled=yes authenticate=yesOn the client router:
/tool/speed-test 192.168.88.1 user=admin password=yourpassOverview
Section titled âOverviewâWhat this does: The Speed Test tool performs a comprehensive network performance assessment between two MikroTik devices. It combines ping, jitter, and bandwidth measurements into a single command, running five sequential tests: ping/jitter, TCP download, TCP upload, UDP download, and UDP upload.
When to use this:
- Quick overall network health check
- Measure latency, jitter, and throughput in one command
- Baseline network performance between sites
- Compare TCP vs UDP performance
- Troubleshoot connection quality issues
Prerequisites:
- Bandwidth Test server enabled on the remote router
- Network connectivity between client and server
- Authentication credentials for the remote router
- Firewall allowing TCP port 2000 (control) and test ports
How it differs from Bandwidth Test:
- Speed Test runs multiple test types automatically in sequence
- Provides ping and jitter measurements alongside throughput
- Includes CPU load monitoring during tests
- Single command for comprehensive results
CPU Impact
Speed Test is CPU-intensive. The tool runs multiple tests over approximately 55 seconds. Running tests can impact router performance and affect other traffic. Test during maintenance windows on production networks.
Server Configuration
Section titled âServer ConfigurationâSpeed Test uses the same server as Bandwidth Test. Enable it on the target router:
Enable the Server
Section titled âEnable the Serverâ/tool/bandwidth-server/set enabled=yes authenticate=yesVerify Server Status
Section titled âVerify Server Statusâ/tool/bandwidth-server/printExpected output:
enabled: yes authenticate: yesallocate-udp-ports-from: 2000 max-sessions: 100Running Speed Test
Section titled âRunning Speed TestâBasic Test
Section titled âBasic Testâ/tool/speed-test 192.168.88.1 user=admin password=secretThe test runs for approximately 55 seconds, performing:
- Ping test (measures latency and jitter)
- TCP download test
- TCP upload test
- UDP download test
- UDP upload test
Set Test Duration
Section titled âSet Test DurationâControl how long each test phase runs:
/tool/speed-test 192.168.88.1 user=admin password=secret test-duration=15sEach of the five tests runs for the specified duration, plus 1-second pauses between tests.
Limit Bandwidth
Section titled âLimit BandwidthâCap test speed to avoid saturating the link:
/tool/speed-test 192.168.88.1 user=admin password=secret \ local-tx-speed=100M remote-tx-speed=100MAdjust Connection Count
Section titled âAdjust Connection CountâControl parallel connections (affects throughput on high-latency links):
/tool/speed-test 192.168.88.1 user=admin password=secret connection-count=10Default is 20 connections (or CPU core count if greater than 20).
Specify Direction
Section titled âSpecify DirectionâTest specific directions only:
# Download only/tool/speed-test 192.168.88.1 user=admin password=secret direction=receive
# Upload only/tool/speed-test 192.168.88.1 user=admin password=secret direction=transmit
# Both (default)/tool/speed-test 192.168.88.1 user=admin password=secret direction=bothUnderstanding Results
Section titled âUnderstanding ResultsâA typical speed test produces output like:
status: done ping: 5ms ping-min: 4ms ping-max: 8ms jitter-avg: 1ms jitter-min: 0ms jitter-max: 3ms packet-loss: 0% tcp-download: 94.2Mbps tcp-upload: 93.8Mbps udp-download: 95.1Mbps udp-upload: 94.7Mbps tcp-download-cpu: 45% tcp-upload-cpu: 42% udp-download-cpu: 38% udp-upload-cpu: 35%Result Fields
Section titled âResult Fieldsâ| Field | Description |
|---|---|
ping | Average round-trip time |
ping-min / ping-max | Minimum and maximum ping times |
jitter-avg | Average variation in ping times |
jitter-min / jitter-max | Minimum and maximum jitter |
packet-loss | Percentage of ping packets lost |
tcp-download / tcp-upload | TCP throughput rates |
udp-download / udp-upload | UDP throughput rates |
*-cpu | CPU usage during each test phase |
Interpreting Results
Section titled âInterpreting Resultsâ- High jitter: May indicate network congestion or unstable links
- Packet loss: Network congestion, bad cables, or interference (wireless)
- TCP < UDP throughput: Normal; TCP has overhead for reliability
- CPU at 100%: Results limited by router CPU, not network capacity
- Asymmetric speeds: Check for QoS, link issues, or duplex mismatch
Common Scenarios
Section titled âCommon ScenariosâScenario: Verify WAN Link Performance
Section titled âScenario: Verify WAN Link PerformanceâTest your ISP connection through a remote MikroTik:
/tool/speed-test remote-router.example.com user=admin password=secret \ test-duration=15sScenario: Test VPN Tunnel Quality
Section titled âScenario: Test VPN Tunnel QualityâMeasure performance through a VPN tunnel:
/tool/speed-test 10.0.0.1 user=admin password=secretCompare results with direct tests to measure VPN overhead.
Scenario: Baseline Before/After Changes
Section titled âScenario: Baseline Before/After ChangesâDocument network performance before making configuration changes:
# Before changes/tool/speed-test 192.168.88.1 user=admin password=secret
# Make changes, then retest/tool/speed-test 192.168.88.1 user=admin password=secretScenario: Quick Test from Winbox
Section titled âScenario: Quick Test from Winboxâ- Open Tools > Speed Test
- Enter server address and credentials
- Click Start
Results display in real-time with graphs.
Firewall Configuration
Section titled âFirewall ConfigurationâIf speed test isnât working, ensure firewall allows the required ports:
/ip/firewall/filter/add chain=input protocol=tcp dst-port=2000 action=accept \ comment="Speed Test/Bandwidth Test control"/ip/firewall/filter/add chain=input protocol=udp dst-port=2000-2100 action=accept \ comment="Speed Test/Bandwidth Test UDP"Place these rules before any drop rules.
Verification
Section titled âVerificationâCheck 1: Verify Server Is Running
Section titled âCheck 1: Verify Server Is Runningâ/tool/bandwidth-server/printExpected: enabled: yes
Check 2: Run Local Test
Section titled âCheck 2: Run Local Testâ/tool/speed-test 127.0.0.1 user=admin password=secret test-duration=5sTests the server locally (useful for verifying server is running).
Check 3: Check Active Sessions
Section titled âCheck 3: Check Active Sessionsâ/tool/bandwidth-server/session/printShows currently running tests.
Troubleshooting
Section titled âTroubleshootingâ| Symptom | Cause | Solution |
|---|---|---|
| âconnection refusedâ | Server disabled or firewalled | Enable server; check firewall rules |
| âlogin failureâ | Wrong credentials | Verify username/password |
| Low throughput | CPU bottleneck | Check CPU during test; test through device |
| High jitter | Network congestion | Test during off-peak; check for interference |
| Packet loss | Congestion or link issues | Check interface errors; verify cables |
| Test hangs | Firewall blocking | Allow TCP 2000 and UDP ports |
| âno route to hostâ | Routing issue | Verify connectivity with ping first |
Debug: Check CPU During Test
Section titled âDebug: Check CPU During Testâ/system/resource/printIf CPU is consistently >80% during tests, results are CPU-limited.
Debug: Check for Errors
Section titled âDebug: Check for Errorsâ/interface/print statsLook for errors, drops, or FCS errors that indicate physical layer issues.
Common Mistakes
- Testing on the device under test - Test through routers, not on them, for accurate results
- Forgetting server setup - Speed test requires bandwidth-server enabled on remote
- Ignoring CPU limits - 100% CPU means the router is the bottleneck, not the link
- Testing during production hours - Can saturate links and affect users
- Comparing UDP to TCP directly - Different protocols have different overhead
Related Topics
Section titled âRelated TopicsâPerformance Testing
Section titled âPerformance Testingâ- Bandwidth Test - dedicated throughput testing
- Ping Tool - basic connectivity and latency testing
- Traceroute - path discovery
Traffic Analysis
Section titled âTraffic Analysisâ- Torch - real-time traffic analysis
- Traffic Monitor - real-time interface statistics
- Graphing - historical bandwidth graphs
Network Services
Section titled âNetwork Servicesâ- Firewall Basics - allow test traffic
- Simple Queues - bandwidth management
Reference
Section titled âReferenceâParameters (/tool/speed-test)
Section titled âParameters (/tool/speed-test)â| Parameter | Type | Default | Description |
|---|---|---|---|
address | IP/hostname | - | Server address (required) |
user | string | - | Authentication username (required) |
password | string | - | Authentication password (required) |
test-duration | time | 10s | Duration per test phase |
direction | receive/transmit/both | both | Traffic direction |
connection-count | integer | 20 | Parallel TCP connections |
local-tx-speed | rate | unlimited | Limit local transmit rate |
remote-tx-speed | rate | unlimited | Limit remote transmit rate |
Ports Used
Section titled âPorts Usedâ| Port | Protocol | Purpose |
|---|---|---|
| 2000 | TCP | Control connection |
| 2000+ | UDP | UDP test traffic |