Questions tagged [traffic-shaping]

Traffic shaping is a technique to delay some or all datagrams to comply with desired traffic profile.

Filter by
Sorted by
Tagged with
0 votes
2 answers
66 views

Both incoming and outgoing packets is delayed even though i target incoming only with tc command

I want to deay incoming packets from a particular ip with tc command. I tried sudo tc qdisc add dev eth0 root handle 1: prio sudo tc qdisc add dev eth0 parent 1:3 handle 10: netem delay 500ms sudo tc ...
JustSomeFool's user avatar
0 votes
2 answers
68 views

Share bandwidth equally

I have a server with 100 Mbps bandwidth. Clients with dynamic IPs could connect to web server and download large files There are maximum 10 clients which can download simultaneously And I guarantee 10 ...
pirojnoe's user avatar
0 votes
1 answer
202 views

Linux TCP tuning to overcome choking uplink

A linux computer is on a network link which exhibits the following behaviour: good download speeds upload/uplink starts well but after a few seconds drops to close to nothing. The Send-Q and Recv-Q ...
Konrads's user avatar
  • 880
2 votes
0 answers
575 views

Can any help me to understand HAProxy DDoS attack protection configuration?

I'm using HAP on and off for a bit now and now I'm trying confgure DDoS protection per frontend, to block a connection for 5 mints, if it receives more than 200 requests per second from the same ...
MacUsers's user avatar
  • 479
0 votes
0 answers
276 views

How to realize a user-based bandwidth throttling in VPN or Proxy server

I created my own VPN or proxy server on a rented Ubuntu server. For example it may be an OpenVPN server with Pritunl or a Wireguard server with wg-easy or wg-install or firezone installation script. ...
Monerig's user avatar
  • 11
0 votes
0 answers
73 views

Ingress traffic shaping with OVS port

I have a ovs topology like this: h1 | | [SW 1] / \ / \ [SW 2] [SW 3] \ / \ / [SW 4] | | h2 Traffic is sent ...
Hai Pham's user avatar
0 votes
0 answers
33 views

Traffic shaping for multipath routing in OVS

I'm working with OVS and tried multipath routing using group tables like in this link: https://github.com/PSIB0T/Multipath-Routing. It splits traffic to buckets with output is different ports. At ...
Hai Pham's user avatar
0 votes
0 answers
62 views

Traffic control on an interface for all sessions

On an interface that is connected to a 1G port I want to limit all users/sessions to have no more than 20Mbits download speed individually. I mean If two of them tried to use bandwidth at the same ...
PouJa's user avatar
  • 135
0 votes
1 answer
2k views

Limit bandwidth for incoming packets to specific ip and port

I have a Linux server application running on a specific IP and PORT. Incoming packets need to be manipulated and put into an nfqueue based on sources and ports, for example: iptables -t raw -A ...
seq16's user avatar
  • 1
0 votes
1 answer
264 views

Huge lag with linux Traffic Control - TBF failed?

I've been working with Ubuntu18.04 and trying to shape the traffic with linux tc. Things went well in the passed few months. Here's my commands: # init queue sudo tc qdisc add dev enp2s0 root handle 1:...
MingXuan Yan's user avatar
1 vote
0 answers
43 views

shape voice linux traffic using tc

How to set up a traffic control policy so voice traffic has maximum bandwidth of an specific interface? I tried tc qdisc add dev $WIFI handle 1: root tbf rate 10mbit burst 32kbit latency 10ms but how ...
user3778640's user avatar
1 vote
0 answers
327 views

Dynamic bandwidth in Tc (Bandwidth Changes over time)

Basically I wanted to change the bandwidth after every 10 seconds using tc. So how to do that thing in tc. This is my script. !/bin/bash # # tc uses the following units when passed as a parameter. # ...
Abhishek Chapla's user avatar
2 votes
1 answer
4k views

traffic control (tc) filter not working

i am using Debian and am trying to limit the upload-bandwidth on an ip basis. The configuration is the following: #!/bin/bash tc=/sbin/tc $tc qdisc del dev eth0 root 2> /dev/null > /dev/null $...
Christian's user avatar
  • 141
0 votes
0 answers
1k views

Limit traffic to any one device with nftables meters

I have a Linux server (up-to-date debian buster) acting as a firewall/router to share an Internet connection among several Windows 10 and Ubuntu Linux workstations (5-10, no more than that). Since the ...
qid's user avatar
  • 111
1 vote
1 answer
158 views

Does tc guarantee network bandwidth for a process or run as best effort?

I have a tc rule as follows: qdisc tbf 1: dev bwp93ce2ea9d929 root refcnt 2 rate 100Mbit burst 100Kb lat 25.0ms Is this rule guarantee network bandwidth to be 100Mbps or it'll throttle if not enough ...
Michel Gokan Khan's user avatar
1 vote
1 answer
1k views

Reduce the network traffic priority in Linux

I want to reduce the priority of specific network traffic using tc in particular tc-u32 in my Linux server. In other words all other traffic must have higher priority than traffic with specified IP-...
red0ct's user avatar
  • 404
2 votes
1 answer
1k views

Linux traffic control u32 hashtable filters based on MAC address

I am currently working with a traffic shaping Linux node. The rule set has grown to about 2500 hosts, all identified specifically by MAC address. The filter configuration is "basic", meaning ...
axon's user avatar
  • 163
5 votes
1 answer
733 views

Bash: Dynamically traffic shaping rsync using variables for times schedule and slowing during runtime?

What are some solutions to having dynamic traffic shaping run during a bash script, after a command has already started? Is this even possible? My use case is, I have rsync running on a huge set of ...
algalg's user avatar
  • 175
0 votes
1 answer
2k views

Corruption using linux traffic control (tc command)

I am kinda new to doing traffic control using Linux tc commands. So i am doing some hands-on on introducing network delay, packet loss and corruption etc across two hosts in the same network. The ...
Pranooy's user avatar
1 vote
0 answers
41 views

How is traffic shaping handled for WAN links with unknown bandwidth?

We have a customer on a site with an LTE cell link as their WAN connection. The cell provider sells the link as 25Mbps down by 10Mbps up. The customer needs traffic shaping on site, where some of ...
Tal's user avatar
  • 305
0 votes
1 answer
763 views

Linux HTB: More than 70% of ceil rate is never achieved

Background:- I have an arm based system, which has HTB setup on the eth and wlan interface. Here is the HTB configuration:- tc class add dev eth1 parent 1:1 classid 1:1 htb rate 1Gbit ceil 1Gbit ...
Vo1dSpace's user avatar
1 vote
0 answers
282 views

Linux traffic control did not reach expectation when using HTB and filter

I am doing an tc experiment between two servers. When no tc rules are added, the bandwith between the two servers is about 7Gbps tested with iperf3. Then I add a tc filter based on HTB for testing. ...
UnBeliEvaBle's user avatar
0 votes
1 answer
2k views

how to proritize UDP port in tc

I have this TC code sudo tc qdisc add dev eth0 root handle 1: prio sudo tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport xxxx 0xffff flowid 1:1 where XXXX is the port number. ...
striker69's user avatar
2 votes
1 answer
805 views

Unable to set bandwidth limit on ingress wireless interface with netem and ifb

I am trying to limit the bandwidth on the ingress of a wireless interface using an IFB virtual interface. I followed the instructions here Summary of the steps: Bringing up ifb: sudo modprobe ifb ...
bobsaccamano's user avatar
0 votes
0 answers
321 views

Juniper MX traffic shaping - bypass rate limits for just a few destinations

The aforementioned MX router is a BRAS providing access for about 3,000 subscribers, using the 'dynamic-clients' functionality. Each subscriber demux interface gets assigned a specific firewall rate-...
Branislav Krzanic's user avatar
0 votes
2 answers
178 views

Traffic Control - is it possible to distinguish between www browsing and www bulk (iso download) traffic?

Lately i was working on uploading big files to website, this upload eat whole bandwidth and crippled my network. So i implemented chunking one 1MB chunk per second and its working but now I'm thinking ...
Abc Xyz's user avatar
  • 608
3 votes
1 answer
4k views

How to remove the ingress delay introduced using tc

I learned that we can introduce delay to ingress packets using tc by following the commands specified in : https://wiki.linuxfoundation.org/networking/netem#...
Dinesh's user avatar
  • 171
1 vote
1 answer
438 views

throttle outgoing linux network traffic under high latency

I want to slow my outgoing traffic when it encounters congestion, and measure "congestion" by packet response times. The intent is to avoid one NFS client starving all the other clients when ...
bukzor's user avatar
  • 263
3 votes
0 answers
2k views

Using tc qdisc, class, and filter to limit bandwidth (both ingress and egress) based on DSCP marks

I'm looking to set-up traffic shaping program that limits both incoming and outgoing traffic based on 6-bit DSCP field in IPv4 packet header. The user should be able to specify different rates for ...
dooble's user avatar
  • 31
0 votes
1 answer
1k views

Deleting root pfifo_fast (tc) on Linux

I'm trying to delete all qdiscs to do "fresh" configuration: % tc qdisc del dev enp0s25 root RTNETLINK answers: No such file or directory But it's there: % tc qdisc show qdisc noqueue 0: dev lo ...
LetMeSOThat4U's user avatar
2 votes
1 answer
3k views

Traffic control upload don't limit bandwidth

I'm making some rule to limit the bandwidth per ip connection on my VPN server. My command works for download but doesn't for upload, I don't know what I'm doing wrong here : #!/bin/bash TC='/usr/...
executable's user avatar
3 votes
1 answer
485 views

OpenVPN Traffic Control on CentOS 7

I'm trying to give my OpenVPN some bandwidth limitation. I would like for example for each user give 10Mb/s for upload and download. I tried the following answer I found (Automatically Call a Script ...
executable's user avatar
3 votes
0 answers
2k views

Adding some delay to a specific port on localhost using tc and netem

I'm going to simulate a network latency on three different ports of local host by using tc (traffic control for Linux) commands. I run the following code: !/bin/bash tc qdisc add dev lo root handle 1:...
Folani's user avatar
  • 31
0 votes
2 answers
2k views

Basic QoS bandwidth for all devices/clients

I have an IP network that has about 500+ clients on the network at any given time. The network uses a Cisco 1941 router as it's gateway, and has 5 different subnets. The network also has 2 DCs, a ...
Kevin's user avatar
  • 5
0 votes
1 answer
629 views

Advanced tc filtering flow map for SFQ queue

I'm trying to change the default filtering for a SFQ to one based on source IP, where each IP goes to a class. I know I can create a SFQ with more divisors with something like: tc qdisc add ... sfq ...
Xavier Trilla's user avatar
2 votes
0 answers
144 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;...
Tony Tannous's user avatar
5 votes
2 answers
333 views

How is excess bandwidth distributed in linux htb?

Say I have 100kbps bandwidth - Root - 100kbps / \ / \ / \ / \ / ...
Tony Tannous's user avatar
2 votes
1 answer
658 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 ...
DomeWTF's user avatar
  • 127
2 votes
1 answer
7k 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)....
WindChaser's user avatar
1 vote
1 answer
84 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 ...
Tony Tannous's user avatar
0 votes
1 answer
572 views

Captive portal with local webserver and limited internet access

I have a mini pc running Linux. It has a 3G modem, wifi modem, runs nodogsplash for the captive portal, hostapd, dnsmasq, web server that gives out data that the user needs. I have the 3G device for ...
55597's user avatar
  • 141
0 votes
1 answer
586 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 ...
Shihab Pullissery's user avatar
0 votes
1 answer
916 views

HTB Traffic shaping in Linux - change quantum of a class

I am using Linux HTB to shape traffic, I am able to achieve the bellow diagram. The problem arise when I want to change the allocation for the excess bandwidth, instead of giving each class its ...
Tony Tannous's user avatar
1 vote
1 answer
243 views

Testing Linux HTB fall short of expectation

I am trying to test Linux HTB, doing the simplest example just to see it actually works. I am creating a root and giving it 200kbps, then I create 3 classes which each one gets assigned a portion of ...
Tony Tannous's user avatar
1 vote
0 answers
216 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 ...
jpou's user avatar
  • 131
0 votes
1 answer
129 views

Split ping RoundTripTime

Data obtained from ping: is it round trip or one way? shows that the data of a ping measures both directions together. Is there any way to split this information in time-to-destination and time-back?
M K's user avatar
  • 103
0 votes
1 answer
803 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 ...
Sachith Muhandiram's user avatar
1 vote
1 answer
1k 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 ...
Mr Mueseli's user avatar
4 votes
0 answers
1k 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 ...
Shihab Pullissery's user avatar
0 votes
1 answer
2k views

Linux traffic shaping for large bandwidth (more than 1Gig)

I am doing an experiment between three computers that are connected with 10Gig interfaces and have RTT of 100 microseconds. Let's say these are machines A, B, and C. Machine A is communicating with B ...
Sajjad Rizvi's user avatar

1
2 3 4 5