Disable/enable ether port via script

Hi,
I got a situation where an ethernet port on a 1100AH drops from 1Gbps to a 100 mbps connection.
I know I have to go to the tower and check cabling, earthing etc. etc. but its bloooooody high up and I need time to get there so I just need a short term solution. :slight_smile:

I can login to the routerboard and disable and enable the port again and it works for a day or two.
How can I use a script with interface monitor to do that for me till I can get to the tower?
Do I use a scheduler with the script and run it every how many minutes?

Just for interest sake, any idea why that would happen? I use two licensed Dragonwaves radios for the P2P link.

Thanks.

Hi dipdip.

Here you have the script:
You only need to replace ether5 for your interface name

/interface ethernet monitor ether5 once do={
:if ($rate = “100Mbps”) do={
/interface ethernet set ether5 disabled=yes
:delay 5s
/interface ethernet set ether5 disabled=no
:log info message=“ether5 reset by script”;
}
}

Make in scheduler a rule to call this script as many times you want.

Regards.

great stuff!

thanks

Gjustavo me daria una mano, tambien queiro hacer algo parecido

good

At this moment, I would not like to use a script, but I have never confirmed it, I liked to try a script that has enabled me and disabled once the traffic is low or very low, for example my traffic is 100 Mbps but if low to 5 kbps I want to disable the interface and the function enabled for the traffic upload again to 100 Mbps.

who can help me?