Skip to content
MikroTik RouterOS Docs

MikroTik RouterOS Ping Tool: Connectivity Testing and Diagnostics

MikroTik RouterOS Ping Tool: Connectivity Testing and Diagnostics

Section titled “MikroTik RouterOS Ping Tool: Connectivity Testing and Diagnostics”

RouterOS Version: 6.x / 7.x Difficulty: Beginner Estimated Time: 15 minutes

The ping tool is your first line of defense when diagnosing network issues. It sends ICMP Echo Request packets to a target and measures the response time, helping you verify connectivity, measure latency, and identify network problems.

RouterOS ping supports IPv4, IPv6, and even MAC address pinging on local network segments. Beyond basic connectivity testing, it’s commonly used for MTU path discovery, failover scripting, and integration with monitoring tools like Netwatch.

/ping 8.8.8.8 count=5

Example Output:

SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 55 14ms
1 8.8.8.8 56 55 13ms
2 8.8.8.8 56 55 14ms
3 8.8.8.8 56 55 13ms
4 8.8.8.8 56 55 14ms
sent=5 received=5 packet-loss=0% min-rtt=13ms avg-rtt=13ms max-rtt=14ms

Key output fields:

  • SEQ - Packet sequence number
  • TTL - Time To Live remaining after reaching destination
  • TIME - Round-trip time in milliseconds
  • packet-loss - Percentage of packets that didn’t receive replies
/ping www.google.com count=5

RouterOS resolves the hostname using its configured DNS servers.

Note: When using CLI, the router’s DNS is used. When using Winbox Tools > Ping, your computer’s DNS is used. This can cause different results.

/ping 2001:4860:4860::8888 count=5

Run indefinitely until you press Ctrl+C:

/ping 8.8.8.8
ParameterDefaultDescription
countunlimitedNumber of pings to send
interval1sTime between pings
size56ICMP payload size in bytes
ttl64Time To Live value
src-addressautoSource IP address to use
interfaceautoForce specific outgoing interface
routing-tablemainVRF/routing table to use
do-not-fragmentnoSet DF flag (for MTU testing)
arp-pingnoUse ARP instead of ICMP
dscp0QoS marking for the ping packets

Use ping with the do-not-fragment flag to find the maximum packet size that can traverse a path without fragmentation.

# Maximum ping size for 1500 MTU = 1500 - 28 = 1472
/ping 8.8.8.8 size=1472 do-not-fragment count=1

If successful, the path supports standard 1500 byte MTU.

If the above fails with “packet too large”, decrease the size:

/ping 8.8.8.8 size=1400 do-not-fragment count=1
/ping 8.8.8.8 size=1300 do-not-fragment count=1
# Continue until ping succeeds
Connection TypeMTUMax Ping Size
Standard Ethernet15001472
PPPoE14921464
IPsec Tunnel~1400~1372
GRE Tunnel14761448

Why subtract 28? ICMP packets have 20 bytes of IP header + 8 bytes of ICMP header = 28 bytes overhead.

/ping 10.0.0.1 src-address=192.168.1.1 count=5

Caveat: The src-address parameter may be overridden by routing decisions. For reliable source selection, use the routing-table parameter with a dedicated routing table.

/ping 8.8.8.8 interface=ether1 count=5
Section titled “Using VRF/Routing Tables (Recommended for Multi-WAN)”
# Ping through specific WAN connection
/ping 8.8.8.8 routing-table=wan1 count=5

This is the most reliable method for testing specific paths in multi-WAN setups.

Ping a device by its MAC address on the local network segment:

# First, enable MAC ping server on target devices
/tool mac-server ping set enabled=yes
# Ping by MAC (specify interface to avoid flooding all ports)
/ping 00:11:22:33:44:55%ether1 count=3

Without the %interface suffix, the router sends the ping out all interfaces, which can cause unnecessary traffic.

Test layer 2 reachability without ICMP:

/ping 192.168.1.1 arp-ping count=3

ARP ping only works for hosts on the same broadcast domain - it cannot cross routers.

Discover all IPv6-enabled devices on the local link:

/ping ff02::1 count=3

This pings the “all nodes” multicast group. You may receive multiple replies (one from each device), which can show negative packet loss in statistics - this is normal.

The ping command returns the number of successful replies:

:local result [/ping 8.8.8.8 count=3]
:if ($result = 0) do={
:log warning "Host unreachable"
} else={
:log info "Host reachable ($result/3 replies)"
}
# Global variable to track state
:global primaryUp true
# Check primary WAN
:local result [/ping 8.8.8.8 count=3 interval=500ms routing-table=wan1]
:if ($result = 0) do={
# Primary is down
:if ($primaryUp) do={
:log warning "Primary WAN DOWN - switching to backup"
/ip route set [find comment="primary-default"] distance=10
/ip route set [find comment="backup-default"] distance=1
:set primaryUp false
}
} else={
# Primary is up
:if (!$primaryUp) do={
:log info "Primary WAN UP - restoring"
/ip route set [find comment="primary-default"] distance=1
/ip route set [find comment="backup-default"] distance=10
:set primaryUp true
}
}

Key point: Track state to avoid repeated alerts. Only take action when state changes.

Create a scheduler to run the check periodically:

/system scheduler add name=wan-check interval=1m on-event="/system script run wan-failover"
/ping 8.8.8.8 count=5

Expected: 0% packet loss, reasonable RTT (depends on your connection).

/ping www.google.com count=3

Expected: Hostname resolves and ping succeeds.

/ping 8.8.8.8 size=1472 do-not-fragment count=1

Expected: Success if path supports 1500 MTU.

/ping 8.8.8.8 routing-table=wan1 count=3
/ping 8.8.8.8 routing-table=wan2 count=3

Expected: Both succeed if both WANs are operational.

/ping 4C:5E:0C:12:34:56%ether2 count=3

Expected: Replies if device is on that interface and MAC ping server is enabled.

Causes:

  • No route to destination
  • Firewall blocking ICMP
  • Target host is down
  • Target firewall blocking ICMP

Solution:

  1. Check routing: /ip route print where dst-address=0.0.0.0/0
  2. Try traceroute to see where it fails: /tool traceroute 8.8.8.8
  3. Check firewall rules on both ends

Cause: TTL too low for the number of hops to destination, or routing loop.

Solution:

  1. Increase TTL: /ping 8.8.8.8 ttl=128
  2. If still failing, check for routing loops with traceroute

Cause: Using do-not-fragment with size larger than path MTU.

Solution: Decrease size until ping succeeds to find actual path MTU.

Cause: Routing decision overrides the specified source.

Solution: Use routing-table parameter with a dedicated routing table that has the correct gateway for your intended source.

Causes:

  • MAC ping server disabled on target
  • Target not on same broadcast domain
  • Wrong interface specified

Solution:

  1. Enable MAC ping server: /tool mac-server ping set enabled=yes
  2. Verify layer 2 connectivity
  3. Specify correct interface: /ping MAC%interface

Problem: “ARP ping fails to remote network”

Section titled “Problem: “ARP ping fails to remote network””

Cause: ARP is layer 2 only - cannot cross routers.

Solution: Use regular ICMP ping for hosts on different subnets.

1. MAC Ping Without Interface Specification

Section titled “1. MAC Ping Without Interface Specification”

Wrong:

/ping 00:11:22:33:44:55 # Floods all interfaces

Right:

/ping 00:11:22:33:44:55%ether1 # Targets specific interface

Wrong thinking: “I can ping with size=1500, so my MTU is 1500”

Right: Ping size + 28 bytes overhead = actual packet size. For 1500 MTU, max ping size is 1472.

Wrong:

:if ([/ping 8.8.8.8 count=1] = 0) do={
:log warning "Link down!" # Logs every minute when down
}

Right: Track state and only log on changes (see failover script example above).

Wrong:

/ping 8.8.8.8 src-address=10.0.0.2 # May be ignored

Right:

/ping 8.8.8.8 routing-table=wan1 # Reliable path selection

5. Expecting ARP Ping to Work Across Routers

Section titled “5. Expecting ARP Ping to Work Across Routers”

Wrong:

/ping 10.20.30.40 arp-ping # Fails - different subnet

Right: Use ARP ping only for hosts on the same broadcast domain.

  • Netwatch - automated host monitoring with actions
  • Flood Ping - high-rate ping for stress testing