Community discussions

MikroTik App
 
reion
just joined
Topic Author
Posts: 24
Joined: Mon Nov 05, 2012 10:16 am

Local&Intnl different bandwith

Fri Jan 11, 2013 12:14 pm

Hi to all! Please help! I need to apply different bandwith for local and intnl traffic.
First, I divided traffic in 2 parts: local and intnl:
ip firewall mangle
add action=mark-connection chain=forward comment=Intnl_traff disabled=no \
dst-address-list=!Local new-connection-mark=Intnl_Connection passthrough=yes
add action=mark-packet chain=forward connection-mark=Intnl_Connection \
disabled=no new-packet-mark=Intnl_Packet passthrough=no
add action=mark-connection chain=forward comment=Local_traff disabled=no \
new-connection-mark=Local_Connection passthrough=yes
add action=mark-packet chain=forward connection-mark=Local_Connection \
disabled=no new-packet-mark=Local_Packet passthrough=no

Second:
queue type
add kind=pcq name=Local_DL pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=2M pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=Local_UP pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=2M pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=Intnl_DL pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=1M pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=Intnl_UP pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=1M pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000

third:
queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=TOTAL_DL packet-mark="" parent=Local_interface priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=TOTAL_UP_Direct packet-mark="" parent=Extern_interface priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Local_DL packet-mark=Local_Packet parent=TOTAL_DL \
priority=8 queue=Local_DL
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Local_UP packet-mark=Local_Packet parent=\
TOTAL_UP priority=8 queue=Local_UP
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Intnl_DL packet-mark=Intnl_Packet parent=TOTAL_DL \
priority=8 queue=Intnl_DL
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Intnl_UP packet-mark=Intnl_Packet parent=\
TOTAL_UP priority=8 queue=Intnl_UP


all works fine, BUT when host downloading he has summary 2M+1M=3M for p2p traffic for example.
What to do for host can download/upload intnl traffic 1M/1M, Local 2M/2M, but summary no more than local, mean 2M/2M?
I assume that in mangle I am doing mistake, or in queue tree....

Who is online

Users browsing this forum: dcavni and 45 guests