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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [tc]

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

2
votes
0answers
17 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
23 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
69 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
11 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
70 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
85 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
49 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
96 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
26 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
1answer
37 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
122 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
53 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
104 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 ...
1
vote
0answers
15 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
121 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
56 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
153 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
70 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
132 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
65 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
269 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
0answers
92 views

HTB traffic shaper per IP - users download speed degrade at peak time

I have Oracle Linux Server with latest kernel-3.8.13.... On server goes traffic shaping and some iptables rules. Server have three Intel i350-T2 dual Gigabit network adapters. Cooperated by 3 ...
0
votes
1answer
221 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
63 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
331 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
1k 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
92 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
332 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
216 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
66 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
253 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
297 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
700 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
374 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
202 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
378 views

How to configure per User/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
544 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
117 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
445 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
216 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
98 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
415 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
190 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 ...
3
votes
0answers
43 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
0answers
69 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
1answer
117 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
1answer
538 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
0answers
95 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
1answer
155 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
0answers
108 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 ...