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
0answers
11 views

How to define iptables rules for routing encapsulated VPN traffic based on destination port?

I am looking to route VPN traffic originating from one computer A differently on a connected computer B based on destination port of the traffic. Because the VPN encapsulates the original destination ...
0
votes
1answer
28 views

tc - what is wrong with this comand?

I am new to tc and this might be beginner's mistake, but I know little enough for this to stop me. I need to write a script which limits incoming/outgoing traffic speed for a docker container. I began ...
0
votes
1answer
22 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
0answers
19 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
0answers
14 views

TC Filter - Port ranges u32

I have created the following tc filter: tc filter add dev tun0 parent 1:0 protocol ip u32 match ip sport 17056 0xffff flowid 1:2 however instead of just targeting port 17056 I want to target the ...
0
votes
0answers
34 views

Low rate with tc htb in Ubuntu Guest VM with Ubuntu Host

I am using tc htb to shape multiple flows with a total bandwidth constraint, but stuck in some low rate issue related to the system or virtualization. The script is here: BURST=1600 # 1600b by ...
1
vote
0answers
33 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 ...
1
vote
1answer
157 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
1answer
27 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
0answers
150 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 ...
0
votes
0answers
70 views

Linux Firewall mark classifier (tc-fw) not working after upgrade to Debian 9 - kernel 4.19

i have traffic shape with TC and everything work as i expected on Debian 8 kernel 3.16 . When i upgrade with new kernel 4.19 and Debian 9 the TC-fw and u32 classifying didn`t work . I marked packets ...
1
vote
1answer
194 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
1answer
178 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 ...
2
votes
1answer
142 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 ...
0
votes
1answer
116 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 ...
0
votes
0answers
51 views

TC: delete/add and replace filters do not work, how to fix?

I'm new to traffic control. Porting a routing system from kernel 4.4 to 4.15 (with perspective to move to 5). The system is rather dynamic and creates separate qdisc (analog of netem) for each client ...
0
votes
0answers
58 views

Traffic Control on Pritunl

I have a OVH-Game server with a 1Gbps Port and from time to time I will do speedtest. When the server is in mitigation and the download speed of the test goes over 30mbps you get disconnected for a ...
0
votes
0answers
41 views

Why rules are not applied to the incoming traffic to limit bandwidth?

I have 3 PC2, two are clients and one server, which are connected through Ethernet. I'm trying to apply rules and filters to limit the bandwidth of the clients (ingress traffic) using the following ...
0
votes
0answers
71 views

Can't find tc in my docker container, even though iproute is installed

I want to use tc command inside my docker container. [root@5c8bf67d4611 sbin]# [root@5c8bf67d4611 sbin]# tc bash: tc: command not found and it is not find in /sbin [root@5c8bf67d4611 sbin]# cd /...
0
votes
0answers
59 views

tc: limit upload by IP address

After many days of search I don't found nothing to limit bandwidth speed by IP, this script works to limit only by interface, any idea to modify to works with IP. #!/bin/bash #USAGE: sudo ./netspeed ...
1
vote
0answers
86 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, ...
0
votes
0answers
21 views

Why HFSC does not provide the expected results regarding latency?

Linux scheduling algorithm HFSC is poorly documented and it is difficult to find complete configuration examples, fortunately there is this nice tutorial I tried to follow in order to create this ...
1
vote
0answers
94 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: $...
1
vote
0answers
203 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 ...
1
vote
0answers
200 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 ...
0
votes
1answer
214 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. ...
0
votes
0answers
697 views

tc on openwrt: RTNETLINK answers: No such file or directory

I've just installed OpenWRT release 19.07.2 on this thing: https://openwrt.org/toh/netgear/netgear_r6220 It is meant as a temporary router+firewall for a small network, not as a typical wifi router ...
0
votes
1answer
91 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. ...
0
votes
0answers
62 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 ...
0
votes
2answers
160 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 ...
0
votes
1answer
43 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 ...
2
votes
1answer
253 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 ...
0
votes
0answers
33 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 ...
1
vote
1answer
95 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 ...
1
vote
0answers
50 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 ...
0
votes
2answers
120 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 ...
1
vote
1answer
1k 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#...
4
votes
1answer
383 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 ...
2
votes
1answer
287 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 ...
0
votes
1answer
1k 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 ...
1
vote
1answer
248 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 ...
0
votes
1answer
30 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 ...
0
votes
1answer
989 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. ...
1
vote
0answers
243 views

tc rule not matching when applied on virtual interface created with Docker

I'm trying to delay traffic between containers (container1 calling container2) from a third container that has access to the host network and having capability NET_ADMIN (container3_admin). When I ...
2
votes
0answers
547 views

Using tc qdisc, class, and filter to limit bandwidth (both ingress and egress) based on DSCP marks

I'm looking to set-up traffic shaping program that limits both incoming and outgoing traffic based on 6-bit DSCP field in IPv4 packet header. The user should be able to specify different rates for ...
1
vote
1answer
78 views

tc command does not affect on two processes in a same machine

I am wondering why tc command does not work as expected. I set the command like the following tc qdisc add dev eno0 root handle 1:0 tbf rate 50mbit burst 25kb limit 250kb where I'm expecting ...
1
vote
1answer
135 views

tc match IPv4 fragment offset

What is the correct Syntax for matching Fragments that have and Offset > 0 in tc? I have tried: ... u32 match u8 255 ff at 7 flowid 2:1 But to no avail
0
votes
1answer
548 views

Deleting root pfifo_fast (tc) on Linux

I'm trying to delete all qdiscs to do "fresh" configuration: % tc qdisc del dev enp0s25 root RTNETLINK answers: No such file or directory But it's there: % tc qdisc show qdisc noqueue 0: dev lo ...
2
votes
1answer
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 ...
2
votes
0answers
1k views

Adding some delay to a specific port on localhost using tc and netem

I'm going to simulate a network latency on three different ports of local host by using tc (traffic control for Linux) commands. I run the following code: !/bin/bash tc qdisc add dev lo root handle 1:...

1
2 3 4 5