Questions tagged [tc]

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

Filter by
Sorted by
Tagged with
2 votes
0 answers
8k views

tc qdisc tbf - calculate sensible latency and burst from rate

I want to create a simple script that lets me limit the outgoing speed of an interface somewhere between 56k (modem speed) and 1MBit/s. I found that something along the following does the job: tc ...
josch's user avatar
  • 141
2 votes
1 answer
2k views

Traffic shaping outbound clients source ip with tc / iptables

My question is I am trying to limit a users bandwidth on a server and wondering the best way to do this. Before I dive to far into the tc/iptables I was wondering if I could get any advice on this ...
dryve's user avatar
  • 23
1 vote
0 answers
322 views

How to change give highest priority to Mail traffic on port 25 with tc

How can I give the highest priority to mail traffic on port 25 whit tc? I tried prio option but It didn't work out for me or maybe I'm missing something. I'd appreciate any help.
JimmySys's user avatar
4 votes
0 answers
3k views

Linux Traffic Controller (Linux tc): hierarchical token bucket (htb) packet queue size

In my Linux router, I am using the following configuration to limit the rate of traffic towards port 44444 of a client in the LAN (client address is 192.168.10.2, connected through the router's eth1 ...
bmarcov's user avatar
  • 41
-1 votes
1 answer
760 views

tc-qfq is classless error

I'm using Linux 3.0.101 with iproute2-3.4.0 on a router and I'm getting this error: tc qdisc add dev eth2.2 root handle 1: qfq --> OK tc class add dev eth2.2 parent 1: classid 1:10 qfq weight 1 --...
xnor's user avatar
  • 101
5 votes
1 answer
18k views

Debian7 and tc qdisc issue : RTNETLINK answers: No such file or directory

I've been searching for few days now but couldn't find the solution to my problem. I have a VPS running Debian 7, and I have root access. I am trying to add some traffic shaping (using HTB), so the ...
Raphael Laurent's user avatar
-1 votes
4 answers
266 views

Is there anyway to tell what user will receive data from inbound packet?

In linux, considering this use case: 1. User initiates http request for webpage to remote server 2. Remote server answers request and sends packets Is there any reference to the user who started ...
Rooster's user avatar
  • 495
1 vote
0 answers
234 views

How to test if packet has been tagged with classid

I'm trying to troubleshoot an issue I'm having related to IFB Mirroring which I'm attempting to deploy based on this question: Tc: ingress policing and ifb mirroring My theory is that since the ...
Rooster's user avatar
  • 495
4 votes
1 answer
2k views

linux tc htb bandwidth ceil being ignored and giving improper results

I'm setting up some htb packet queues like so: tc qdisc add dev eth0 root handle 10: htb tc qdisc add dev eth1 root handle 10: htb tc class add dev eth0 parent 10: classid 10:1012 htb rate 750kbps ...
Rooster's user avatar
  • 495
1 vote
0 answers
402 views

Group traffic shaping with traffic control?

I'm trying to limit the output bandwidth generated by an application with linux tc. This application sends me the source port of the request that I use has a filter to limit each user at a given ...
Arka's user avatar
  • 173
0 votes
1 answer
316 views

Is it possible to limit output bandwidth between eth0 and lo?

I'm trying to limit the bandwidth between my eth0 output (nginx proxy) to my loopback inteface (apache) by filtering on destination port. Incoming Packet -> Eth0 -> 0.0.0.0:80 Nginx -> tc ...
Arka's user avatar
  • 173
0 votes
0 answers
803 views

Trouble using net_cls control group in tandem with tc for packet filtering

I'm having some trouble limiting network bandwidth using the net_cls control group in conjunction with the linux traffic controller (tc). I think I might just be confused about how I'm writing the ...
Rooster's user avatar
  • 495
5 votes
1 answer
1k views

Trying to understand HTB subclasses rate

I'm currently studying the opportunity of using an Ubuntu server to provide QoS instead of my consumer-class router. I've read a lot of resources about tc and HTB queuing disciplines - which look to ...
Eric MORAND's user avatar
2 votes
0 answers
585 views

HTB equal bandwith sharing per ip in one class

In my tc configuration (shown below) in one class all bandwidth is shared among connections equally, but I want to share bandwidth among all IP addresses equally. Now: 192.168.0.2 - 38KB/s 192.168.0....
denizeren's user avatar
  • 329
3 votes
1 answer
8k views

Implementing HTB, NetEM, and TBF traffic control simultaneously

I am working on a bash utility that will use several aspects of the tc Linux command line utility to emulate various network conditions. I have successfully constructed several qdisc hierarchies, one ...
Ian's user avatar
  • 103
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.
Ali Mezgani's user avatar
  • 3,850
5 votes
1 answer
1k views

Bandwidth Throttling using tc qdiscs

I am trying to limit the bandwidth between a simple iperf server and client, using a third, passive machine acting as a bridge. With no interference, iperf returns a bandwidth of ~90 Mbits/sec. My ...
Ian's user avatar
  • 103
1 vote
1 answer
2k views

How to slow down and share incoming network traffic using TC (traffic shaping)

I am trying to slow down incoming packets for a specific program, while a second one will have full access to the unused bandwidth. In other words, I want to control the network bandwidth sharing in ...
LittleWhite's user avatar
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. $ ...
Leandro Moreira's user avatar
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. ...
user200913's user avatar
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 ...
Martin's user avatar
  • 352
5 votes
1 answer
14k views

How can I limit the upload/download bandwidth on my CentOS server?

How can I limit the upload and download bandwidth on my CentOS server? This is a box with a single interface, eth0. Ideally, I would like a command-line solution (I've been trying to use tc), ...
Dan Nestor's user avatar
2 votes
0 answers
143 views

Is It Possible to Attach multiple Ports to a TC Filter?

I need to limit the bandwidth/rate by ports, and as a server there would be thousands of ports. Due to the limit of tc filter, I wonder if it is possible for multiple discreate ports to share a same ...
Steve Peng's user avatar
1 vote
1 answer
79 views

How Many Filters Can We Have -- LINUX QOS

I am doing Qos on Linux server using TC. According to the grammar of tc tool, the handle of a filter must be between 800::001 and 800::FFF. And because 0XFFF equals 4095 in decimal, so we can only ...
Steve Peng's user avatar
1 vote
0 answers
575 views

Why Parent Class In a TC Rules Tree Not Working

The parent class in my TC rules script doesn't work as it garanteed! Can somebody tell me what is wrong with my script? Here are some details about my question: From the chapter "9.5.4.4. Sample ...
Steve Peng's user avatar
0 votes
1 answer
1k views

Why This TC Script Not Working

Our application has three classes of traffic, and every type of traffic involves three ports. We want to limit the traffic by port number via TC, so I made a simple TC script to have the test, however ...
Steve Peng's user avatar
4 votes
2 answers
2k views

Linux qos: tc DRR qdisc does not work

There is tc queue discipline DRR(Dificite Round Robin) . It has same capabilities, as HTB, but instead of using buckets, filled with tokens, it just assignes every queue some Dificit Counter. On ...
Selivanov Pavel's user avatar
0 votes
1 answer
837 views

What do these two QOS script statements mean

I am studying the QOS utility of Linux -- TC -- recently, and today I encountered below two statments from a bandwidth-limit script on Linux: tc filter add dev eth0 parent 1: prio 1 protocol ip ...
Steve Peng's user avatar
1 vote
1 answer
2k views

Can TC limit bandwidth by the Qos field of IP header

We are developing a client/server applications. There are three types of network data in our server app: Realtime data such as those of Video/audio, Critical Data such as those of Database data and ...
Steve Peng's user avatar
0 votes
2 answers
1k views

Shaping of outgoing traffic in linux for channel with unknown width

Is there any way to divide outgoing channel between different traffic class, for example, with relation 30/70, if I don't know channel width? HTB requires exact numbers, and CBQ too.
Selivanov Pavel's user avatar
1 vote
1 answer
2k views

TCP packet filter based on TCP sequence

I need to build a test environment with a very precise packet loss based on specific TCP sequence or, optionally, on payload content. I couldn't figure out how to do it with tc or iptables. What tool ...
jackhab's user avatar
  • 781
3 votes
2 answers
1k views

Can TC (Linux Qos Utility) limit bandwidth usage of target applications?

We have many applications running on the same server machine which is inside a network of servers. We want limit the bandwidth of our applications to specific value. So here are some choices: ...
Steve Peng's user avatar
0 votes
1 answer
264 views

How can we set variable throttle bandwidth values using tc?

I'm building a network application and need to test its behavior under various bandwidths. This question is an offshoot of this question. I was successfully able to test my application for different ...
spiritusozeans's user avatar
2 votes
1 answer
7k views

tc filter replace, tc filter change doesn't work

I have a tc filter rule: tc filter add dev eth0 protocol ip prio 1 u32 match ip dst 10.0.0.3 flowid 1:14 if I try to 'change' this filter rule I get an error: # tc filter change dev eth0 protocol ...
user174704's user avatar
0 votes
1 answer
10k views

How to add delay to incoming traffic?

For purpose of continuous testing, I would like have apache server to serve static files with at least 20ms delay. I tried to find a apache configuration setting or a plugin with similar ability, but ...
bbaja42's user avatar
  • 161
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....
Zak's user avatar
  • 153
5 votes
1 answer
6k views

VLAN based rate limiting using tc

I have been trying to perform VLAN based rate limiting on an academic project I am working on. The project uses Openflow (with Beacon controller) and the network is emulated using Mininet. The network ...
user1449265's user avatar
15 votes
3 answers
48k views

Resetting a queue discipline back to the default pfifo_fast one?

I'm trying to temporarily set a rate-limited queue discipline and then remove it a bit later: # /sbin/tc qdisc add dev eth1 root tbf rate 600kbit latency 50ms burst 1540 # /sbin/tc qdisc del dev eth1 ...
François Marier's user avatar
3 votes
2 answers
4k views

how to limit upload bandwidth per user in linux?

Can anyone provide the tc command to limit upload bandwidth per user in Debian Lenny? I found that to mark packets per user with iptables I can use the following command iptables -t mangle -A OUTPUT ...
Gihan Lasita's user avatar
4 votes
2 answers
7k views

Limiting bandwidth on internal interface on Linux gateway

I am responsible for a Linux-based (it runs Debian) branch office router that takes a single high-speed Internet connection (eth2) and turns it into about 20 internal networks, each with a seperate ...
Jack Scott's user avatar
1 vote
0 answers
275 views

htb with an inner gred how to setup filter to reach DPs

I want to create a qos htb class and within this class there is a gred queue. how do I add a working filter for each red queue in the gred queue? what i tried was: DEV=lo SOMEGREDETTINGS="limit ...
phschoen's user avatar
  • 111
5 votes
2 answers
4k views

lxc bandwidth control using tc

I am trying to restrict bandwidth inside my containers. I have tried using the following commands , But I think it is not getting effective. cd /sys/fs/cgroup/net_cls/ echo 0x1001 > A/net_cls....
kumar's user avatar
  • 433
2 votes
0 answers
661 views

tc rules block traffic from some hosts at network

I have a problem I can not solve. The script, which sets the rules for traffic shaping is blocking the traffic from some hosts.If I remove all the rules, then it works. I can not understand why? ...
user avatar
0 votes
1 answer
1k views

tc don't see marked packets

Server has 2 interfaces: eth1 with address 13.0.0.254/24 eth0 with address 172.20.203.4/24. It's routing traffic between this two networks. Task is to limit bandwidth between this two networks to ...
Selivanov Pavel's user avatar
5 votes
2 answers
1k views

nginx clobbering sftp traffic during peak times - is tc the answer?

This is probably a continuation of my previous (unanswered) question because the underlying cause is probably the same. I have a Linux server with nginx and sshd running on it. It's on a shared ...
njahnke's user avatar
  • 290
0 votes
1 answer
156 views

Does TC rate policing mangle packets?

I'm trying to limit traffic to test performance of some in-house applications, but I am getting inconsistent results when configuring my home PC and my company testbed. The goal is to police the rate ...
dave's user avatar
  • 1
1 vote
1 answer
4k views

Linux tc htb + prio = very slow link

I'm trying to shape the traffic going out of my DSL link (verified 1 mbit upload) using Linux (3.2) tc, HTB, and PRIO. My Linux box is connected via a Gigabit Ethernet link to the ADSL modem. I want ...
Etienne Dechamps's user avatar
1 vote
0 answers
138 views

Defining an explicit parent in traffic control rules

In traffic control, will an explicit parent declaration in a filtering rule override a flowid definition? E.g.; tc qdisc add dev eth0 root handle 1: htb default 20 tc class add dev eth0 parent 1: ...
noctorum's user avatar
  • 105
5 votes
1 answer
7k views

Difference between HTB Rate and Ceil Values

What is the difference between the HTB rate and Ceil values?
noctorum's user avatar
  • 105
23 votes
4 answers
45k views

Using tc to delay packets to only a single IP address

I am new to using tc and netem. I want to delay packets being sent to a specific IP address. However, the commands below cause all packets on the system to be delayed, instead of just to the IP ...
Matt White's user avatar