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

learn more… | top users | synonyms

7
votes
3answers
6k views

Tc: ingress policing and ifb mirroring

I'm trying to setup traffic shaping on a Linux gateway as written here. The script needs to be customized because I have multiple LAN interfaces. So to shape the LAN side I am planning to create a ifb ...
-1
votes
4answers
212 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 ...
1
vote
0answers
12 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 ...
3
votes
0answers
24 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 ...
2
votes
1answer
930 views

HTB.init / tc behind NAT

I have an Ubuntu 10 box that I'm trying to set up as a bandwidth-shaping router. The machine has one WAN interface, eth0 and two LAN interfaces, eth1 and eth2. NAT is configured using MASQUERADE as ...
2
votes
2answers
608 views

tc prio qdisc for priorization of mysql traffic

I am struggling with tc prio qdisc for a few hours now. I have read the lartc Documentation, Examples and HowTos, but this whole thing is kinda new for me and somewhat confusing :) So this is my ...
1
vote
0answers
29 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 ...
0
votes
1answer
39 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 ...
0
votes
0answers
22 views

tc policing not working

We have a system that uses TC to throttle IPs as follows: tc qdisc del dev $egressif root tc qdisc add dev $egressif root handle 1:0 htb default 1 tc class add dev $egressif parent 1:0 classid 1:1 ...
0
votes
0answers
46 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 ...
1
vote
2answers
1k 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 ...
1
vote
3answers
2k views

Traffic shaping on Linux with HTB: weird results

I'm trying to have some simple bandwidth throttling set up on a Linux server and I'm running into what seems to be very weird stuff despite a seemingly trivial config. I want to shape traffic coming ...
0
votes
0answers
23 views

tc rules not working

Here is my tc setup : tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:1 htb rate 10kbit ceil 10kbit This should limit the uplink bandwidth to 10kbit. But when I ...
1
vote
0answers
30 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 ...
1
vote
1answer
40 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 ...
1
vote
1answer
1k 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), ...
1
vote
0answers
58 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 ...
2
votes
1answer
244 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 ...
3
votes
1answer
60 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 ...
0
votes
1answer
78 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.
0
votes
1answer
146 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 ...
2
votes
0answers
101 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. $ ...
1
vote
1answer
1k views

deleting filters in tc

I have added a filter in tc as follows: tc filter add dev eth0 parent 1: protocol ip handle 6 fw flowid 1:6 This should be sending packets marked by iptables with '--set-mark 6' to class 1:6. The ...
0
votes
1answer
97 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 ...
1
vote
1answer
57 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 ...
1
vote
1answer
275 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. ...
0
votes
0answers
109 views

Traffic shaping / HTB - how to interpret borrowed/lended figures?

I have upload traffic shaping set up as follows (this is my NAS box, eth0 serves both LAN and internet traffic): # root handle tc qdisc add dev eth0 root handle 1:0 htb default 12 # lan class - no ...
0
votes
0answers
55 views

Traffic Shaping Script Not Working

I wrote a script trying to use HTB algorithm to limit the throughput of specific ports, below is the script: tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:1 ...
0
votes
0answers
26 views

Same tc rules, different behavior?

I want to do some experiments with various network conditions. To do this, I am created 2 lxc containers and I place traffic control rules with tc on their network devices to represent these ...
0
votes
0answers
59 views

HTB Statistic not Correct

I have HTB Shaping with fq_codel but the statistics of the root not is less that the leaf node, what am I doing wrong here? In the example below the root not sent data is less then the leaf node ...
0
votes
0answers
18 views

Interaction between tc (traffic control) queue and MAC queue

If I establish, e.g., an HTB qdisc on an interface, what is the interaction between its internal queue and the MAC queue of the network interface? Do they effectively add up? My second question is: ...
0
votes
0answers
29 views

Queuing disciplines are per-interface, what qos is handle with interfaces using same device?

I have read about queuing disciplines here http://lartc.org/. I understand that for instance band 0 of pfifo policy is prioritized over band 2 within same qdisc, but what happen when i have ppp0 and ...
1
vote
1answer
228 views

Traffic control: marking packets for shaping

I'm seeking advice about which technology to use to classify packets for shaping in traffic control (tc). I've found at least 3 that could be used: iptables MARK iptables CLASSIFY tc filter Which ...
0
votes
0answers
29 views

Throttling bandwidth on a per group basis

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 ...
0
votes
0answers
48 views

Traffic shaping prioritizing some WAN interfaces using prio qdisc

Im configuring my router to give preference to some WAN interfaces. I have read about queuing disciplines here http://lartc.org/. I understand how PRIO discipline can prioritize traffic depending on ...
0
votes
0answers
79 views

Problems using wondershaper on KVM guest

I am trying to limit bandwidth on one of my KVM guest using Wondershaper. Doing something like this works fine: wondershaper br23 9000 9000 Doing a wget with the setting above gives a download ...
1
vote
0answers
27 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 ...
0
votes
0answers
80 views

tc traffic shapping HTB in Linux-based router

I use an Android device to be a hotspot router. In fact, the behavior is similar to a Linux OS router. There are parts of functions in Android. Now, I try to use tc command to limit bandwidth of end ...
0
votes
0answers
37 views

What Is the Smallest Burst Value for HTB Algorithm (QOS)

Regarding the HTB algorithm, I want to know what is the smallest burst value in an HTB shaping rule such as "tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5mbit burst 15k". Is it MTU?
0
votes
2answers
467 views

Linux Traffic Shaping With TC & Proxy

I have a Linux box being used as a router. It has 2x interfaces, one which connects to the internet (it uses NAT) and one which connects to a local network serving multiple computers. I would like ...
9
votes
4answers
2k views

tc u32 — how to match L2 protocols in recent kernels?

I have a nice shaper, with hashed filtering, built at a linux bridge. In short, br0 connects external and internal physical interfaces, VLAN tagged packets are bridged "transparently" (I mean, no VLAN ...
2
votes
3answers
2k views

How to match port range using u32 filter

with "u32 match ip sport 80" in Linux tc I can match port 80, but how can I match a port range 10000 - 20000 ?
1
vote
0answers
54 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 ...
3
votes
5answers
615 views

QoS configuration for a medium ISP

What is the best Linux-based QoS platform to implement a configuration where all 256Kbps DSL clients (all belong to the same IP range) get a guaranteed speed of 200Kbps with single QoS rule?
1
vote
1answer
188 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 ...
0
votes
1answer
124 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 ...
3
votes
2answers
305 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 ...
0
votes
0answers
80 views

Realtime dynamic traffic shaping per ip

I have a wireless and wired network shared among several users. There is a linux router which acts as dhcp server and gateway. I would like to split the max bandwidth available from ISP (20 Mbit) over ...
2
votes
3answers
2k views

QOS on ubuntu server

I want to run the following script on ubuntu server. eth1 is NAT interface, and eth2 is the WAN interface which has a static public ip: TCA="tc class add dev eth2" TFA="tc filter add dev eth2" ...
0
votes
2answers
316 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.