Advertisement
ujiajah1

loadbalance

Jun 7th, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TOPOLOGI :
  2.  
  3.         wlan1 : 192.168.1.1/24
  4.         wlan2 : 192.168.2.1/24
  5.         local : 192.168.88.1/24
  6.  
  7. EXPLANATION :
  8.  
  9. / ip address
  10. add address=192.168.88.1/24 network=192.168.0.0 broadcast=192.168.88.255 interface=Local
  11. add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=wlan1
  12. add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=wlan2
  13.  
  14. / ip route
  15. add dst-address=0.0.0.0/0 gateway=192.168.1.1,192.168.2.1 check-gateway=ping
  16.  
  17. / ip firewall nat
  18. add chain=srcnat out-interface=wlan1 action=masquerade
  19. add chain=srcnat out-interface=wlan2 action=masquerade
  20.  
  21. / ip firewall mangle
  22. add chain=input in-interface=wlan1 action=mark-connection new-connection-mark=wlan1_conn
  23. add chain=input in-interface=wlan2 action=mark-connection new-connection-mark=wlan2_conn
  24. add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wlan1    
  25. add chain=output connection-mark=wlan2_conn action=mark-routing new-routing-mark=to_wlan2    
  26.  
  27. / ip route
  28. add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_wlan1
  29. add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_wlan2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement