RouterOS Italia

Versione completa: [Mikrotik] ScheduledWANDisconnect
Al momento stai visualizzando i contenuti in una versione ridotta. Visualizza la versione completa e formattata.
"t-dsl" is the name of the WAN-interface, PPPoE in this case
Codice:
/ system scheduler

Codice:
add name="sched_disconnect" on-event=pppoe_dis start-date=jan/01/2006 start-time=03:00:00 interval=1d \

Codice:
comment="move daily T-DSL-disconnect to late night" disabled=yes


Codice:
/system script

Codice:
add name=pppoe_dis source={/interface pppoe-client disable [find name="t-dsl"]

Codice:
:delay 10

Codice:
/interface pppoe-client enable [find name="t-dsl"]

Codice:
:log info "Script pppoe_dis - scheduled T-DSL-disconnect executed."

Codice:
}


should be tested in your environment and use it by own risk!
....or simply name your pppoe interface "ADSL" and do it within scheduler without scripting ...
Codice:
/system scheduler

Codice:
add  name="ADSL reconect" interval=1d on-event="interface pppoe-client disable ADSL ;\r\

Codice:
\ninterface pppoe-client enable ADSL ;\r\

Codice:
\n" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,a

Codice:
start-date=sep/12/2012 start-time=06:00:00