Advertisement
rootplg3544

Load balancing 1+1+1=3....dijamin lancar....rb450gx4

Jun 10th, 2019
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. Bagi2 ilmu
  2. Load balancing 1+1+1=3....dijamin lancar....rb450gx4
  3.  
  4. /ip address
  5. add address=192.168.1.10/24 interface=ether1
  6. add address=192.168.2.10/24 interface=ether2
  7. add address=192.168.3.10/24 interface=ether3
  8. add address=192.168.10.1/24 interface=ether5
  9.  
  10. /ip dns
  11. set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=2048 servers=192.168.1.1,192.168.2.1,192.168.3.1
  12.  
  13. /ip firewall mangle
  14. add chain=input in-interface=ether1 action=mark-connection new-connection-mark=WAN1_con
  15. add chain=input in-interface=ether2 action=mark-connection new-connection-mark=WAN2_con
  16. add chain=input in-interface=ether3 action=mark-connection new-connection-mark=WAN3_con
  17. add action=mark-routing chain=output connection-mark=WAN1_con new-routing-mark=to_WAN1
  18. add action=mark-routing chain=output connection-mark=WAN2_con new-routing-mark=to_WAN2
  19. add action=mark-routing chain=output connection-mark=WAN3_con new-routing-mark=to_WAN3
  20. add chain=prerouting dst-address=192.168.1.0/24 in-interface=ether5
  21. add chain=prerouting dst-address=192.168.2.0/24 in-interface=ether5
  22. add chain=prerouting dst-address=192.168.3.0/24 in-interface=ether5
  23. add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth in-interface=ether5 new-connection-mark=WAN1_con per-connection-classifier=both-addresses-and-ports:3/1
  24. add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth in-interface=ether5 new-connection-mark=WAN2_con per-connection-classifier=both-addresses-and-ports:3/2
  25. add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth in-interface=ether5 new-connection-mark=WAN3_con per-connection-classifier=both-addresses-and-ports:3/3
  26. add action=mark-routing chain=prerouting connection-mark=WAN1_con in-interface=ether5 new-routing-mark=to_WAN1
  27. add action=mark-routing chain=prerouting connection-mark=WAN2_con in-interface=ether5 new-routing-mark=to_WAN2
  28. add action=mark-routing chain=prerouting connection-mark=WAN3_con in-interface=ether5 new-routing-mark=to_WAN3
  29.  
  30. /ip firewall nat
  31. add action=masquerade chain=srcnat out-interface=ether1
  32. add action=masquerade chain=srcnat out-interface=ether2
  33. add action=masquerade chain=srcnat out-interface=ether3
  34.  
  35. /ip route
  36. add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
  37. add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
  38. add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_WAN3
  39. add check-gateway=ping distance=1 gateway=192.168.1.1
  40. add check-gateway=ping distance=2 gateway=192.168.2.1
  41. add check-gateway=ping distance=3 gateway=192.168.3.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement