Tuesday, April 08, 2025

Breaking News
>> Cara Membuka Admin pada mesin Absensi  >> Cara Melihat Password Admin Modem Indihome Yang Berubah (ZTE F660)  >> Cara Memperbaiki Error B200 Pada Printer Canon IP2770 dan MP258  >> Cara Root Asus Zenfone 6 KitKat  >> Cara Root Samsung Galaxy Note 2 4.4.2 KitKat  >> Cara Setting Email Gmail di Ms. Outlook    

Selasa, 01 September 2015

Mikrotik Load Balancing 2 WAN 2 LAN

Mikrotik Load Balancing 2 WAN 2 LAN with Failover- Load balance 2 WAN on Mikrotik Router is a technique to distribute the traffic load on the two-paths connection in a balanced manner, so that traffic can run optimally, maximize throughput, minimize response time and avoid overload on one connection path. This experiment, I have 2 internet connections different ip WAN and 2 LAN. I've tried it, load balancing and failover can run normally. 
You can see the mikrotik script below.
 
Network Topology

IP WAN  1 = 10.10.10.2/29
IP WAN  2 = 10.10.11.2/29
Block IP LAN 1 = 192.168.1.0/24 Gatheway 192.168.1.1 Mask 255.255.255.0
Block IP LAN 2 = 192.168.100.0/24 Gatheway 192.168.100.254 Mask 255.255.255.0 

1. Add Ip address to interfaces mikrotik router

Mikrotik Script:
/ip address
add address=10.10.11.2/29 interface=ether2 network=10.10.11.1
add address=10.10.10.2/29 interface=ether1 network=10.10.10.1
add address=192.168.1.1/24 interface=ether3 network=192.168.1.0

2. Setting IP Pool to restrict the range of IP that will distributed automatically by DHCP system that we enable.

Mikrotik Script :
/ip pool
add name="LAN 1" ranges=192.168.1.10-192.168.1.254
add name="LAN 2" ranges=192.168.100.20-192.168.100.30

3. Setting DHCP Server on mikrotik router

Mikrotik Script :
/ip dhcp-server
add address-pool="LAN 1" disabled=no interface=ether3 name="staff"
add address-pool="LAN 2" disabled=no interface=ether6 name= manager

/ip dhcp-server network
add address=192.168.1.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.1.1
add address=192.168.100.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.100.254

4. Add the both private address (IP LAN) to the firewall address list

Mikrotik Script :
/ip firewall address-list
add address=192.168.1.0/24 list="block lan"
add address=192.168.100.0/24 list="block lan"

5. Setting Firewall NAT  

Mikrotik Script :
add action=masquerade chain=srcnat out-interface=ether1 src-address-list=
    "block lan" to-addresses=10.10.10.2 
add action=masquerade chain=srcnat out-interface=ether2 src-address-list=\
    "block lan" to-addresses=10.10.11.2

6. Setting Mangle

Mikrotik Script :
/ip firewall mangle
add action=mark-connection chain=input in-interface=ether1 \
    new-connection-mark=ip10con passthrough=no
add action=mark-connection chain=input in-interface=ether2 \
    new-connection-mark=ip11con passthrough=no
add action=mark-routing chain=output connection-mark=ip10con new-routing-mark=\
    to-ip10 passthrough=no
add action=mark-routing chain=output connection-mark=ip11con \
    new-routing-mark=to-ip11 passthrough=no

7. Setting IP Route 


Mikrotik Script :
/ip route
add distance=1 gateway=10.10.10.1 routing-mark=to-ip10
add distance=1 gateway=10.10.11.1 routing-mark=to-ip11
add check-gateway=ping distance=1 gateway=10.10.10.1,10.10.10.1

Tidak ada komentar :

Posting Komentar

Designed By Fedi Rahadi Noviandi ST