IFSYSCTL(5)

πŸ“¦ version 0.6.80, in opensuse-leap 16.0

πŸ’… IFSYSCTL(5) πŸ’…

ok so this is a manual page β€” it's IFSYSCTL(5), like, the section-5 one, bestie. buckle up, we're talking per-network-interface sysctl settings and it's honestly kind of iconic once you get it. πŸ¦‹


✨ NAME ✨

ifsysctl[-<interface name>] - per network interface sysctl settings

like, ifsysctl with an optional -<interface name> slapped on the end β€” and it's all about sysctl settings for each network interface. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

the system sysctl files (the main character energy ones)

/boot/sysctl.conf-<kernelversion>
/run/sysctl.d/*.conf
/etc/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf

the wicked ifsysctl files (deprecated, rip πŸ’€)

/etc/sysconfig/network/ifsysctl
/etc/sysconfig/network/ifsysctl-`<interface>`
ngl bestie, that second set is deprecated. it's giving "still here but we don't stan anymore". use the system sysctl files. 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so here's the lore. the settings from the system sysctl files get applied by systemd-sysctl.service at boot, and the per-interface settings get applied by udev rules when the interface actually shows up in the system. slay. ✨

the kernel supports these configuration sets:

  • all β€” the common runtime behavior policy for all currently existing interfaces. literally everybody.
  • default β€” the template used to initialize the interface sysctls when a new interface is created. it's the blueprint, the starter pack.
  • <interface> β€” interface-specific behavior. this one's the special-est. main character, honestly.

Wicked is never applying the all or default sysctl settings to the kernel, periodt. but it does consider them β€” along with the <interface> sysctl settings (which have the highest priority) β€” when it's parsing the ifcfg-<interface> files. iykyk.

the ifcfg variables and the sysctl settings are used as protocol settings in the effective wicked xml configuration, and you can literally see that in the wicked show-config output. πŸ‘€

the wicked xml interface configuration gets sent by wicked ifup and wicked ifreload to the wickedd* backends, and they're the ones applying the sysctl settings from the xml configuration to the kernel β€” on configuration changes, hotplug events, and wickedd service restart (like, say, on a wicked package update). so many moments. πŸ’…

and here's a cute little detail: interface sysctl settings that the kernel initialized to -1 (meaning "not applicable for this interface") are not overwritten by wickedd. rude to touch, so it doesn't. πŸ™ˆ


πŸ’€ SYSCTL PITFALLS πŸ’€

  • each sysctl has its own specific processing in the kernel. for details, please read the kernel documentation at https://www.kernel.org/doc/Documentation/networking/ip-sysctl.rst. go read it, bestie, it's free.
  • applying changes to the all sysctl set (e.g. using sysctl -w ...) is propagated (in many cases) by the kernel in time of execution also to default and the interface specific sysctl of all existing interfaces. so like, it spreads. that's the whole thing.
  • enabling forwarding changes the system role from host to router. this has impact on several other sysctl's like the IPv6 RA processing (see accept_ra) and IPv6 autoconfiguration:
    • there is no automatic IPv6 default route configuration
    • there is no automatic IPv6 route to the prefix network
    • there are no IPv6 addresses applied by SLAAC and DHCPv6
    • the nameservers sent in the RA are not applied to resolv.conf

the accept_ra = 2 sysctl (on the affected uplink interface) enables RA processing on a router. so if you're a router now, that's your move. 🧚

  • Wicked is considering system sysctl configuration and may revert temporary runtime changes (sysctl -w ...), e.g. applied by another programs (see DESCRIPTION). yes, it might undo your little experiment. it's not sorry. 😭

πŸ“ SYSCTL VARIABLES πŸ“

IPv4

  • net.ipv4.conf.{all,default,interface}.forwarding β€” Enable IP forwarding changing the system role between host and router.
  • net.ipv4.conf.{all,default,interface}.arp_notify β€” Define mode for notification of address and device changes. this setting is also set by SEND_GRATUITOUS_ARP, which has precedence over sysctl (see man ifcfg). so it's got beef with sysctl and it wins. πŸ’…

IPv6:

  • net.ipv6.conf.{all,default,interface}.disable_ipv6 β€” Enable/Disable IPv6 operation.
  • net.ipv6.conf.{all,default,interface}.forwarding β€” Enable IPv6 forwarding changing the system role between host and router. Note: several other sysctl's, dhcp6, auto6 and routing have functional dependency to the forwarding sysctl (see SYSCTL PITFALLS). it's all connected, bestie. πŸ•ΈοΈ
  • net.ipv6.conf.{all,default,interface}.accept_ra β€” Accept Router Advertisements and perform IPv6 autoconfiguration of the interface if accept_ra > forwarding.
  • net.ipv6.conf.{all,default,interface}.autoconf β€” Autoconfigure addresses using Prefix Information in Router Advertisements.
  • net.ipv6.conf.{all,default,interface}.use_tempaddr β€” Preference for Privacy Extensions (RFC3041), ignored for loopback interface. loopback said "not my problem". πŸ™ˆ
  • net.ipv6.conf.{all,default,interface}.accept_dad β€” Whether to accept DAD (Duplicate Address Detection), ignored for loopback interface. again, loopback does not care. πŸ’€
  • net.ipv6.conf.{interface}.accept_redirects β€” Accept Redirects. Wicked considers only interface specific settings. no all, no default, just you babe. 🫢
  • net.ipv6.conf.{all,default,interface}.addr_gen_mode β€” Defines how link-local and managed autoconf addresses are generated.
  • net.ipv6.conf.{all,default,interface}.stable_secret β€” This IPv6 address will be used as a secret to generate IPv6 addresses for link-local and autoconfigured addresses. it's giving secret keeper. 🀫

🌈 SYNTAX 🌈

the sysctl configuration supports two separator characters for sysctl keywords: a . in default format and a / in the alternate format. so the syntax is the same as is found in the /etc/sysctl.conf file. pick your fighter, both are valid. ⭐


πŸ¦‹ EXAMPLES πŸ¦‹

settings for "eth0" and "eth0.1" interfaces:

# using "." as separator:
net.ipv6.conf.eth0.use_tempaddr = 2
net.ipv6.conf.eth0/1.use_tempaddr = 2

# using "/" as separator:
net/ipv6/conf/eth0/use_tempaddr = 2
net/ipv6/conf/eth0.1/use_tempaddr = 2

ok notice how eth0/1 becomes eth0.1 β€” that's the separator swap working its magic, no cap. ✨


Copyright (C) 2024 SUSE LLC

πŸ’€ BUGS πŸ’€

please report bugs as described at https://bugs.opensuse.org. don't suffer in silence bestie, tell them. 😭


πŸ’– SEE ALSO πŸ’–

ifup (8), ifcfg (5), sysctl (8), systemd-sysctl (8)


🌟 AUTHORS 🌟

Marius Tomaschewski, Clemens Famulla-Conrad.


and that's the whole page, bestie! this one's from the Wicked User Manual, October 2024 edition β€” so if you're quoting it in the group chat, cite it properly. mwah, love u, go configure some interfaces. πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from