Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [traffic-shaping]

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

0
votes
0answers
25 views

How to use tc with HTB to rate limit docker outbound traffic?

I am trying to use tc with HTB to throttle bandwidth used by my containers in bridge network mode. To test the result, I used iperf3. without throttling, I got the following result: root@...
0
votes
0answers
17 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 ...
0
votes
0answers
8 views

is it possible to use imq interface for egress qos

I found examples to set imq interfaces for ingress traffic shaping but I have multiple interfaces and I want to shape all this different outgoing traffic. any link or example to set imq for egress ...
2
votes
0answers
37 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
2answers
105 views

How is excess bandwidth distributed in linux htb?

Say I have 100kbps bandwidth - Root - 100kbps / \ / \ / \ / \ / ...
0
votes
0answers
61 views

Connecting IP GRE and EoGRE tunnel in the same linux host

Is there a way to forward the payload of a GRE traffic to a different EoGRE tunnel on the same Linux host ? Host A (GRE (IP/GRE/IP)) <—> (GRE (IP/GRE/IP)) Host B (EoGRE(IP/Ethernet/GRE/IP) <...
1
vote
0answers
94 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
2answers
274 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
1answer
38 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
1answer
49 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
0answers
32 views

tc: HTB class on LAN also affects upload speeds

I'm trying to limit download and upload speed of each client on LAN. I've got the download speed limit working so far. I used tc and iptables. The problem is upload speed is also affected by the ...
0
votes
1answer
134 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
1answer
253 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
1answer
108 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
0answers
82 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
1answer
45 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
1answer
256 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
1answer
368 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 ...
3
votes
0answers
370 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
1answer
338 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
1answer
343 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
1answer
749 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
1answer
440 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 ...
1
vote
1answer
234 views

shape dropbox on linux router with tc and iptables

Another machine on my LAN is uploading to Dropbox and saturating my internet connection's upload bandwidth. When that happens my pings to 8.8.8.8 take 3000-6000ms. When dropbox is not uploading my ...
4
votes
0answers
429 views

How to configure per IP bandwidth control using TC?

Requirements: There is an arbitrary number of users per group. Bandwidth for any particular group is 1000kbps. Bandwidth for each user in a group is 70 kbps. At any time no user should not consume ...
4
votes
1answer
130 views

Inject Delay between Virtual Machines in a VLAN

We'd like to simulate the impact of locality using VMs within a on a public cloud (say AWS EC2). To do this, we would like to inject delays in packets such that we can simulate a particular network ...
2
votes
1answer
448 views

Minimum bandwidth limit on Linux systems

I need to limit the minimum bandwith from an IP to specific services/ports, by dropping all the packets that will not satisfy that minimum rate. I saw the attribute rate in the HTB class of the Linux ...
0
votes
2answers
118 views

Router is slowing internet connection from 17 Mbps to 3 Mbps

The office is equipped with a Edgewater EdgeMarc 4500 router (Software Version 11.6.18 -- Mon Mar 25 14:01:38 PDT 2013). I did a test and determined that the router is slowing down the internet from ...
1
vote
1answer
345 views

Layer 7 QoS Management

I have currently run a medium size SOHO network that can have up to 25-50 users and I am looking to implement a QoS system to better utilize the bandwidth. I currently am using pfSense however, both ...
1
vote
1answer
39 views

Any detectable difference between traffic from HTTP browsing and HTTP downloads?

I am planning to use a multi WAN device for failover and load balancing, with multiple ISPs In my case I would like to maximize performance of HTTP browsing, while diverting on a specific WAN ...
0
votes
1answer
1k views

How to check all active netem rules?

I have been adding rules/settings (not sure what the correct terminology is here) with tc/netem, such as tc qdisc add dev eth0 root netem delay 25ms, and have been removing them after use. However, ...
1
vote
0answers
905 views

When add filter in tc have a “RTNETLINK answers: Invalid argument, We have an error talking to the kernel” error

Need help witch tc on debian 8. I add class rule like this "tc class add dev p514p1 parent 1:0 classid 1:0xA486 htb rate 20480Kbit ceil 102400Kbit quantum 2000 mtu 3000 burst 15k" and then add filter ...
3
votes
1answer
5k views

How to add latency and bandwidth-limit interface using tc?

I know I can add latency to an interface using this command: # tc qdisc add dev eth0 root netem delay 50ms In addition to latency, I want to limit the bandwidth of this interface to 100kbps. How ...
1
vote
1answer
329 views

Linux: limit outgoing bandwidth based on destination /24 network

I am setting up a scanning system for a Pentest company. The box has loads of bandwidth and I'm concerned that testers could inadvertently DoS the clients. Capping the outgoing bandwidth to 10mbps ...
1
vote
0answers
169 views

HTB scheduler unexpected behaviour, low priority traffic starving high priority traffic

I am working on assuring low delay for UDP traffic at the home gateway level. At this home gateway I have two types of traffic, TCP and UDP, and I assure differentiated treatment by using HTB. The ...
0
votes
1answer
99 views

iptables is marking packets with wrong number while copying file by scp

[Case1] When copying file from server (being on client) to client, packets are marked incorrect with 3 (root). [Case2] When copying file from server (being on server) to client, packets are marked ...
1
vote
1answer
1k views

QOS with iptables and tc with unstable WAN

I have a router/gateway under Linux, I want to add some QoS to reserve bandwidth for a specific flow. This can be done with iptables/netfilter and tc, but all examples start from the fact that you ...
0
votes
0answers
4k views

Mikrotik Queue Tree Priority and PCQ

I know very basics of mikrotik and trying to learn advance bandwidth management. Requirements: Group-A Users - 10.10.0.1/24 Group-A Users Bandwidth Allowed = 64k Per User with following Priorities ...
1
vote
0answers
79 views

Traffic control

Good day! I am using Traffic control on ubuntu 14.04 for shaping bandwidth for rate 5Mbit/sec. After some time I would like to change the rate. As fas as I understand I can do that with "change" ...
1
vote
2answers
595 views

cannot identify YouTube traffic with ndpi-netfilter, when using Google Chrome

I have ndpi-netfilter installed on Ubuntu and I need to shape the youtube traffic to 100kbps using tc module. I classify all youtube traffic to a one class through the iptables and apply tc class to ...
0
votes
1answer
803 views

linux tc: unstable rate using tbf qdisc

This is the first time I am experimenting with tc. What I am trying to achieve is to limit the download rate that passes through a Virtual Machine that acts as gateway. The VM has two Ethernet ...
1
vote
1answer
171 views

tc filters not working with DRR

I am trying to control the outgoing traffic from two VMs with the DRR qdisc. This is the hierarchy I want to have: root | qdisc drr ...
1
vote
2answers
544 views

Percentual dynamic bandwidth control with tc

Does anyone know if tc (iproute2) can be used to percentually divide the currently available bandwidth? We're on a GPRS connection on which the available bandwidth changes frequently. What I want to ...
3
votes
1answer
545 views

linux tc qdisc pie (aqm) configuration with limited bandwidth

I would like to configure AQM PIE by using tc-qdisc, but at the same time I would like to limit the bandwidth to 1Mb/s. I have used similar configuration with fq_codel, i.e. I have limited the ...
0
votes
1answer
1k views

How to set 1Mb speed per host in pfsense

Currently we are using pfsense latest version and I want to assign download speed upto 1Mbps per host (download+Upload) using pfsense and also setup squid proxy which working on bridgh mode in pfsense ...
1
vote
2answers
5k views

RTNETLINK answers: File exists when using netem with tc

So I simply get this error when I enter this command in my master VM: sudo tc qdisc add dev eth0 root netem delay 97ms RTNETLINK answers: File exists Any idea how that could be fixed? I am running ...
2
votes
1answer
359 views

QoS Traffic Shaping based on packet loss and latency for VPN

I am currently having the following situation: I am using a VPN (OpenVPN) over a rather unstable internet connection. This means the maximum bandwidth varies between 100kbs and 1mbit. Whenever the ...
0
votes
1answer
507 views

Dynamic bandwidth limitation with pfSense

Currently we have a squid proxy to access internet. A single download can saturate the lines and in this circumstance a second user experiences extremely poor performance trying to surf the web. I ...
1
vote
1answer
192 views

traffic shaping using ifb redirect

I would like to use ifb to perform some shaping for multiple virtual interfaces. However, I am not sure how to tell the ifb interface to egress to a dedicated egress interface Right now vnet0 -> ...
0
votes
1answer
783 views

Limit input on a given port with tc filter and u32 match

I'm trying to rate-limit all incoming traffic on ports 8128-8191. I've read everything I found, checked everything ten times, it still doesn't work. The commands: tc qdisc del dev eth0 root tc ...