Questions tagged [tc]

Tc is used to configure Traffic Control in the Linux kernel.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

How does the tc-tbf command work when trying to perform bandwidth limiting on a file transfer?

I am running code on an ec2 instance with two docker containers installed on it. I am trying to send a file from one container to the other. I want to limit the bandwidth to 20 MB/sec and send a file ...
user avatar
1 vote
0 answers
45 views

How can I limit bandwidth per connection using tc?

I am pretty new to Linux and tc command and lately I have been looking for a solution to limit bandwidth per connection using the tc command. I have a server application that handles requests from ...
user avatar
  • 11
1 vote
0 answers
21 views

Add extra latency on top of existing tc qdiscs

On a system with an existing multi-stage qdisc setup, we need to introduce extra latency (at least fixed, but fixed with a small variation would be a nice option to have). The canonical way to do this ...
user avatar
  • 1,551
0 votes
0 answers
23 views

Does tc (traffic control) enqueue packets or frames?

Assume we are working with TCP/IP connection. According to https://wiki.linuxfoundation.org/networking/kernel_flow tc works on Layer 2. However, everywhere else in the internet (man, lartc, ..) the ...
user avatar
0 votes
1 answer
59 views

Setting the throughput with TC QDISC affects TCP but no UDP

I am new to tc qdisc and I have been creating a script to change throughput, delay and losses. However, when I try to change the throughput levels I only see an effect on TCP traffic and not on the ...
user avatar
  • 1
0 votes
0 answers
25 views

Cannot get the full throughput from the specified TCP pacing rate

I am writing a TCP kernel module that needs pacing. Based on TCP BBR, in the kernel module, I first set the pacing status in my init function: cmpxchg(&sk->sk_pacing_status, SK_PACING_NONE, ...
user avatar
0 votes
0 answers
143 views

Illegal "match" error when applying Linux tc, u32 filters mask

I want apply the following rules for TOS based traffic shaping. All rules works but the final rule which mask the IP header shows illegal "match" error sudo tc qdisc del dev tun0 root handle ...
user avatar
0 votes
1 answer
346 views

How to delay traffic and limit bandwidth at the same time with tc (Traffic Control)?

I want to throttle bandwidth and add delay to a network interface to simulate satellite communication. For example 800ms delay and 1mb/s. The following limits the bandwidth correctly but does not ...
user avatar
  • 9
0 votes
0 answers
20 views

Constrain bandwidth on a network interface

I want to limit bandwidth on the wlp2s0 network interface of my laptop. As far as I understood tc, it should be the tool to go. So I tried the following: tc qdisc add dev wlp2s0 root handle 1: htb ...
user avatar
  • 179
0 votes
0 answers
48 views

tc traffic shaping with HTB and CQB causes packet transmission gap inconsistencies

I am sorry if this is duplicate of https://serverfault.com/q/1076769/822163. I created that first and then realized the Linux and Unix stack exchange is the right place. Problem: When the tc HTB or ...
user avatar
0 votes
0 answers
116 views

linux tc's (traffic control) fw filter is not working

I am trying to modify the wondershaper script for a different use-case. So, I am trying to change the following to filter (Refer to line 253) to fwmark filter so that I can set up different download ...
user avatar
0 votes
0 answers
75 views

qdisc netem is adding too much delay

I'm running the following command in order to simulate delay + jitter on a veth pair (Mininet). sudo tc qdisc add dev h1-eth0 root netem delay 100ms 5ms When only specifying a 100ms (without the 5ms ...
user avatar
0 votes
0 answers
108 views

Shaping priority on SSH forwarded connections

I have a system where clients establish reverse tunnels from ports on the server, either to local ports on the client or to some other addresses, and then the server starts sending all sorts of ...
user avatar
  • 1
0 votes
0 answers
29 views

Linux Traffic Control (tc) - Enforces Only Average Bandwidth Usage or Also Prevents Spikes

I would like to "level off" bandwidth spikes coming out of Kubernetes pod. Setting Linux tc to 10MB enforces average usage of 10MB or also prevent spikes of over 10MB? Is tc the way to ...
user avatar
  • 1
0 votes
1 answer
402 views

can I use multiple qdiscs per device?

Can I add multiple qdiscs to the same device with tc, or is it only possible to use one qdisc per device? Also, can a qdisc contain child qdiscs, or only child classes? i.e. is it possible to do tc ...
user avatar
  • 113
3 votes
2 answers
492 views

Unwanted defragmentation of forwarded ipv4 packets

I want to handle ip fragments in user-space, and I am using the iptables NF_QUEUE to direct packets to user-space. The problem is that IPv4 packets are always re-assembled and delivered as one packet ...
user avatar
  • 263
0 votes
0 answers
322 views

Understanding tc qdisc command

I am currently working with a NXP LS1028ARDB board, on which I run a Linux system. I have a few questions regarding queuing disciplines (qdiscs) setup with the tc command. By default I have this for ...
user avatar
1 vote
1 answer
331 views

Can TC rules persist beyond a reboot? Where?

I am trying to determine whether rules put in place using tc persist beyond a reboot (I do not believe they do by default), and whether there is any way to cause them to persist, or if the best you ...
user avatar
0 votes
0 answers
926 views

Linux tc filter add - errors RTNETLINK answers: Operation not supported

I'm working on the network simulation to create some traffic on specific ports , and trying to inject the network delay. I'm using the linux tc utility to do this operations. So i'm new to the tc ...
user avatar
1 vote
0 answers
13 views

set asymmetric bandwidth on an interface

I'm coding a simple application using docker-compose and docker networks (images based on ubuntu). One of my services is a client with a network interface given from docker. All my services are on my ...
user avatar
  • 111
1 vote
1 answer
371 views

Forcefully enable fq_pie

I am very interested in setting up fq_pie queue discipline for TCP congestion control. If I write net.core.default_qdisc = fq_pie to /etc/sysctl.d/90-override.conf, it should enable fq_pie on latest ...
user avatar
  • 1,633
-1 votes
1 answer
723 views

Installing wondershaper on Debian 10

# apt-get install wondershaper # wondershaper wlan0 24000 16000 Now what?! How can I tell if it's running? How can I get it to start automatically after a reboot? (And configure it.) None of the ...
user avatar
0 votes
0 answers
18 views

ESFQ is not control the upload

I am using IMQ and Iptables to control the packages outcome from my LAN using ESFQ, but it is not work at all. How I can control the upload of my LAN, I know that others systems like Mikrotik, has its ...
user avatar
1 vote
1 answer
70 views

How does a htb qdesc tree handle bandwidth overallocation?

let's say I have a simple htb hierarchy (See man 8 tc-htb) set up where the total bandwidth specified for child htb classes exceeds the total bandwidth specified for the root htb class: tc class add ...
user avatar
0 votes
1 answer
334 views

wondershaper bandwdith limit per ip

Does this command allows us to download speed 512kpbs for each connected devices? or let say if two devices connected then they get only 256kbps each or 512 kbps each ? sudo wondershaper wlan0 512
user avatar
  • 13
-1 votes
1 answer
68 views

Why does iperf results not change with traffic control change to outbound?

I have been trying to change bandwidth between two ec2 instances using tc and outbound rules using HTB and TBF. I set these rules on on ec2 instance which acts as server and then test from another ...
user avatar
0 votes
1 answer
43 views

Is there a back-pressure mechanism from qdisc to TCP?

Is there a mechanism to stop TCP sending packets towards Qdisc if the queue length exceeds the limit? I know TSQ helps here for a small number of connections but what if I have 1000 connections or ...
user avatar
0 votes
0 answers
78 views

What is the equivalent tool TC (Traffic Control) for Solaris?

I would like to know if anyone knows a way to emulate what TC does on Linux. I have some scripts that I would like to port to Solaris.
user avatar
  • 161
0 votes
0 answers
405 views

Problem of limit bandwidth on a specific port in Ubuntu18.04

I set up a socks proxy server listening on 2 ports, 10001-10002. The port 10001 is provided to anonymous user. So, I want to limit the max bandwidth to 1 MB/s, and limit the max bandwidth of port ...
user avatar
  • 1
0 votes
0 answers
149 views

Netem does not show the correct parameter inserted

I'm issuing the following tc command tc qdisc in order to configure different queues in a computer. The problem is that when I configure two different queues (htb configuration) and I insert ...
user avatar
0 votes
0 answers
201 views

egress traffic shaping rules on mirrored interface aren't working

In my small, private, network I have a device (IP address 192.168.0.240) which I want to have a "guaranteed" section of the pipe. To that end, I've been following this Server Fault article to shape ...
user avatar
0 votes
1 answer
525 views

qdisc resets after changing to htb

Background I have a system running Ubuntu which has two interfaces eno1 and enp4s0. I have created an OVS bridge using: ovs-vsctl add br s1 I added the two physical interfaces eno1 and enp4s0 to ...
user avatar
  • 83
2 votes
1 answer
1k views

Example command to set same DSCP value in the IP header for return packets within the same TCP connection

I have seen connmark or ctinfo could work for this but couldn't find a simple effective command to make it work (Not familiar within this area). The command can be applied to the TCP termination node ...
user avatar
4 votes
1 answer
2k views

Adding qdisc under the mq top-level qdisc

This LWN article suggests that one may add/replace the network scheduler for a queue "under" the mq "dummy scheduler." These two point to that end: The mq scheduler does two things: - present ...
user avatar
1 vote
2 answers
1k views

Mirror to Multiple Ports Using TC?

Does anyone know if it's possible to mirror to multiple interfaces from one source interface using TC? I've done the following: The first thing I did was create an ingress queue on my input interface ...
user avatar
1 vote
1 answer
952 views

tc qdisc not delete filter

I have a problem with understand tc behaviour, especially how is working qdisc deletion. My main problem is why tc qdisc did not delete the attached filter? I did: tc qdisc add dev eth ingress tc ...
user avatar
  • 11
0 votes
0 answers
1k views

Traffic control (TC) command with u32 filter - Not working (RTNETLINK answers: Invalid argument)

I am working on college assignment, in which our teacher asked us to block some BPDU packets (which are generated by interface, incoming packets are blocked by BPDU guard) using traffic control tc's ...
user avatar
0 votes
1 answer
268 views

Difference between MTU and Burst at Linux-TC

I did a small experiment by using Linux-tc My question is what is the difference between Burst and MTU at Linux tc-htb It seems that they have a same effect. They change a only burst value. (we can ...
user avatar
1 vote
1 answer
1k views

How many qdiscs can I create with tc?

I am trying to emulate traffic among multiple virtual machines. Each connection is supposed to have different parameters, i.e. delay. Therefore, I am trying to create different qdisc filters for ...
user avatar
  • 11
1 vote
0 answers
106 views

tc: route all traffic from default gateway to ifb0

Traffic from eth0 arriving from gateway should be sent to ifb0 for ingress shaphing. Here some relevant outputs and commands ip route default via 192.168.0.1 dev eth0 metric 200 realm 1 What ...
user avatar
  • 155
0 votes
1 answer
418 views

Using tc rate limit all traffic except from one IP

Currently i have the below rule for rate limiting the traffic on port 22. This applies for all traffic, however i don't want this to apply for one IP say x.x.x.x , how to do this? So if the traffic is ...
user avatar
5 votes
2 answers
1k views

Tc qdisc delay not seen in tcpdump recording

I have two linux containers connected with a veth-pair. At veth-interface of one container I set up tc qdisc netem delay and send traffic from it to the other container. If I watch traffic on both ...
user avatar
  • 264
2 votes
0 answers
595 views

Simulate network on a single machine

I'm trying to simulate a network on a single machine. I have multiple nodes that communicate through tcp sockets. I tried to create one dummy interface for each node like this: ip link add name ...
user avatar
  • 21
1 vote
1 answer
2k views

For veth pair, ping does not recognize interface name and tc qdisc netem does not work

I have Ubuntu 16.04 LTS with hwe kernel 4.13.0-39-generic. I configure the veth pair in the default network namespace as follows: $ sudo ip link add h1-eth0 type veth peer name h2-eth0 $ sudo ip ...
user avatar
  • 264
1 vote
0 answers
51 views

Are there any disadvantages of using very low "rate" value for Linux HTB queuing discipline?

I have a use-case where egress traffic on 10Mbps connection needs to be divided into two classes. First class is high-priority traffic which needs to be able to use bandwidth up to 10Mbps. Second ...
user avatar
  • 6,258
3 votes
3 answers
1k views

queueing in linux-htb

I am trying to understand the queuing mechanism of linux-htb QDisc and QDisc of linux tc in general. What I could gather: During TX, the packet is queued into the queue inside the linux tc. This ...
user avatar
  • 83
4 votes
0 answers
1k 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 ...
user avatar
0 votes
0 answers
362 views

Using netem on traffic filtered by iptables

I would like to use netem for only partion of the traffic on bridge. Edit 1 So, I was able to figure out at least something. tc qdisc del dev eth0.1 root tc qdisc add dev eth0.1 root handle 1: ...
user avatar
  • 101
1 vote
2 answers
2k views

Slowing down a server with traffic shaping

I would like to study the behaviour of an application streaming from a slow server. I'm trying to take advantage of tc-netem to introduce a network delay. Before setting up a more complicated ...
user avatar
  • 488
1 vote
1 answer
227 views

How does one use tc to add latency to a ratelimit?

I read that there's another tool for netfilter that allows you to add latency to a ratelimit. Does anyone have an example of this?
user avatar
  • 4,039