I also can’t understand also what “bandwith” means for “shaper”
shaper hotspotdownload {
bandwidth 50mbit
Does it mean that I am limiting bandwith on this interface to 50 and then splitting it in classes (or default bandwith)?
Thanks in advance for any clarification of this topic!
According to the showed configuration, you are not limiting or shaping per IP or host, you are limiting any inbound traffic coming from that interface and you are shaping every outbound traffic going through that interface.
Does it mean that I am limiting bandwith on this interface to 50 and then splitting it in classes (or default bandwith)?
Yes, that’s it, it is shaped as a whole to 50mbit. And that will be your reference when configuring classes, I mean you will be able to define classes with absolute values (never higher than 50mbit) or with percentages of that reference bandwidth.
And yes, documentation on Traffic Policy needs some love, we will give it soon : )
If you don’t want to use PPPoE, I would use the Stochastic Fairness Queuing algorithm (VyOS’ faire-queue) to have a more or less proportional fair share of every conversation. fair-queue won’t take only source IP address into account for its calculations, but source port and destination address too, but probably the final results will somehow meet what you are looking for.
In the case your physical link is not really 50mbit, you will have to set fair-queue inside a shaper policy so that fair-queue really takes effect.
That would be:
set traffic-policy shaper hotspotdownload bandwidth '50mbit'
set traffic-policy shaper hotspotdownload default bandwidth '50mbit'
set traffic-policy shaper hotspotdownload default queue-type 'fair-queue'
For the inbound traffic I cannot think of something similar to a per-user policy without using PPPoE.
For “ingress shaping” you may want to use the IFB (Intermediate Functional Block) workaround, which lets you redirect every incoming traffic to an in-between virtual interface to which you can apply
outbound policies.
So, you would need to do:
set traffic-policy shaper hotspotupload bandwidth <bandwidth>
set traffic-policy shaper hotspotupload default bandwidth <bandwidth>
set traffic-policy shaper hotspotupload default queue-type 'fair-queue'
set interfaces input ifb0 traffic-policy out hotspotupload
set interfaces ethernet <ethX> redirect ifb0