Skip to content Skip to sidebar Skip to footer

Restart the MikroTik Interface Automatically

Restart the MikroTik Ethernet Interface automatically


Restart the MikroTik Ethernet Interface automatically - Have you ever experienced an event where the connection status on the microtic ethernet interface indicates Running, Link Ok, Rate 1GB, but so when test pinged the result is even Timeout.


Here are some ways to solve the above problems:


1. Unplug and re-plugged the LAN cable and then test ping the result showing replay.

 

2. The second way is easier and simpler, login to Mikrotik Router and disable-enable the problematic ethernet interface, Then test ping and Result "Replay".

 

3. The 3rd way is easier, by installing a script on the Mikrotik Router, so that if you test ping then if the result timeout router mikrotik will automatically disable-enable Interface or can be called the term restart interfaces repeatedly until the test ping replay results.

 

Here is a script that you can use to restart the ethernet interface automatically.

Please Put the Script below on your Mikrotik Terminal. please replace the variables that have been marked red. and don't forget to Customize the Interface you will restart automatically. for example "ether1".


=============== start copying the script below this line====================



/system script
add name="Restart ether1" \
source=":global runningRestartEther1\r\
\n:if ([:len \$runningRestartEther1] = 0 || \$runningRestartEther1 = 0) do\
={\r\
\n /interface {\r\
\n :set runningRestartEther1 1\r\
\n :local o [find name=\"ether1\"]\r\
\n set \$o disabled=yes\r\
\n :delay 5\r\
\n set \$o disabled=no\r\
\n :delay 2\r\
\n :set runningRestartEther1 0\r\
\n }\r\
\n}\r\
\n"

/system scheduler
add name="Restart ether1" on-event="Restart ether1" \
start-date=jan/01/1970 start-time=00:00:00 interval=2s

/tool netwatch
add host=1.1.1.1 \
down-script="/system scheduler set [find name=\"Restart ether1\"] disabled=no" \
up-script="/system scheduler set [find name=\"Restart ether1\"] disabled=yes"


================ stop copy of the script above this line===================


This script is taken from = http://forum.mikrotik.com/viewtopic.php?t=65027

rename the interface " ether1" according to the ether or interface that is problematic in your Mikrotik Router.

Replace host = 1.1.1.1 according to the destination IP that you will be monitored (In this case please use a server or ip that is rarely offline because biasnaya if using ip that is often offline Mikrotik router will think this interface error).

Hopefully useful, do not forget this web bookmark yes. and help support this web aggar continue to provide affirmation about interesting technologies.


So much, may it be useful

Dani31
Dani31 2012 pertamakali Melakukan Blongging dani31 great web for support dani31 About Me About Me dani31