Questions tagged [trafficshaping]

Traffic-Shaping refers to the modification of packet-based network protocols according to certain criteria. A frequent goal might be to forbid certain protocols e.g. for file sharing to limit data transfer rates. If intended to modify the network traffic, blocking certain ports also counts as traffic shaping.

Traffic Shaping refers to various methods to change the network load of a connection. The usual goal is to avoid clogging of a slow connection.

Example: Assume you have a DSL-connection with asymmetric up- and download speeds, i.e. slow upload and fast download. If you are sending an email while downloading a large file from a webserver, not all TCP packets necessary to continue the download will find their way to the webserver and thus the download is being delayed. A solution to avoid that is to throttle the email-upload thus that the requests for the download can find their way to the webserver.

Further reading: https://de.wikipedia.org/wiki/Traffic-Shaping

82 questions
1
vote
0 answers

How to check how well my traffic control rules are working?

I am a bit new to network traffic control. I have been tinkering with the tc command and iptables in linux and have been testing them by not so convenient methods, like for instance, for congestion, putting multiple heavy files on upload. Is there a…
1
vote
0 answers

Cannot delete Linux traffic control qdisc using its handle

I am a beginner with Linux TC. I cannot figure out why a certain qdisc which I added to the root of an interface cannot be deleted by specifying its handle. Yes, I know I can delete it using the root specifier if it's attached to the root of the…
1
vote
0 answers

transport header in sk_buff

Is it guaranteed that skb->transport_header is always correctly set on ingress path? Specifically, I'm setting a tc qdisc on interface, and attach to it filter with tc action; this path qdisc->filter->action exists before the packet hits TCP/IP…
Mark
  • 6,052
  • 8
  • 61
  • 129
1
vote
0 answers

How to limit bandwidth to a set of hosts

I'd like to limit bandwidth to a set of local hosts by adding an appropriate config to my router. IIUC I can limit the bandwidth like I want with: tc qdisc add dev $IF root tbf burst 1mb rate 100kbps Except that this affects all machines connected…
Stefan
  • 27,908
  • 4
  • 53
  • 82
1
vote
0 answers

using tc control command in bash script gives unexplainable results

I send frames in packets from a client to a server on the server I want to shape my traffic. I use this script to control the traffic. First down to 80 kbit after 10 seconds down to 40 kbit. (I know this is ridiculously low, I usually use bigger…
Fulion
  • 31
  • 1
  • 6
1
vote
0 answers

Bandwidth shaping for an ipset using qdisc and tc

I am trying to do bandwidth control for an ipset using this tutorial. I have modified it to get ipsetnames. This is my bandwithshaing script. TC=/sbin/tc IF=wlan0 # Interface DNLD=1mbit # DOWNLOAD Limit UPLD=1mbit #…
Sachith Muhandiram
  • 2,819
  • 10
  • 45
  • 94
1
vote
1 answer

How do I throttle bandwidth-speed for internal ip-addresses using tc command and cbq-only filter?

I want to limit bandwidth-speed of internal ip-addresses (like 10.8.0.1) and had been trying to use the following rules: tc qdisc add dev tun1 root handle 1: cbq avpkt 1000 bandwidth 3000mbit tc class add dev tun1 parent 1: classid 1:1 cbq rate…
LeVence
  • 41
  • 8
1
vote
1 answer

Discriminators for using in flow-based classification

I need to classify TCP traffic base on video and non-video. So i need to find characteristics of each flow. My classification is Flow-based and one of my variables is incoming packet length. but it is not accurate as P(video|1200Bytes)=…
1
vote
1 answer

tc filter drop matched packets

I'm looking to add a set of filters that would drop packets that match parameters. It seems tc filters do not support drop action based on match, but based on qos parameters. Has anyone been able to place tc drop filters? The most common method…
user2066671
  • 177
  • 4
  • 16
1
vote
1 answer

socket connection bandwith limiting / traffic shaping with ActionScript

Does anyone know of a way to monitor and/or limit bandwidth usage for a given socket connection in ActionScript 3? I have an Adobe AIR app from which I need to upload large streams of data. However, due to bandwidth restrictions I want my users to…
1
vote
1 answer

Limit not bandwith, but packets per second in linux

Subquestion #1 tc with all its qdiscs is perfect way to limit bandwidth, but is there any means in Linux to limit pps of outcoming packets? Why i ask it. Normally you think about only one resource - bandwidth (bytes per second), but when some app…
Void
  • 271
  • 3
  • 11
1
vote
1 answer

tc: attaching many netems to an interface

I'm looking to simulate delays for a set of services that run on different ports on a host. I would like to simulate different delays to different services, potentially many on a given host hopefully without any limits. The only way I've found to do…
Chris Adams
  • 1,008
  • 1
  • 11
  • 22
1
vote
1 answer

The two NICs bridged together ingress are redirected to ifb, but it don't work ,why?

I have a host that have two NICs, so it can be seen as a gateway, and the two network ports bridge. Then I make the two network interfaces' ingress traffic to redirect to an IFB, and then do the flow control of the IFB, but it do not work, why? The…
choumin
  • 11
  • 5
1
vote
2 answers

Traffic monitoring and shaping (C\C++)

I want to write a library (C\C++) which would be able to monitor network traffic (TCP and UDP) as well as limit bandwidth to a particular network area (apply different traffic shaping rules to different network zones). This library should work on…
Stepan
  • 11
  • 1
  • 3
1
vote
0 answers

linux: traffic shaping per TCP session

I'm running a service on TCP port 7070 and i want to limit the incoming and/or outgoing traffic to f.e. 50kbits/s. The limit should be per TCP session whatever the src ip is. Can you please send me any hints how I can build this? Thanks in advance…