^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Documentation for /proc/sys/net/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Copyright
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Copyright (c) 1999
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - Terrehon Bowden <terrehon@pacbell.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Bodo Bauer <bb@ricochet.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Copyright (c) 2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) - Jorge Nerin <comandante@zaralinux.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Copyright (c) 2009
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - Shen Feng <shen@cn.fujitsu.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) For general info and legal blurb, please look in index.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) ------------------------------------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) This file contains the documentation for the sysctl files in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /proc/sys/net
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) The interface to the networking parts of the kernel is located in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /proc/sys/net. The following table shows all possible subdirectories. You may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) see only some of them, depending on your kernel's configuration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) Table : Subdirectories in /proc/sys/net
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) ========= =================== = ========== ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Directory Content Directory Content
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) ========= =================== = ========== ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) core General parameter appletalk Appletalk protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) unix Unix domain sockets netrom NET/ROM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 802 E802 protocol ax25 AX25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) ethernet Ethernet protocol rose X.25 PLP layer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ipv4 IP version 4 x25 X.25 protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) bridge Bridging decnet DEC net
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) ipv6 IP version 6 tipc TIPC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) ========= =================== = ========== ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 1. /proc/sys/net/core - Network core options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) ============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) bpf_jit_enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) This enables the BPF Just in Time (JIT) compiler. BPF is a flexible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) and efficient infrastructure allowing to execute bytecode at various
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) hook points. It is used in a number of Linux kernel subsystems such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) as networking (e.g. XDP, tc), tracing (e.g. kprobes, uprobes, tracepoints)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) and security (e.g. seccomp). LLVM has a BPF back end that can compile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) restricted C into a sequence of BPF instructions. After program load
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) through bpf(2) and passing a verifier in the kernel, a JIT will then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) translate these BPF proglets into native CPU instructions. There are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) two flavors of JITs, the newer eBPF JIT currently supported on:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - x86_64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - x86_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - arm64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - arm32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) - ppc64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) - sparc64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - mips64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) - s390x
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) - riscv64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) - riscv32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) And the older cBPF JIT supported on the following archs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) - mips
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) - ppc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) - sparc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) eBPF JITs are a superset of cBPF JITs, meaning the kernel will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) migrate cBPF instructions into eBPF instructions and then JIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) compile them transparently. Older cBPF JITs can only translate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) tcpdump filters, seccomp rules, etc, but not mentioned eBPF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) programs loaded through bpf(2).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) Values:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) - 0 - disable the JIT (default value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) - 1 - enable the JIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) - 2 - enable the JIT and ask the compiler to emit traces on kernel log.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) bpf_jit_harden
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) This enables hardening for the BPF JIT compiler. Supported are eBPF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) JIT backends. Enabling hardening trades off performance, but can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) mitigate JIT spraying.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) Values:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) - 0 - disable JIT hardening (default value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) - 1 - enable JIT hardening for unprivileged users only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) - 2 - enable JIT hardening for all users
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) bpf_jit_kallsyms
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) When BPF JIT compiler is enabled, then compiled images are unknown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) addresses to the kernel, meaning they neither show up in traces nor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) in /proc/kallsyms. This enables export of these addresses, which can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) be used for debugging/tracing. If bpf_jit_harden is enabled, this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) feature is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) Values :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) - 0 - disable JIT kallsyms export (default value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) - 1 - enable JIT kallsyms export for privileged users only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) bpf_jit_limit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) This enforces a global limit for memory allocations to the BPF JIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) compiler in order to reject unprivileged JIT requests once it has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) been surpassed. bpf_jit_limit contains the value of the global limit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) dev_weight
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) ----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) The maximum number of packets that kernel can handle on a NAPI interrupt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) it's a Per-CPU variable. For drivers that support LRO or GRO_HW, a hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) aggregated packet is counted as one packet in this context.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) Default: 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) dev_weight_rx_bias
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) RPS (e.g. RFS, aRFS) processing is competing with the registered NAPI poll function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) of the driver for the per softirq cycle netdev_budget. This parameter influences
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) the proportion of the configured netdev_budget that is spent on RPS based packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) processing during RX softirq cycles. It is further meant for making current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) dev_weight adaptable for asymmetric CPU needs on RX/TX side of the network stack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) (see dev_weight_tx_bias) It is effective on a per CPU basis. Determination is based
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) on dev_weight and is calculated multiplicative (dev_weight * dev_weight_rx_bias).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) Default: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) dev_weight_tx_bias
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) Scales the maximum number of packets that can be processed during a TX softirq cycle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) Effective on a per CPU basis. Allows scaling of current dev_weight for asymmetric
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) net stack processing needs. Be careful to avoid making TX softirq processing a CPU hog.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) Calculation is based on dev_weight (dev_weight * dev_weight_tx_bias).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) Default: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) default_qdisc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) The default queuing discipline to use for network devices. This allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) overriding the default of pfifo_fast with an alternative. Since the default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) queuing discipline is created without additional parameters so is best suited
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) to queuing disciplines that work well without configuration like stochastic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) fair queue (sfq), CoDel (codel) or fair queue CoDel (fq_codel). Don't use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) queuing disciplines like Hierarchical Token Bucket or Deficit Round Robin
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) which require setting up classes and bandwidths. Note that physical multiqueue
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) interfaces still use mq as root qdisc, which in turn uses this default for its
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) default to noqueue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) Default: pfifo_fast
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) busy_read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) Low latency busy poll timeout for socket reads. (needs CONFIG_NET_RX_BUSY_POLL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) Approximate time in us to busy loop waiting for packets on the device queue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) This sets the default value of the SO_BUSY_POLL socket option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) Can be set or overridden per socket by setting socket option SO_BUSY_POLL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) which is the preferred method of enabling. If you need to enable the feature
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) globally via sysctl, a value of 50 is recommended.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) Will increase power usage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Default: 0 (off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) busy_poll
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) Low latency busy poll timeout for poll and select. (needs CONFIG_NET_RX_BUSY_POLL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) Approximate time in us to busy loop waiting for events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) Recommended value depends on the number of sockets you poll on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) For several sockets 50, for several hundreds 100.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) For more than that you probably want to use epoll.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) Note that only sockets with SO_BUSY_POLL set will be busy polled,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) so you want to either selectively set SO_BUSY_POLL on those sockets or set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) sysctl.net.busy_read globally.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) Will increase power usage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) Default: 0 (off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) rmem_default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) The default setting of the socket receive buffer in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) rmem_max
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) The maximum receive socket buffer size in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) tstamp_allow_data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) Allow processes to receive tx timestamps looped together with the original
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) packet contents. If disabled, transmit timestamp requests from unprivileged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) processes are dropped unless socket option SOF_TIMESTAMPING_OPT_TSONLY is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) Default: 1 (on)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) wmem_default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) The default setting (in bytes) of the socket send buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) wmem_max
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) The maximum send socket buffer size in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) message_burst and message_cost
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) ------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) These parameters are used to limit the warning messages written to the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) log from the networking code. They enforce a rate limit to make a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) denial-of-service attack impossible. A higher message_cost factor, results in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) fewer messages that will be written. Message_burst controls when messages will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) be dropped. The default settings limit warning messages to one every five
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) warnings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) This sysctl is now unused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) This was used to control console messages from the networking stack that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) occur because of problems on the network like duplicate address or bad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) checksums.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) These messages are now emitted at KERN_DEBUG and can generally be enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) and controlled by the dynamic_debug facility.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) netdev_budget
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) Maximum number of packets taken from all interfaces in one polling cycle (NAPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) poll). In one polling cycle interfaces which are registered to polling are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) probed in a round-robin manner. Also, a polling cycle may not exceed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) netdev_budget_usecs microseconds, even if netdev_budget has not been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) exhausted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) netdev_budget_usecs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) Maximum number of microseconds in one NAPI polling cycle. Polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) will exit when either netdev_budget_usecs have elapsed during the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) poll cycle or the number of packets processed reaches netdev_budget.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) netdev_max_backlog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) Maximum number of packets, queued on the INPUT side, when the interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) receives packets faster than kernel can process them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) netdev_rss_key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) RSS (Receive Side Scaling) enabled drivers use a 40 bytes host key that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) randomly generated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) Some user space might need to gather its content even if drivers do not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) provide ethtool -x support yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) myhost:~# cat /proc/sys/net/core/netdev_rss_key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8: ... (52 bytes total)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) File contains nul bytes if no driver ever called netdev_rss_key_fill() function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) Note:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) /proc/sys/net/core/netdev_rss_key contains 52 bytes of key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) but most drivers only use 40 bytes of it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) myhost:~# ethtool -x eth0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) RX flow hash indirection table for eth0 with 8 RX ring(s):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 0: 0 1 2 3 4 5 6 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) RSS hash key:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) netdev_tstamp_prequeue
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) If set to 0, RX packet timestamps can be sampled after RPS processing, when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) the target CPU processes packets. It might give some delay on timestamps, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) permit to distribute the load on several cpus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) If set to 1 (default), timestamps are sampled as soon as possible, before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) queueing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) optmem_max
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) ----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) Maximum ancillary buffer size allowed per socket. Ancillary data is a sequence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) of struct cmsghdr structures with appended data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) fb_tunnels_only_for_init_net
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) ----------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) Controls if fallback tunnels (like tunl0, gre0, gretap0, erspan0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) sit0, ip6tnl0, ip6gre0) are automatically created. There are 3 possibilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) (a) value = 0; respective fallback tunnels are created when module is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) loaded in every net namespaces (backward compatible behavior).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) (b) value = 1; [kcmd value: initns] respective fallback tunnels are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) created only in init net namespace and every other net namespace will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) not have them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) (c) value = 2; [kcmd value: none] fallback tunnels are not created
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) when a module is loaded in any of the net namespace. Setting value to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) "2" is pointless after boot if these modules are built-in, so there is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) a kernel command-line option that can change this default. Please refer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) Documentation/admin-guide/kernel-parameters.txt for additional details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) Not creating fallback tunnels gives control to userspace to create
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) whatever is needed only and avoid creating devices which are redundant.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) Default : 0 (for compatibility reasons)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) devconf_inherit_init_net
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) ------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) Controls if a new network namespace should inherit all current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) settings under /proc/sys/net/{ipv4,ipv6}/conf/{all,default}/. By
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) default, we keep the current behavior: for IPv4 we inherit all current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) settings from init_net and for IPv6 we reset all settings to default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) If set to 1, both IPv4 and IPv6 settings are forced to inherit from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) current ones in init_net. If set to 2, both IPv4 and IPv6 settings are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) forced to reset to their default values. If set to 3, both IPv4 and IPv6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) settings are forced to inherit from current ones in the netns where this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) new netns has been created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) Default : 0 (for compatibility reasons)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 2. /proc/sys/net/unix - Parameters for Unix domain sockets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) ----------------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) There is only one file in this directory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) unix_dgram_qlen limits the max number of datagrams queued in Unix domain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) socket's buffer. It will not take effect unless PF_UNIX flag is specified.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 3. /proc/sys/net/ipv4 - IPV4 settings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) -------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) Please see: Documentation/networking/ip-sysctl.rst and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) Documentation/admin-guide/sysctl/net.rst for descriptions of these entries.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 4. Appletalk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) The /proc/sys/net/appletalk directory holds the Appletalk configuration data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) when Appletalk is loaded. The configurable parameters are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) aarp-expiry-time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) The amount of time we keep an ARP entry before expiring it. Used to age out
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) old hosts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) aarp-resolve-time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) The amount of time we will spend trying to resolve an Appletalk address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) aarp-retransmit-limit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) The number of times we will retransmit a query before giving up.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) aarp-tick-time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) Controls the rate at which expires are checked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) The directory /proc/net/appletalk holds the list of active Appletalk sockets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) on a machine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) The fields indicate the DDP type, the local address (in network:node format)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) the remote address, the size of the transmit pending queue, the size of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) received queue (bytes waiting for applications to read) the state and the uid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) owning the socket.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) /proc/net/atalk_iface lists all the interfaces configured for appletalk.It
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) shows the name of the interface, its Appletalk address, the network range on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) that address (or network number for phase 1 networks), and the status of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) /proc/net/atalk_route lists each known network route. It lists the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) (network) that the route leads to, the router (may be directly connected), the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) route flags, and the device the route is using.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 5. TIPC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) -------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) tipc_rmem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) The TIPC protocol now has a tunable for the receive memory, similar to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) tcp_rmem - i.e. a vector of 3 INTEGERs: (min, default, max)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) # cat /proc/sys/net/tipc/tipc_rmem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 4252725 34021800 68043600
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) The max value is set to CONN_OVERLOAD_LIMIT, and the default and min values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) are scaled (shifted) versions of that same value. Note that the min value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) is not at this point in time used in any meaningful way, but the triplet is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) preserved in order to be consistent with things like tcp_rmem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) named_timeout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) TIPC name table updates are distributed asynchronously in a cluster, without
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) any form of transaction handling. This means that different race scenarios are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) possible. One such is that a name withdrawal sent out by one node and received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) by another node may arrive after a second, overlapping name publication already
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) has been accepted from a third node, although the conflicting updates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) originally may have been issued in the correct sequential order.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) If named_timeout is nonzero, failed topology updates will be placed on a defer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) queue until another event arrives that clears the error, or until the timeout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) expires. Value is in milliseconds.