Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tc]

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

0
votes
1answer
34 views

Revert tc back to original that existed before the tc command?

I did this which worked great to limit my host's bandwidth. But now I want to return to full speed. Sadly my command is not right. ga@ga-EX58-UD4P:~$ sudo tc qdisc add dev eth1 ingress [sudo] ...
0
votes
0answers
17 views

TrafficControl filters

# task - to limit incoming traffic by subnets / hosts   2   3 # clean up   4 tc qdisc del dev ppp7 root   5 tc qdisc del dev ifb0 root.   6 tc qdisc del dev ppp7 handle ffff: ingress   7   8   9 # ...
0
votes
0answers
40 views

How to use tc with HTB to rate limit docker outbound traffic?

I am trying to use tc with HTB to throttle bandwidth used by my containers in bridge network mode. To test the result, I used iperf3. without throttling, I got the following result: root@...
0
votes
1answer
39 views

Advanced tc filtering flow map for SFQ queue

I'm trying to change the default filtering for a SFQ to one based on source IP, where each IP goes to a class. I know I can create a SFQ with more divisors with something like: tc qdisc add ... sfq ...
0
votes
0answers
75 views

How to undo the effects of a 'tc qdisc change' command?

I am playing with the netem examples from here https://wiki.linuxfoundation.org/networking/netem and I have learned that I can undo the effect of a tc qdisc add command with a similar tc qdisc del ...
0
votes
1answer
32 views

Network shaping local proxy for website testing

I want to make a virtual network interface to TCP-proxy a website and have my browser see it through a slow network connection, in order to debug performance issues in the website itself. So far I ...
0
votes
0answers
48 views

adding delay with `tc netem` giving better throughput on AWS network

During network tests (AWS) i found an interesting behavior - adding a small delay (0.5ms) on network device lead to better throughput results. Without delay 359MB/sec in avg, with delay 422MB/sec in ...
0
votes
0answers
48 views

simulate bad network between two devices

We are developing a product on an arm soc and unfortunately the kernel on the devices does not support netem. So I want to use my workstation as an intermediate router to simulate a bad network ...
2
votes
0answers
46 views

Linux HTB number of levels

Re-modified Linux HTB by adding a single printk message in htb_dequeue function. static struct sk_buff *htb_dequeue(struct Qdisc *sch) { ... original code ... original code for (level = 0;...
1
vote
1answer
70 views

tc/netem filter explenation

Iam new to tc and i find it mighty confusing, i was able to find and bit understand little command flow, to issue delay on specific IP, but i dont tink it works properly - delaying all traffic ...
1
vote
1answer
102 views

Delaying Server response for specific IPv6 address

I have 3 servers configured with IPv6 address and I want to add some delay to a couple of servers say S1 and S3. For IPv4, I'm using 'tc' command and it's working fine. Commands using for IPv4 ...
1
vote
1answer
32 views

TC- HFSC : Can we have TC rule to set classes with minimum guarantee, but no maximum limit?

Can we set a rule where i can specify that my particular traffic will get minimum b/w no matter what, but no max limit if bandwidth is available. Eg : I have 20 mbps line. i want to set minimum 5 ...
0
votes
0answers
173 views

Run OpenVPN --learn-address script as root

I am running an OpenVPN server and need to run a bash script whenever a user gets an IP. The script is working fine now that i am running OpenVPN as root, but my intention was to run the server as ...
1
vote
0answers
115 views

Limit traffic on by user OpenVPN server using tc (traffic control)

I run an OpenVPN server with a 1 Gbps bandwidth and I need to limit it to 5 Mbps per user. Searching the internet I've come up to this bash script: $U32 = "tc filter add dev tun0 protocol ip parent ...
2
votes
0answers
155 views

Bandwidth control with TC for clients yet to be connected

I have applied bandwidth control using TC and iptables using this tutorial on my Strongswan VPN server. The bandwidth control works fine ONLY if that specific client is already connected. For example:...
2
votes
2answers
489 views

Limit packet rate, open connections, and IP addresses

On Linux, can I use tools like tc, iptables or others to control/shape network traffic on a network interface, for the following purposes: Control the network packet number rate (or the total number)....
1
vote
1answer
43 views

htb multiply root rate by 8

I am changing the queue discipline to HTB, creating a parent node, and 3 children which are the classes. sudo tc qdisc add dev em1 root handle 1: htb sudo tc qdisc add dev em1 parent 1: classid 1:1 ...
1
vote
2answers
146 views

Why doesn't this “tc filter” rule classify the traffic at intended?

I'm trying to configure some basic traffic classification to limit the maximum ingress bandwidth for every machine in my local network to 3 Mbps. I'm operating the gateway 192.168.2.1, where the ...
2
votes
1answer
347 views

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 ...
0
votes
1answer
152 views

How to change HTB rate of a classid?

I have tc htb qdisc setup that looks like 1:0 | 1:1 / \ 1:10 1:11 # tc -s -d class show dev br0 Shows class 1:10 with 1024kbit rate and ceil: class htb 1:10 parent 1:1 ...
0
votes
1answer
162 views

tc qdisc with GRE in openwrt

I'm trying to implement traffic control to GRE interface in an openwrt board. For this i followed below steps, Create GRE interface named gre1 in both tunnel end devices. Tested reachability with ...
2
votes
0answers
22 views

Combining tbf with other qdiscs?

It looks like a subset of classless qdiscs can be combined with each other in certain configurations. In fact it doesn't make sense to me that you could not do this, since things like codel will only ...
1
vote
0answers
269 views

tc prio how the packets are prioritized

I want to use tc prio queuing discpline for scheduling packets in a particular order. I want to send out packets to destination port 5555 with the highest priority and packets to destination port 6666 ...
0
votes
0answers
69 views

Bandwidth Control Of UDP packets on a router

As in TCP we have a Congestion control receiver window which negotiates between Sender and receiver ,We dont have such in UDP. So if I were to create some sort of bandwidth control on UDP packets (...
2
votes
1answer
226 views

How to measure the speed for tc (traffic control) in Ubuntu?

I have the following settings: tc qdisc del dev $ETH0ORSIMILAR root tc qdisc add dev $ETH0ORSIMILAR root handle 1: htb default 30 tc class add dev $ETH0ORSIMILAR parent 1: classid 1:1 htb rate ...
0
votes
0answers
93 views

Testing performance of iproute2 TC on large number of pppoe interfaces

I have an Accel-ppp[1] server that deals with a lot concurrent pppoe connections. These pppoe connections are generated in a way that all come in a burst and Accel-ppp server does the pppoe ...
-2
votes
1answer
180 views

Linux control packet size for specific IP address

I would like to get Linux tool/script to control packet size of specific IP or MAC. For example if IP reach 10 MB then DROP packages with IP tables. I have idea how to DROP, but I don't have idea how ...
1
vote
0answers
96 views

force tbf qdisc to drop traffic

I have several virtual netspaces on my server connected via the virtual adapters. One of the connections between the netspaces is limited to 10 Mbps: root@core-wkst:/var/log# tc -s qdisc show dev ...
4
votes
0answers
344 views

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 ...
0
votes
1answer
269 views

Bandwidth shaping for an ipset using qdisc and tc

I am trying to do bandwidth control for an ipset using these tutorials 1,3,21. And this script. I have modified it to get ipsetnames. This is my bandwithshaing script. TC=/sbin/tc IF=wlan0 ...
0
votes
1answer
102 views

Limit bandwidth for two sources of traffic together but not one of them

There are 2 sources of traffic The first one of them shouldn't be impeded in any way, it should be able to draw as much available traffic as it wants. The second one, on the other hand, should be ...
1
vote
1answer
420 views

How to set an general network limit per client + priority for TCP acknowledgements

Following situation: Network A is connected to network B over an slow connection. Different hosts in network A would like to send traffic to hosts in network B. Hosts in network B sending commands to ...
0
votes
1answer
2k views

I need it simulate a delay to a certain IP over as certain port

I need to simulate a traffic slow down to a certain service. That means I need to slow connection on a certain port. I have this script that introduces a delay to a certain IP on all ports, but other ...
2
votes
1answer
136 views

Can Linux queueing discipline solely to lower latency? Can it be disabled?

i'm learning about queueing discipline as part of tuning the network stack on our carbon-c-relay cluster. My understanding is that the queueing discipline layer exists solely to lower latency and ...
3
votes
0answers
392 views

Limiting incoming traffic with tc police

I have a requirement to limit the total incoming traffic to 5mbit. I know this can be achieved by using the following tc command: tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 ...
0
votes
0answers
265 views

How can i limit incoming bandwidth for an ip

i have access to some multipurpose machines configured to do jobs for different clients. each client is a web server. since one of my web server taking too much data traffic. this system blocks me for ...
2
votes
0answers
73 views

Qdisc class for eth0 disappearing

I have a script that sets up traffic shaping on port eth0. The script is as follows: import os import subprocess def run(cmd): print cmd result = subprocess.check_output(cmd, shell=True) ...
1
vote
0answers
337 views

Use tc qdisc netem to emulate delay, but ssh gets slow down

I have 3 VMs, A, B, and C. These VMs are all under the same network. On VM A, I use the following commands to introduce a delay to VM B. tc qdisc add dev eth0 root handle 1: prio tc filter add dev ...
0
votes
1answer
371 views

Limit download speed to single LAN IP using TC on router's WAN interface

Currently I police the rate on my download speed with tc filter add dev ppp0 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 9900kbit burst 10k drop flowid :1 I've got one ...
1
vote
1answer
792 views

Traffic shaping with iptables, ipset and tc (--match-set and --set-mark)

I am having some trouble with what I believe should be a fairly straightforward traffic shaping problem. I have an Ubuntu (16.04) server that is acting as a router/nat. I want to allow most users to ...
2
votes
1answer
463 views

tc police rate packets by iptables handle?

I want to limit download speed from any IP to 800kbit, (this works) And I want to limit the download speed of marked packets to 400kbit. I don't get any errors, but it's not limiting the download ...
1
vote
1answer
271 views

shape dropbox on linux router with tc and iptables

Another machine on my LAN is uploading to Dropbox and saturating my internet connection's upload bandwidth. When that happens my pings to 8.8.8.8 take 3000-6000ms. When dropbox is not uploading my ...
4
votes
0answers
456 views

How to configure per IP bandwidth control using TC?

Requirements: There is an arbitrary number of users per group. Bandwidth for any particular group is 1000kbps. Bandwidth for each user in a group is 70 kbps. At any time no user should not consume ...
1
vote
1answer
677 views

rate limiting traffic for internal ip (TC)

i have setup ikev2 vpn on my server, but there is no tunnel interfaces like openvpn (tun0). so i cant actually using tc to limit the ikev2 vpn speed. example for traffic shapping of openvpn (tun0) ...
4
votes
1answer
135 views

Inject Delay between Virtual Machines in a VLAN

We'd like to simulate the impact of locality using VMs within a on a public cloud (say AWS EC2). To do this, we would like to inject delays in packets such that we can simulate a particular network ...
1
vote
2answers
633 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 ...
0
votes
1answer
261 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
1answer
124 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
1answer
461 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
1answer
236 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 ...