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

Python Twisted: How use HTB rate-limiting with UDP Protocol

I have a DNS server which I want to add some rate-limiting on, since I'm receiving some bursts of floods of queries. I read through https://github.com/racker/python-twisted-core/blob/master/doc/examples/shaper.py and adapted it to my needs: from…
Daniel F
  • 13,684
  • 11
  • 87
  • 116
0
votes
1 answer

The defined BANDWIDTH in M3U8 and Linux tc

I have the following m3u8 file…
Salem Masoud
  • 411
  • 11
  • 32
0
votes
2 answers

Traffic shaping over Google Interconnect

Considering an hybrid scenario based on on-premises systems and VM/services on Google Cloud, is it possible to shape the traffic over the Google Dedicated Interconnect link (e.g. define different priorities, different bandwidth, etc.)? Are…
0
votes
1 answer

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 ping, Success. create qdisc using following…
0
votes
1 answer

pfSense Traffic Shaping - distribute bandwidth evenly

I am trying to distribute traffic evenly per IP on the network. I have seen an implementation of this using monowall with a simple check-box for distributing bandwidth evenly, but since monowall is discontinued I am resorting to pfSense or Opnsense.…
WMRamadan
  • 974
  • 1
  • 11
  • 25
0
votes
0 answers

tc command to enqueue TCP packets but randomly drop UDP packets

On my CentOS 7.3 system, I would like to configure the ethernet interface so that it immediately enqueues outgoing TCP packets but randomly drops outgoing UDP packets at a configurable rate. The tc(8) command appears capable of doing this using a…
Steve Emmerson
  • 7,702
  • 5
  • 33
  • 59
0
votes
1 answer

Traffic Shaping tc-htb, burst has no effect

I’m doing some tests to try to understand the tc-htb arguments. I’m using VmWare Player (version 2.0.5) with Windows 7 as host and Ubuntu (version 4.4.0-93) as guest. My plan is to use iperf to generate a known data stream(udp 100Mbits/sec) via…
MattiasK
  • 11
  • 1
  • 2
0
votes
0 answers

tc multiple piped actions results performance hit, seek better way

I have been experimenting with using tc, tc-nat and tc-pedit to perform stateless nat operations. My goal is to mirror packets from one interface (eth0) to another (eth1), but I also want to change the destination IP, and destination MAC, so the…
user2066671
  • 177
  • 4
  • 16
0
votes
2 answers

Traffic mirroring with tc over GRE Tunnel only gets ingress Traffic

i am trying to mirror "all" network traffic from one interface with the help of tc trough an GRE-Tunnel tun0. The GRE-Tunnel is working fine, i can ping and send packets trough it without any problems. I added the tc-qdisc and tc-filter with the…
Florian
  • 29
  • 6
0
votes
1 answer

tc filter does not match ip address, only range

I am trying to build virtual network for simulation. Links are determined by IP addresses and I can shape traffic and set up delay for range defined by netmask #!/bin/bash VETH_1="vethf4dbb89" tc qdisc del dev $VETH_1 root tc qdisc add dev $VETH_1…
sgflt
  • 68
  • 3
  • 10
0
votes
2 answers

'RTNETLINK answers: File exists'

When I added the delay command, paramiko returns back "2" as exit status(while it returns "0" for bandwidth command setting). Is 2 alright? (Googling didn't help with this, I am guessing 2 must be an error of some sort). The command I use…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
0
votes
1 answer

Calculation of written and read bytes in netty application

I need to track individual client's connections (written, read bytes and speed(bytes per second)) in my simple http server netty app. As I understand, to do this, I have to use ChannelTrafficShapingHandler. What methods must be overriden and how can…
TMS
  • 13
  • 6
0
votes
1 answer

How to limit network speed using tc?

I have three machines: client, server and proxy. On client(1.1.1.1) I have simple script, which using wget, on server(2.2.2.1) I have apache. And on proxy machine I want to limit speed by using tc. On proxy machine I have two interfaces…
luminousmen
  • 1,971
  • 1
  • 18
  • 24
0
votes
1 answer

tc-sfq alternative that limits by bytes?

Is there an alternative to tc-sfq (Stochastic Fairness Queueing) that allows to configure a limit based on the packet size (total bytes) instead of packet count? The reason for this is that given a packet size of 50 bytes, one htb class…
xnor
  • 343
  • 5
  • 11
0
votes
2 answers

How to run bash 'tc' command within python?

I want to us traffic control of the Linux kernel with Python to simulate lost, corrupt and duplicate packages. I'm already able to configure this with the Linux Terminal, but I have to use python. bash cmd works: tc filter show dev eth1 python…
checkThisOut
  • 621
  • 1
  • 5
  • 18