Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
24 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 ...
1
vote
1answer
95 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
1answer
66 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 ...
0
votes
0answers
22 views

Traffic Shaping with Shorewall

I'd like to shape my network traffic according to the following rules: All traffic from one specific IP has lowest priority All HTTPS traffic shall have medium priority All SSH traffic shall have ...
1
vote
0answers
238 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
0answers
16 views

Linking qdisc rules to an IP address

I am having trouble traffic shaping specific IP addresses using the HTB algorithm. I saw tutorials online about applying qdisc rules to specific devices and they all uses a command similar to what I ...
0
votes
2answers
73 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
0answers
70 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
1answer
129 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 ...
-1
votes
0answers
28 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
47 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
114 views

How is excess bandwidth distributed in linux htb?

Say I have 100kbps bandwidth - Root - 100kbps / \ / \ / \ / \ / ...
0
votes
0answers
153 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) <...
2
votes
0answers
147 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
1k 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
47 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
122 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
1answer
237 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
357 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
125 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
121 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
53 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
326 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
490 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
480 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
527 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
426 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
2answers
978 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
536 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
395 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
539 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
170 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
496 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
138 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
445 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
2k 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
1k 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
365 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
194 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
110 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
2k 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
83 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
746 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
993 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
192 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
629 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
623 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 ...