How to configure traffic shaping?

Hello.

I have a VyOS VM I am trying to use to limit UDP bandwidth to particular IPs.

Default Traffic - No speed limit
Traffic out to 1.2.3.4: Max 800Mbps
Traffic out to 2.3.4.5: Max 800Mbps

Here’s my current shaper settings:

class 2 {
bandwidth 800mbps
match server1 {
ip {
destination {
address 1.2.3.4/32
}
}
}
}
class 3 {
bandwidth 800mbps
match server2 {
ip {
destination {
address 2.3.4.5/32
}
}
}
}
default {
bandwidth 10gbps
}

When I try to commit I get the following error:
[interfaces ethernet eth0 traffic-policy out upload-policy ]
Interface eth0 speed cannot be determined (assuming 10mbit)
Configuration error in: traffic-policy shaper upload-policy default
The bandwidth reserved for this class (80000000Kbps) must be less than
the bandwidth for the overall policy (10000Kbps)

[[interfaces ethernet eth0]] failed
commit failed.

What am I missing?

Can you provide more information, output of show tech-support output will help
it looks like it can be a bug caused by failed nic speed detection.
But for now it’s just assumption

I figured it out… needed to define bandwidth setting at the top level of the shaper policy. however 10gbps as a setting fails with “Invalid Rate” I had to set it down to 4gbps.

Hey, glad that you found solution
it will be great if you can submit this as a bug in https://phabricator.vyos.net
Thanks!