Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15394

General • Restarting interface when it's down ( based on status, not the ping )

$
0
0
Hello everybody

I have a problem with randomly frozen the SFP>RJ45 module, it is only happening when the device connected to the PowerBox Pro sfp1 port is making reboot.
I need to log in to the MT make disable and enable Interface and it is working again properly for another couple days.
I was trying to use a script but it is not working:

:local uptime ([/interface/ethernet/monitor sfp1 once as-value]->“status”)

:local reset false
:if ([ :typeof $status ] = “no-link”) do={
:log warning “sfp1 Reset”

:set reset true
}
:if ($reset = true) do={

:log warning “Resetting sfp1”

/interface disable sfp1

/delay 5s

/interface enable sfp1
}

can somebody help me please

Z.

Statistics: Posted by ziemowitm — Fri Feb 23, 2024 3:31 am



Viewing all articles
Browse latest Browse all 15394

Trending Articles