Advertisement
punces

fail-over-ip-modem

Apr 5th, 2017
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. /ip route
  2. add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.12.12 routing-mark=exit-1
  3. add check-gateway=ping comment=exit-2 distance=1 gateway=192.168.11.11 routing-mark=exit-2
  4. add check-gateway=ping comment=jalur1 distance=1 gateway=192.168.12.12 routing-mark=jalur1
  5. add check-gateway=ping comment=jalur1 distance=2 gateway=192.168.11.11 routing-mark=jalur1
  6. add check-gateway=ping comment=jalur2 distance=1 gateway=192.168.11.11 routing-mark=jalur2
  7. add check-gateway=ping comment=jalur2 distance=2 gateway=192.168.12.12 routing-mark=jalur2
  8. add check-gateway=ping comment=jalur1 distance=1 gateway=192.168.12.12
  9. add check-gateway=ping comment=jalur2 distance=2 gateway=192.168.11.11
  10.  
  11. /system scheduler
  12. add interval=10s name=fail-over-ip-modem on-event="#jalur-1 cek\r\
  13. \n:if ([/ping address=208.67.222.222 interface=ether2 routing=exit-1 count=10] = 0) do={/ip route set [find comment=jalur1 gateway=192.168.12.12 distance=1] distance=3}\
  14. \_else={/ip route set [find comment=jalur1 gateway=192.168.12.12 distance=3] distance=1};\r\
  15. \n\r\
  16. \n#jalur-2 cek\r\
  17. \n:if ([/ping address=208.67.222.222 interface=ether1 routing=exit-2 count=10] = 0) do={/ip route set [find comment=jalur2 gateway=192.168.11.11 distance=1] distance=3}\
  18. \_else={/ip route set [find comment=jalur2 gateway=192.168.11.11 distance=3] distance=1};" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
  19. start-date=apr/05/2017 start-time=16:19:19
  20.  
  21. *isinya system scheduler fail-over-ip-modem, seperti ini :
  22. #jalur-1 cek
  23. :if ([/ping address=208.67.222.222 interface=ether2 routing=exit-1 count=10] = 0) do={/ip route set [find comment=jalur1 gateway=192.168.12.12 distance=1] distance=3} else={/ip route set [find comment=jalur1 gateway=192.168.12.12 distance=3] distance=1};
  24.  
  25. #jalur-2 cek
  26. :if ([/ping address=208.67.222.222 interface=ether1 routing=exit-2 count=10] = 0) do={/ip route set [find comment=jalur2 gateway=192.168.11.11 distance=1] distance=3} else={/ip route set [find comment=jalur2 gateway=192.168.11.11 distance=3] distance=1};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement