Tuning via /proc Filesystem
The IPv4 routing subsystem uses the /proc filesystem to export some internal data structures in read-only mode (e.g., the cache), and other structures in read-write mode so that they can be used for tuning.
Figure 36-4 shows where these files
are located and the routines that register them. The files shown without a reference to a
creating routine are statically defined by sysctl_init
at boot time.
- /proc/sys/net/ipv4/
- /proc/sys/net/ipv4/conf
- /proc/sys/net/ipv4/route
These directories are used to export internal data structures used for tuning. The files in these directories are therefore writable. Later sections list their files, the associated kernel variables, and the variables' default values when applicable.[*]
- /proc/net/
- /proc/net/stat
Files in these directories are not used for tuning, but rather, to execute kernel routines to get some kind of information. See the section "The /proc/net and /proc/net/stat Directories."

Figure 36-4. /proc files used by the IPv4 routing subsystem
The /proc/sys/net/ipv4 Directory
This directory contains a lot of files, but the only ones used by routing subsystems are:
- ip_forward
Contains a Boolean flag that can be used to globally enable and disable IP forwarding. Its value can be overwritten on a per-device basis (see the section "Enabling and Disabling Forwarding").
- icmp_echo_ignore_broadcasts
An ICMP tuning parameter. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access