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

tools for traffic shaping

I have to carry out a test where I differentiate (delay or partially drop) some of my outgoing traffic based on a combination of destination port and IP address. I was thinking of doing it locally on the linux machine where I do my tests. What are…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
1
vote
1 answer

Any free/cheap bandwith shaping or network impairment software with API?

I'm looking for a (preferably) free software to install on a dual NIC box to shape badwidth and/or introduce packet loss, latency, etc. Now I know dummynet and similar software but I need an API to control it. Maybe a simple RESTful http or SOAP…
Zepplock
  • 28,655
  • 4
  • 35
  • 50
0
votes
2 answers

Traffic shaping with tc is inaccurate with high bandwidth and delay

I'm using tc with kernel 2.6.38.8 for traffic shaping. Limit bandwidth works, adding delay works, but when shaping both bandwidth with delay, the achieved bandwidth is always much lower than the limit if the limit is >1.5 Mbps or so. Example: tc…
user308917
0
votes
2 answers

Looking for traffic control function (i.e. QOS) library in Linux

I try to port some C++ code from Windows to Linux, but I can't find a similar API for traffic control functions in Linux. I need these functions. Please help if you know where I can find such API? Thank you for your time.
user1263270
  • 61
  • 2
  • 8
0
votes
1 answer

What does the term POLICED in Linux network scheduler (tc qdisc) named after?

POLICED means that the speed of ingress packet will be limited and the exceeding packets will be dropped. I saw a comment "skb is shot by police" in include/linux/netdevice.h. It's of course alike, but is there any story behind this name?
Zhe Yang
  • 312
  • 2
  • 9
0
votes
0 answers

Combining clsact and classful qdiscs together

I need to work with clsact qdisc and ebpf filter on it but at the same time I want to shape my traffic using e.g. htb qdisc. While clsact acts as a root qdisc I can't attach it as a leaf of any of htb classes. At the same time clsact is classless…
Maciek Leks
  • 1,288
  • 11
  • 21
0
votes
0 answers

Why can't I add tc filters to docker0?

I want to run multiple containers, each of which sftp's into a server, and downloads file. I want to manipulate qdiscs to give priority to a certain container. The containers are attached to the docker0 bridge by default and therefore are an…
akastack
  • 75
  • 7
0
votes
0 answers

how to make a allow-firewall using linux tc(traffic control)

I want to make a simple firewall using linux tc (traffic control) simple firewall means allow or deny packet using ip address filter. I can make 'deny' firewall using this config (deny ip packets from 192.168.0.10) tc qdisc add dev eth0 root handle…
0
votes
0 answers

parent qdisc is not visible after adding child class

I'm implementing a traffic classifier with a match filter using MAC address and then adding a child classifier based on fwmark. Below is the heirarchy root(1:) \ 1:5 \ 1:6 tc qdisc add dev enx1 root handle 1: htb tc class add dev…
Preyas
  • 1
  • 1
0
votes
0 answers

Linux TC Qdisc Prio: How to generate priomap for non-default bands (e.g. for #bands 5)

I am doing some experiments on linux tc filter. I am using Prio qdisc and I need 5 bands (classes). I see that if I use default #bands i.e. 3 then it works. But when I am setting bands to 4 or 5, it does not work. So it seems that I need to provide…
0
votes
1 answer

`tcconfig` throws ValueError when setting/deleting traffic control on docker container

I'm using tcconfig to set traffic control rules on docker containers. I'm running from a python script with venv (not from a bash shell) a tcset/tcdel command, for example: tcdel --docker --all The command is run with check_call of…
user107511
  • 772
  • 3
  • 23
0
votes
0 answers

How to specify the custom profile to send packet for Moongen?

I'm trying to send multiples packets to test a server , but i need to send different traffic pattern ( send IPv4,ICMP,Ipv6...) but i can't even specify one type when sending the streams [EDIT-1] CMD: ./build/MoonGen ./packetgen.lua -tx 0 -rx…
Mey
  • 1
  • 1
0
votes
1 answer

Call traffic control (tc) from within Linux kernel

There is a userspace util called tc(8) for traffic shaping, i.e. tc qdisc add dev eth0 root tbf rate 10mbit latency 100ms burst 5000. The internal implementation of the tc command uses netlink to send specific messages to the kernel which in turn…
elasticman
  • 641
  • 8
  • 20
0
votes
0 answers

How to throttle data to a given data rate on a TCP Connection

There are multiple incoming TCP connections and you need to architect a system that will write to an outgoing TCP connection at a particular data rate. How do you programmatically achieve this. The ordering of the packets from different threads is…
user592748
  • 1,194
  • 3
  • 21
  • 45
0
votes
1 answer

Blocking YouTube videos with iptables

I'm trying to find a way to block YouTube video playback on my kid's Ubuntu computer. I created a shell script to get Youtube IPs and add them to iptables for incoming packets to be dropped. To do so I grab IPs with whois -h whois.radb.net -- '-i…
MaxAuray
  • 513
  • 1
  • 4
  • 18