Dengan asumsi mikrotik mempunyai 2 interface dan akan difungsikan sebagai bandwidth manager yang berjalan pada interface bridge (TransparentTrafficShaper).
Pertama buat interface bridge dan masukan kedua interface fisik ke dalam bridge
/ interface bridge
add name=”bridge1″
/ interface bridge port
add interface=ether1 bridge=bridge1
add interface=ether2 bridge=bridge1
Untuk Mikrotik versi 3 dan yang lebih baru jalankan perintah berikut untuk melewatkan bridge paket ke dalam “ip firewall”
/ interface bridge settings
set use-ip-firewall=yes
Tambahkan alamat ip yang akan kita atur bandwidthnya ke dalam address list
/ ip firewall address-list add address=192.168.1.230 list=mine
/ ip firewall address-list add address=192.168.1.232 list=swc
/ ip firewall address-list add address=192.168.1.233 list=kary
/ ip firewall address-list add address=192.168.1.240 list=utama
Buat rules mangle untuk alamat ip yang akan kita atur bandwidthnya
/ ip firewall mangle add chain=forward src-address-list=mine action=markconnection new-connection-mark=mine-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=mine action=markconnection new-connection-mark=mine-down passthrough=no
/ ip firewall mangle add chain=forward src-address-list=swc action=markconnection new-connection-mark=swc-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=swc action=markconnection new-connection-mark=swc-down passthrough=no
/ ip firewall mangle add chain=forward src-address-list=kary action=markconnection new-connection-mark=kary-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=kary action=markconnection new-connection-mark=kary-down passthrough=no
/ ip firewall mangle add chain=forward src-address-list=utama action=markconnection new-connection-mark=utama-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=utama action=markconnection new-connection-mark=utama-down passthrough=no
Buat Queue untuk masing-masing host
/queue tree add name=mine-up parent=global-in packet-mark=mine-down limit-at=32 max-limit=64
/queue tree add name=mine-down parent=global-in packet-mark=mine-down limitat=32 max-limit=64
/queue tree add name=swc-up parent=global-in packet-mark=swc-down limit-at=32 max-limit=64
/queue tree add name=swc-down parent=global-in packet-mark=swc-down limitat=32 max-limit=64
/queue tree add name=kary-up parent=global-in packet-mark=kary-down limit-at=32 max-limit=64
/queue tree add name=kary-down parent=global-in packet-mark=kary-down limitat=32 max-limit=64
/queue tree add name=utama-up parent=global-in packet-mark=utama-down limit-at=32 max-limit=64
/queue tree add name=utama-down parent=global-in packet-mark=utama-down limitat=32 max-limit=64
Selain itu, bisa juga digunakan Simple Queue semisal seperti berikut:
/queue simple name=”kary” target-addresses=192.168.1.233/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=3M/3M max-limit=3M/3M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small
/queue simple name=”utama” target-addresses=192.168.1.240/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=0/0 max-limit=0/0
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small
/queue simple name=”swc” target-addresses=192.168.1.232/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=2M/2M max-limit=2M/2M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small
Dan bisa juga ditambahkan simple queue yang lain semisal:
/queue simple name=”raja” target-addresses=192.168.1.241/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=1M/1M max-limit=1M/1M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small
/queue simple name=”riset” target-addresses=192.168.1.236/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=2M/2M max-limit=2M/2M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small
/queue simple name=”cisco” target-addresses=192.168.1.244/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=512k/512k
max-limit=512k/512k burst-limit=0/0 burst-threshold=0/0
burst-time=0s/0s total-queue=default-small
/queue simple name=”lab” target-addresses=192.168.1.245/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=256k/256k
max-limit=256k/256k burst-limit=0/0 burst-threshold=0/0
burst-time=0s/0s total-queue=default-small