Qos per IP bandwidth limit/shape - little help please

qos per IP bandwidth limit/shape - little help please

I’m still new to Vyos , but starting to get comfortable with it.
I am trying to get a grasp how to configure VyOS to limit bandwith in/out per IP.

Here is a basic example:
interface ethernet eth0 ( my outside Internet facing interface )
.
interface ethernet eth1 ( my inside Interface facing customers )

What I want to do ( for my customers behind my eth1 interface ):
Customer # 1 ( 192.0.2.2/32 desired BW Download-75-Meg & Upload-25-Meg )
Customer # 2 ( 192.168.1.18/32 desired BW Download-10-Meg & Upload-5-Meg )
Customer # 3 ( 100.64.8.88/32 desired BW Download-75-Meg & Upload-25-Meg )

In real life , I have thousands of customers and about 10 different account speed types.
I am looking for a basic/simple VyOS configuration. After I get the basics down and understood , then I should be able create a procedure to do the following:

  • add new customer IP address x.x.x.x/32 desired BW Download-X-Gig & Upload-Y-Gig
  • remove a customer and their qos settings ( as if a customer has gone away )
  • modify a customer bandwidth settings ( if a customer upgrades or downgrades their speeds )

After I have a MOP for the above , then I hope to create a software script/API in my Sonar ISP management system to auto-perform the functions I am trying to understand above.

Thanks for any help - I hope the above example has an easy solution for what I am asking how-to help on.

edit: note - I am testing on one of the free latest nightly VyOS builds.

North Idaho Tom Jones

Vyos does not currently support rate-shaping based on IP/Subnet.

The way to achieve what you want at the moment would be a seperate subinterface for each customer (vif) and to shape on that.

tjh - thanks for your reply.

I was playing around with
traffic-policy limiter -and- traffic-policy shaper
and I was able to get some interface shaping working - but it was not want I wanted.

Below was my first somewhat working configuration:
set qos interface eth1 ingress FromCust000
set qos policy limiter FromCust000 default bandwidth 25mbit
**** Upload was limited to about 25-Meg - download was not limited
then later I addes this below:
set qos interface eth0 ingress ToCust000
set qos policy limiter ToCust000 default bandwidth 75mbit
**** Upload was limited to about 25-Meg - download was limited to about 75-Meg

So am I correct based on old VyOS search info I found that there is no working functional equivalent of this:
set traffic-policy limiter FromCust000 class 51 match user ip destination address ‘66.35.15.117/32’
or
set traffic-policy shaper ToCust000 class 51 match user ip source address ‘66.35.15.117/32’
where I would then just cookie-cutter paste in additional IP address & rates

Thanks

North Idaho Tom Jones

That’s correct - there’s no simple way to apply rate-shapes to IPs, either individual /32s or subnets.

Have a good read of this, especially the shaper section.

You could do something like what’s listed in the example:

set traffic-policy shaper MY-HTB bandwidth '50mbit'
set traffic-policy shaper MY-HTB class 10 bandwidth '20%'
set traffic-policy shaper MY-HTB class 10 match DSCP ip dscp 'EF'
set traffic-policy shaper MY-HTB class 10 queue-type 'fq-codel'
set traffic-policy shaper MY-HTB class 20 bandwidth '10%'
set traffic-policy shaper MY-HTB class 20 ceiling '50%'
set traffic-policy shaper MY-HTB class 20 match PORT666 ip destination port '666'
set traffic-policy shaper MY-HTB class 20 priority '3'
set traffic-policy shaper MY-HTB class 20 queue-type 'fair-queue'
set traffic-policy shaper MY-HTB class 30 bandwidth '10%'
set traffic-policy shaper MY-HTB class 30 ceiling '50%'
set traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip source address '192.168.30.0/24'
set traffic-policy shaper MY-HTB class 30 priority '5'
set traffic-policy shaper MY-HTB class 30 queue-type 'fair-queue'
set traffic-policy shaper MY-HTB default bandwidth '10%'
set traffic-policy shaper MY-HTB default ceiling '100%'
set traffic-policy shaper MY-HTB default priority '7'
set traffic-policy shaper MY-HTB default queue-type 'fair-queue'

How well that would work/scale though, I don’t know, especially when shared between multiple customers.

tjh - thanks again for your reply

Re: … You could do something like what’s listed in the example:

Well , I’ve been trying to follow many examples and with this example , this is what I get:

tjadmin@VyOS-Lab-BW-Shaper-LabTest01# set traffic-policy shaper MY-HTB bandwidth ‘50mbit’

Configuration path: [traffic-policy] is not valid
Set failed

Sooo , I don’t know if this is an example for an older version of Vyos - or am I missing something ?

North Idaho Tom Jones

What version of Vyos are you using? I have linked the 1.3 docs sorry, check the 1.5 docs which is probably what you’re using.

tjh, again - thanks for your reply

Today, I updated/u[graded my VyOS using this command below:

How I upgraded this VyOS router:
add system image https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.5-rolling-202406250020/vyos-1.5-rolling-202406250020-amd64.iso

My older 1.5 rolling-nightly-build was also doing same thing.
So , Should I assume some or many commands and examples are not interchangeable between 1.3 & 1.5 ( including traffic-policy limiter(s) -and- traffic-policy shaper(s) ?

North Idaho Tom Jones

The hierarchy for 1.4/1.5 is set qos

1 Like

Just read the 1.5 docs - they have updated examples.

It seems you need configure BRAS and send speed via RADIUS or manually.
It is possible.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.