Community discussions

MikroTik App
 
slv
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Jun 17, 2013 8:54 pm

PCQ in multiple LANs with SNAT - problem

Sat Apr 02, 2016 9:38 pm

Hello

I know that You wil answer could be RTFM ... but beleave me .. I spend many hours on reading/googling before I created this topic.

My configuration is a bit different/complicated that regular ones that are commonly used.

I have 3 LAN (as subinterface/VLAN on one ethernet port) and one WAN port. Every LAN i SNATet to it's public IP.
I'd like to proritize traffic from/to internet only. I'm not using bridge at all.

I'd like to configure PCQ to give my users (50 users) equall bandwith so according to
http://wiki.mikrotik.com/index.php?titl ... edirect=no
it should be really simple ....
But I have couple questions/daubts:
- is it in my scenario I should mangle on FORWAD or PREROUTING?
- I'm using 6.35 ROS and there isnt "global-in/global-out" but only "global" queue - is it the same?
- if "global" replaced "global-in" how to get "global-out"?
- I checked flow diagram but now I'm completelly lost - please point me in right direction
2016-04-02_203303.jpg
Now I have code:
/ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=LAN-down-con passthrough=yes src-address-list=Local_LANs comment="mark client traffic" disabled=no 
add action=mark-packet chain=forward comment="" disabled=no new-packet-mark=all_packet passthrough=no
Local_LANs=192.168.0.0/16
Is this code will properly mark download traffic from internet?

With such mangle applied I see in "connection" tab connection that has "unknown 8" or "unknown 6" and of course a lot of "LAN-down-con". What does it mean unknown 8 ir 6? why they appear?


I hope that someone could help me solve my problem.

With regards
SLawek
You do not have the required permissions to view the files attached to this post.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: PCQ in multiple LANs with SNAT - problem

Sun Apr 03, 2016 12:29 am

ROS 6.x packet flow: http://wiki.mikrotik.com/wiki/Manual:Packet_Flow_v6

Changes from ROS 5 to 6: http://forum.mikrotik.com/viewtopic.php?t=67037

If all that you want is equal bandwidth sharing amongst all users, you don't need mangle nor Queue Tree, can use simple queues with queue type pcq-download/pcq-upload (advanced tab) as stated at the end of the mikrotik wiki page you linked to in your post.
 
slv
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Jun 17, 2013 8:54 pm

Re: PCQ in multiple LANs with SNAT - problem

Sun Apr 03, 2016 12:19 pm

Hello

Yes - first step is to make equall bandwith for users. As stated in Wiki
/queue simple add target-addresses=192.168.0.0/24 queue=PCQ_upload/PCQ_download
Of course it doesn't working because is outdated? It's another time when I found errors on Wiki page.

Please help me to correst and I will ask support to corect this entry - It will help in the future peaoples to use Wiki documentation without frustration.

In my opinion this code should be:
 /queue simple add target=192.168.0.0/16 queue=pcq-upload-default/pcq-download-default
Please explain me why on Wiki is 192.168.0.0/24 not a 192.168.0.0/16? in my opinion should be 192.168.0.0/16 to cover every most common used 192.168 network adressess.

It seems to be working now, but I think that is is not enought. What about connection parameters?
Do I need to put it in General tab of "queue3" (why its name is queue3 not 2 as is in topic that You putet) MAX LIMIT for download and upload?
How to change this parameter using CLI?


Regards
Slawek
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: PCQ in multiple LANs with SNAT - problem

Sun Apr 03, 2016 2:28 pm

Of course it doesn't working because is outdated? It's another time when I found errors on Wiki page.
Seems that documentation is from a time where there weren't predefined queue types, so you had to create them with the desired parameters, and name those queue-types as you wish.

ROS comes now with pre-defined queue-types, so its possible now to refer by them.
Please explain me why on Wiki is 192.168.0.0/24 not a 192.168.0.0/16? in my opinion should be 192.168.0.0/16 to cover every most common used 192.168 network adressess.
That's just an example, you are the one in the better position to decide whose subnets should be the target of this simple queue.
Do I need to put it in General tab of "queue3" (why its name is queue3 not 2 as is in topic that You putet) MAX LIMIT for download and upload?
That's just a sequential name auto generated by winbox, you can rename it as you see fit.
How to change this parameter using CLI?
Tips:

1.- Modify the simple queue (follow wiki page for target, max-limit and limit-at parameters reference) as your liking, then open a New terminal, and issue
/queue simple export
You'll be able to see how values from Winbox translate to CLI syntax.

2.- While in a cli prompt menu, hit the tab key on your keyboard, it will show possible commands and parameters in a contextually-aware fashion; will also autocomplete them.

3.- See http://wiki.mikrotik.com/wiki/Manual:Console
 
slv
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Jun 17, 2013 8:54 pm

Re: PCQ in multiple LANs with SNAT - problem

Sun Apr 03, 2016 4:02 pm

Hello

So in my case, I have 192.168.11x.0/24 - should I put there every network address or use 192.168.0.0/16? Is that make change to ROS?

Do I need to put it in General tab of "queue3" MAX LIMIT for download and upload?
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: PCQ in multiple LANs with SNAT - problem

Sun Apr 03, 2016 10:04 pm

As you see fit, you should set it so it covers all the networks you want to apply that fair bandwidth share.

Yes, you have to, it is needed to know the total bandwidth available so that algorithms can operate effectively.

Who is online

Users browsing this forum: dlevanic, Florian, gianry, surek and 57 guests