Linux Netfilter discussions
 help / color / mirror / Atom feed
* Traffic shaping with nftables maps and tc
@ 2017-11-02 20:34 Tomas Mudrunka
  2017-11-03  0:07 ` Tomas Mudrunka
  0 siblings, 1 reply; 6+ messages in thread
From: Tomas Mudrunka @ 2017-11-02 20:34 UTC (permalink / raw)
  To: netfilter

Hello,
i am thinking about improving the way we do bandwidth shaping (traffic 
control) in our network.

Currently we have like 80000 rules that do something like this:

iptables -A post_10_11_171_248_29 -d 10.11.171.249/32 -o vlan1100 -j 
CLASSIFY --set-class 0001:3065

And even when there is some level of optimalization using subchains, i 
guess that nftables can optimize this simply by internal hashing in 
named map (or dictionary - i did not get how these two are different).

I need to have $IP : $CLASS map like this:

10.11.171.247/32 : 0001:4095
10.11.171.248/32 : 0001:3065
10.11.171.249/32 : 0001:2023

And then simply classify the packets using single rule like this:

-d $IP -j CLASSIFY --set-class $CLASS

So i can later shape the classified packets using tc. (BTW i've heard 
that nft has something called "ingress hook" that could replace tc, so i 
could have everything configured thru nft, is that true?)

Is there way to do this in nftables?

-- 
S pozdravem
Best regards
      Tomáš Mudruňka - SPOJE.NET s.r.o.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-03 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-02 20:34 Traffic shaping with nftables maps and tc Tomas Mudrunka
2017-11-03  0:07 ` Tomas Mudrunka
2017-11-03 10:48   ` Arturo Borrero Gonzalez
2017-11-03 12:37     ` Tomas Mudrunka
2017-11-03 16:01       ` Arturo Borrero Gonzalez
2017-11-03 16:28         ` Tomas Mudrunka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox