Berikut ini saya sampaikan langkah langkah bagaimana kita membuat Loadbalancing dengan perangkat Routerboad Mikrotik :
Asumsi IP :
Untuk Device :
Langkah 1:
Kita perlu pembuatan sebuah mangle yang berfungsi untuk menandai berbagai paket yang masuk dari public
Code:
[admin@MikroTik] /ip firewall mangle> chain=postrouting action=mark-packet new-packet-mark=HIT passthrough=no protocol=tcp dst-port=80,81,8080,3128 dscp=12 comments="Proxy Los" chain=prerouting action=mark-connection new-connection-mark=PROXY-1 passthrough=yes connection-state=new in-interface=Squid comments="LOAD BALANCE PROXY PCC" chain=prerouting action=mark-connection new-connection-mark=PROXY-2 passthrough=yes connection-state=new in-interface=Squid chain=prerouting action=mark-connection new-connection-mark=PROXY-3 passthrough=yes connection-state=new in-interface=Squid chain=prerouting action=mark-connection new-connection-mark=PROXY-1 passthrough=yes in-interface=Squid connection-mark=PROXY-1 chain=prerouting action=mark-connection new-connection-mark=PROXY-2 passthrough=yes in-interface=Squid connection-mark=PROXY-2 chain=prerouting action=mark-connection new-connection-mark=PROXY-3 passthrough=yes in-interface=Squid connection-mark=PROXY-3 chain=prerouting action=mark-connection new-connection-mark=PROXY-1 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Squid dst-port=80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/0 chain=prerouting action=mark-connection new-connection-mark=PROXY-2 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Squid dst-port=80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/1 chain=prerouting action=mark-connection new-connection-mark=PROXY-3 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Squid dst-port=80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/2 chain=prerouting action=mark-routing new-routing-mark=Route-Proxy-1 passthrough=yes in-interface=Squid connection-mark=PROXY-1 chain=prerouting action=mark-routing new-routing-mark=Route-Proxy-1 passthrough=yes in-interface=Squid connection-mark=PROXY-2 chain=prerouting action=mark-routing new-routing-mark=Route-Proxy-2 passthrough=yes in-interface=Squid connection-mark=PROXY-3 chain=input action=mark-connection new-connection-mark=ADSL-1 passthrough=yes connection-state=new in-interface=Lokal comments="LOAD BALANCE LOKAL" chain=input action=mark-connection new-connection-mark=ADSL-2 passthrough=yes connection-state=new in-interface=Lokal chain=input action=mark-connection new-connection-mark=ADSL-3 passthrough=yes connection-state=new in-interface=Lokal chain=prerouting action=mark-connection new-connection-mark=ADSL-1 passthrough=no in-interface=Lokal connection-mark=ADSL-1 chain=prerouting action=mark-connection new-connection-mark=ADSL-2 passthrough=no in-interface=Lokal connection-mark=ADSL-2 chain=prerouting action=mark-connection new-connection-mark=ADSL-3 passthrough=no in-interface=Lokal connection-mark=ADSL-3 chain=prerouting action=mark-connection new-connection-mark=ADSL-1 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Lokal dst-port=!80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/0 comments="AUTOMATIC DISABLE IF PROXY DOWN" chain=prerouting action=mark-connection new-connection-mark=ADSL-2 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Lokal dst-port=!80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/1 chain=prerouting action=mark-connection new-connection-mark=ADSL-3 passthrough=yes protocol=tcp dst-address-type=!local in-interface=Lokal dst-port=!80,81,8080,3128 per-connection-classifier=both-addresses-and-ports:3/2 chain=prerouting action=mark-connection new-connection-mark=ADSL-1 passthrough=yes dst-address-type=!local in-interface=Lokal per-connection-classifier=both-addresses-and-ports:3/0 comments="AUTOMATIC ENABLE IF PROXY DOWN" chain=prerouting action=mark-connection new-connection-mark=ADSL-2 passthrough=yes dst-address-type=!local in-interface=Lokal per-connection-classifier=both-addresses-and-ports:3/1 chain=prerouting action=mark-connection new-connection-mark=ADSL-3 passthrough=yes dst-address-type=!local in-interface=Lokal per-connection-classifier=both-addresses-and-ports:3/2 chain=prerouting action=mark-routing new-routing-mark=jalur-1 passthrough=yes in-interface=Lokal connection-mark=ADSL-1 chain=prerouting action=mark-routing new-routing-mark=jalur-1 passthrough=yes in-interface=Lokal connection-mark=ADSL-2 chain=prerouting action=mark-routing new-routing-mark=jalur-2 passthrough=yes in-interface=Lokal connection-mark=ADSL-3 chain=prerouting action=mark-connection new-connection-mark=Trafik PB + POKER passthrough=yes protocol=tcp dst-address-list=Poker + PB dst-port=49100 comments="POKER + POINT BLANK" chain=prerouting action=mark-connection new-connection-mark=Trafik PB + POKER passthrough=yes protocol=udp dst-address-list=Poker + PB dst-port=40000-40010 chain=prerouting action=mark-connection new-connection-mark=Trafik PB + POKER passthrough=yes protocol=tcp dst-address-list=Poker + PB dst-port=39190 chain=prerouting action=mark-packet new-packet-mark=PB + Poker passthrough=yes connection-mark=Trafik PB + POKER chain=prerouting action=mark-routing new-routing-mark=Poker + PB passthrough=no src-address=192.168.0.2-192.168.0.30 dst-address-list=Poker + PB in-interface=Lokal connection-mark=Trafik PB + POKER comments="ROUTING POKER + POINT BLANK" chain=prerouting action=mark-routing new-routing-mark=Poker + PB passthrough=no src-address=192.168.3.2-192.168.3.16 dst-address-list=Poker + PB in-interface=Lokal connection-mark=Trafik PB + POKER
Nanti kita akan terlihat hasilnya seperti ini :
Kemudian langkah berikutnya kita buat NAT (Network Address Translation)
pcc
Hasilnya akan seperti ini :
Setelah pembuatan NAT, kita lanjutkan pembuatan Routingnya atau
ROUTE bahasa gampangnya arah tujuan
berikut tambahan buat poker dan point blank yang bertujuan unutuk memberi aliran beandwit yang lebih atu juga untuk supaya tidak terjadi login berulang-ulang
pcc
Berikut hasil screencrotnya :
script ini untuk keadaan di mana proxy external mati yang disebabkan karena banyak hal
pcc
pcc
Demikian sekilas pembuatan Loadbalance type PCC dengan menggunakan 2 line sp**dy pada mikrotik.
Semoga bermanfaat dan selamat mencoba ...
thanks to donipermono1982