Traffic Control on OpenWRT and LibreMesh (second round)

image135

Thanks to @amuza we had a very insightful introduction to traffic control on OpenWRT. You can explore more at Traffic Control on OpenWRT and LibreMesh

Now we will dig deeper and see how to configure traffic control on OpenWRT.

This is done as part of the #cops:activeinfra learning group. We are organizing a series of gatherings to share learnings about topics related to active infrastructure, that being the elements of the infrastructure that are configurable and customizable (like wireless routers).

We hope to learn from him and contribute towards building Traffic control on LibreMesh .

Everyone is welcomed to join and learn together.

2 Likes

Links shared in the session today:

The presentation given by @amuza:
salida.pdf (60.4 KB)

The video for the session is here:
https://videos.apc.org/u/apc/m/traffic-control-on-openwrt-and-libremesh-second-round/

Hi all!! Thank you for the session.
I am testing TC together with pirania. The idea is to manage bandwidth of who has voucher, I have tried adding a filter based on the mark made by pirania iptables filtering.

I saw pirania does:

 iptables -t mangle -D PREROUTING -m mark --mark 0x9124714 -j pira
nia

Them based in an example from Linux Advanced Routing & Traffic Control HOWTO
I added a filter:
tc filter add dev wlan0-apname parent 1:0 protocol ip prio 1 handle 9124714 fw classid 1:10

This class has a limit of 1mibt
tc class add dev wlan0-apname parent 1:1 classid 1:10 htb rate 1mbit ceil 1mbit prio 0

But looking to tc, seems it is not restricting it:


# tc -s class show dev wlan0-apname
.
.
class htb 1:10 parent 1:1 leaf 8003: prio 0 rate 1Mbit ceil 1Mbit burst 1600b cburst 1600b 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 200000 ctokens: 200000

Do you people have tested some scenario like this one before?

1 Like

Hi @batata,

I’m not an expert, but as it is difficult to find someone who knows about the topic, I’ll try to share the little bit I know.

I think here you should use flowid instead of classid.

If you still face problems, could share your whole tc config?