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
2 answers
2k 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 ...
Jak's user avatar
  • 1,008
4 votes
2 answers
762 views

Matching last fragment of IP packets using tc or ipfilter

I am transmitting UDP packets of say 2900 bytes. Due to fragmentation, packet is divided in 2 IP fragments. My tc u32 filter (more fragments bit and IP/PORT combination) matches only first fragment ...
Pritesh's user avatar
  • 41
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
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
2 votes
1 answer
4k views

Linux income filtering based on private destination IP address

I am trying to set up a QoS script in my OpenWRT box so that traffic coming from the Internet is classified into a low prio and a high prio class. The criteria to classify traffic is its destination ...
Dani Camps's user avatar
1 vote
2 answers
9k views

Tool to monitor bandwidth utilization per traffic (tc) class on linux

Some time in the past, i came across a siple tool that showed live in a 1sec interval, in human readable format, the bandwidth utilization seperated per tc class on your linux server. Unfortunately, i ...
QuArK's user avatar
  • 81
9 votes
2 answers
22k 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 ...
Neal's user avatar
  • 280
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
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
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
3 votes
3 answers
5k views

TC hashing filters - single rule deletion

For traffic shaping I'm currently using a setup that looks exactly like the setup from LARTC, on this page: http://lartc.org/howto/lartc.adv-filter.hashing.html I have a simple problem with that - ...
exa's user avatar
  • 571
0 votes
1 answer
254 views

HTB qdisc child of another HTB qdisc drawbacks

In the HTB documentation can be read: Note: HTB as child of another HTB is NOT the same as class under another class within the same HTB. It is because when class in HTB can send it will send ...
Diosney's user avatar
  • 305
4 votes
2 answers
4k views

Traffic shaping: tc filter attached to an HTB class?

Can I attach a tc filter to an HTB class rather than to an HTB qdisc? For example: tc class add dev $IF_LAN parent 1:100 classid 1:180 htb rate 19kbit ceil 2000kbit prio 4 where: 1:100 -> Is ...
Diosney's user avatar
  • 305
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
1 vote
0 answers
924 views

Traffic shaping for gateway to stop leechers

I am new to traffic shaping, but I need a quick simple shaping. I have a free internet service on my place using wifi. All www traffic has been routed to transparent proxy. We have a 10mbps connection,...
prd's user avatar
  • 608
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
877 views

how to tune tc rate parameter for optimal performance with htb/sfq?

I'm new to using tc/htb and I've just copy/pasted the script at ... http://lartc.org/howto/lartc.cookbook.ultimate-tc.html ... to run on the office gateway. The reason is to prevent large downloads, ...
SpliFF's user avatar
  • 404
0 votes
1 answer
149 views

tc: packets filter

I need to drop UDP packets with specific UDP port number) on network interface (say eth0). On my setup the interface eth0 is part of the bridge. is it possible to do it using tc command? if yes, how?
Dima's user avatar
  • 485
12 votes
2 answers
3k views

Linux TC class/filter numbering

I'm currently working on a traffic shaping solution for ISP-level companies, and came to an interesting (kindof philosophical) problem. Looking about the number of endpoints the system should handle (...
exa's user avatar
  • 571
1 vote
1 answer
2k views

tc traffic limiting/shaping/throttling/policing in linux ipv6 issues

I managed to discover an interesting issue: I'm not getting proper limiting with ipv4 traffic, but instead it works perfectly with ipv6. This doesn't make much sense to me since I read this article: ...
Regan W's user avatar
  • 31
3 votes
5 answers
1k 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?
MZK's user avatar
  • 31
4 votes
3 answers
5k views

Making iptables recognize youtube streams and large files

I use Ubuntu server 10.04 with the stock kernel as a NAT router. I use iptables and tc to do port based traffic prioritization. It is working fine. I have given http higher priority. So my network ...
nixnotwin's user avatar
  • 1,543
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
0 votes
1 answer
898 views

Rsync over NFS with QoS: How to view real transfer speed?

We have a bandwidth limit between a Linux server and a NAS, created using 'tc' with an IP filter. When writing to an NFS mount of the NAS, rsync claims a very high transfer speed for each file and ...
Ian Mackinnon's user avatar
0 votes
2 answers
5k views

Incoming rate limiting

I have a ubuntu machine with two interfaces. eth1 is the NAT interface and eth2 is the WAN iterface. I have a 4 mbps internet connection. I want to limit it to 2 mbps for the eth1 NAT network. So I ...
nixnotwin's user avatar
  • 1,543
2 votes
3 answers
3k 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" TQA="...
nixnotwin's user avatar
  • 1,543
1 vote
2 answers
3k views

Bash Script - Traffic Shaping

hey all, I was wondering if you could have a look at my script and help me add a few things to it, How do I get it to find how many active ethernet ports I have? and how do I filter more than 1 ...
Craig-Aaron's user avatar
3 votes
4 answers
14k 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 ?
Supratik's user avatar
  • 2,164
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
2 votes
1 answer
2k views

How to monitor qdisc bandwidth utilization

I have created a script to shape my traffic using tc. Is there any tool in Linux which will help me to visualize and monitor qdisc bandwidth utilization ?
Supratik's user avatar
  • 2,164
4 votes
2 answers
2k 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 ...
Ben K.'s user avatar
  • 2,389
2 votes
1 answer
887 views

traffic shaping for certain (local) users

i'm using ubuntu 10.10 i've a local backup user called "backup". :) i would like to give this user just a bandwidth of 1Mbit. No matter which software wants to connect to the network. this solution ...
JMW's user avatar
  • 1,463
1 vote
2 answers
2k views

tc simple rate limiting

I would like to do a simple rate limiting so all the http traffic (in & out) going to or from my http server is shaped. I have a GigE connexion on the server and I want to rate limit all HTTP ...
user avatar
1 vote
1 answer
718 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 ...
facha's user avatar
  • 1,368
1 vote
2 answers
4k views

higher traffic priority for FPS game in Linux

Goal: when running a FPS game in Linux, automate the setup of higher priority for its network traffic I know such tasks are usually accomplished with a combination of iptables (to mark IP packets ...
halp's user avatar
  • 2,228
0 votes
2 answers
3k views

Inconsistencies with Linux tc filter u32 matching on packet data payload - can someone explain?

I would just like some heads up on this as I really don't understand -why- this is the case. Further down is the TCPDUMP output (tcpdump -s0 -XXnni eth0 tcp port 80) of the 'HTTP' response a ...
parkamark's user avatar
  • 1,128
1 vote
3 answers
262 views

Priorize linux traffic in same protocol (http download vs htto browsing) with htb/tc

I have a big time reading but i cant figure-out how to do this. always i have a download in mu network all http browsing are affected, i need to do some specific or dont use sfq ? some one have a ...
user avatar
1 vote
2 answers
840 views

How much traffic a linux-based shaper would be able to chew

I have a linux based traffic shaper (iptables + tc htb policy). It works in bridge mode. Shapes traffic based on IPs and ports (there are about 100 rules in the "mangle" chain of iptables). Right now ...
facha's user avatar
  • 1,368
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
0 votes
3 answers
6k views

How do I use the `tc` command to give the 1st queue priority?

Lets say I have 3 queues (# indicates data): Q1: (in)[ ###](out) Q2: (in)[ #####](out) Q3: (in)[ #############](out) Lets say I put all my ICMP packets in Q1 and all the ...
Nick Bolton's user avatar
  • 5,126

1 2 3 4
5