Questions tagged [tc]

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

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

233 questions
23
votes
4 answers

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 address 1.2.3.4: tc qdisc del dev eth0 root tc qdisc…
Matt White
  • 707
  • 1
  • 5
  • 17
23
votes
3 answers

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 pseudo device like so: modprobe ifb ip…
nixnotwin
  • 1,513
  • 5
  • 34
  • 54
15
votes
3 answers

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 root Unfortunately, this entirely removes the…
François Marier
  • 381
  • 2
  • 3
  • 12
12
votes
5 answers

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 interfaces are there). Now, different kernels do…
brownian
  • 291
  • 3
  • 13
12
votes
2 answers

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 (which is around ~20k) I got a little worried what…
exa
  • 571
  • 4
  • 14
8
votes
2 answers

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 problem is, I can't figure out how to later delete…
Neal
  • 270
  • 1
  • 2
  • 7
7
votes
2 answers

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 dev $IF_LAN parent 1:100 protocol ip prio 7 flowid…
Diosney
  • 305
  • 5
  • 12
6
votes
1 answer

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 sets of commands, neither of those work: tc qdisc…
peetonn
  • 231
  • 2
  • 4
6
votes
0 answers

How to limit bandwidth per VPN connection?

I have a StrongSwan (IKEv2) server setup and would like to limit each VPN connection to 512kb/s. After researching I came across tc in Ubuntu. I don't quite understand it and am fighting through the manual pages. DEV=eth0 tc qdisc del dev $DEV…
Houman
  • 1,325
  • 3
  • 18
  • 30
6
votes
3 answers

Advanced dynamic routing with external program

I need to build a system in which i am able to route packets based on a number of parameters, such as port/protocol etc, which are somehow "normal", but also on other aspects, such as queue length, and other external factors. My router is composed…
lbedogni
  • 111
  • 5
5
votes
1 answer

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 first line I tried to type was this one : tc qdisc…
Raphael Laurent
  • 219
  • 1
  • 6
  • 17
5
votes
1 answer

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 be the one I need for my QoS needs, and even if it…
Eric MORAND
  • 293
  • 2
  • 8
5
votes
1 answer

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 goal is to create a root qdisc that sends all…
Ian
  • 93
  • 1
  • 6
5
votes
1 answer

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), something that I could easily switch on and off in a…
Dan Nestor
  • 220
  • 1
  • 2
  • 7
5
votes
1 answer

Linux Traffic Control: qdisc mq

On my Linux system I see this: # ip link list .... 2: eth2: mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 .... What's qdisc mq? In http://lartc.org/lartc.html I find only information about IMQ. In the examples…
Zak
  • 153
  • 1
  • 1
  • 3
1
2 3
15 16