Questions tagged [tc]
Tc is used to configure Traffic Control in the Linux kernel.
148 questions
1
vote
2
answers
152
views
Drop all packets sent to localhost and particular port
I want to drop all packets sent to a particular port. I first tried using firewalld/iptables-nft settings but that failed (maybe they're being processed by the kernel only?).
I succeeded in blocking ...
1
vote
0
answers
43
views
Why does netem delay not work when netem loss does
I am using tc to test the behaviour of a networked app under various network conditions. The setup is like this:
if [ -z "$(tc qdisc show dev ${MAIN_LINK} ingress)" ]
then
sudo tc qdisc ...
2
votes
1
answer
93
views
How to mark 802.1Q ethernet frame with PCP bits according to encapsulated IP header IP Precedence bits
I would like the IP header IP Precedence bits to be copied into 802.1Q PCP bits for outgoing traffic sourced from the host in question. Specifically for iperf3 and ping utilities.
I have failed to set ...
0
votes
0
answers
88
views
Bidirectional Traffic Forwarding Issue with tc filter
I'm working with a tc filter setup and I have the following configuration:
sudo tc qdisc add dev eth0 handle ffff: ingress
sudo tc filter add dev eth0 parent ffff: protocol ip prio 1 flower ip_proto ...
1
vote
1
answer
91
views
QoS on Linux: tc doesn't see RTP traffic
I have a camera that creates RTSP traffic. I connected it to a Linux PC via Ethernet, configured the network and access. But when I tried to apply QoS rules, the tc statistics showed that too few ...
0
votes
0
answers
92
views
Is Linux tc tool only useful for tcp traffic?
Is the tc tool only useful for TPC traffic, or can it also be used to control other protocols like UDP traffic?
1
vote
2
answers
611
views
Traffic shaping ineffective on tun device
I am developing a tunnel application that will provide a low-latency, variable bandwidth link. This will be operating in a system that requires traffic prioritization. However, while traffic towards ...
0
votes
1
answer
342
views
Changing packet payload with tc
How can tc be used to match a particular payload of an ingress packet, e.g., if the first 32 bits of payload of an IP/UDP packet are equal to some constant $c, the value $c should be changed to $d? ...
1
vote
1
answer
557
views
MAC address rewriting using tc
I am using tc to change the MAC address of incoming packets on a TAP interface (tap0) as follows where mac_org is the MAC address of a guest in a QEMU virtual machine and mac_new is a different MAC ...
1
vote
1
answer
985
views
Redirect port using TC BPF
I'm want to use TC BPF to redirect incoming traffic from port 80 to port 8080.
Below is my own code, but I've also tried the example from man 8 tc-bpf (search for 8080) and I get the same result.
#...
1
vote
0
answers
413
views
How to set bandwidth limit using linux tc
In my linux router:
interface eth1 total bandwidth is 1gbit
I want to divide 1140kbit to GroupA, divide 150kbit to GroupB
Set users 10.10.10.158, 10.10.21.5, 10.10.21.6 to GroupB
Each user has no ...
0
votes
2
answers
494
views
Can netfilter act as a DHCP relay?
I'm wondering whether instead of using a DHCP relay netfilter (be that tc or nftables) can be used to route DHCP broadcast packets to a Docker container attached to a bridge.
The reasoning for this is ...
0
votes
0
answers
73
views
Can no longer ping containers after setting TBF qdisc on Docker0
I am trying to use the tc command to manipulate traffic on the docker0 interface.
I run the commands
tc qdisc del dev docker0 root
tc qdisc add dev docker0 root handle 1: tbf rate 100mbps burst 1600 ...
1
vote
0
answers
2k
views
tc filter - error talking to the kernel
I am trying to add a tc flower filter for the geneve protocol and I am getting this error:
% sudo tc filter add dev gnv0 protocol ip parent ffff: \
flower geneve_opts 0108:01:020000000000000000/...
1
vote
1
answer
772
views
How to police ingress (input) packets belonging to a cgroup with iptables and tc?
I am trying to limit the download (ingress) rate for a certain app within a cgroup.
I was able to limit the upload (egress) rate successfully by marking app's OUTPUT packets in iptables and then set a ...