Rate-multiplier option in shaper of accel-ppp

I use radius based rate limits, but my radius system and vyos have different units of measurement(Mikrotik is a good example)
When my speed limit is 30m, the value transmitted by radius is 31457280, while the value vyos wants is 31457.

This problem can be solved on the radius side, but for routers with many radius clients and different brands, modifying radius is not a good way
I made it work by modifying the “[shaper]” section in “/var/run/accel-pppd/pppoe.conf

I added:“rate-multiplier=0.001
This is my configuration:

[shaper]
rate-multiplier=0.001
verbose=1
vendor=Mikrotik
attr=Mikrotik-Rate-Limit

But restarting and modifying the PPPoE configuration will overwrite my additional configuration, so I’m at vyos-postconfig-bootup.script and /config/scripts/commit/post-hooks.d have been added:

grep -Fxq 'rate-multiplier=0.001' /var/run/accel-pppd/pppoe.conf || ( sudo sed -i '/\[shaper\]/a rate-multiplier=0.001' /var/run/accel-pppd/pppoe.conf ; run restart pppoe-server )

This is clumsy. I hope to add an option “set service pppoe-server authentication radius dynamic-author rate-multiplier xxx” to easily realize this function

https://accel-ppp.readthedocs.io/en/latest/configuration/shaper.html

rate-multiplier=n
By default is rate-multiplier=1
Due to accel-ppp operates with rates in kilobit basis if you send rates in different basis then you can use this option to bring your values to kilobits. For vendor=Mikrotik often sets rate-multiplier=0.001

Could you create a feature request at https://phabricator.vyos.net/

Sorry, what I have to say is that my account on the phasiciator always displays disabled status after registration. I don’t know why. I’m confused

Link to the feature request ⚓ T4373 PPPoE-server add multiplier option for shaper

@vhudie121 Will be present in the next rolling release after 20220516xxx
Could you test it?

OK, I will download the latest version and test this function. Thank you very much!

Hello, the version I use is VyOS 1.4-rolling-202205200217

I execute the command

set service pppoe-server authentication radius rate-limit multiplier 0.001

It seems that it cannot be successfully executed. Please help me see if the command I execute is correct,Thank you!

vyos@vyos# set service pppoe-server authentication radius rate-limit multiplier 0.001

/usr/libexec/vyos/validators/numeric: unknown option ‘–float’.
Usage: /usr/libexec/vyos/validators/numeric [OPTIONS]
–non-negative Check if the number is non-negative (>= 0)
–positive Check if the number is positive (> 0)
–range Check if the number is within a range (inclusive)
-help Display this list of options
–help Display this list of options

Multiplier needs to be between 0.001 and 1000
Value validation failed
Set failed

[edit]
vyos@vyos# set service pppoe-server authentication radius rate-limit multiplier <0.001>

/usr/libexec/vyos/validators/numeric: unknown option ‘–float’.
Usage: /usr/libexec/vyos/validators/numeric [OPTIONS]
–non-negative Check if the number is non-negative (>= 0)
–positive Check if the number is positive (> 0)
–range Check if the number is within a range (inclusive)
-help Display this list of options
–help Display this list of options

Multiplier needs to be between 0.001 and 1000
Value validation failed
Set failed

[edit]
vyos@vyos# set service pppoe-server authentication radius rate-limit multiplier --float 0.001

Configuration path: service pppoe-server authentication radius rate-limit multiplier --float [0.001] is not valid
Set failed

[edit]
vyos@vyos# set service pppoe-server authentication radius rate-limit multiplier ‘0.001’

/usr/libexec/vyos/validators/numeric: unknown option ‘–float’.
Usage: /usr/libexec/vyos/validators/numeric [OPTIONS]
–non-negative Check if the number is non-negative (>= 0)
–positive Check if the number is positive (> 0)
–range Check if the number is within a range (inclusive)
-help Display this list of options
–help Display this list of options

Multiplier needs to be between 0.001 and 1000
Value validation failed
Set failed

[edit]

It used an old validator, we’ll find out soon

Upate
Will be fixed in the next rolling release
Thanks