This has to be the easiest spot

Please see or tell me what I am doing wrong. All I need is this script to turn off an ethernet3 port and then later turn it on. But my silly script is not working.

I am not using {} is that the problem? Tried different things I can not get it to work please assist. Thanks!

/interface ethernet set ether3\
disable =no

Or should it be

/interface ethernet set ether3 disable =no

Any advice.

Also does the script need different things if it is being executed via the scheduler such as braces or not?
Thanks

-Sincerely,
DesertAdmin

Don’t put a space between the variable and its value.

/interface ethernet set ether3 disabled=no

That works for interfaces - in other sections you can’t refer directly by name so the canonical form is:

/interface ethernet set [/interface ethernet find name=ether3] disabled=no

That’ll work fine in a scheduled script.

Your awesome! Thanks I have been going crazy wondering why this simple script was not working.

Thanks again!


-Sincerely,
DesertAdmin

Awesome so this is the script I got to go and it works! What it does is reconnects and emails me if a certain backhaul gets what I call a dry sock connection. The connection stays linked but nothing passes. It happens during extreme snow conditions out here. Not sure if it is a static case or what but nonetheless here is my code that I use to fix this problem.

The script will turn off wlan2 for 5 seconds and then turn it back on which will cause everything to re-sync and work again. This code is now something that I deploy to all backhauls to keep everything running and to help me get more sleep.

/interface wireless set wlan2 disabled=yes
{
/tool e-mail send \
from=("9milefix@emailaddress.com") \ server="enter.in.your.smtpIP" \
body="9mile DWN running fix" \
subject="9 mile fix DWN" \ to="me@administratoremail.com" 
}
:delay 5
{
/tool e-mail send \
from=("9milefix@emailaddress.com") \ server="enter.in.you.smtpIP" \
body="9mile fixing UP" \
subject="9 mile fix running UP" \ to="me@administratoremail.com" 
}
/interface wireless set wlan2 disabled=no

Thanks for the help!

-Sincerely,
DesertAdmin