Configuration Traffic Limiter

I have a problem with the configuration of the incoming traffic. input speed does not work.

SpeedTest : 190.196.123.9/32

traffic upload not WORK

100Mbits Download
100Mbits Upload

Version:

Version: VyOS 1.1.6
Description: VyOS 1.1.6 (helium)
Copyright: 2015 VyOS maintainers and contributors
Built by: maintainers@vyos.net
Built on: Mon Aug 17 03:58:33 UTC 2015
Build ID: 1508170358-a3033d5
System type: x86 64-bit
Boot via: disk
Hypervisor: VMware
HW model: VMware Virtual Platform
HW S/N: VMware-42 09 0f a7 26 a5 8f 06-f9 3e 93 a7 bf ef 18 38
HW UUID: 42090FA7-26A5-8F06-F93E-93A7BFEF1838
Uptime: 17:49:37 up 1 day, 50 min, 1 user, load average: 0.06, 0.03, 0.05

Comands

set interfaces ethernet eth1 traffic-policy in ‘entrada’
set interfaces ethernet eth1 traffic-policy out ‘salida’

IN

set traffic-policy limiter entrada class 51 bandwidth ‘100mbit’
set traffic-policy limiter entrada class 51 burst ‘15k’
set traffic-policy limiter entrada class 51 match user ip destination address ‘190.196.123.29/32’
set traffic-policy limiter entrada class 51 priority ‘20’
set traffic-policy limiter entrada default bandwidth ‘100mbit’
set traffic-policy limiter entrada default burst ‘15k’

OUT

set traffic-policy shaper salida bandwidth ‘auto’
set traffic-policy shaper salida class 51 bandwidth ‘100mbit’
set traffic-policy shaper salida class 51 burst ‘15k’
set traffic-policy shaper salida class 51 match user ip source address ‘190.196.123.29/32’
set traffic-policy shaper salida class 51 queue-type ‘fair-queue’
set traffic-policy shaper salida default bandwidth ‘100mbit’
set traffic-policy shaper salida default burst ‘15k’
set traffic-policy shaper salida default queue-type 'fair-queue

Any help / suggestions anyone can give would be greatly appreciated. :slight_smile:

1 Like

It is pretty much working, isnt it? 96M is kind like 100M (Measuring TCP goodput is rather complex topic…).

Anyway, you are using Limiting/Policing for Ingress, see comparison to Shaping:

A) Try setting bigger bursts ->128k for limiter

B) Redirect traffic to ifb0 and use Shaper for ingress traffic

set interfaces input ifb0 description 'Ingress for eth0'
set interfaces input ifb0 traffic-policy out 'SHAPER-INGRESS'

set interfaces ethernet eth0 redirect 'ifb0'
set interfaces ethernet eth0 traffic-policy out 'SHAPER-EGRESS'

No ingress policy is attached to eth0. Traffic is redirected through ifb0 where “egress” policy is applied.


vyos@NNN-FW-TemplateCliente# set interfaces input ifb1 traffic-policy out entrada
[edit]
vyos@NNN-FW-TemplateCliente# commit
[ interfaces input ifb1 traffic-policy out entrada ]
Interface ifb1 speed cannot be determined (assuming 10mbit)
Configuration error in: traffic-policy shaper entrada default
The bandwidth reserved for this class (100000Kbps) must be less than
the bandwidth for the overall policy (10000Kbps)

how to change the speed ifb1?

Currently only the Shaper works which rate-limits incoming traffic on the applied interface only. To make it work, you will need a separate WAN & LAN interface and apply the shaper policy to both WAN and LAN interfaces.
If your system is setup as an aggregation router(serving multiple networks/customers), then you will have a problem. In which case, you can only limit the download speed. You will have to do the rate-limiting on a switch downstream instead for upload speed.

Dear Yohan
your script is pretty nice and I am running ISP with VYOS and limiting bandwidth for several clients for more than 3 Gbps
Tanvir Ahmed