Questions tagged [tc]

Tc is used to configure Traffic Control in the Linux kernel.

Filter by
Sorted by
Tagged with
0
votes
0answers
43 views

Linux TC filter to combine u32 and basic match

I want to match the ingress traffic with a particular firewall mark and ipset match. Only after both matches I want to redirect the packet. I restore the mark for ingress packets using action ...
0
votes
0answers
13 views

linux tc network traffic control

I am using a Synology NAS and within their control panel one can set up network traffic control and set a limit. With nothing set, one would assume there is no limit and it would run as fast as ...
0
votes
0answers
33 views

Netem does not show the correct parameter inserted

I'm issuing the following tc command tc qdisc in order to configure different queues in a computer. The problem is that when I configure two different queues (htb configuration) and I insert ...
0
votes
0answers
37 views

egress traffic shaping rules on mirrored interface aren't working

In my small, private, network I have a device (IP address 192.168.0.240) which I want to have a "guaranteed" section of the pipe. To that end, I've been following this Server Fault article to shape ...
0
votes
1answer
63 views

qdisc resets after changing to htb

Background I have a system running Ubuntu which has two interfaces eno1 and enp4s0. I have created an OVS bridge using: ovs-vsctl add br s1 I added the two physical interfaces eno1 and enp4s0 to ...
1
vote
1answer
47 views

Example command to set same DSCP value in the IP header for return packets within the same TCP connection

I have seen connmark or ctinfo could work for this but couldn't find a simple effective command to make it work (Not familiar within this area). The command can be applied to the TCP termination node ...
0
votes
0answers
36 views

Adding Latency to Internal Port

I am doing some network simulations on an Ubuntu VM. I am trying to add some latency to all packets being sent to and from specific ports without affecting the whole adapter. I have found this code ...
1
vote
1answer
245 views

Adding qdisc under the mq top-level qdisc

This LWN article suggests that one may add/replace the network scheduler for a queue "under" the mq "dummy scheduler." These two point to that end: The mq scheduler does two things: - present ...
1
vote
2answers
160 views

Mirror to Multiple Ports Using TC?

Does anyone know if it's possible to mirror to multiple interfaces from one source interface using TC? I've done the following: The first thing I did was create an ingress queue on my input interface ...
1
vote
1answer
83 views

tc qdisc not delete filter

I have a problem with understand tc behaviour, especially how is working qdisc deletion. My main problem is why tc qdisc did not delete the attached filter? I did: tc qdisc add dev eth ingress tc ...
0
votes
0answers
198 views

Traffic control (TC) command with u32 filter - Not working (RTNETLINK answers: Invalid argument)

I am working on college assignment, in which our teacher asked us to block some BPDU packets (which are generated by interface, incoming packets are blocked by BPDU guard) using traffic control tc's ...
0
votes
0answers
76 views

The bucket size in TC-HTB

I study the behavior of tc-HTB. I did a tc setting like the below. After reading The bucket in tbf, I expect its burst size will be rate / HZ. sudo /sbin/tc qdisc del dev s1-eth1 root sudo /sbin/tc ...
0
votes
1answer
56 views

Difference between MTU and Burst at Linux-TC

I did a small experiment by using Linux-tc My question is what is the difference between Burst and MTU at Linux tc-htb It seems that they have a same effect. They change a only burst value. (we can ...
1
vote
1answer
86 views

How many qdiscs can I create with tc?

I am trying to emulate traffic among multiple virtual machines. Each connection is supposed to have different parameters, i.e. delay. Therefore, I am trying to create different qdisc filters for ...
1
vote
0answers
40 views

tc: route all traffic from default gateway to ifb0

Traffic from eth0 arriving from gateway should be sent to ifb0 for ingress shaphing. Here some relevant outputs and commands ip route default via 192.168.0.1 dev eth0 metric 200 realm 1 What ...
0
votes
1answer
38 views

Using tc rate limit all traffic except from one IP

Currently i have the below rule for rate limiting the traffic on port 22. This applies for all traffic, however i don't want this to apply for one IP say x.x.x.x , how to do this? So if the traffic is ...
2
votes
2answers
368 views

Tc qdisc delay not seen in tcpdump recording

I have two linux containers connected with a veth-pair. At veth-interface of one container I set up tc qdisc netem delay and send traffic from it to the other container. If I watch traffic on both ...
2
votes
0answers
180 views

Simulate network on a single machine

I'm trying to simulate a network on a single machine. I have multiple nodes that communicate through tcp sockets. I tried to create one dummy interface for each node like this: ip link add name ...
0
votes
1answer
554 views

For veth pair, ping does not recognize interface name and tc qdisc netem does not work

I have Ubuntu 16.04 LTS with hwe kernel 4.13.0-39-generic. I configure the veth pair in the default network namespace as follows: $ sudo ip link add h1-eth0 type veth peer name h2-eth0 $ sudo ip ...
0
votes
0answers
42 views

Is there a way to find NetEm delay selected when using distribution table?

I am trying to find how much each packets are delayed when it is passed through NetEm from one PC to another via an ethernet cable. At the moment I am using Wireshark to find delay experienced by each ...
1
vote
0answers
30 views

Are there any disadvantages of using very low “rate” value for Linux HTB queuing discipline?

I have a use-case where egress traffic on 10Mbps connection needs to be divided into two classes. First class is high-priority traffic which needs to be able to use bandwidth up to 10Mbps. Second ...
1
vote
3answers
627 views

queueing in linux-htb

I am trying to understand the queuing mechanism of linux-htb QDisc and QDisc of linux tc in general. What I could gather: During TX, the packet is queued into the queue inside the linux tc. This ...
2
votes
0answers
435 views

Multiqueue tun/tap interface

I am trying to understand how Multiqueue tuntap interface works. Following the instructions provided at: https://www.kernel.org/doc/Documentation/networking/tuntap.txt I was able to create multiple ...
0
votes
0answers
170 views

Using netem on traffic filtered by iptables

I would like to use netem for only partion of the traffic on bridge. Edit 1 So, I was able to figure out at least something. tc qdisc del dev eth0.1 root tc qdisc add dev eth0.1 root handle 1: ...
0
votes
2answers
750 views

Slowing down a server with traffic shaping

I would like to study the behaviour of an application streaming from a slow server. I'm trying to take advantage of tc-netem to introduce a network delay. Before setting up a more complicated ...
1
vote
1answer
92 views

How does one use tc to add latency to a ratelimit?

I read that there's another tool for netfilter that allows you to add latency to a ratelimit. Does anyone have an example of this?
1
vote
1answer
496 views

Rate limiting with tc on vlans

I have found this prior answer (https://serverfault.com/questions/461153/vlan-based-rate-limiting-using-tc), however attempting to add the vlan match to my script yields : What is "handle"? Usage: ....
1
vote
1answer
372 views

How can I use `tc` with diffrent parameters on few virtual interfaces?

I need to simulate network environment with bad network connections for about 1000 hosts. Can tc (with netem) be used with virtual network interfaces (like eth0:0, eth0:1)? When I try to use tc on ...
1
vote
0answers
130 views

Any interface to access linux's tc flower from another kernel module?

I was looking at linux tc flower source code. I see that when a flow is modified, a netlink message is sent from user space to kernel space to create/delete/modify the flow. Rather than the userspace ...
1
vote
0answers
413 views

When mirroring ingress traffic on an interface with tc, are only the packets destined for the interface mirrored?

I have a Linux box with 3 physical interfaces, one for management (has an IP address) and two for receiving mirrored traffic from two separate switches that make up a link aggregation group (LAG). The ...
1
vote
0answers
19 views

IPTABLES: issue with impacting traffic to a subnet using --destination flag

I am applying iptables rule to impact outbound traffic into a subnet. I send the traffic into a new chain created and then tc impose some delay using netem. TC is then using that rules. Something like ...
2
votes
0answers
278 views

htb -> netem -> pfifo_fast qdisc drops all packets under high traffic

I configured a OpenVSwitch-based topology using Mininet on my local machine: h1 (server) -------(eth1) s1 (eth2)--------------- h2 (client) (eth3) | ...
2
votes
1answer
807 views

How can I permanently associate tc qdisc commands with a particular interface?

I need to use a tc qdisc command to limit bandwidth usage on an interface created by openvpn. This works great when I run the command manually but occasionally the connection drops or restarts and ...
2
votes
1answer
411 views

Using IFB for ingress traffic shaping

I am trying to use the IFB driver for ingress traffic and are having some problems getting it to work for us. It hooks the packets before netfilter and so marks set with iptables are not seen by tc ...
2
votes
0answers
1k views

Performance bottlenecks of Linux traffic shaping (tc)

I have an interesting problem. We have a Linux server with Debian Stretch installed. The server has a single CPU E5-2680 v2 and Intel 82599ES 10G Dual Port NIC's. There are no other services (like ...
1
vote
0answers
238 views

TC (Traffic control) and trickle: apply different bandwidth to (multiple requests) same IP or URL during upload and download

I have some files of different sizes which I needed to send to Azure blob storage and I am using Azure IOT SDKs to achieve that.Now I have different types of file size ( from 50 MB to 5 GB) and have ...
0
votes
0answers
66 views

fq_codel - does ath9k_htc support it

I cannot seem to find documentation that says ath9k_htc supports fq_codel, so, it'd be safe to assume that it does not? If I use fq_codel as the queue discipline and ath9k_htc doesn't support it, ...
1
vote
0answers
180 views

shorewall - problems with traffic shaping

I'm shaping my traffic such that VoIP calls have highest priority, followed by, VPN, then general network surfing, and lastly, large downloads. [tcclasses] lw 1 200kbit full 1 tos=0x68/0xfc,tos=0xb8/...
1
vote
1answer
191 views

wireshark packet capture point [closed]

I am using tc qdisc to add delay to packets on my interface eth2 as follows sudo tc qdisc add dev eth2 root netem delay 100ms 10ms 25% Then I pinged a host and got some result. The results on the ...
1
vote
1answer
624 views

Delay some localhost traffic

How to delay some localhost traffic? (the computer is a VM, but hopefully that won't matter) The following creates a new interface and tries to apply tc to it: ifconfig lo:1 127.0.10.10 netmask 255....
1
vote
0answers
87 views

Exclude a specific network from the tc rules

Even though there are numerous resources on how to create and manipulate traffic control settings using the tc command on Linux, I can't find anything useful around network exclusion in tc. I would ...
0
votes
0answers
2k views

How to limit download bandwidth per IP?

We are running Ookla Speedtest server and want to limit download bandwidth per IP (350Mbit/s per IP). And I cannot find some examples how to do that. All the examples with tc are about how to limit ...
1
vote
0answers
166 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
1answer
88 views

Why I don't see drops with TCP flows in linux

I wanted to observe the congestion window of a TCP flow so for that I have two nodes (using linux namespaces) connected to each other through veth pairs and a bridge. To limit bandwitdh to 10mbps I ...
1
vote
1answer
1k views

iptables: download quota per mac address for all hosts

On a Linux router, how to setup download quotas for all hosts? This is for a shared wifi network with many guests: Each guest should start with a 150 Mb download quota and no restriction Once quota ...
2
votes
1answer
1k views

How do packets traverse tc/netfilter physical, VLAN and bridge interfaces?

Given the following setup on a router that performs NAT between two networks A and B: eth0 - physical interface - no ip address eth0.1 - VLAN interface for network A - no ip address eth0.2 - VLAN ...
1
vote
0answers
515 views

Remote (REST) API for system administration

I've spent a few hours looking for a FOSS or commercial product to solve my problem, with no success. In the context of a big C++ code-base I was assigned the task to provide some automatic ...
4
votes
1answer
2k views

Is TCP PACING enabled by default on linux?

I want to ask a basic question: Is TCP PACING enabled by default on Linux? I'm using Ubuntu right now, kernel 4.4.0. I saw that it can be enabled/disabled using TC-FQ, but is it enabled by default ...
1
vote
1answer
701 views

Using tc, I want TCP and UDP to use the same buffer

I have 2 types of traffic TCP UDP I want to apply 2 different filters on them, 1 Mbps b/w for UDP and 7 Mbps b/w for TCP But I want their traffic to use a common buffer of size 100 packets I've ...
5
votes
2answers
2k views

Limit bandwidth of individual HTTP requests while not throttling total bandwidth

Looking at tools like tc, wondershaper, htb and comcast, all these tools seem to operate on the level of a network interface or at least a "connection group" for limiting bandwidth. I'd like to not ...