Speed limit on network interface using TC

I will give an example of a speed limit of up to 3.3 Gb/s on a network interface on Ubuntu Server 16.04:

/sbin/tc qdisc del dev ens2f0 parent ffff:
/sbin/tc qdisc add dev ens2f0 handle ffff: ingress
/sbin/tc filter add dev ens2f0 parent ffff: protocol ip prio 50 u32 match ip dst police rate 3300mbit burst 330k mtu 30000 drop flowid 1:0


tc filter show dev ens2f0 parent ffff:
tc -s -d class show dev ens2f0
tc -s -d class show dev ens2f0 parent ffff

See also my articles:
Configuring the Network in Linux
nload – monitoring network interface bandwidth
Installing and using jnettop

Подписаться на IT Blog (RU) по Email
Subscribe to IT Blog (EN) by Email

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a Reply