2022 Developer Survey is open! Take survey.

Questions tagged [tc]

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

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

Traffic shaping and artificial latency per IP in a LAN network using tc/netem

for the last few days I have been trying to setup traffic shaping and artificial latency in a local network. Currently I have an Ubuntu 20.04 PC with 2 NICs, where one is connected to the company ...
user avatar
  • 1
0 votes
0 answers
13 views

Traffic shaping with tc penalise large downloads

I have this shaping script that is supposed to penalise downloads larger than 10mb by downgrading their connection speed. If I test with one connection the penalty is in effect and the download speed ...
user avatar
0 votes
0 answers
17 views

Traffic Control to Openvpn Clients

I have a group of users connecting to my server(ubuntu 20.04 x64) via OpenVPN(2.4.7) UDP. I'd like to be able to limit each user's bandwidth to say 10mb/s up and 10mb/s down using the TC command. Here ...
user avatar
  • 1
0 votes
0 answers
54 views

Limit bandwidth by tc per src IP

I would like to limit output bandwith to server in LAN (virtual server in fact) per IP session / or src IP in other words. My following rules on router doesn't work: tc qdisc add dev lxdbr0 root ...
user avatar
  • 1
0 votes
1 answer
58 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, ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
  • 153
0 votes
0 answers
67 views

tc-mirred, redirecting flow matches to a dummy interface

I'm scaling a security inspection device. The rate limiting step is a single threaded process that analyses and extracts data from network flows. As a short-term goal, I would like to scale this by ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
0 votes
0 answers
26 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 ...
user avatar
  • 1
0 votes
0 answers
94 views

How can I limit download/upload speed for every single user on OpenVPN using TC?

I have an OpenVPN server on CentOS 7 and I want to limit the download/upload speed for every single OpenVPN client to 512 kilo byte per second . From my own researches , I understood that I can ...
user avatar
1 vote
0 answers
30 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 ...
user avatar
0 votes
0 answers
40 views

How does the tbf and the fq_codel interract in this particular case? Why would I need fq_codel?

I've posted this question in here, seems like it's been the wrong spot.) I've been studying TC for a while. I came across this answer containing a script. In it we set the egress limit as: # setup ...
user avatar
  • 113
0 votes
0 answers
55 views

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

Problem: When the tc HTB or CQB is used to do traffic shaping, first two packet that are sent after some time gap are sent back to back as recorded in the pcap log. I have a intermediate computer with ...
user avatar
1 vote
1 answer
2k 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. ...
user avatar
0 votes
0 answers
38 views

Error in changing traffic classification of CAKE in OpenWrt

I am currently using OpenWrt (version: 19.07.7) on Virtual Box (version: 6.1). As also having a Linux machine that I use, in order, to ssh into OpenWrt and route synthetic traffic to it. And trying ...
user avatar
0 votes
0 answers
151 views

Why am I seeing overlimits in TC statistics?

I configured my linux servers with tc (TBF) using the below parameters: rate 1Gbit burst 1000Kb lat 200.0ms Now, when I'm testing Iperf between this server and another server as iperf client, I'm ...
user avatar
  • 11
0 votes
0 answers
27 views

not working traffic filter on debian 10

on debian 7-9 this filter is working fine on debian 10: # tc qdisc add dev $IFACE handle ffff: ingress # tc filter add dev $IFACE parent ffff: pref 100 protocol 0x8863 u32 match u16 0x1109 0xffff at 0 ...
user avatar
0 votes
0 answers
92 views

WonderShaper limits the bandwidth too much

We use WonderShaper as a traffic control tool on our linux servers. We have 10Gbit uplink, and I want to limit the upload and download to be up to 1Gbit per server. My goal is to prevent a situation ...
user avatar
  • 11
1 vote
0 answers
130 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. # ...
user avatar
0 votes
1 answer
86 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 ...
user avatar
  • 13
1 vote
0 answers
67 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 ...
user avatar
1 vote
0 answers
51 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 ...
user avatar
  • 175
1 vote
1 answer
1k 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 $...
user avatar
  • 121
1 vote
1 answer
44 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 ...
user avatar
1 vote
0 answers
474 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 ...
user avatar
1 vote
1 answer
449 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-...
user avatar
  • 374
1 vote
1 answer
451 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 ...
user avatar
  • 153
2 votes
1 answer
592 views

tc: one qdisc for two classes (multiqueue)

The default tc configuration on my server is: # tc class show dev ens5 class mq :1 root class mq :2 root # tc qdisc show dev ens5 qdisc mq 0: root qdisc fq 0: parent :2 limit 10000p flow_limit 100p ...
user avatar
0 votes
1 answer
307 views

Why does my bond interface with multiq ignore tc's queue selection?

On Debian Buster, Kernel 5.4.51, I have two interfaces tap0 and tap1 joined in a bond interface in mode balance-xor to increase throughput. There is, however, some traffic that must be sent through ...
user avatar
  • 21
1 vote
0 answers
237 views

limit bandwidth per IP Linux ubuntu openVPN

I am a newmember in config ubuntu server and I installed an OpenVPN on a ubuntu 18.04 linux server, now I want to limit the server bandwidth with 2Mbit per IP for users that connect to the OpenVPN, ...
user avatar
  • 113
2 votes
0 answers
196 views

tc filter does not apply between a virtual interface and a physical one

I am working on a project aiming at managing a network between several components. For project purpose, we want to test some bad network effects using netem. The used commands are the following ones: $...
user avatar
2 votes
0 answers
558 views

Using tc to delay packets to several ports

After reading several pages like this this and without having a really deep knowledge about the kernel Linux, I am able to filter up to 3 ports using just the three first leaves of the tree. tc qdisc ...
user avatar
2 votes
0 answers
376 views

TC Filter With BPF and NFTables Packet Marking

I made a TC BPF ingress program and I want it to process specific packets only marked by NFTables. Here's my NFTables table that marks the specific packets: table ip compressor_tc { chain ...
user avatar
0 votes
1 answer
704 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. ...
user avatar
0 votes
1 answer
245 views

Measure packet latency / drop between ingress and egress interface of a rate-limiting pass-through host

Somewhere between my sender and receiver, there is host explicitly limiting my transfer rate. I know it's a Linux host. The ingress interface for my traffic is eth0 and the egress interface is eth1. ...
user avatar
  • 21
0 votes
0 answers
110 views

how to apply TC htb class to each of IPs in an IP range separately?

I use HTB for TC and mark packets with iptables. First I mark a range of IPs (like 192.168.1.0/24). Now I want to apply a htb class to each of these IPs separately. If I add a class and a filter for ...
user avatar
0 votes
2 answers
282 views

Configuring NAT with Traffic Control for Nginx/Apache on localhost, cache miss

Apache is on 127.0.100.2 and Nginx is on 127.0.100.3, with Traffic Control performing DNAT from the former to the latter (for source 127.0.0.1) and SNAT from the latter to the former (for destination ...
user avatar
0 votes
1 answer
75 views

Using tc filter together with Snort

I need to add delay to packets after doing some modification using the SNORT inline module. However, I cannot seem to get the packets to match a filter using tc filter ... It always matches the ...
user avatar
2 votes
1 answer
466 views

Unable to set bandwidth limit on ingress wireless interface with netem and ifb

I am trying to limit the bandwidth on the ingress of a wireless interface using an IFB virtual interface. I followed the instructions here Summary of the steps: Bringing up ifb: sudo modprobe ifb ...
user avatar
0 votes
0 answers
46 views

How configurable is the Linux Network Emulator in regards to queue disciplines?

Based on this wiki article https://wiki.archlinux.org/index.php/Advanced_traffic_control It appears that I can configure the Linux traffic controller, which seems to be a subset of the Linux Network ...
user avatar
1 vote
1 answer
114 views

Performing tasks and custom logic on network packets

I'm looking for a way to process packets in a Linux server in a particular fashion - I need to run some custom logic on every packet, then (possibly) take some actions on the packets and let the ...
user avatar
1 vote
0 answers
73 views

Why does adding a single class to the htb qdisc in tc slow down my connection?

I'm running tc with the command: sudo tc qdisc add dev eth0 root handle 1: htb default 1. I then proceed to add a single class like so: sudo tc class add dev eth0 parent 1:0 classid 1:1 htb rate ...
user avatar
0 votes
2 answers
131 views

Traffic Control - is it possible to distinguish between www browsing and www bulk (iso download) traffic?

Lately i was working on uploading big files to website, this upload eat whole bandwidth and crippled my network. So i implemented chunking one 1MB chunk per second and its working but now I'm thinking ...
user avatar
  • 588
2 votes
1 answer
2k views

How to remove the ingress delay introduced using tc

I learned that we can introduce delay to ingress packets using tc by following the commands specified in : https://wiki.linuxfoundation.org/networking/netem#...
user avatar
  • 141
4 votes
1 answer
568 views

Using tc to decrease bandwidth to a specific destination address

I am trying to find the shortest path between two hosts H1 and H2 using Dijkstra code. Setting a condition in one of the switches on that path. the condition is: if the packet sending to H2 then ...
user avatar
  • 43
2 votes
1 answer
388 views

Attempting to shape traffic for both IPv4 and IPv6 results in a conflict

On my server I'm attempting to set up traffic shaping, and if I'm doing it for either IPv4 or IPv6, things are just fine: All filter rules for that particular protocol are installed. However, when ...
user avatar
  • 123
0 votes
1 answer
2k views

Link bandwidth limiting by using tc

I am a newbie network engineer. I am trying to understand the Linux command tc. I made a simple network, consisting of two hosts H1, H2 and a switch S1 connecting them by using Mininet. Then, I ...
user avatar
1 vote
1 answer
351 views

throttle outgoing linux network traffic under high latency

I want to slow my outgoing traffic when it encounters congestion, and measure "congestion" by packet response times. The intent is to avoid one NFS client starving all the other clients when ...
user avatar
  • 243
0 votes
1 answer
41 views

Where can I place tc filters?

I have a raspberry pi router for me and my room mates. The bandwidth is divided as follow: 1:0(htb) | 1:1(16mbit/s) / \ 1:2(8mbit/s) 1:ffff(8mbit/s) If I ...
user avatar
0 votes
1 answer
2k views

What's the differences between "quantum"s in htb and fq_codel qdisc?

According to the manual page HTB quantum how much bytes to serve from leaf at once {use r2q} FQ_Codel quantum It is the number of bytes used as 'deficit' in the fair queuing algorithm. ...
user avatar

1
2 3 4 5