Questions tagged [tc]
TC is the linux tool used to manipulate the traffic control functionality in the kernel.
240
questions
3
votes
2
answers
4k
views
How to limit speed for every device per MAC address in the gateway via Linux command "tc"?
I have a gateway whose OS is Linux.Assume my downlink bandwidth is 100 Mbps. I want to limit the max download speed to 1Mbps for every device which uses this gateway.In other words, if there are 100 ...
1
vote
1
answer
841
views
LINUX: multiq leaf not replaceable with tc
# uname -r
4.7.5-200.fc24.x86_64+debug
# tc -s -d qdisc show dev ens3
qdisc mq 8001: root
Sent 44589 bytes 340 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0
qdisc fq_codel ...
0
votes
1
answer
337
views
Is it possible to control network traffic per url with TC?
I need to slowdown a specific call to a Web-service but only for a specific url on the same host:
I have my program configured to call (GET)
URL1 = http://my-remote-system.domain.net:567/...
2
votes
1
answer
903
views
Minimum bandwidth limit on Linux systems
I need to limit the minimum bandwith from an IP to specific services/ports, by dropping all the packets that will not satisfy that minimum rate.
I saw the attribute rate in the HTB class of the Linux ...
1
vote
1
answer
840
views
Bandwidth limit for multiple network destinations with a default (slow) match with Linux TC
I'm playing with Linux traffic control features to restrict KVM VM output bandwidth and got stuck while using filters to match destinations for a fast class and for a (default) slow class for a given ...
2
votes
0
answers
66
views
Measuring effectiveness of qdisc
I am trying to set the incoming and outgoing bandwidth of a particular interface. I set the outgoing bandwidth in the following way.
sudo tc qdisc add dev f30e888e9a857_c handle 1: root htb default ...
1
vote
0
answers
237
views
Create IFB with name or ID in Ubuntu server
I am doing some work relate to limit income bandwidth (ingress) of a NIC in Ubuntu 16.04. Seem like we cannot limit the income bandwidth directly but have to use IFB. In this
this post we have a good ...
0
votes
1
answer
293
views
My tc script just limit outgoing traffic or both outgoing and incoming traffic?
I create this script to limit bandwidth all traffic through card eth1, I can test download speed with wget command but don't know how to test upload speed. Can anyone answer my question or show me how ...
0
votes
1
answer
2k
views
Why I can't limit bandwidth with tc command
I want to limit bandwidth for interface eth1, I read command in this link.
sudo tc qdisc add dev eth1 root handle 1:0 htb default 10
sudo tc class add dev eth1 parent 1:0 classid 1:10 htb rate ...
0
votes
0
answers
204
views
How to slow traffic on a proxy?
I'm trying to slow down the traffic on my TCP forking proxy.
The code is no longer located on the proxy, I'm still testing on my laptop; all HTTP(S) requests on Chrome are redirected with ...
0
votes
1
answer
1k
views
Set large buffer/queue on a network interface to emulate bufferbloat
I want to emulate large buffer delay on a specific interface. I have a simple dumbbell topology like:
PC1 eth0 <-----------------------> eth0 PC2
It would be good if I ping PC1 from PC2, ...
1
vote
0
answers
254
views
Network performance low when using OpenVPN
When transferring larger amounts of data using an OpenVPN client from a specific internet connection, the internet connection from the OpenVPN servers network completely breaks down.
Other OpenVPN ...
1
vote
1
answer
3k
views
Limit bandwidth per connection in Linux
I wasn't really able to google this which surprises me but maybe I was just looking the wrong way... I would like to limit bandwidth per one TCP connection ie. all the connections are coming to a ...
1
vote
1
answer
6k
views
How to check all active netem rules?
I have been adding rules/settings (not sure what the correct terminology is here) with tc/netem, such as tc qdisc add dev eth0 root netem delay 25ms, and have been removing them after use.
However, ...
0
votes
0
answers
156
views
Gradual throttling total bandwidth
I have a server with a 30TB traffic allowance hosting (mostly) history images and would like to throttle one particular directory (the download image sizes) when necessary to avoid going over the ...
3
votes
1
answer
9k
views
How to add latency and bandwidth-limit interface using tc?
I know I can add latency to an interface using this command:
# tc qdisc add dev eth0 root netem delay 50ms
In addition to latency, I want to limit the bandwidth of this interface to 100kbps.
How ...
1
vote
0
answers
938
views
TC not classifying packets correctly based on iptables MARK
I have machineA that is connected to the internet via eth0. MachineB on the other hand is connected to machineA through a mesh and is connected to the internet via machineA. I am trying to give lower ...
0
votes
2
answers
7k
views
OpenVPN Variables Passed via Script
Can someone explain and/or direct me to a summary of the variables that are available to be passed to OpenVPN upon a client connection?
For example, what do the following $1, $2, $3, $4 values ...
-2
votes
2
answers
527
views
Configure OpenVPN with many users [closed]
Similar to this question I am looking at connecting 1000's of concurrent users:
OpenVPN performance: how many concurrent clients are possible?
To save CPU cycles I would like to know if there is ...
0
votes
1
answer
358
views
Bash Script Not Working
I hope this is an easy answer
Problems:
I placed the following bash script called learn-address.sh in the following folder:
vi /etc/openvpn/netem/learn-address.sh
Added the following (2) lines ...
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 ...
2
votes
1
answer
366
views
Bandwidth throttling linux to external subnets
I am looking to start up a new open-source mirror for my enterprise, but would also be interested in opening it up for external clients as well. However, for obvious reasons, I would like to limit ...
1
vote
0
answers
342
views
HTB scheduler unexpected behaviour, low priority traffic starving high priority traffic
I am working on assuring low delay for UDP traffic at the home gateway level. At this home gateway I have two types of traffic, TCP and UDP, and I assure differentiated treatment by using HTB. The ...
2
votes
1
answer
1k
views
bandwidth larger than tc htb ceil in 10-Gigabit network
In classid 88:201, I set ceil 200mibps, but in fact data can be send at 218 Mibps.
Any one have any ideas what I'm doing wrong?
Cheers!
tc qdisc add dev eth0 root handle 88: htb default 202
tc ...
2
votes
2
answers
5k
views
How to setup a netem box
I'm trying to simulate different network condition based on factors such as latency, bandwidth and so on. I found that Netem is the best way to simulate different network condition. So my desired ...
0
votes
2
answers
268
views
Traffic control - bulk downloads with scp makes sshd to lag
My goal is to limit bandwidth per system user with tc, IMQ interfaces and iptables. Right now i have problem with bulk downloads (i.e. scp) that is creating lag on interactive programs such as ssh ...
1
vote
2
answers
1k
views
cannot identify YouTube traffic with ndpi-netfilter, when using Google Chrome
I have ndpi-netfilter installed on Ubuntu and I need to shape the youtube traffic to 100kbps using tc module. I classify all youtube traffic to a one class through the iptables and apply tc class to ...
0
votes
1
answer
2k
views
linux tc: unstable rate using tbf qdisc
This is the first time I am experimenting with tc. What I am trying to achieve is to limit the download rate that passes through a Virtual Machine that acts as gateway. The VM has two Ethernet ...
1
vote
1
answer
336
views
tc filters not working with DRR
I am trying to control the outgoing traffic from two VMs with the DRR qdisc.
This is the hierarchy I want to have:
root
|
qdisc drr
...
1
vote
2
answers
1k
views
Percentual dynamic bandwidth control with tc
Does anyone know if tc (iproute2) can be used to percentually divide the currently available bandwidth? We're on a GPRS connection on which the available bandwidth changes frequently. What I want to ...
3
votes
1
answer
1k
views
linux tc qdisc pie (aqm) configuration with limited bandwidth
I would like to configure AQM PIE by using tc-qdisc, but at the same time I would like to limit the bandwidth to 1Mb/s.
I have used similar configuration with fq_codel, i.e. I have limited the ...
0
votes
1
answer
1k
views
Add latency and random packet drops excluding SSH packets
I want to add some random delay/drop to all packets excluding SSH packets.
I can do that to all packets this way:
tc qdisc change dev $NIC root netem delay 100ms 10ms 25%
tc qdisc change dev $NIC ...
1
vote
2
answers
10k
views
RTNETLINK answers: File exists when using netem with tc
So I simply get this error when I enter this command in my master VM:
sudo tc qdisc add dev eth0 root netem delay 97ms
RTNETLINK answers: File exists
Any idea how that could be fixed?
I am running ...
2
votes
1
answer
588
views
QoS Traffic Shaping based on packet loss and latency for VPN
I am currently having the following situation:
I am using a VPN (OpenVPN) over a rather unstable internet connection. This means the maximum bandwidth varies between 100kbs and 1mbit. Whenever the ...
1
vote
1
answer
463
views
traffic shaping using ifb redirect
I would like to use ifb to perform some shaping for multiple virtual interfaces. However, I am not sure how to tell the ifb interface to egress to a dedicated egress interface
Right now vnet0 -> ...
0
votes
1
answer
2k
views
Limit input on a given port with tc filter and u32 match
I'm trying to rate-limit all incoming traffic on ports 8128-8191. I've read everything I found, checked everything ten times, it still doesn't work.
The commands:
tc qdisc del dev eth0 root
tc ...
2
votes
0
answers
127
views
Traffic shaping linux shell users on a per-user basis
I have a debian 7 server with a number of shell users and I would like to limit upload and download rate on all interfaces (eth0, gre1, sit1) on a per user basis so each user has his own 75KB/s upload ...
0
votes
1
answer
3k
views
RTNETLINK answers: Invalid argument while specifying packet loss by tc command
I am trying to specify packet loss by tc command on interface (port) 1 of switch part of network I have created using mininet :
sudo tc qdisc change dev s1-eth1 root netem loss 0.1%
but gettring ...
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 ...
0
votes
0
answers
244
views
Bandwidth Policing on Linux gateway - not QoS
I have a linux server providing NAT to a large subnet (/16) using iptables to-destination + multiple external ip's to survive port exhaustion.
I've looked at using tc / htb such as here Limiting ...
0
votes
0
answers
726
views
Traffic Control in OpenStack Neutron with either TC or OpenVSwitch
As far as I know, QoS in OpenStack Neutron is still under development and not production-ready (I could be wrong on this point though, shout at me if so...), but we are required to implement traffic ...
1
vote
1
answer
3k
views
How can I do traffic shaping in Linux by IP for both way communication?
Well, I've already gone through How can I do traffic shaping in Linux by IP?
on serverfault & what I'm trying to achieve is pretty much same.
Internet--------Linux Router----Switch-----Clients
...
4
votes
1
answer
7k
views
Limiting bandwidth on Ubuntu Linux
I am in the situation where I have to simulate a P2P-environment (for my masters thesis in computer science). To do that I am using Docker with Ubuntu to create a bunch of virtual machines that is ...
3
votes
1
answer
5k
views
How to limit outgoing traffic per IP Address using Linux TC
I want to limit outgoing traffic per IP address. For example I have a network interface eth0, having 1Gbps of bandwidth.
I want to limit the whole network interface to 1Mbps each destination IP ...
1
vote
0
answers
91
views
How do I cap each individual tcp stream, to a fixed maximum rate?
I've read but not in depth all the various traffic shaping docs and seen the long question on HSFC scheduling
Does anyone really understand how HFSC scheduling in Linux/BSD works?
looked at the ...
6
votes
3
answers
1k
views
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, ...
0
votes
1
answer
448
views
Using tc to delay packets to all IP address except for a single IP address
I'm familiar with this post here:
Using tc to delay packets to only a single IP address
Which will delay outbound packets to a single IP address. I want to do the opposite, which is to delay all ...
0
votes
1
answer
231
views
Linux Traffic Shaping: ceil rate never reached
My application run on port 8080. I have this iptables command:
iptables -A OUTPUT -t mangle -p tcp --sport 8080 -j MARK --set-mark 10
I have also theses TC rules:
tc qdisc add dev eth0 root handle ...
-3
votes
1
answer
505
views
Understanding a shell script [closed]
there i am trying to understand the purpose of this shell script. If anyone can help out i would appreciate it. Thanks!
This is located in android system at system/etc/throttle.sh
#!/system/bin/sh
# ...
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 ...