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.

241 questions
28
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
  • 756
  • 2
  • 7
  • 18
28
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,623
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…
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…
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
10
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
  • 290
8
votes
1 answer

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,735
7
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
  • 261
7
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
  • 121
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
6
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…
6
votes
1 answer

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. $ tc -s qdisc ls dev em1 qdisc mq 0: root Sent…
5
votes
1 answer

Using tc to decrease bandwidth to a specific destination address

I am trying to find the shortest path between two hosts H1 and H2 using Dijkstra code. Setting a condition in one of the switches on that path. the condition is: if the packet sending to H2 then change the path automatically. I'm using Mininet, I…
a66a
  • 53
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…
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
  • 113
1
2 3
16 17