Questions tagged [traffic-shaping]
Traffic shaping is a technique to delay some or all datagrams to comply with desired traffic profile.
233
questions
2
votes
0
answers
331
views
Wondershaper Issues Disq [closed]
We have 2 servers using tunnels for some things. Normally to limit traffic we use wondershapper. But on one server we get the following output:
Error: Specified qdisc kind is unknown.
RTNETLINK ...
0
votes
2
answers
498
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 ...
0
votes
2
answers
132
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 ...
0
votes
1
answer
304
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 ...
2
votes
0
answers
927
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 ...
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 ...
0
votes
1
answer
336
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:...
1
vote
0
answers
46
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 ...
1
vote
0
answers
377
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.
# ...
2
votes
1
answer
5k
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
$...
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 ...
1
vote
1
answer
182
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 ...
1
vote
1
answer
2k
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-...
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 ...
5
votes
1
answer
856
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 ...
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 ...
1
vote
0
answers
52
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 ...
0
votes
1
answer
821
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 ...
1
vote
0
answers
328
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. ...
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.
...
2
votes
1
answer
870
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 ...
0
votes
0
answers
345
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-...
0
votes
2
answers
185
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 ...
3
votes
1
answer
5k
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#...
1
vote
1
answer
466
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 ...
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 ...
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 ...
2
votes
1
answer
4k
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/...
3
votes
1
answer
507
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 ...
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:...
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 ...
0
votes
1
answer
722
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 ...
2
votes
0
answers
150
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;...
5
votes
2
answers
345
views
How is excess bandwidth distributed in linux htb?
Say I have 100kbps bandwidth
- Root - 100kbps
/ \
/ \
/ \
/ \
/ ...
2
votes
1
answer
721
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 ...
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)....
1
vote
1
answer
85
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 ...
0
votes
1
answer
586
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 ...
0
votes
1
answer
624
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 ...
0
votes
1
answer
1k
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 ...
1
vote
1
answer
251
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 ...
1
vote
0
answers
229
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 ...
0
votes
1
answer
140
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?
0
votes
1
answer
831
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 ...
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 ...
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 ...
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 ...
0
votes
1
answer
879
views
Limit download speed to single LAN IP using TC on router's WAN interface
Currently I police the rate on my download speed with
tc filter add dev ppp0 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 9900kbit burst 10k drop flowid :1
I've got one ...
1
vote
2
answers
7k
views
Traffic shaping with iptables, ipset and tc (--match-set and --set-mark)
I am having some trouble with what I believe should be a fairly straightforward traffic shaping problem.
I have an Ubuntu (16.04) server that is acting as a router/nat. I want to allow most users to ...
2
votes
1
answer
1k
views
tc police rate packets by iptables handle?
I want to limit download speed from any IP to 800kbit, (this works)
And I want to limit the download speed of marked packets to 400kbit.
I don't get any errors, but it's not limiting the download ...