systemd icon indicating copy to clipboard operation
systemd copied to clipboard

equivalent of "ip -6 rule del pref 0" in systemd-networkd configuration

Open anitazha opened this issue 1 year ago • 1 comments

Component

systemd-networkd

Is your feature request related to a problem? Please describe

We've moved the majority of our network configuration to systemd-networkd but there is one piece of route management we are still shelling out to ip:

ip -6 rule del pref 0

We do this on certain servers to delete the local rule with highest preference after replacing the local rule with interface specific rules on RDMA interfaces.

Describe the solution you'd like

I'm not sure the best way to implement this. I suppose it would be another option or configuration in networkd.conf?

Describe alternatives you've considered

We're currently continuing to shell out to ip

The systemd version you checked that didn't have the feature you are asking for

255

anitazha avatar Oct 18 '24 22:10 anitazha

This is more like a nice to have we might not require deleting the rule after all.

anitazha avatar Oct 18 '24 22:10 anitazha

Also on the "might be a nice to have" (I don't have a requirement now, just considered restructuring things):

Being able to remove this one from the v4 rules:

32767:	from all lookup default

ChristianTacke avatar Jan 09 '25 17:01 ChristianTacke

At this point, we can make it generic and supply a list of tables to remove

teknoraver avatar Mar 19 '25 12:03 teknoraver

what about the following options in networkd.conf:

[Network]
IPv4RoutingTableDelete=0,254,...
IPv6RoutingTableDelete=0,253,...

With a comma separated list of tables to remove at start (or at every reload)?

teknoraver avatar Apr 15 '25 15:04 teknoraver

  • IPv4RoutingTableDelete sounds like it will delete the whole routing table AND the rule pointing to it. This might not be the desired feature. I think, this issue is only about removing a rule that points to a table. (My envisioned use case: re-add the rule with a different priority.)
  • Please make sure that one can reference routing tables not only by number, but also by name.

ChristianTacke avatar Apr 26 '25 13:04 ChristianTacke