|
发表于 2022-12-2 08:46:29
|
显示全部楼层
本帖最后由 cspm333 于 2022-12-2 09:09 编辑
第一次聽這樣的請求,總之試試吧:
- :local pppoe1 [/interface get pppoe-out1 running]
- :local pppoe2 [/interface get pppoe-out2 running]
- :local pppoe3 [/interface get pppoe-out3 running]
- :local pppoe4 [/interface get pppoe-out4 running]
- :if (!$pppoe1) do={
- :while ($pppoe1=no) do={
- /interface disable pppoe-out2,pppoe-out3,pppoe-out4
- :delay 5s ; :set pppoe1 [/interface get pppoe-out1 running]
- }
- /interface enable pppoe-out2,pppoe-out3,pppoe-out4 ; :delay 5s
- :set pppoe2 [/interface get pppoe-out2 running]
- :set pppoe3 [/interface get pppoe-out3 running]
- :set pppoe4 [/interface get pppoe-out4 running]
- }
- :if (!$pppoe2) do={
- :while ($pppoe2=no) do={
- /interface disable pppoe-out1,pppoe-out3,pppoe-out4
- :delay 5s ; :set pppoe2 [/interface get pppoe-out2 running]
- }
- /interface enable pppoe-out1,pppoe-out3,pppoe-out4 ; :delay 5s
- :set pppoe3 [/interface get pppoe-out3 running]
- :set pppoe4 [/interface get pppoe-out4 running]
- }
- :if (!$pppoe3) do={
- :while ($pppoe3=no) do={
- /interface disable pppoe-out1,pppoe-out2,pppoe-out4
- :delay 5s ; :set pppoe3 [/interface get pppoe-out3 running]
- }
- /interface enable pppoe-out1,pppoe-out2,pppoe-out4 ; :delay 5s
- :set pppoe4 [/interface get pppoe-out4 running]
- }
- :if (!$pppoe4) do={
- :while ($pppoe4=no) do={
- /interface disable pppoe-out1,pppoe-out2,pppoe-out3
- :delay 5s ; :set pppoe4 [/interface get pppoe-out4 running]
- }
- /interface enable pppoe-out1,pppoe-out2,pppoe-out3 ; :delay 5s
- }
复制代码
|
|