howto:network:nftables
Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
| Následující verze | Předchozí verze | ||
| howto:network:nftables [2018/11/28 21:55] – vytvořeno harvie | howto:network:nftables [2018/11/28 23:08] (aktuální) – harvie | ||
|---|---|---|---|
| Řádek 2: | Řádek 2: | ||
| ===== Traffic Shaping with nftables and tc ===== | ===== Traffic Shaping with nftables and tc ===== | ||
| + | |||
| + | Using shell commands: | ||
| + | |||
| + | <code bash> | ||
| + | nft add table ip filter | ||
| + | nft add map filter deucalion { type ipv4_addr : classid\; } | ||
| + | </ | ||
| + | |||
| + | Using nftables file: | ||
| <file ini deucalion.nft> | <file ini deucalion.nft> | ||
| + | table ip filter { | ||
| map deucalion { | map deucalion { | ||
| type ipv4_addr : classid; | type ipv4_addr : classid; | ||
| Řádek 14: | Řádek 24: | ||
| meta priority set ip daddr map @deucalion; | meta priority set ip daddr map @deucalion; | ||
| } | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Patch ==== | ||
| + | |||
| + | This patch is already merged upstream (as of 2018 Archlinux and Ubuntu have it, Debian not yet!): | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | You need it if nft shows this error: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | add map filter deucalion { type ipv4_addr : classid; } | ||
| + | ^^^^^^^ | ||
| + | < | ||
| + | add map filter deucalion { type ipv4_addr : classid; } | ||
| + | | ||
| + | </ | ||
| + | |||
| + | <file diff nft-classid.patch> | ||
| + | parser: allow classid as set key | ||
| + | |||
| + | From: Arturo Borrero Gonzalez < | ||
| + | |||
| + | Allow TC classid as set key. | ||
| + | |||
| + | Signed-off-by: | ||
| + | --- | ||
| + | | ||
| + | 1 file changed, 1 insertion(+) | ||
| + | |||
| + | diff --git a/ | ||
| + | index 7016f5b..2918875 100644 | ||
| + | --- a/ | ||
| + | +++ b/ | ||
| + | @@ -1545,6 +1545,7 @@ type_identifier : | ||
| + | | ||
| + | | ||
| + | | ||
| + | + | CLASSID { $$ = xstrdup(" | ||
| + | ; | ||
| + | |||
| + | | ||
| </ | </ | ||
howto/network/nftables.1543438523.txt.gz · Poslední úprava: 2018/11/28 21:55 autor: harvie
