People who code: we want your input. Take the Survey

Questions tagged [tc]

Tc is used to configure Traffic Control in the Linux kernel.

Filter by
Sorted by
Tagged with
15
votes
4answers
15k views

Understanding tc qdisc and iperf

I'm trying to limit bandwidth with tc and check the results with iperf. I started like this: # iperf -c 192.168.2.1 ------------------------------------------------------------ Client connecting to ...
12
votes
2answers
8k views

Bucket size in tbf

I've read many times about Linux's token bucket filter (tbf) and still I don't fully understand how I should calculate the burst and latency parameters, shame on me :( I suppose that a reasonable ...
8
votes
1answer
5k views

tc on bridge port

I have a 4 port bridge: root@Linux-Switch:~# brctl show bridge name bridge id STP enabled interfaces br0 8000.000024cd2cb0 no eth0 eth1 ...
6
votes
2answers
29k views

set packet rate limit via iptables

I have a packet rate limit (max. 10 per seconds) which is set by my internet provider. This is a problem if I want to use the AceStream player, because if I exceed the limit I get disconnected. How ...
6
votes
2answers
9k views

How is the IFB device positioned in the packet flow of the Linux kernel

I would like to know the exact position of the following device in the packet flow for ingress traffic shaping: IFB: Intermediate Functional Block I would like to better understand how packets are ...
6
votes
1answer
4k views

Can't get tc to limit network traffic

Based on this section of the Linux Advanced Routing & Traffic Control HOWTO, I can't get tc to limit the network speed in my computer. The router is a Motorola SurfBoard modem with a few routing ...
5
votes
2answers
2k views

Limit bandwidth of individual HTTP requests while not throttling total bandwidth

Looking at tools like tc, wondershaper, htb and comcast, all these tools seem to operate on the level of a network interface or at least a "connection group" for limiting bandwidth. I'd like to not ...
4
votes
3answers
2k views

monitor bandwidth on interface with tc or iptables

I would like to log a warning message to /var/log/messages file if either ingress or egress bandwidth on eth0 interface is over a certain threshold. I could do this with a script which reads the value ...
4
votes
2answers
26k views

tc show output explanation

I've found useful run watch along tc, for example: [root@router ~]# watch -dc tc -p -s -d qdisc show dev eth0 Every 2,0s: tc -p -s -d qdisc show dev eth0 ...
4
votes
1answer
3k views

Is TCP PACING enabled by default on linux?

I want to ask a basic question: Is TCP PACING enabled by default on Linux? I'm using Ubuntu right now, kernel 4.4.0. I saw that it can be enabled/disabled using TC-FQ, but is it enabled by default ...
4
votes
1answer
3k views

How to configure QoS per IP basis?

We have say 4 users in a private network connected to the Internet trough a Linux router with a public IP address that is doing network address translation (NAT). I have to configure QoS to give ...
4
votes
1answer
2k views

How can I configure fair bandwidth sharing between cgroups?

It's fairly easy to use tc with Stochastic Fairness Queueing (SFQ) to configure fair bandwidth sharing between flows, but an application can open multiple flows and get an unfair share of bandwidth. ...
4
votes
1answer
2k views

TC (Traffic Control) to control bandwidth

I'm having an issue with a bandwidth script that I've been using for a while to limit the outgoing bandwidth on a port. It worked fine at the beginning until I wanted to change the outgoing port ...
4
votes
1answer
900 views

Using tc for traffic quotas?

Is it possible to implement traffic quotas (absolute limits, not rate limits) based on the network classifier cgroup? I see there is the iptables netfilter 'quota' extension, which seems to do ...
4
votes
1answer
2k views

Traffic shaping with tc does not work

I want to limit the outgoing traffic to a specific bandwidth. My Code: tc qdisc add dev vif1.0 root handle 1: htb default 30 tc class add dev vif1.0 parent 1: classid 1:1 htb rate 1mbit tc class add ...
4
votes
1answer
5k views

Is it possible to throttle upload bandwidth per `IP` basis using `tc`, `htb` and `iptables` ? (Download limitation not required)

Problem I've searched internet like anything but couldn't find much about limiting upload. The solutions given are not limiting IP basis like this one but LAN as a whole. +-----+ +------...
4
votes
0answers
97 views

Queuing disciplines are per-interface, what happen 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 ...
3
votes
1answer
1k views

tc class rate 50Kbps != 50K/s in wget?

Got the following test rule setup: tc qdisc add dev wlan0 root handle 1: htb tc class add dev wlan0 parent 1: classid 1:1 htb rate 1000Mbps tc class add dev wlan0 parent 1:1 classid 1:5 htb rate ...
3
votes
3answers
1k views

queueing in linux-htb

I am trying to understand the queuing mechanism of linux-htb QDisc and QDisc of linux tc in general. What I could gather: During TX, the packet is queued into the queue inside the linux tc. This ...
3
votes
1answer
2k views

About hfsc parameters

I'm trying to use hfsc, so I've read the HFSC Scheduling with Linux I understand some concepts but shame on me, I don't understand how the values are calculated, for example: The concept of the ...
3
votes
2answers
943 views

Tc qdisc delay not seen in tcpdump recording

I have two linux containers connected with a veth-pair. At veth-interface of one container I set up tc qdisc netem delay and send traffic from it to the other container. If I watch traffic on both ...
3
votes
1answer
1k views

How can I permanently associate tc qdisc commands with a particular interface?

I need to use a tc qdisc command to limit bandwidth usage on an interface created by openvpn. This works great when I run the command manually but occasionally the connection drops or restarts and ...
3
votes
1answer
517 views

TCP flows coexisting with UDP when using SFQ (stochastic fair queuing)

I am simulating a network where I limited and modified all the interfaces using TC (traffic control). My interfaces are of the form HTB --- SFQ (it is a little bit more complex but I will simplify ...
3
votes
1answer
7k views

remove tc filter (Traffic Shaping)

How can I remove a single filter? tc filter show dev peth1 shows filter parent 1: protocol ip pref 16 u32 filter parent 1: protocol ip pref 16 u32 fh 800: ht divisor 1 filter parent 1: protocol ip ...
3
votes
1answer
1k views

Adding qdisc under the mq top-level qdisc

This LWN article suggests that one may add/replace the network scheduler for a queue "under" the mq "dummy scheduler." These two point to that end: The mq scheduler does two things: - present ...
3
votes
1answer
6k views

tc don't see marked with -j MARK packets

Server has 2 network interfaces: eth1 with address 13.0.0.254/24 eth0 with address 172.20.203.4/24. It's routing traffic between this two networks. Task is to limit bandwidth between this two ...
3
votes
1answer
2k views

Get list of qdiscs and filters that are supported by tc tool

Depending on how it was compiled and on its version number, tc tool does not always handle the same list of queueing disciplines, filters, policing actions and so on. I am looking for a way to get a ...
3
votes
1answer
1k views

QoS with TC qdiscs: is it possible to have ALL outbound connections have x speed limit per unique IP?

I'm trying to setup QoS in my VPS so that I can have any new outbound connection to a unique IP gets limited x speed. For instance: have 5 public IP's requesting data from my VPS. When the VPS sends ...
3
votes
1answer
1k views

Are dropped packages in traffic control really dropped?

While having a slight timeout problem in my network (the router needed some rest, so that's solved) I found myself trying to decipher tc -s output, after noticing that the "dropped" values represented ...
3
votes
1answer
1k views

Why don't the following commands work to limit traffic to port 21 using tc?

In my quest to find a way to limit outgoing bandwidth for a running instance of bitcoind, I came across this guide that explains how to rate limit traffic to a particular destination IP: tc qdisc add ...
3
votes
0answers
909 views

Multiqueue tun/tap interface

I am trying to understand how Multiqueue tuntap interface works. Following the instructions provided at: https://www.kernel.org/doc/Documentation/networking/tuntap.txt I was able to create multiple ...
3
votes
0answers
400 views

htb -> netem -> pfifo_fast qdisc drops all packets under high traffic

I configured a OpenVSwitch-based topology using Mininet on my local machine: h1 (server) -------(eth1) s1 (eth2)--------------- h2 (client) (eth3) | ...
3
votes
0answers
528 views

tc cbq doesn't work (no traffic limitation)

I've been trying to use cbq weight attributes after HTB failed to do so. I've tried using a command set I've found in an example just to verify it works (HTB works fluently) Here are the commands I ...
2
votes
1answer
3k views

How can I limit Download bandwidth of an existing process? (iptables, tc, ?)

I am happily limiting upload speed by port - but really want to limit download by process. It seems iptables did have functionality for matching and marking packets by process in the form of --pid-...
2
votes
1answer
639 views

How can I use `tc` with diffrent parameters on few virtual interfaces?

I need to simulate network environment with bad network connections for about 1000 hosts. Can tc (with netem) be used with virtual network interfaces (like eth0:0, eth0:1)? When I try to use tc on ...
2
votes
1answer
2k views

Alternative to Iptables for packet filtering in OVS interfaces

I just realised that all the iptables rules I have been applying to my open Vswitch interfaces never match. I am using iptables to mark some packets, and then I use TC (traffic control) filters to ...
2
votes
1answer
767 views

Explanation of bandwidth management script calling tc

I have some scripts in Linux to manage internet bandwidth, but I do not understand what they do. What is the meaning of the following scripts: tc qdisc add dev $IF root handle 1: htb default 256 tc ...
2
votes
3answers
3k views

Reducing packet loss in tc rate limiting

I use this tc command to limit upload speed on an interface: tc qdisc add dev eth1 root tbf rate 2mbit burst 10kb latency 70ms peakrate 2.4mbit minburst 1540 But it results in heavy packet loss. If ...
2
votes
1answer
924 views

Rate limiting with tc on vlans

I have found this prior answer (https://serverfault.com/questions/461153/vlan-based-rate-limiting-using-tc), however attempting to add the vlan match to my script yields : What is "handle"? Usage: ....
2
votes
1answer
952 views

Delay some localhost traffic

How to delay some localhost traffic? (the computer is a VM, but hopefully that won't matter) The following creates a new interface and tries to apply tc to it: ifconfig lo:1 127.0.10.10 netmask 255....
2
votes
1answer
2k views

How do packets traverse tc/netfilter physical, VLAN and bridge interfaces?

Given the following setup on a router that performs NAT between two networks A and B: eth0 - physical interface - no ip address eth0.1 - VLAN interface for network A - no ip address eth0.2 - VLAN ...
2
votes
1answer
2k views

Why does this tc ingress limit command not work? (bandwidth drops off to nothing)

I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely IF="wlp3s0" LIMIT="100kbit" BURST="100kbit" PORT="...
2
votes
1answer
740 views

how to use tc with htb on arch-linux

I'm trying to use this tc script on my arch box. Specifically, the first line, roughly equal to tc qdisc add dev eth0 root handle 1: htb default 3 fails with RTNETLINK answers: Operation not ...
2
votes
1answer
2k views

Filter UDP packet in tc filter

Hello I'm trying to limiting the bandwidth on my iperf udp test (iperf -u). I use tc qdisc and class to make some assured rate and ceiling rate for it. However, I don't know what filter I should use ...
2
votes
1answer
705 views

SSH tunnelling outgoing traffic shaping

I am using an OpenSSH server for a client app that uses the traffic forwarding, SSH tunnelling and some users are consuming an extraordinary amount of bandwidth. Is there a way to shape the traffic on ...
2
votes
0answers
385 views

Simulate network on a single machine

I'm trying to simulate a network on a single machine. I have multiple nodes that communicate through tcp sockets. I tried to create one dummy interface for each node like this: ip link add name ...
2
votes
1answer
526 views

Using IFB for ingress traffic shaping

I am trying to use the IFB driver for ingress traffic and are having some problems getting it to work for us. It hooks the packets before netfilter and so marks set with iptables are not seen by tc ...
2
votes
0answers
1k views

Performance bottlenecks of Linux traffic shaping (tc)

I have an interesting problem. We have a Linux server with Debian Stretch installed. The server has a single CPU E5-2680 v2 and Intel 82599ES 10G Dual Port NIC's. There are no other services (like ...
2
votes
1answer
100 views

Why I don't see drops with TCP flows in linux

I wanted to observe the congestion window of a TCP flow so for that I have two nodes (using linux namespaces) connected to each other through veth pairs and a bridge. To limit bandwitdh to 10mbps I ...
2
votes
0answers
206 views

I want to limit a SFQ qdisc by bytes [closed]

I have to HTB branches that continue to a SFQ qdisc. tc qdisc add dev eth0 root handle 1: htb default 20 tc class add dev eth0 parent 1: classid 1:1 htb tc class add dev eth0 parent 1:1 classid 1:10 ...