| 
 | 
防止site-to-site連接失敗時,log被洗版
| 最近要看Log了解為什麼連不上LTE. 但Log比SSTP connection error Overwrite... 我用了以下的方法來減少SSTP error...
 1)power on 時:disable SSTP,
 2) Netwatch connection, 在中國可以看看Taobao IP, 在香港可以看看8.8.8.8。
 3) 如果有Network connection, 便enable SSTP, 沒有disable SSTP
 4) Netwatch 不會重複enable sstp/disable SSTP. 是Netwatch status (狀態)變化才有動作。
 Netwatch 的Script 有限制 only read, write, reboot, test
 
 ------ power on 時 Disable SSTP -- 其實有沒有差別不大。
 /system scheduler
 add name=pwrondisable on-event=wan-down policy=\
 ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
 start-time=startup
 
 ------ netwatch 看看有沒有Connection... x.x.x.x 1.1.1.1 要可以。
 /tool netwatch
 add down-script=wan-down host=x.x.x.x up-script=wan-up
 
 --- Script wan-down, 當Status 變到沒有Network connection 時,運行一次。
 Script wan-down
 {
 :log warning "sstp-bcp NOT running"
 /interface sstp-client disable [find where name="sstp-bcp"]
 }
 --- Script wan-up, 當Status 變到有Network connection 時,運行一次。
 {
 :log info message="Link up, Check SSTP"
 :if ([/interface sstp-client get sstp-bcp running]=true) do={
 :log info message="sstp running"
 }  else={
 :log warning "sstp-bcp NOT running"
 :delay delay-time=1;
 /interface sstp-client enable [find where name="sstp-bcp"]
 }
 }
 | 
 |