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
18
votes
2 answers

Bandwidth Shaping in my C# application

I have a C# application that uses a native library that sends video to other IP over the internet using UDP. I have no traffic control over that library. My application also calls web services of another server using WebRequest that I have control…
Matin Lotfaliee
  • 1,745
  • 2
  • 21
  • 43
13
votes
2 answers

Why tc cannot do ingress shaping? Does ingress shaping make sense?

In my work, I found tc can do egress shaping, and can only do ingress policing. I wonder that why tc doesn't implement ingress shaping? Code sample: #ingress tc qdisc add dev eth0 handle ffff: ingress tc filter add dev eth0 parent ffff: protocol ip…
damn_c
  • 2,442
  • 2
  • 15
  • 17
11
votes
5 answers

How to throttle network traffic for environment simulation?

I'm trying to test an application that uses a database connection. What I would like to do is throttling the bandwith to, say, 1 MBit or such to get a better feeling for the application under realistic conditions. I already use Wireshark to have a…
user274464
9
votes
1 answer

tc class ceil inheritance

Using traffic shaping (tc) on Linux, trying to limit throughput in 2 levels. Class 1:20 inherits from 1:10 but traffic restriction does not apply. The traffic is being limiting using the limit of the last class. class htb 1:1 root rate 1Gbit ceil…
HenryGiraldo
  • 415
  • 3
  • 15
8
votes
2 answers

Removing the tc config on a particular interface

I am new to using the tc command. I am writing a test script to add delays to an interface. This is being done using python and fabric api So the script will do something like: sudo tc qdisc add dev eth1 root netem delay And at the end of script…
Akshya11235
  • 959
  • 4
  • 11
  • 25
7
votes
1 answer

Use tc to throttle Docker container's outgoing network bandwidth

I'm trying to do the bandwidth throttling to the Docker containers. To limit the downlink bandwidth, I can first find the veth interface of the container and use tc: tc qdisc add dev vethpair1 root tbf rate 1mbit latency 50ms burst 10000. If I want…
Wei-Tsung
  • 297
  • 3
  • 12
7
votes
2 answers

How to correctly limit bandwith usage with Java netty?

For a download client that I developed in Java using the netty nio lib I also implemented a bandwith limitation feature. Technically I do so via a GlobalTrafficShapingHandler object. Based on this class' JavaDoc I initialize the nio client pipeline…
Matthias
  • 9,817
  • 14
  • 66
  • 125
6
votes
3 answers

Avoid traffic shaping by using ssh on port 443

I heard that if you use port 443 (the port usually used for https) for ssh, the encrypted packets look the same to your isp. Could this be a way to avoid traffic shaping/throttling?
Jiaaro
  • 74,485
  • 42
  • 169
  • 190
5
votes
2 answers

How to priotize packets using tc and cgroups

I am trying to prioritize the packets that are generated from a certain process group so that they'll be picked first to be transmitted from the PC. I aim to do this by using cgroups and tc, but it seems not to work. First I set up cgroups on…
5
votes
0 answers

How can I set network priority on a docker container?

I'd like to set a lower priority on a specific docker container so it never starves other containers of network capacity. The model I'm looking for is something like: tc filter add dev eth0 protocol ip parent 10: prio 2 I think I want to set it…
joar
  • 473
  • 3
  • 7
5
votes
1 answer

API Traffic Shaping/Throttling Strategies For Tenant Isolation

I'll start my question by providing some context about what we're doing and the problems we're facing. We are currently building a SaaS (hosted on Amazon AWS) that consists of several microservices that sit behind an API gateway (we're using Kong).…
Mikel
  • 321
  • 1
  • 3
  • 7
5
votes
4 answers

Traffic shaping under Linux

Where can I learn about controlling/interrogating the network interface under Linux? I'd like to get specific application upload/download speeds, and enforce a speed limit for a specific application. I'd particularly like information that can help…
Seif Sallam
  • 821
  • 2
  • 10
  • 30
4
votes
1 answer

How to manage Squid based on per user user bandwidth

I want to manage the bandwidth and traffic based on user activities on Squid Server Proxy. I made some research but couldn't find the solution that I want. For example, users who have more than 256K traffic should be restricted from server. Can you…
3
votes
1 answer

Traffic shaping using tc

I'm working on a school project in which I try to simulate the network phenomenon of Buffer Bloating. This essentially is latency as a consequence of buffers in routers getting larger and larger in time because of the cheap prices of memory. Now, to…
Jan Discart
  • 167
  • 1
  • 1
  • 13
3
votes
2 answers

TC (traffic control) in Linux

I am using the code in this page to limit my upload and download bandwidth. https://help.atmail.com/hc/en-us/articles/201566464-Throttling-Bandwidth-using-Traffic-Controller-for-Linux The code: TC=/sbin/tc IF=eth0 #…
Ha Hacker
  • 387
  • 2
  • 6
  • 14
1
2 3 4 5 6