Advertisement
punces

LB-PCC

Sep 21st, 2016
1,438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. ### copy paste scrip berikut di terminal winbox, scrip ini untuk menambah address list ip lokal secara global ###
  2. /ip firewall address-list
  3. add address=10.0.0.0/8 comment="lokal-private" list=lokal-private
  4. add address=172.16.0.0/12 comment="lokal-private" list=lokal-private
  5. add address=192.168.0.0/16 comment="lokal-private" list=lokal-private
  6. #################################################################################################################
  7.  
  8.  
  9. #################################################################################################################
  10. #### apabila menggunakan PPPOE mikrotik, berikut scriptnya ####
  11. ## misal nama pppoe mikrotik adalah pppoe1 dan pppoe2, maka :
  12. ## pengaturan ip route mikrotiknya :
  13. add check-gateway=ping comment=default distance=1 gateway=pppoe1
  14. add check-gateway=ping comment=backup-default distance=2 gateway=pppoe1
  15. add check-gateway=ping comment=jalur1 distance=1 gateway=pppoe1 routing-mark=jalur1
  16. add check-gateway=ping comment=backup-jalur1 distance=2 gateway=pppoe2 routing-mark=jalur1
  17. add check-gateway=ping comment=jalur2 distance=1 gateway=pppoe2 routing-mark=jalur2
  18. add check-gateway=ping comment=backup-jalur2 distance=2 gateway=pppoe1 routing-mark=jalur2
  19. ## script mangle routing :
  20. add action=mark-routing chain=prerouting comment=jalur1-LB disabled=yes dst-address-list=!lokal-private dst-address-type=!local new-routing-mark=jalur1 passthrough=no per-connection-classifier=both-addresses-and-ports:2/0
  21. add action=mark-routing chain=prerouting comment=jalur2-LB disabled=yes dst-address-list=!lokal-private dst-address-type=!local new-routing-mark=jalur2 passthrough=no per-connection-classifier=both-addresses-and-ports:2/1
  22. #################################################################################################################
  23.  
  24.  
  25. #################################################################################################################
  26. #### apabila bukan PPPOE mikrotik, berikut scriptnya ####
  27. ## misal :
  28. # modem1 menggunakan ether1 dengan ip modem = 192.168.1.1
  29. # dan modem2 menggunakan ether2 dengan ip modem = 192.168.2.1
  30. ## pengaturan ip route mikrotiknya :
  31. add check-gateway=ping comment=default distance=1 gateway=192.168.1.1
  32. add check-gateway=ping comment=backup-default distance=2 gateway=192.168.2.1
  33. add check-gateway=ping comment=jalur1 distance=1 gateway=192.168.1.1 routing-mark=jalur1
  34. add check-gateway=ping comment=backup-jalur1 distance=2 gateway=192.168.2.1 routing-mark=jalur1
  35. add check-gateway=ping comment=jalur2 distance=1 gateway=192.168.2.1 routing-mark=jalur2
  36. add check-gateway=ping comment=backup-jalur2 distance=2 gateway=192.168.1.1 routing-mark=jalur2
  37. ## script mangle routing :
  38. add action=mark-routing chain=prerouting comment=jalur1-LB disabled=yes src-address-list=lokal-private dst-address-list=!lokal-private dst-address-type=!local new-routing-mark=jalur1 passthrough=no per-connection-classifier=both-addresses-and-ports:2/0
  39. add action=mark-routing chain=prerouting comment=jalur2-LB disabled=yes src-address-list=lokal-private dst-address-list=!lokal-private dst-address-type=!local new-routing-mark=jalur2 passthrough=no per-connection-classifier=both-addresses-and-ports:2/1
  40. #################################################################################################################
  41.  
  42.  
  43. ###### BAGAIMANA lebih dari 3 line isp ?
  44. # tambah ip route
  45. # tambah mangle 1 mangle lagi
  46. # ubah bot-address-and-ports, masing-masing = 3/0 , 3/1 dan 3/2
  47. ##### begitu juga berapun banyak line isp yang digunakan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement