Skip to content

Packet Sniffer

The RouterOS Packet Sniffer captures full packet payloads on one or more interfaces. Unlike Torch, which shows traffic metadata in real time, the sniffer records actual packet contents for protocol-level inspection.

Captured packets can be:

  • Saved to a .pcap file on the router for later download and analysis in Wireshark or tcpdump
  • Streamed live over the network to Wireshark using the TZSP protocol

Configure, start, and stop the sniffer from the /tool sniffer menu.

# Configure a capture on ether1, save to flash
/tool sniffer set interface=ether1 file-name=capture.pcap file-limit=10000000
# Start capturing
/tool sniffer start
# ... reproduce the problem ...
# Stop capturing
/tool sniffer stop

Download the file via Winbox (Files panel) or FTP/SCP for analysis.

View captured packets directly in the terminal without saving to a file:

/tool sniffer quick interface=ether1 ip-address=10.0.0.50 protocol=tcp

Quick-print runs a brief capture and dumps decoded packet headers to the console. It does not produce a .pcap file.

Set parameters with /tool sniffer set ... before calling start:

PropertyDescription
interfaceInterface(s) to capture on. Comma-separate multiple interfaces, or use all
filter-interfaceLimit capture to a specific interface (used with all scope)
memory-limitMaximum RAM to use for capture buffer in KB (default: 100). Increase for high-traffic captures
file-nameFilename on the router’s filesystem to save the capture (e.g. capture.pcap). Omit to capture only to RAM
file-limitMaximum file size in bytes before capture stops or wraps

Apply filters to reduce capture volume. Filters are combined with AND logic.

PropertyDescription
filter-ip-addressCapture only packets matching this source or destination IP address
filter-portCapture only packets with this source or destination port
filter-protocolProtocol filter: tcp, udp, icmp, etc.
filter-mac-addressCapture only packets from or to this MAC address
filter-streamSet yes to exclude TZSP streaming traffic from the capture (prevents capture feedback loops)
PropertyDescription
streaming-enabledSet yes to enable live TZSP stream to a remote host
streaming-serverIP address of the Wireshark host
streaming-portUDP port on the streaming server (default: 37008)
/tool sniffer set interface=ether1 filter-ip-address=192.168.88.50 \
file-name=host50.pcap file-limit=5000000
/tool sniffer start
/tool sniffer set interface=ether1 filter-protocol=icmp file-name=icmp.pcap
/tool sniffer start
/tool sniffer set interface=ether1 filter-protocol=tcp filter-port=443 \
file-name=https.pcap
/tool sniffer start

On the router:

/tool sniffer set interface=ether1 streaming-enabled=yes \
streaming-server=192.168.88.100 streaming-port=37008 filter-stream=yes
/tool sniffer start

Setting filter-stream=yes prevents the sniffer from capturing its own TZSP packets, which would create a feedback loop.

In Wireshark (on 192.168.88.100):

  1. Start a capture on the interface facing the router
  2. Apply display filter: port 37008 and not host 192.168.88.1 (Replace 192.168.88.1 with your router’s IP)
  3. Wireshark automatically decodes TZSP-encapsulated packets
/tool sniffer quick interface=bridge protocol=arp

Displays ARP request/reply headers in the terminal without saving to disk.

Featuresniffer start/stopsniffer quick
Saves to .pcap file✓ (if file-name set)
Live stream via TZSP
Terminal output
Long-running capture✗ (brief)
Best forDeep analysis, WiresharkQuick CLI inspection

FastTrack and hardware-offloaded traffic — Packets accelerated by FastTrack or switch-chip hardware offloading bypass the CPU and will not appear in the sniffer. Disable FastTrack before capturing if you need to see established TCP/UDP flows:

/ip firewall filter disable [find action=fasttrack-connection]

Re-enable after troubleshooting is complete.

CPU and memory impact — Packet capture consumes CPU resources, particularly on high-throughput interfaces. On production routers, apply narrow filters to reduce load. Set memory-limit appropriately to avoid OOM conditions.

No payload decryption — The sniffer captures raw bytes. Encrypted traffic (TLS, IPsec, WireGuard) requires the keys to decrypt offline in Wireshark.

Bridge traffic — To capture traffic bridged between ports, capture on the bridge interface rather than individual member ports. Member port captures may not show all forwarded frames.

After stopping the sniffer:

  • Winbox: Files → locate the .pcap file → drag to desktop
  • FTP: ftp <router-ip> and retrieve the file
  • SCP: scp admin@<router-ip>:/capture.pcap ./

Open in Wireshark or analyze with tcpdump -r capture.pcap.

  • Torch — Real-time traffic metadata without full packet capture
  • Ping — Connectivity and latency testing
  • RouterOS Troubleshooting Methodology — When to use the packet sniffer in a diagnostic workflow
  • Firewall — FastTrack configuration that affects sniffer visibility