Sample Header Ad - 728x90

Tc-Netem not working with a bridge for simulating jitter

0 votes
0 answers
36 views
Im using Ubuntu 24.04. I need to make a bridge to simulate jitter using TC-Netem between two devices but is not working with im doing right now. I have a setup consisting of 3 units. One that generates network udp packets (Device A) that it sends to the Ubuntu input interface (enx7cc2c6474599), this should simulate a jitter and disorder in the forwarding through a bridge that is composed of the interface (enx7cc2c6474599) and the interface (enx7cc2c6331825) called br0. Through this bridge it should send the jitter-affected traffic to Device B over the interface (enx7cc2c6331825). Setup The bridge is created with this set of commands in order to work:
sudo ip link add name br0 type bridge
	
	sudo ip link set enx7cc2c6474599 master br0
	sudo ip link set enx7cc2c6331825 master br0
	
	sudo ip link set enx7cc2c6474599 up
	sudo ip link set enx7cc2c6331825 up
	sudo ip link set br0 up
	sudo sysctl -w net.ipv4.ip_forward=1
	sudo sysctl net.ipv4.conf.all.forwarding
	sudo sysctl net.ipv4.conf.default.forwarding
	sudo sysctl -p
Then for testing i send traffic and i can see it perfectly on the Device B. But when i do:
sudo tc qdisc add dev enx7cc2c6474599 root netem delay 10ms 8ms distribution normal
	sudo tc qdisc add dev enx7cc2c6331825 root netem delay 10ms 8ms distribution normal
I cant see the packets in the correct order and with no jitter. Also i tried using the "tc qdisc" command on the br0 (brige) with the same or worse results. Also tried this one:
sudo tc qdisc add dev enx7cc2c6474599 root netem delay 10ms 40ms reorder 25%
    sudo tc qdisc add dev enx7cc2c6331825 root netem delay 10ms 40ms reorder 25%
Here is a description of the interfaces: > br0: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 5e:96:25:d5:26:df brd ff:ff:ff:ff:ff:ff inet6 fe80::5c96:25ff:fed5:26df/64 scope link valid_lft forever preferred_lft forever > enx7cc2c6474599: mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000 link/ether 7c:c2:c6:47:45:99 brd ff:ff:ff:ff:ff:ff > enx7cc2c6331825: mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000 link/ether 7c:c2:c6:33:18:25 brd ff:ff:ff:ff:ff:ff
Asked by Carlos López Martínez (101 rep)
Nov 20, 2024, 03:52 PM