Load Balance Mikrotik dengan NTH

Saturday, July 24, 2010

Berdasarkan mikrotik documentation pada bagian mangle, disebutkan keterangan nth sebagai berikut :

nth (integer,integer: 0..15,integer{0,1}) - match a particular Nth packet received by the rule. One of 16 available counters can be used to count packets every - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet
counter - specifies which counter to use. A counter increments each time the rule containing nth match matches
packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively.

Berikut ini contoh mangle load balance 2 speedy.

/ip firewall mangle

add chain=prerouting action=mark-connection new-connection-mark=LB-Proxy-1 passthrough=yes connection-state=new protocol=tcp src-address-list=Proxy in-interface=Proxy dst-port=80 nth=2,1

add chain=prerouting action=mark-connection new-connection-mark=LB-Proxy-2 passthrough=yes connection-state=new protocol=tcp src-address-list=Proxy in-interface=Proxy dst-port=80 nth=2,2

add chain=prerouting action=mark-routing new-routing-mark=JaluR-1 passthrough=yes in-interface=Proxy connection-mark=LB-Proxy-1

add chain=prerouting action=mark-routing new-routing-mark=JaluR-2 passthrough=yes in-interface=Proxy connection-mark=LB-Proxy-2



Note :
Perintah diatas untuk me-load-balance port 80 yg berasal dari proxy external bukan yg berasal dari Local



AddThis Social Bookmark Button