Questions tagged [tc]

TC is the linux tool used to manipulate the traffic control functionality in the kernel.

Filter by
Sorted by
Tagged with
3 votes
1 answer
5k views

How to limit outgoing traffic per IP Address using Linux TC

I want to limit outgoing traffic per IP address. For example I have a network interface eth0, having 1Gbps of bandwidth. I want to limit the whole network interface to 1Mbps each destination IP ...
1 vote
1 answer
6k views

WireGuard: Limiting download & upload bandwidth

I'm trying to limit download and upload speed of each wireguard peer to 512kbit. The problem is that my following commands, only limits download bandwidth of peer and doesn't limit upload bandwidth. ...
0 votes
1 answer
65 views

How to handle QoS(traffic control) based on physical interface of virtual bridge?

I have a requirement to limit the traffic rate based on different interfaces of the router, such as controlling the upload speed of ssid1 to 10mbps, download speed to 20mbps, lan1 upload speed to ...
0 votes
0 answers
27 views

Ingress traffic shaping with OVS port

I have a ovs topology like this: h1 | | [SW 1] / \ / \ [SW 2] [SW 3] \ / \ / [SW 4] | | h2 Traffic is sent ...
0 votes
0 answers
22 views

Traffic control on an interface for all sessions

On an interface that is connected to a 1G port I want to limit all users/sessions to have no more than 20Mbits download speed individually. I mean If two of them tried to use bandwidth at the same ...
0 votes
0 answers
54 views

How to set speed limit per IP in IP range in Ubuntu

What I want: I've setup a openvpn-server and want the clients in range of 10.8.0.0/21 limit their speed to 10mbit for each IP as a total limit of 100mbit. wan interface : eth0 openvpn interface : ...
0 votes
1 answer
246 views

linux tc + vlan interface

This is my tc simple script. It limit bandwidth based on source ip address and use hashing filter based on /24 subnet. This example filter works but only when this example subnet 10.118.0.0/24 is add ...
1 vote
1 answer
112 views

Using cgroup & tc in linux seems to NOT apply exactly my rates: 10x discrepancy

I'm using the "standard" way that I found everywhere on the internet (including ServerFault) to try and limit the bandwidth of a process, using cgroups & tc. What I see in practice is ...
1 vote
0 answers
337 views

How to limit Wireguard bandwidth

I have Debian 11 server with installed Wireguard with wg0 interface and 3 peers. Server bandwidth speed is 100 MBit and traffic is around 500 GB per month. What I need is: these 3 peers can use 100 GB/...
0 votes
0 answers
98 views

Any way to limit bandwidth per IP in network behind linux router

I whant to limit bandwith of clients from network behind my linux based NAT gateway. My clints is connected via wifi or directly via ethernet to router and receiving their IP address from DHCP. I want ...
0 votes
0 answers
89 views

How can I have different delays for different IP Addresses using tc and netem?

I have been using tc with netem to delay packets being sent from my computer to a specific IP address. I have managed to get this to work but I would like to have unique packet delays to each IP ...
0 votes
1 answer
1k views

Limit bandwidth for incoming packets to specific ip and port

I have a Linux server application running on a specific IP and PORT. Incoming packets need to be manipulated and put into an nfqueue based on sources and ports, for example: iptables -t raw -A ...
1 vote
1 answer
353 views

Linux Traffic Control: What is the difference between qdisc multiq and mq?

By default Linux creates a qdisc mq. I am configuring it on my computer to change some parameters but I found that there are 2 qdiscs that seem to be the same: mq and multiq. I can't find any ...
0 votes
0 answers
94 views

Traffic control with tc qdisc taprio

Currently, I am working on a TSN project and I am trying to implement a TSN scenario in a Ubuntu 20.04 VM. I leverage on tc qdisc command: tc qdisc replace dev gateway-eth0 parent root handle 100 ...
0 votes
0 answers
82 views

TC: link sharing for ingress traffic not working

I was trying to set up an ingress link sharing env. by tc & htb qdisc. and I made two macvlan subinterfaces(say mgmt, data) under a parent physical interface enp8s0f0 and enp8s0f0's speed is 1000 ...
0 votes
0 answers
43 views

Combine netem with pfifo_fast at the root

I am unable to combine netem with pfifo_fast so that at the root I have pfifo_fast and then netem as sub childs on the same interface. I can afford to run sudo tc qdisc add dev <interface_name> ...
2 votes
1 answer
1k views

Linux traffic control u32 hashtable filters based on MAC address

I am currently working with a traffic shaping Linux node. The rule set has grown to about 2500 hosts, all identified specifically by MAC address. The filter configuration is "basic", meaning ...
0 votes
0 answers
100 views

Linux traffic balacning over multiple interfaces using traffic control

I have a server with virtual machines on libvirt. The server has an eth0 external interface. Each virtual machine has its own tap interface (tap0, tap1, tap2, etc.). I need to balance the traffic ...
0 votes
1 answer
3k views

RTNETLINK answers: Invalid argument while specifying packet loss by tc command

I am trying to specify packet loss by tc command on interface (port) 1 of switch part of network I have created using mininet : sudo tc qdisc change dev s1-eth1 root netem loss 0.1% but gettring ...
2 votes
1 answer
1k views

linux traffic control qdisc mq pfifo_fast: where to put netem?

When I list out the qdiscs on my system, I see an mq qdisc and some pfifo_fast qdiscs. The pfifo_fast ones all seem to have a major number that is the same as their parent. Or am I misunderstanding ...
2 votes
1 answer
2k views

Openvpn limit bandwidth

I would like to ask you a question concerning openvpn and the possibility to increase the bandwidth in case I want to transfer files. I have an openvpn server via which I connect to my data center. ...
1 vote
1 answer
2k views

rate limiting traffic for internal ip (TC)

I have configured ikev2 VPN on my server, but there is no tunnel interfaces like openvpn (tun0). So actually, I can't limit the ikev2 vpn speed using tc tool. Example for traffic shapping of openvpn (...
4 votes
2 answers
2k views

HTB.init / tc behind NAT

I have an Ubuntu 10 box that I'm trying to set up as a bandwidth-shaping router. The machine has one WAN interface, eth0 and two LAN interfaces, eth1 and eth2. NAT is configured using MASQUERADE as ...
0 votes
2 answers
3k views

Is there a way to limit bandwidth per ip using HTB + a CIDR range in Linux?

I can create rules to limit a entire subnet or to limit individual ip addresses with tc and htb. I am looking to use CIDR ranges to keep things somewhat elegant. The machines in question are all ...
4 votes
1 answer
4k views

Meaning of requeues of tc command

I ran this tc bellow and it outputs requeues with high number, do you know what this requeues means? By the way, it keeps increasing over the time. I look at man tc but I couldn't find anything. $ ...
2 votes
2 answers
3k views

tc netem possibly missing

I have a VPS running Ubuntu 10.04 that I want to simulate network latency on. It looks like tc is what I want to use, and I pulled this command from the examples from here: http://www.linuxfoundation....
0 votes
1 answer
2k views

linux tc: unstable rate using tbf qdisc

This is the first time I am experimenting with tc. What I am trying to achieve is to limit the download rate that passes through a Virtual Machine that acts as gateway. The VM has two Ethernet ...
1 vote
1 answer
2k views

Limit monthly traffic per interface

I'm trying to deploy an application for a limited monthly traffic. Please can you tell me how can I do this ? I need to limit traffic on an interface under linux.
0 votes
1 answer
186 views

Huge lag with linux Traffic Control - TBF failed?

I've been working with Ubuntu18.04 and trying to shape the traffic with linux tc. Things went well in the passed few months. Here's my commands: # init queue sudo tc qdisc add dev enp2s0 root handle 1:...
1 vote
1 answer
1k views

How to apply `fq_codel` to balance traffic in multiple VLAN connections?

I have an Ubuntu server connected to multiple VLAN networks over a single physical 1 Gbps network port. The network connections are configured via /etc/network/interfaces like this: auto lo iface lo ...
9 votes
2 answers
22k views

deleting filters in tc

I have added a filter in tc as follows: tc filter add dev eth0 parent 1: protocol ip handle 6 fw flowid 1:6 This should be sending packets marked by iptables with '--set-mark 6' to class 1:6. The ...
3 votes
1 answer
3k views

Multiqueue tun/tap interface

I am trying to understand how Multiqueue tuntap interface works. Following the instructions provided at: https://www.kernel.org/doc/Documentation/networking/tuntap.txt I was able to create multiple ...
0 votes
1 answer
522 views

HTB "rate" parameter limits available bandwidth

Good day, I have the following situation: 4 TCP streams of data from one machine to another. Each streams has its own destination TCP Port. 4 streams have different priorities : high, medium, low, ...
0 votes
1 answer
217 views

Where does u32 packet classifier start

I have a functioning traffic classifier that uses raw packet offsets to match on the source and/or destination MAC addresses of the packet. The filter uses negative offsets as the default appears to ...
0 votes
1 answer
46 views

Which values for Netem to emulate WAN?

I am developing a distributed application, which I'm currently running on a cluster of Ubuntu VMs over LAN. I'd like to evaluate the performance of my application over WAN. So I decided to use Netem ...
1 vote
0 answers
174 views

tc prio qdisc example not working

I'm used tc to priority send packets to port 9999. tc qdisc add dev eno1 root handle 1: prio priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 tc filter add dev eno1 protocol ip parent 1: prio 0 u32 match ip ...
1 vote
0 answers
66 views

How to see contents of output queue of NIC in Linux and introspect frame delay

I am experimenting with tc tool to implement prioritization of specific data coming from my computer and would like to see exatly how the frames are scheduled and how much time they spend in the qdisc ...
1 vote
0 answers
714 views

Use tc qdisc netem to emulate delay, but ssh gets slow down

I have 3 VMs, A, B, and C. These VMs are all under the same network. On VM A, I use the following commands to introduce a delay to VM B. tc qdisc add dev eth0 root handle 1: prio tc filter add dev ...
3 votes
3 answers
5k views

TC hashing filters - single rule deletion

For traffic shaping I'm currently using a setup that looks exactly like the setup from LARTC, on this page: http://lartc.org/howto/lartc.adv-filter.hashing.html I have a simple problem with that - ...
1 vote
0 answers
294 views

Dynamic bandwidth in Tc (Bandwidth Changes over time)

Basically I wanted to change the bandwidth after every 10 seconds using tc. So how to do that thing in tc. This is my script. !/bin/bash # # tc uses the following units when passed as a parameter. # ...
0 votes
1 answer
221 views

TC Corruption of Packets Ingress

I’m new to tc & this may be naive question but correct me if I’m wrong tc qdisc change dev eth0 root netem corrupt 5% Does above command corrupt ingress packets only ? If Yes, does outgress ...
1 vote
0 answers
211 views

Why the CLASSIFY action isn't applied by the iptables?

Why might the following simple iptables rule not work: iptables -t mangle -A POSTROUTING -p tcp --dport 1194 -j CLASSIFY --set-class 1:10 ? I'm trying to prioritize outgoing traffic to VPN. I am ...
0 votes
1 answer
2k views

Why I can't limit bandwidth with tc command

I want to limit bandwidth for interface eth1, I read command in this link. sudo tc qdisc add dev eth1 root handle 1:0 htb default 10 sudo tc class add dev eth1 parent 1:0 classid 1:10 htb rate ...
5 votes
1 answer
23k views

Linux Traffic Control: qdisc mq

On my Linux system I see this: # ip link list .... 2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 .... What's qdisc mq? In http://lartc.org/lartc....
1 vote
0 answers
239 views

How can I limit incoming/outgoing connection speeds based off IPs?

I want to limit the speed each IP can download/upload files for every application on my server to 1Mb/s Example IP 192.168.0.1 is downloading at sustained 900Kb/s through FTP server if the IP then ...
2 votes
1 answer
3k views

traffic control (tc) filter not working

i am using Debian and am trying to limit the upload-bandwidth on an ip basis. The configuration is the following: #!/bin/bash tc=/sbin/tc $tc qdisc del dev eth0 root 2> /dev/null > /dev/null $...
1 vote
1 answer
1k views

packet loss only on Tx using tc(Traffic Control) in Linux

I'm aware that one can introduce packet loss in a Linux machine using tc. For example: tc qdisc change dev eth0 root netem loss 10% However, is it possible to specify a traffic direction where the ...
1 vote
1 answer
127 views

Does tc guarantee network bandwidth for a process or run as best effort?

I have a tc rule as follows: qdisc tbf 1: dev bwp93ce2ea9d929 root refcnt 2 rate 100Mbit burst 100Kb lat 25.0ms Is this rule guarantee network bandwidth to be 100Mbps or it'll throttle if not enough ...
1 vote
1 answer
1k views

Reduce the network traffic priority in Linux

I want to reduce the priority of specific network traffic using tc in particular tc-u32 in my Linux server. In other words all other traffic must have higher priority than traffic with specified IP-...
0 votes
1 answer
2k views

how to proritize UDP port in tc

I have this TC code sudo tc qdisc add dev eth0 root handle 1: prio sudo tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport xxxx 0xffff flowid 1:1 where XXXX is the port number. ...

1
2 3 4 5