Script Mangle | Queue Tree

script yg dipake [odie] klo mesti bkin mangle & queue tree yg banyak biar g kriting di tangan..

cara pakenya tinggal copas di new terminal mikrotik

note : sesuaikan beberapa option dengan kondisi jaringan masing2.

Mikrotik v.2.xx

{

:local sukhoi

:set sukhoi “PC0″

:local ip

:set ip “192.168.100.”

:local startip

:set startip 2

:local endip

:set endip 4

/queue tree add name=”Download” parent=ether1-local limit-at=0 max-limit=128000 priority=8 queue=default

/queue tree add name=”Upload” parent=ether2-internet limit-at=0 max-limit=128000 priority=8 queue=default

:for i from=$startip to=$endip do={

:if ($i < 10) do={:set sukhoi “PC0″} else={:set sukhoi “PC”}

/ip firewall mangle add chain=prerouting src-address=($ip . $i) action=mark-connection new-connection-mark=(mc . $i) passthrough=yes

/ip firewall mangle add chain=prerouting protocol=!1 connection-mark=(mc . $i)action=mark-packet new-packet-mark=(mp . $i) passthrough=no

/queue tree add name=($sukhoi. $i. “Down”) parent=”Download” packet-mark=(mp . $i) limit-at=32000 max-limit=100000 queue=default priority=8

/queue tree add name=($sukhoi. $i. “Up”) parent=”Upload” packet-mark=(mp . $i) limit-at=32000 max-limit=100000 queue=default priority=8

}

}

Mikrotik v.3, v.4, v.5

{

:local “sukhoi”

:set sukhoi PC0

:local “ip”

:set ip 192.168.1.

:local “startip”

:set startip 1

:local “endip”

:set endip 200

/queue tree add name=”Donlot” parent=[LAN interface] limit-at=0 priority=8 queue=default

/queue tree add name=”Upload” parent=[INET interface] limit-at=0 priority=8 queue=default

:for i from=$startip to=$endip do={

:if ($i < 10) do={:set sukhoi PC0} else={:set sukhoi PC}

/ip firewall mangle add chain=prerouting src-address=($ip . $i) action=mark-connection new-connection-mark=(mc . $i) passthrough=yes

/ip firewall mangle add chain=prerouting protocol=!1 connection-mark=(mc . $i) action=mark-packet new-packet-mark=(mp . $i) passthrough=no

/queue tree add name=($sukhoi. $i. “Down”) parent=”Donlot” packet-mark=(mp . $i) limit-at=0 max-limit=0 queue=default priority=8

/queue tree add name=($sukhoi. $i. “Up”) parent=”Upload” packet-mark=(mp . $i) limit-at=0 max-limit=0 queue=default priority=8

}

}

About these ads
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: