Questions tagged [tc]

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

Filter by
Sorted by
Tagged with
23 votes
3 answers
44k 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 ...
nixnotwin's user avatar
  • 1,543
4 votes
1 answer
17k views

How to do traffic shaping (rate limiting) with TC per OpenVPN client

This question is related to another question with a great answer and script from @Oliver. The goal: I want to modify/extend the script provided in this answer to suit my requirements, which are as ...
Server Programmer's user avatar
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
12 votes
5 answers
6k 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 ...
brownian's user avatar
  • 291
6 votes
1 answer
5k views

Network shaping using `tc netem` doesn't seem to work

I'm trying to simply delay traffic targeted for certain IP address on Ubuntu 16.06 box with no luck. There are plenty of resources as this this this or this that I studied. I ended up with these two ...
peetonn's user avatar
  • 231
2 votes
3 answers
10k views

Shaping outbound Traffic to Control Download Speeds with Linux

I have a situation where a server makes lots of requests from big webservers all at the same time. Currently, I have not control over the amount of requests or the rate of the requests from the ...
Kyle Brandt's user avatar
  • 83.8k
7 votes
2 answers
4k views

Traffic shaping: tc filter catch all filter

How Can I configure a "catch all" filter with tc filter? I tested with the following code but it gave me the error: "Unknown filter "1:100", hence option "protocol" is unparsable": tc filter add ...
Diosney's user avatar
  • 305
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
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
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
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
3 votes
2 answers
6k 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 ...
Niko S P's user avatar
  • 1,182
2 votes
2 answers
3k views

tc netem possibly missing

I have a VPS running Ubuntu 10.04 that I want to simulate network latency on. It looks like tc is what I want to use, and I pulled this command from the examples from here: http://www.linuxfoundation....
phasetwenty's user avatar
1 vote
1 answer
1k views

How to apply `fq_codel` to balance traffic in multiple VLAN connections?

I have an Ubuntu server connected to multiple VLAN networks over a single physical 1 Gbps network port. The network connections are configured via /etc/network/interfaces like this: auto lo iface lo ...
Mikko Rantalainen's user avatar
1 vote
2 answers
3k views

controlling the bandwidth using tc

I have two NICs. eth0 is connected to the internet and eth1 is connected to the LAN. I want to restrict the download limit using iptables and linux tc. So I wrote a test script to verify if it is ...
Supratik's user avatar
  • 2,164
1 vote
3 answers
9k 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 ...
DADGAD's user avatar
  • 31
1 vote
0 answers
842 views

tc u32 match protocol [any] in recent kernels -- where to discuss?

I've been using debian with 2.6.26 kernel; now I've started to test 2.6.32 for my needs. And I've noticed that u32 filter behaves differently for, namely, "protocol 802.1q". To discover the ...
brownian's user avatar
  • 291
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
1 vote
1 answer
3k views

Limit bandwidth using tc, iptables, and htb

I'm running a Debian server and was wondering if there are good resources out there, to which you can point me, where I can read about traffic limitations. I have a couple of users sharing one server....
Server_Noob'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
1 vote
3 answers
2k views

Linux: limit specific port rate by combining tc with iptables does not work as expected

The script blow tries to limit the incoming rate of the port 2000, when using iptables to mark the INPUT packets does not work, but OUTPUT works fine. I use nc -kl 2000 on machine 10.0.1.54 and iperf ...
tianchaijz's user avatar
0 votes
2 answers
3k views

Is there a way to limit bandwidth per ip using HTB + a CIDR range in Linux?

I can create rules to limit a entire subnet or to limit individual ip addresses with tc and htb. I am looking to use CIDR ranges to keep things somewhat elegant. The machines in question are all ...
user274562's user avatar
-2 votes
1 answer
635 views

Linux control packet size for specific IP address

I would like to get Linux tool/script to control packet size of specific IP or MAC. For example if IP reach 10 MB then DROP packages with IP tables. I have idea how to DROP, but I don't have idea how ...
aze2201's user avatar
  • 101