Community discussions

MikroTik App
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

How to shape local traffic?

Sun May 27, 2007 4:09 pm

Network is separated in three subnets. I have MT with lan adapter for each net. Each net is in its own ip range and routing is set to allow comunication among nets. Internet link is not in question here.

Local trafic is not shaped at all, menaing, each user may take up all physicaly available bandwidth.

I have noticed that it often happens that one user from one subnet can run download (or upload) from other two subnets using all or almost all available bandwidth. Others then have problem with using network because all bandwidth is used by single user.

What I want to achieve is to set shapping in that manner that one user may take all resources if he is using them alone, but if there are several active users bandwidth should be shared equaly.

I already looked at MT Manual and Wiki and coul not get to the right soulution for this.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Tue May 29, 2007 10:31 am

As I expected, questions about queues always stay unanswered...
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: How to shape local traffic?

Tue May 29, 2007 10:50 am

This was discussed many times in this forum. You must add PCQ queues for download and upload. Search the forum and you will find answer.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Tue May 29, 2007 10:25 pm

There is no answer for this. all quueue related stuff is targeted to shaping to outgoing internet link.

I have diferent need here.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: How to shape local traffic?

Wed May 30, 2007 12:35 pm

Outgoing incoming or whatever link, it doesn't matter, idea is always the same.
I really don't understand where is the problem:
* mark trafiic
* add pcq for download and upload
* add queue

It's so simple.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Wed May 30, 2007 3:11 pm

I've done that and got nothing. I mean, still one client may take all resources even if there are others using the same link.

That's why I ask for help.
 
niobe
just joined
Posts: 3
Joined: Wed May 30, 2007 8:48 pm

Re: How to shape local traffic?

Wed May 30, 2007 9:14 pm

Hi,

You cannot shape traffic between two devices on same subnet using mikrotik because traffic is not routed using it. Two devices on same subnet uses direct connection instead of going through a firewall. But you may try to shape the traffic using QoS and rate limiting enabled switch etc.

I hope my answer helps!
 
valens
Trainer
Trainer
Posts: 244
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Re: How to shape local traffic?

Thu May 31, 2007 8:14 am

please copy-paste your rule. mangle, queue....
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Fri Jun 01, 2007 9:20 am

You cannot shape traffic between two devices on same subnet
Of course. I am not trying that.
please copy-paste your rule. mangle, queue....
/queue type set wireless-default name="wireless-default" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000

/ip firewall mangle add chain=forward out-interface=wlan-apcd-servcon action=mark-packet new-packet-mark=wlan-apcd-e passthrough=yes comment="" disabled=no

/ queue tree add name="wlan-apdc-e" parent=global-out packet-mark=wlan-apcd-e limit-at=0 queue=wireless-default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no

Queue made this way shows the same traffic as wireless interface, so i guess it matches connections properly. but, when i check with torch, I can see that one IP can use all traffic and others are struggling to get any.

One more question. If I make siple queue that matches all trafic on one interface, and set its' queue-type to one of pcq type, should all connections matching this queue also get equal bandwidth?
 
valens
Trainer
Trainer
Posts: 244
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Re: How to shape local traffic?

Sat Jun 02, 2007 7:50 am

For mangle, do not specify out-interface. Just left it blank.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Sat Jun 02, 2007 10:36 am

I've set out interface to narrow influenced connections, just to make it easier to check if it works.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Sat Jun 09, 2007 9:46 pm

Today I set some time to experiment. Here is what I found out.

If everything is set as I stated few posts up, there is no equal bandwidth share. Who gets to the bandwidth first, he takes it all.

But, if I set pcq-rate in queue type to some low value, (for example 2M) then, no one could get more than set rate and bandwidth is shared among different users. But, my link is 5.5Mbit, and I want each user to be able to use all bandwidth if he is alone on link, and to share if there are more. So, if I set pcq-rate to 5M, then limit for each user in queue is 5Mbit, and first one who gets it, gets it all, there is no equal bandwidth share among users.

This does not confir5m what MT manual says. I may be setting something wrong, but this is all to simple and straightforward that I cannot see what could I do wrong.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Mon Jun 11, 2007 11:38 pm

No help?
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 982
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: How to shape local traffic?

Tue Jun 12, 2007 11:08 pm

The issue is that you are wishing to allow your end users to eat all the BW if needed.. Typically FIFO works well, as it will balance the connections to the best of its ability. PCQ will still allow for all of the bw to be used. However, if user 1 starts a download, and is running at 500k or so, the next user start, they will see something in the area of 220k to 260k. The first user will see the 500k for a while, until the download averages down to the 250k mark.

Thats the idea. Another simple option is to put the PCQ to burst to 5 meg (I belive you can burst on it) and then drop the mdown to something like 1 meg after 1-2 mintues. This would keep your resourcses free as needed.

Just some thoghts.

Dennis Burgess
mikrotikconsulting.com
http://www.mikrotikconsulting.com
dmburgess@mikrotikconsulting.com
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How to shape local traffic?

Tue Jun 19, 2007 10:53 pm

Well, what you say is what manual says, but even after waiting for quite a while, the first user who gets bandwidth is keeping using it. it is not shared to others. That's why O am confused.

I thought about bursting, but it would not actually do what I want: to let single user take whole bandwidth and if some other user shows up bandwidth to be equally shared among them.
 
alaaghazi
just joined
Posts: 11
Joined: Mon Jun 11, 2007 10:08 am

Re: How to shape local traffic?

Wed Dec 26, 2007 10:46 pm

Hi,

You need to mark the connection first then the packet

Who is online

Users browsing this forum: Bing [Bot], syadnom and 43 guests