Community discussions

MikroTik App
 
HighTower
just joined
Topic Author
Posts: 16
Joined: Wed Feb 18, 2015 4:06 pm

Reserve channel width for ip

Fri May 08, 2015 2:02 pm

Hello,

can you help me with configuration...
I have channel 50/50 Mbit
and two internal networks 192.168.0.0/24 & 10.0.0.0/24
I need to reserve for ip 10.0.0.10 channel about 20Mbit
and the rest of channel to split equally between all other connected devices...
Tried different tutorials, but with no lock....
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Reserve channel width for ip

Fri May 08, 2015 3:18 pm

Try setting up a simple queue with target = 10.0.0.10 and another simple queue (SFQ is the easiest "shared bandwidth" queue type to use, PCQ is probably the best) after it which just matches all traffic. The queues are processed in order, so as long as the reserved 10.0.0.10 queue comes first, it should process for only the special host.
Limit the shared queue to: max - 10Mbps, and the special host's queue to 10Mbps.

This is the easiest method.
 
HighTower
just joined
Topic Author
Posts: 16
Joined: Wed Feb 18, 2015 4:06 pm

Re: Reserve channel width for ip

Fri May 08, 2015 4:07 pm

sorry, didn't get...
can you provide it with commands?

and if to limit shared queue to 10Mbit - it will be impossible to get more than 10Mbit than?

I want to guarantee 20Mbit to ip 10.0.0.10 and share the rest channel between other clients...
if 10.0.0.10 is not active - share full channel...
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Reserve channel width for ip

Fri May 08, 2015 4:30 pm

sorry, didn't get...
can you provide it with commands?

and if to limit shared queue to 10Mbit - it will be impossible to get more than 10Mbit than?

I want to guarantee 20Mbit to ip 10.0.0.10 and share the rest channel between other clients...
if 10.0.0.10 is not active - share full channel...
You're going to need to use a queue tree in this case, with the parent queue having the limit of 50Mbps. Then your leaf queues are pretty simple - put nothing but possibly another 50Mbps max-limit on the standard shared queue.
Put 50Mbps on the 10.0.0.10 queue as well, but also put a limit-at value of 20Mbps. "Limit-at" is actually a confusing term in my opinion. It's a minimum guaranteed bandwidth (or CIR in telco terminology)

To use queue trees, you'll need to mark all packets with mangle table rules.
packet mark = special or packet mark = default.
Make the 10.0.0.10 queue match packet mark special, and make the SFQ queue match "default" packet mark.

This isn't what you want exactly, but uses the same concepts to do similar things....
http://www.mikrotik-routeros.com/tag/queue-tree/
 
HighTower
just joined
Topic Author
Posts: 16
Joined: Wed Feb 18, 2015 4:06 pm

Re: Reserve channel width for ip

Fri May 08, 2015 8:27 pm

ok, can you tell me if rules I created correct or not:
/ip firewall mangle
add action=mark-packet chain=forward comment="for shaping" dst-address-list=\
    net_192 new-packet-mark=default_pkt
add action=mark-packet chain=forward comment="for shaping" dst-address-list=\
    net_10 new-packet-mark=default_pkt
add action=mark-packet chain=forward comment="for shaping" dst-address=\
    10.0.0.10 new-packet-mark=priority_pkt


/queue type
add kind=pcq name=my_shaping pcq-classifier=dst-address \
    pcq-dst-address6-mask=64 pcq-src-address6-mask=64

/queue tree
add max-limit=50M name=shaping_tree parent=global queue=my_shaping
add name=def packet-mark=default_pkt parent=shaping_tree queue=my_shaping
add limit-at=15M max-limit=50M name=prio_cl packet-mark=priority_pkt parent=\
    shaping_tree priority=1 queue=my_shaping
 
HighTower
just joined
Topic Author
Posts: 16
Joined: Wed Feb 18, 2015 4:06 pm

Re: Reserve channel width for ip

Tue May 12, 2015 10:22 am

no one can comment is this correct or not?