Breaking News
Loading...
05 December 2011

Load Balancing Mikrotik 2 Speedy dengan PCC

11:02 AM
Load Balancing Mikrotik 2 Speedy dengan PCC
keterangan
----------------
interface :
1. Lokal
2. Speedy-1
3. Speedy-2

ip modem:
Speedy-1 = 10.112.0.1
Speedy-2 = 10.111.0.1

--------------------------------------------------------------------------------
/ip address
add address=192.168.88.1/24 network=192.168.88.0 broadcast=192.168.88.255 interface=Lokal
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=Speedy-1
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=Speedy-2

/ip firewall mangle
add action=mark-connection chain=input comment="NEW Load Balance" connection-state=new disabled=no in-interface=Speedy-1 new-connection-mark=ADSL-1 passthrough=yes
add action=mark-connection chain=input comment="" connection-state=new disabled=no in-interface=Speedy-2 new-connection-mark=ADSL-2 passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=ADSL-1 disabled=no new-routing-mark=jalur-1 passthrough=no
add action=mark-routing chain=output comment="" connection-mark=ADSL-2 disabled=no new-routing-mark=jalur-2 passthrough=no

add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=Lokal new-connection-mark=ADSL-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=Lokal new-connection-mark=ADSL-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1

add action=mark-routing chain=prerouting comment="" connection-mark=ADSL-1 disabled=no in-interface=Lokal new-routing-mark=jalur-1 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=ADSL-2 disabled=no in-interface=Lokal new-routing-mark=jalur-2 passthrough=yes

/ip firewall nat
add chain=srcnat action=masquerade out-interface=Speedy-1 comment="" disabled=no
add chain=srcnat action=masquerade out-interface=Speedy-2 comment="" disabled=no

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.112.0.1 routing-mark=jalur-1
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.111.0.1 routing-mark=jalur-2

add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.111.0.1
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.112.0.1
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=10.111.0.1



atau pakai setingan yang ini untuk loanding balance


add ip address Local dan Wan

/ ip address
add address=10.10.0.1/24 network=10.10.0.0 broadcast=10.10.0.255 interface=client
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=speedy1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=speedy2

Setting Routing Gateway

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1,192.168.2.1 check-gateway=ping

Setting Firewall Nat

/ip firewall nat
add chain=srcnat out-interface=speedy1 action=masquerade
add chain=srcnat out-interface=speedy2 action=masquerade

Setting Balancing dengan firewall mangle

/ ip firewall mangle
add chain=input in-interface=speedy1 action=mark-connection new-connection-mark=speedy1_conn
add chain=input in-interface=speedy2 action=mark-connection new-connection-mark=speedy2_conn
add chain=output connection-mark=speedy1_conn action=mark-routing new-routing-mark=to_speedy1
add chain=output connection-mark=speedy2_conn action=mark-routing new-routing-mark=to_speedy2

Setting Balancing routing

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_speedy1
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_speedy2

0 komentar:

Post a Comment

 
Toggle Footer