Community discussions

MikroTik App
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Problem in pppoe with Queues

Thu Jun 16, 2016 11:37 pm

Hello everyone
I have problem in queues when i create pppoe server in ether 2 then,
Created new queue and in target putting interface ether 2
And put upload and download load like 1m/1m
Finally apply ok.
Suppose all user's active..
I saw the traffic of queue was not working?
Where is the error?
pppoe server not working with target ether? Only working with ip address if active pppoe server?
I tested if active ether with dhcp without pppoe server and user's active i saw target traffic of queue was worked.
Any one have idea if i create pppoe server and needed add ether of pppoe with queue.
Regards
 
MrBarakat
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Mon Apr 25, 2011 2:30 pm

Re: Problem in pppoe with Queues

Fri Jun 17, 2016 5:19 pm

u maked pppoe server with ip pools and profiles ?? or what
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Fri Jun 17, 2016 8:21 pm

u maked pppoe server with ip pools and profiles ?? or what
Yes
created ip pool
Profile
pppoe server
Secret
What is the problem
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Fri Jun 17, 2016 8:23 pm

The queue can't see this traffic because it's looking for IP addresses, but ether2 isn't carrying IP traffic - it's carrying PPPoE traffic.
In other words - pppoe is like a tunnel, and the only information available on the "outside" of the tunnel is the src/dst MAC addresses for each session's traffic.

You need to specify queueing values in your ppp profiles instead so that the system will dynamically add and remove simple queues for each user as they are authenticated/disconnected.
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Sat Jun 18, 2016 1:16 pm

The queue can't see this traffic because it's looking for IP addresses, but ether2 isn't carrying IP traffic - it's carrying PPPoE traffic.
In other words - pppoe is like a tunnel, and the only information available on the "outside" of the tunnel is the src/dst MAC addresses for each session's traffic.

You need to specify queueing values in your ppp profiles instead so that the system will dynamically add and remove simple queues for each user as they are authenticated/disconnected.
Thank you for replying
I understand from your reply,
Should I doing to add all ip's addresses client from user's our pppoe and that i make static ip for all users from remote address account ,
Then i going to add new queue and write ip's in target address, finally limits download and upload bandwidth.
Regards
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Sat Jun 18, 2016 6:25 pm

No- just specify a queue in the pop ppp profile and the router will dynamically add queues whoever users connect.

Or specify a RADIUS attribute on their account and that will work too.

EDIT:  in the PPP profile.... (stupid autocorrect)
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Mon Jun 20, 2016 12:47 am

No- just specify a queue in the pop profile and the router will dynamically add queues whoever users connect.

Or specify a RADIUS attribute on their account and that will work too.
In your paragraph
"just specify a queue in the pop profile and the router will dynamically add queues whoever users connect."
I need to sharing equal bandwith between all user's in pppoe server, for example
Download 1m
Upload 1m
If i have 10 users in pppoe server, i need sharing equal bandwith between them, and note
If one only active user by pppoe server and 9 user not active then the 1 only user give 1m/1m full bandwith,
And if all user in same time active then traffic sharing equal bandwith.
How can apply that?
Regards
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Mon Jun 20, 2016 5:04 pm

What you want is more of a PCQ application than a per-user-queue application, and there's nothing that directly does exactly what you want - that being give users up to full pipe if available, but strictly limit to X whenever there is load.

In general, the options for bandwidth management are basically in one of a few categories:
  • Limit each user to a contracted amount as "up to X bandwidth" (not guaranteed, but may never exceed)
  • Minimum guaranteed bandwidth (will always get at least X bandwidth, but may get as much as Y if available - this method is pretty good but the danger is if your "guarantees" ever total more than the maximum available bandwidth, things get bad.)
  • Equal sharing with PCQ ~ 1/N bandwidth (for N users) - no individual user parameters (this is the most like what you want)
  • Equal sharing with PCQ - X bandwith max for each user, but divides any shortfall evenly between all users (this is the opposite of what you want, by the way)
So if you use PCQ with no "subqueue" rules, PCQ will try to divide the available bandwidth evenly between the subqueues. However, I'm not sure what the behavior will be if you set the PCQ's target to be the PPPoE server interface (in other words, will the PCQ engine be able to look inside the PPPoE streams to see what src/dst IP addresses are on any given packet?)
Perhaps someone with some hands-on experience with such a configuration can add more to this discussion, but this is theoretically what you want. It may not be doable in practice.
(Does anyone with this kind of a setup working in production have anything to add?)
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Mon Jun 20, 2016 10:40 pm

What you want is more of a PCQ application than a per-user-queue application, and there's nothing that directly does exactly what you want - that being give users up to full pipe if available, but strictly limit to X whenever there is load.

In general, the options for bandwidth management are basically in one of a few categories:
  • Limit each user to a contracted amount as "up to X bandwidth" (not guaranteed, but may never exceed)
  • Minimum guaranteed bandwidth (will always get at least X bandwidth, but may get as much as Y if available - this method is pretty good but the danger is if your "guarantees" ever total more than the maximum available bandwidth, things get bad.)
  • Equal sharing with PCQ ~ 1/N bandwidth (for N users) - no individual user parameters (this is the most like what you want)
  • Equal sharing with PCQ - X bandwith max for each user, but divides any shortfall evenly between all users (this is the opposite of what you want, by the way)
So if you use PCQ with no "subqueue" rules, PCQ will try to divide the available bandwidth evenly between the subqueues. However, I'm not sure what the behavior will be if you set the PCQ's target to be the PPPoE server interface (in other words, will the PCQ engine be able to look inside the PPPoE streams to see what src/dst IP addresses are on any given packet?)
Perhaps someone with some hands-on experience with such a configuration can add more to this discussion, but this is theoretically what you want. It may not be doable in practice.
(Does anyone with this kind of a setup working in production have anything to add?)
I am using PCQ for download and upload
When created pcq but the Rate=0
True on dst for download pcq
And added new
Pcq=0 and true on src address for upload
Finally
Going queue
Add new
Advanced select download and upload them before time created in pcq
And in the same of queue in general limit download and upload
And select target
Finally apply ok
True method?
Step 2:
After step 2
Queue with pppoe server not work
When select target interface ether for pppoe server,
My problem
Queue was not working with interface of pppoe server but,
Should I add all ip's users in target of queue
Note i select static ip for everyone users
Static with remote address secret .
What do you advise me to do Do you agree with the way recent
To queue working with pcq and equal bandwith.
Regards
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Mon Jun 20, 2016 10:44 pm

Try setting the target to be the IP range that your users come from - HTB happens sort of "in between" lots of other steps, so perhaps that's the best way to capture the traffic and police it properly, so that the queueing is done before the time that PPPoE encapsulation takes place / after PPPoE decapsulation takes place.
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Tue Jun 21, 2016 8:46 am

Try setting the target to be the IP range that your users come from - HTB happens sort of "in between" lots of other steps, so perhaps that's the best way to capture the traffic and police it properly, so that the queueing is done before the time that PPPoE encapsulation takes place / after PPPoE decapsulation takes place.
"Try setting the target to be the IP range that your users come from"
I tried to add and put the range of pool in target of queue but the queue was refusal why?
I need to change the target of interface ether TO
range of ip pool
How can do that?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Tue Jun 21, 2016 4:48 pm

The target cannot use ranges. It has to use a CIDR block.
i.e. 192.168.12.0/24 , or 10.12.0.0/16 or whatever prefix describes the IP range.
And yes, your pools should be organized in CIDR blocks like this too - not ranges, because very few things work with ranges.

(I've seen lots of networks that are a pain to manage and expand properly because things are arranged on round numbers for humans (i.e. 30-40 = secure, 41-99 = dynamic, etc) instead of being round numbers for computers. (i.e. 24-31 = secure, 64-127 = dynamic, etc)
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Wed Jun 22, 2016 12:38 am

The target cannot use ranges. It has to use a CIDR block.
i.e. 192.168.12.0/24 , or 10.12.0.0/16 or whatever prefix describes the IP range.
And yes, your pools should be organized in CIDR blocks like this too - not ranges, because very few things work with ranges.

(I've seen lots of networks that are a pain to manage and expand properly because things are arranged on round numbers for humans (i.e. 30-40 = secure, 41-99 = dynamic, etc) instead of being round numbers for computers. (i.e. 24-31 = secure, 64-127 = dynamic, etc)
In my ether of interface i dont active or added ip address in the same ether of pppoe server, but only active ip pool.
For example any user connect with the server it cant get ip address from interface mean dont active dhcp, then if a pass to connect with username and password from pppoe server the user can connect with pppoe server,,
Last the user give ip address to lan from ip pool
My problem in queue with target i can't write range of ip pool, As you said earlier.
Note i have more 200 users in pppoe server that Each one of ip user must be written in target because the method will do work,
Is there an easier way to apply?
Regards
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Wed Jun 22, 2016 4:03 am

If you want to use PCQ then you need to specify a target that covers all hosts who are to share bandwidth fairly. I.e. Target=10.10.16.0/23
When using the global htb, the IPs can live on several interfaces. You could probably insert s few "more-specific-target queues sooner in the list (e.g. Target=10.10.16.32/27) and IPs in this range would match this queue first and thus their bandwidth would not be controlled by the "big" queue.
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Wed Jun 22, 2016 10:18 pm

If you want to use PCQ then you need to specify a target that covers all hosts who are to share bandwidth fairly. I.e. Target=10.10.16.0/23
When using the global htb, the IPs can live on several interfaces. You could probably insert s few "more-specific-target queues sooner in the list (e.g. Target=10.10.16.32/27) and IPs in this range would match this queue first and thus their bandwidth would not be controlled by the "big" queue.
I understand your command
About target like 10.10.16.0/23 i think you mean without pppoe server because i told before time
I dont added ip address with ip, address interface in lan of pppoe server and i saw ip like 10.10.16.0/23 or other one that mean i should add in ip address to interface.
Because in ip pool of pppoe i know should write like for example 10.10.10.0/23 but don't write 10.10.10.2-10.10.10.254

Sorry if i false for understanding your meaning?
Regards
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Problem in pppoe with Queues

Wed Jun 22, 2016 10:33 pm

If you want to use PCQ then you need to specify a target that covers all hosts who are to share bandwidth fairly. I.e. Target=10.10.16.0/23
When using the global htb, the IPs can live on several interfaces. You could probably insert s few "more-specific-target queues sooner in the list (e.g. Target=10.10.16.32/27) and IPs in this range would match this queue first and thus their bandwidth would not be controlled by the "big" queue.
I understand your command
About target like 10.10.16.0/23 i think you mean without pppoe server because i told before time
I dont added ip address with ip, address interface in lan of pppoe server and i saw ip like 10.10.16.0/23 or other one that mean i should add in ip address to interface.
Because in ip pool of  pppoe i know should write like for example  10.10.10.0/23 but don't  write 10.10.10.2-10.10.10.254

Sorry if i false for understanding your meaning?
Regards
I'm not quite understanding what you mean (highlighted in the quote above) - But I take this to mean that you don't have 10.10.10.1 on the LAN of the PPPoE server.
That's perfectly fine - because when you say 10.10.10.0/24 is the target of a queue (not an interface, but exactly 10.10.10.0/24) then this means that if the queue sees a packet with an IP address from 10.10.10.0-10.10.10.255, then this packet should be placed into that queue. If the queue's parent is global, then the queue is not watching any particular interface - imagine you and two friends are in a park somewhere and your friends are throwing balls back and forth to each other over your head. If you see a red ball, you jump up and grab it, but leave any other color balls alone. This is how the Queue will work.
So if your PPPoE customers have IP addresses that will always be inside of the range 10.10.10.0/24 then use that for the target - the netmask of the customers can be /32 - this information isn't present anywhere in the IP header anyway. This IP address does not need to match the interfaces of the router, because the queue doesn't care. The queue is just watching "all packets" for anything with the target range. But because of performance reasons, you cannot specify 'interesting' ranges for queues like 10.10.10.2-10.10.10.5,10.10.10.9-10.10.10.145,10.10.10.147.....
You have to give it a simple network+mask - i.e. 10.10.10.0/24 so that the router can do a fast binary operation on the packet to see if the packet is a match or not.
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Sat Jun 25, 2016 7:54 am

Thank you for your explain
I have idea if you agree
I add 2 rule in mangle
No. 1
Add
Chain forward
Src address 10.10.10.2-10.10.10.254 that mean range of ip pool
Action
Mark-connection
New mark connection :for example name, white -connection
Select true on pass through.
Apply ok
Step 2
Add
Chain forward
Connection mark:select white-connection
Action
Packet mark
New packet mark: white-packet
Remove select on pass through
Apply ok
Mangle was completed
In queues
Add
Name : white
Target:10.10.10.0/24
Limits upolad and download 1m/1m
Advanced
Packet marks :select white-packet
Before i created pcq dowload and upolad (rate=0) sharing equal bandwith.
I can select in advanced of queue to select upolad and download.
All method was true or contain errors?
Regards
 
loveman
Member
Member
Topic Author
Posts: 348
Joined: Tue Mar 10, 2015 9:32 pm

Re: Problem in pppoe with Queues

Mon Jun 27, 2016 11:30 pm

Please answer me
 
abudrammeh
just joined
Posts: 1
Joined: Mon Mar 04, 2019 12:32 pm

Re: Problem in pppoe with Queues

Mon Mar 04, 2019 12:58 pm

No- just specify a queue in the pop ppp profile and the router will dynamically add queues whoever users connect.

Or specify a RADIUS attribute on their account and that will work too.

EDIT:  in the PPP profile.... (stupid autocorrect)
Hi,

I am following your comments on this issue which I am also facing. I have set queue profile as you suggested. However the mikrotik does create queue for each pppoe user and the queue caps are correct. However, the users do exceed the queue limit. When I check under interface traffic I can see that the user queues are not being enforced.
Any spefic advise on this? am using CCR1036 with Router OS 6.44. The box is running both PPPoE and Hotspot services. The hotspot service does enfore the queue limits.
I should also mention that I am using a third party Radius server.


Best Regards
 
airpulse
just joined
Posts: 4
Joined: Sat Jun 05, 2021 4:39 am

Re: Problem in pppoe with Queues

Fri Sep 10, 2021 8:11 pm

No- just specify a queue in the pop ppp profile and the router will dynamically add queues whoever users connect.

Or specify a RADIUS attribute on their account and that will work too.

EDIT:  in the PPP profile.... (stupid autocorrect)
there is only option to add either pcq download or upload how can i add both to the ppp profile

Who is online

Users browsing this forum: Amazon [Bot], mvz71, NetHorror and 82 guests