Questions tagged [tc]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
8 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 ...
0
votes
0answers
11 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 on qdisc per device? Also, can a qdisc contain child qdiscs, or only child classes? i.e. is it possible to do tc ...
1
vote
2answers
51 views

Unwanted defragmentation of forwarded ipv4 packets

I want to handle ip fragments in user-space and 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 ...
0
votes
0answers
31 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 ...
1
vote
1answer
28 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 ...
4
votes
1answer
5k views

Is it possible to throttle upload bandwidth per `IP` basis using `tc`, `htb` and `iptables` ? (Download limitation not required)

Problem I've searched internet like anything but couldn't find much about limiting upload. The solutions given are not limiting IP basis like this one but LAN as a whole. +-----+ +------...
0
votes
0answers
20 views

tc qdisc add dev eth0 handle ffff: ingress only relaying Multicast/Broadcast traffic from physical interface, need to mirror all traffic… any idea

I have two linux machines running debian 10, they both have dual interfaces. I have built a tunnel between the two machines and mirrored traffic from host1 collection interface to tunnel on host 2. I ...
4
votes
1answer
2k views

Traffic shaping with tc does not work

I want to limit the outgoing traffic to a specific bandwidth. My Code: tc qdisc add dev vif1.0 root handle 1: htb default 30 tc class add dev vif1.0 parent 1: classid 1:1 htb rate 1mbit tc class add ...
1
vote
2answers
2k views

How do I verify the parameters set using tc command?

I am in need of simulating a high latency and low bandwidth connection for a performance test of my application. I have gone through a number of pages describing the tc command. But, I haven't been ...
0
votes
0answers
58 views

Connection reset by peer errror when delaying network response packets

Client's side code written in redis-plus-plus int main(){ auto redis = Redis("tcp://192.168.122.50:6379); sleep(5); int ep = 100; while(true){ cout<<"==============...
0
votes
0answers
335 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 ...
0
votes
0answers
6 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 ...
0
votes
0answers
33 views

Signification of TC (Trafic Control) backlog counter

I try to understand the signification of the counter backlog from the TC stats. Example : tc -s class show dev eth0 class htb 1:1 root rate 10Mbit ceil 10Mbit burst 5000b cburst 5000b Sent 602228374 ...
-1
votes
1answer
236 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 ...
0
votes
0answers
21 views

Some doubts about traffic control

I am performing an experiment of network bandwidth limitation on my ubantu machine. Many views believe that tc (traffic control) cannot limit the inbound bandwidth, and point out that it needs to be ...
1
vote
1answer
177 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 ...
1
vote
1answer
1k views

Using qdisc prio under htb class

I have 2 services, both operate over the same interface. Service A goal is keep high bandwidth while sending massive amount of data. Service B goal is low latency. Service B packets should always ...
0
votes
0answers
12 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 ...
1
vote
1answer
33 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 ...
0
votes
1answer
151 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
0
votes
0answers
81 views

How to set priority of network traffic for services using systemd?

I want to be able to specify the priority for all incoming and outgoing network traffic of a service in its systemd unit configuration to be able to ensure that some services get a higher priority for ...
0
votes
0answers
23 views

How do I use TC to prioritise a device on the network?

I'm running a home network using a Linux gateway (raspbian) as a router. It's a simple setup just using iptables as a firewall and traffic forwarding between the local and ppp0 interface. I want to be ...
-1
votes
1answer
42 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 ...
0
votes
1answer
27 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 ...
0
votes
0answers
61 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.
2
votes
1answer
1k views

Is Traffic control inside namespace on ports created by OpenvSwitch supported?

I am trying to limit the bandwidth of an interface inside a namespace using tc without much success. Seems it's not supported according to https://lists.linux-foundation.org/pipermail/containers/2009-...
0
votes
0answers
266 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 ...
1
vote
1answer
648 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 ...
2
votes
3answers
3k views

Reducing packet loss in tc rate limiting

I use this tc command to limit upload speed on an interface: tc qdisc add dev eth1 root tbf rate 2mbit burst 10kb latency 70ms peakrate 2.4mbit minburst 1540 But it results in heavy packet loss. If ...
0
votes
0answers
100 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 ...
0
votes
0answers
155 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 ...
0
votes
1answer
361 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 ...
1
vote
1answer
839 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 ...
0
votes
1answer
211 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 ...
1
vote
2answers
635 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 ...
3
votes
1answer
1k 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 ...
3
votes
3answers
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 ...
1
vote
1answer
572 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 ...
0
votes
0answers
802 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 ...
4
votes
1answer
2k views

TC (Traffic Control) to control bandwidth

I'm having an issue with a bandwidth script that I've been using for a while to limit the outgoing bandwidth on a port. It worked fine at the beginning until I wanted to change the outgoing port ...
0
votes
1answer
181 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 ...
3
votes
1answer
2k views

Get list of qdiscs and filters that are supported by tc tool

Depending on how it was compiled and on its version number, tc tool does not always handle the same list of queueing disciplines, filters, policing actions and so on. I am looking for a way to get a ...
1
vote
1answer
925 views

Bandwidth throttling per user group

I am wondering if it is possible to create a bandwidth shaping/throttling script that shapes traffic based on user group. That is, if user1, user2, are in user group group1, they will have 1mb/s ...
3
votes
2answers
950 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 ...
1
vote
0answers
68 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 ...
2
votes
0answers
393 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 ...
2
votes
1answer
964 views

Delay some localhost traffic

How to delay some localhost traffic? (the computer is a VM, but hopefully that won't matter) The following creates a new interface and tries to apply tc to it: ifconfig lo:1 127.0.10.10 netmask 255....
15
votes
4answers
15k views

Understanding tc qdisc and iperf

I'm trying to limit bandwidth with tc and check the results with iperf. I started like this: # iperf -c 192.168.2.1 ------------------------------------------------------------ Client connecting to ...
1
vote
1answer
1k 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 ...
4
votes
1answer
3k views

Is TCP PACING enabled by default on linux?

I want to ask a basic question: Is TCP PACING enabled by default on Linux? I'm using Ubuntu right now, kernel 4.4.0. I saw that it can be enabled/disabled using TC-FQ, but is it enabled by default ...