Misc · Topic 1 of 3

RouterOS Tools, E-mail, Netwatch, Ping, Traceroute and Profiler

Use the RouterOS tools menu for troubleshooting and alerts: e-mail, Netwatch host monitoring, ping, traceroute and the profiler that shows CPU load.

  • 5 min
In a nutshell
  • Ping tests reachability, and src-address chooses the source.
  • Traceroute lists the routers on the path to a destination.
  • Netwatch checks a host at an interval and runs a script when it goes up or down.

What it is

The tools menu holds the utilities that you use to test a network and to react when something changes.

Ping and traceroute test reachability and show the path. Netwatch watches hosts and runs a script when one goes up or down.

E-mail lets the router send messages, so it can report events. The profiler shows which parts of the system use the CPU.

Routertools menuping, tracerouteNetworkreachability and pathRouternetwatchHostup or downscript or mailAdminalert

How it works

Each tool answers one question, and together they cover testing, alerting and load.

Ping

Ping sends ICMP echo requests and measures the replies.

/ping 8.8.8.8 count=4
/ping 192.168.2.10 src-address=192.168.1.1 size=1400

Useful options include count for the number of packets, size for the packet size and src-address to choose the source. The source address matters on a router with several addresses, because the reply must find its way back to that address.

A reply shows the round trip time. A timeout means the packet or its reply was lost. The packet size option, together with a do-not-fragment option, can reveal an MTU problem on a path.

Traceroute

Traceroute shows each router on the path to a destination.

/tool traceroute 8.8.8.8

It sends packets with a growing time to live, and each router that discards one reveals itself. The output lists the hops in order, with the delay to each. Where the list stops or shows timeouts is usually where the problem lies.

A hop that does not answer is not always a fault. Some routers choose not to reply, but still forward traffic.

Exam tip

Use ping to find out whether a destination answers, and traceroute to find out where the path breaks.

Netwatch

Netwatch checks hosts at regular intervals, and it runs scripts when the state changes.

/tool netwatch add host=203.0.113.1 interval=30s timeout=1s up-script="" down-script=""
/tool netwatch print

The host is the address to watch. The interval is how often to check, and the timeout is how long to wait for a reply. The down-script runs when the host stops answering, and the up-script runs when it returns.

The status of each entry is up or down, with the time of the last change. Newer versions add other kinds of probe besides ping, so check the options of your version.

A common use is to switch to a backup link. The down script disables a route or an interface, and the up script restores it. Another use is to send a message to the administrator, using the e-mail tool.

E-mail

The e-mail tool lets the router send mail through an SMTP server.

/tool e-mail print
/tool e-mail send to=admin@example.com subject="Link down" body="The WAN host is not answering"

Before it can send, the tool needs the address of the mail server and a sender address. The name of the server setting differs between RouterOS versions, so type the command followed by a question mark to see it in your version.

The e-mail tool is the delivery method for alerts. A Netwatch script can call it when a host goes down, and a watchdog or log action can use it too.

Profiler

The profiler measures what uses the CPU of the router.

/tool profile
/system resource print

The profile tool lists processes with their share of the CPU, such as firewall, networking and the wireless handling. Run it when the CPU is busy, and the process at the top shows what is responsible. The resource print command shows the overall CPU load and the memory.

If the firewall dominates, look at the number of rules and at FastTrack. If a service dominates, look at what that service is doing.

Watch out

A high CPU is a symptom and not a cause, so use the profiler to find which process creates the load before you change anything.

Choosing the right tool

QuestionTool
Does the host answer?Ping
Where does the path stop?Traceroute
Tell me when a host changes stateNetwatch
Send me a messageE-mail
Why is the CPU busy?Profiler

What to remember for the exam

Seven facts cover this topic.

  • Ping tests reachability, and src-address chooses the source.
  • Traceroute lists the routers on the path to a destination.
  • Netwatch checks a host at an interval and runs a script when it goes up or down.
  • Netwatch uses host, interval, timeout, up-script and down-script.
  • The e-mail tool needs a mail server address and a sender before it can send.
  • /tool e-mail send sends a message, and Netwatch can trigger it.
  • The profiler shows which processes use the CPU.

Common mistakes

These four mistakes are common.

Pinging from the wrong source. The reply returns to a different address and the test fails, so choose the source.

Treating silent hops as faults. A traceroute hop that does not reply may still forward traffic.

Setting a tiny Netwatch interval. Frequent checks add load and can flap on a single lost packet.

Sending e-mail without server settings. The message is never sent.

Check yourself

Work through these three questions.

  • What does Netwatch do when a host stops answering?

    It marks the host as down and runs the down-script. When the host answers again, it runs the up-script.

  • What is the difference between ping and traceroute?

    Ping tests whether a destination answers. Traceroute lists each router on the path, so you can see where it stops.

  • What does the profiler show?

    It shows which processes use the CPU, such as firewall or networking. Use it to find the cause of a high CPU load.

Topic 1 of 3 in Misc

Test yourself on Misc

The full MikroTik MTCNA question bank has 558 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.