All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
337 views

How to limit Wireguard bandwidth

I have Debian 11 server with installed Wireguard with wg0 interface and 3 peers. Server bandwidth speed is 100 MBit and traffic is around 500 GB per month. What I need is: these 3 peers can use 100 GB/...
Space's user avatar
  • 11
0 votes
0 answers
100 views

Linux traffic balacning over multiple interfaces using traffic control

I have a server with virtual machines on libvirt. The server has an eth0 external interface. Each virtual machine has its own tap interface (tap0, tap1, tap2, etc.). I need to balance the traffic ...
arykalin's user avatar
  • 101
1 vote
1 answer
1k views

How to apply `fq_codel` to balance traffic in multiple VLAN connections?

I have an Ubuntu server connected to multiple VLAN networks over a single physical 1 Gbps network port. The network connections are configured via /etc/network/interfaces like this: auto lo iface lo ...
Mikko Rantalainen's user avatar
2 votes
1 answer
3k 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
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
  • 394
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
3 votes
1 answer
2k views

tc: one qdisc for two classes (multiqueue)

The default tc configuration on my server is: # tc class show dev ens5 class mq :1 root class mq :2 root # tc qdisc show dev ens5 qdisc mq 0: root qdisc fq 0: parent :2 limit 10000p flow_limit 100p ...
Vasili Syrakis's user avatar
0 votes
1 answer
715 views

Why does my bond interface with multiq ignore tc's queue selection?

On Debian Buster, Kernel 5.4.51, I have two interfaces tap0 and tap1 joined in a bond interface in mode balance-xor to increase throughput. There is, however, some traffic that must be sent through ...
RenWal's user avatar
  • 21
2 votes
1 answer
746 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
1 vote
1 answer
133 views

Performing tasks and custom logic on network packets

I'm looking for a way to process packets in a Linux server in a particular fashion - I need to run some custom logic on every packet, then (possibly) take some actions on the packets and let the ...
FitzChivalry's user avatar
1 vote
0 answers
185 views

Why does adding a single class to the htb qdisc in tc slow down my connection?

I'm running tc with the command: sudo tc qdisc add dev eth0 root handle 1: htb default 1. I then proceed to add a single class like so: sudo tc class add dev eth0 parent 1:0 classid 1:1 htb rate ...
Raiden Worley's user avatar
2 votes
1 answer
581 views

Attempting to shape traffic for both IPv4 and IPv6 results in a conflict

On my server I'm attempting to set up traffic shaping, and if I'm doing it for either IPv4 or IPv6, things are just fine: All filter rules for that particular protocol are installed. However, when ...
Robidu's user avatar
  • 135
0 votes
1 answer
3k views

Link bandwidth limiting by using tc

I am a newbie network engineer. I am trying to understand the Linux command tc. I made a simple network, consisting of two hosts H1, H2 and a switch S1 connecting them by using Mininet. Then, I ...
nimdrak's user avatar
  • 29
1 vote
1 answer
414 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
0 votes
1 answer
162 views

Network shaping local proxy for website testing

I want to make a virtual network interface to TCP-proxy a website and have my browser see it through a slow network connection, in order to debug performance issues in the website itself. So far I ...
dsign's user avatar
  • 153
1 vote
1 answer
366 views

Delaying Server response for specific IPv6 address

I have 3 servers configured with IPv6 address and I want to add some delay to a couple of servers say S1 and S3. For IPv4, I'm using 'tc' command and it's working fine. Commands using for IPv4 ...
metadata's user avatar
  • 121
2 votes
1 answer
6k 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
-2 votes
1 answer
635 views

Linux control packet size for specific IP address

I would like to get Linux tool/script to control packet size of specific IP or MAC. For example if IP reach 10 MB then DROP packages with IP tables. I have idea how to DROP, but I don't have idea how ...
aze2201's user avatar
  • 101
1 vote
0 answers
203 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
2 votes
1 answer
397 views

Can Linux queueing discipline solely to lower latency? Can it be disabled?

i'm learning about queueing discipline as part of tuning the network stack on our carbon-c-relay cluster. My understanding is that the queueing discipline layer exists solely to lower latency and ...
Michael Martinez'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
827 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 ...
Josh's user avatar
  • 61
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 ...
Josh's user avatar
  • 61
4 votes
1 answer
591 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 ...
Jedi's user avatar
  • 458
2 votes
2 answers
5k views

How to setup a netem box

I'm trying to simulate different network condition based on factors such as latency, bandwidth and so on. I found that Netem is the best way to simulate different network condition. So my desired ...
Chandana's user avatar
1 vote
2 answers
1k 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 ...
Jeroen's user avatar
  • 31
1 vote
2 answers
10k 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 ...
Mona Jalal's user avatar
0 votes
1 answer
2k 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 ...
Laurent Caillette's user avatar
0 votes
2 answers
3k views

Is there a way to limit bandwidth per ip using HTB + a CIDR range in Linux?

I can create rules to limit a entire subnet or to limit individual ip addresses with tc and htb. I am looking to use CIDR ranges to keep things somewhat elegant. The machines in question are all ...
user274562's user avatar
0 votes
0 answers
244 views

Bandwidth Policing on Linux gateway - not QoS

I have a linux server providing NAT to a large subnet (/16) using iptables to-destination + multiple external ip's to survive port exhaustion. I've looked at using tc / htb such as here Limiting ...
SomePoorTech's user avatar
-1 votes
4 answers
266 views

Is there anyway to tell what user will receive data from inbound packet?

In linux, considering this use case: 1. User initiates http request for webpage to remote server 2. Remote server answers request and sends packets Is there any reference to the user who started ...
Rooster's user avatar
  • 495
12 votes
5 answers
6k views

tc u32 --- how to match L2 protocols in recent kernels?

I have a nice shaper, with hashed filtering, built at a linux bridge. In short, br0 connects external and internal physical interfaces, VLAN tagged packets are bridged "transparently" (I ...
brownian's user avatar
  • 291
2 votes
1 answer
4k views

Linux income filtering based on private destination IP address

I am trying to set up a QoS script in my OpenWRT box so that traffic coming from the Internet is classified into a low prio and a high prio class. The criteria to classify traffic is its destination ...
Dani Camps's user avatar
1 vote
1 answer
2k views

tc traffic limiting/shaping/throttling/policing in linux ipv6 issues

I managed to discover an interesting issue: I'm not getting proper limiting with ipv4 traffic, but instead it works perfectly with ipv6. This doesn't make much sense to me since I read this article: ...
Regan W's user avatar
  • 31
2 votes
1 answer
887 views

traffic shaping for certain (local) users

i'm using ubuntu 10.10 i've a local backup user called "backup". :) i would like to give this user just a bandwidth of 1Mbit. No matter which software wants to connect to the network. this solution ...
JMW's user avatar
  • 1,463