All Questions
100
questions
0
votes
1
answer
246
views
linux tc + vlan interface
This is my tc simple script. It limit bandwidth based on source ip address and use hashing filter based on /24 subnet. This example filter works but only when this example subnet 10.118.0.0/24 is add ...
0
votes
0
answers
98
views
Any way to limit bandwidth per IP in network behind linux router
I whant to limit bandwith of clients from network behind my linux based NAT gateway.
My clints is connected via wifi or directly via ethernet to router and receiving their IP address from DHCP.
I want ...
0
votes
0
answers
89
views
How can I have different delays for different IP Addresses using tc and netem?
I have been using tc with netem to delay packets being sent from my computer to a specific IP address. I have managed to get this to work but I would like to have unique packet delays to each IP ...
0
votes
1
answer
1k
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
0
answers
43
views
Combine netem with pfifo_fast at the root
I am unable to combine netem with pfifo_fast so that at the root I have pfifo_fast and then netem as sub childs on the same interface.
I can afford to run
sudo tc qdisc add dev <interface_name> ...
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 ...
0
votes
1
answer
522
views
HTB "rate" parameter limits available bandwidth
Good day,
I have the following situation: 4 TCP streams of data from one machine to another. Each streams has its own destination TCP Port. 4 streams have different priorities : high, medium, low, ...
0
votes
1
answer
217
views
Where does u32 packet classifier start
I have a functioning traffic classifier that uses raw packet offsets to match on the source and/or destination MAC addresses of the packet. The filter uses negative offsets as the default appears to ...
1
vote
0
answers
294
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.
# ...
1
vote
0
answers
239
views
How can I limit incoming/outgoing connection speeds based off IPs?
I want to limit the speed each IP can download/upload files for every application on my server to 1Mb/s
Example IP 192.168.0.1 is downloading at sustained 900Kb/s through FTP server if the IP then ...
2
votes
1
answer
1k
views
linux traffic control qdisc mq pfifo_fast: where to put netem?
When I list out the qdiscs on my system, I see an mq qdisc and some pfifo_fast qdiscs. The pfifo_fast ones all seem to have a major number that is the same as their parent. Or am I misunderstanding ...
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-...
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 ...
2
votes
0
answers
348
views
tc filter does not apply between a virtual interface and a physical one
I am working on a project aiming at managing a network between several components. For project purpose, we want to test some bad network effects using netem. The used commands are the following ones:
$...
0
votes
1
answer
458
views
Measure packet latency / drop between ingress and egress interface of a rate-limiting pass-through host
Somewhere between my sender and receiver, there is host explicitly limiting my transfer rate.
I know it's a Linux host. The ingress interface for my traffic is eth0 and the egress interface is eth1. ...
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 ...
0
votes
0
answers
109
views
How configurable is the Linux Network Emulator in regards to queue disciplines?
Based on this wiki article
https://wiki.archlinux.org/index.php/Advanced_traffic_control
It appears that I can configure the Linux traffic controller, which seems to be a subset of the Linux Network ...
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 ...
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 ...
0
votes
2
answers
164
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 ...
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 ...
0
votes
1
answer
2k
views
What's the differences between "quantum"s in htb and fq_codel qdisc?
According to the manual page
HTB
quantum
how much bytes to serve from leaf at once {use r2q}
FQ_Codel
quantum
It is the number of bytes used as 'deficit' in the fair queuing algorithm. ...
1
vote
1
answer
381
views
tc match IPv4 fragment offset
What is the correct Syntax for matching Fragments that have and Offset > 0 in tc?
I have tried:
... u32 match u8 255 ff at 7 flowid 2:1
But to no avail
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
0
answers
4k
views
How to undo the effects of a 'tc qdisc change' command?
I am playing with the netem examples from here https://wiki.linuxfoundation.org/networking/netem and I have learned that I can undo the effect of a tc qdisc add command with a similar tc qdisc del ...
2
votes
0
answers
135
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;...
1
vote
2
answers
3k
views
Why doesn't this "tc filter" rule classify the traffic at intended?
I'm trying to configure some basic traffic classification to limit the maximum ingress bandwidth for every machine in my local network to 3 Mbps. I'm operating the gateway 192.168.2.1, where the ...
6
votes
1
answer
5k
views
Network shaping using `tc netem` doesn't seem to work
I'm trying to simply delay traffic targeted for certain IP address on Ubuntu 16.06 box with no luck.
There are plenty of resources as this this this or this that I studied.
I ended up with these two ...
2
votes
0
answers
65
views
Combining tbf with other qdiscs?
It looks like a subset of classless qdiscs can be combined with each other in certain configurations. In fact it doesn't make sense to me that you could not do this, since things like codel will only ...
-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 ...
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 ...
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 ...
1
vote
1
answer
6k
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
0
answers
938
views
TC not classifying packets correctly based on iptables MARK
I have machineA that is connected to the internet via eth0. MachineB on the other hand is connected to machineA through a mesh and is connected to the internet via machineA. I am trying to give lower ...
0
votes
2
answers
7k
views
OpenVPN Variables Passed via Script
Can someone explain and/or direct me to a summary of the variables that are available to be passed to OpenVPN upon a client connection?
For example, what do the following $1, $2, $3, $4 values ...
-2
votes
2
answers
527
views
Configure OpenVPN with many users [closed]
Similar to this question I am looking at connecting 1000's of concurrent users:
OpenVPN performance: how many concurrent clients are possible?
To save CPU cycles I would like to know if there is ...
2
votes
1
answer
366
views
Bandwidth throttling linux to external subnets
I am looking to start up a new open-source mirror for my enterprise, but would also be interested in opening it up for external clients as well. However, for obvious reasons, I would like to limit ...
2
votes
1
answer
1k
views
bandwidth larger than tc htb ceil in 10-Gigabit network
In classid 88:201, I set ceil 200mibps, but in fact data can be send at 218 Mibps.
Any one have any ideas what I'm doing wrong?
Cheers!
tc qdisc add dev eth0 root handle 88: htb default 202
tc ...
0
votes
1
answer
2k
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 ...
3
votes
1
answer
1k
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
1
answer
1k
views
Add latency and random packet drops excluding SSH packets
I want to add some random delay/drop to all packets excluding SSH packets.
I can do that to all packets this way:
tc qdisc change dev $NIC root netem delay 100ms 10ms 25%
tc qdisc change dev $NIC ...
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 ...
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 ...
0
votes
1
answer
3k
views
RTNETLINK answers: Invalid argument while specifying packet loss by tc command
I am trying to specify packet loss by tc command on interface (port) 1 of switch part of network I have created using mininet :
sudo tc qdisc change dev s1-eth1 root netem loss 0.1%
but gettring ...
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 ...
1
vote
1
answer
3k
views
How can I do traffic shaping in Linux by IP for both way communication?
Well, I've already gone through How can I do traffic shaping in Linux by IP?
on serverfault & what I'm trying to achieve is pretty much same.
Internet--------Linux Router----Switch-----Clients
...
4
votes
1
answer
7k
views
Limiting bandwidth on Ubuntu Linux
I am in the situation where I have to simulate a P2P-environment (for my masters thesis in computer science). To do that I am using Docker with Ubuntu to create a bunch of virtual machines that is ...
3
votes
1
answer
5k
views
How to limit outgoing traffic per IP Address using Linux TC
I want to limit outgoing traffic per IP address. For example I have a network interface eth0, having 1Gbps of bandwidth.
I want to limit the whole network interface to 1Mbps each destination IP ...
6
votes
3
answers
1k
views
Advanced dynamic routing with external program
I need to build a system in which i am able to route packets based on a number of parameters, such as port/protocol etc, which are somehow "normal", but also on other aspects, such as queue length, ...
0
votes
1
answer
448
views
Using tc to delay packets to all IP address except for a single IP address
I'm familiar with this post here:
Using tc to delay packets to only a single IP address
Which will delay outbound packets to a single IP address. I want to do the opposite, which is to delay all ...