Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nftables rules optimizations
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Tender
Apprentice
Apprentice


Joined: 05 Nov 2005
Posts: 166

PostPosted: Sat Dec 05, 2020 11:21 am    Post subject: nftables rules optimizations Reply with quote

Hello,

I would like to have an hint about these rules:

Code:
iifname "enp1s0.511" mark set mark or 1
iifname "enp1s0.512" mark set mark or 2
iifname "enp1s0.513" mark set mark or 4
iifname "enp1s0.514" mark set mark or 8
iifname "enp1s0.51*" ip daddr {192.168.0.0/28,192.168.2.0/24,192.168.11.0/24,192.168.13.0/24,192.168.14.0/24} mark set mark and 0


These rules work, I use them to route different vlans traffic from/to internet towards different ppp interfaces, leaving the intra vlan traffic routed locally.

I am wondering if there is an easier way to achieve the same result using specific nft directives.
For example, using fib statement like (exists nftrace set 1 is only a dummy placeholder):

Code:
fib daddr . iif oif exists nftrace set 1


The search on the internet was fruitless, and the nft documentation describes well all the individual components of the syntax but, at least as far as I'm concerned, it doesn't help me to understand if and how there is a more adequate alternative.
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum