net/ipv4/Kconfig

Source file repositories/reference/linux-study-clean/net/ipv4/Kconfig

File Facts

System
Linux kernel
Corpus path
net/ipv4/Kconfig
Extension
[no extension]
Size
27380 bytes
Lines
769
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: build/configuration rule
Status
atlas-only

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
#
# IP configuration
#
config IP_MULTICAST
	bool "IP: multicasting"
	help
	  This is code for addressing several networked computers at once,
	  enlarging your kernel by about 2 KB. You need multicasting if you
	  intend to participate in the MBONE, a high bandwidth network on top
	  of the Internet which carries audio and video broadcasts. More
	  information about the MBONE is on the WWW at
	  <https://www.savetz.com/mbone/>. For most people, it's safe to say N.

config IP_ADVANCED_ROUTER
	bool "IP: advanced router"
	help
	  If you intend to run your Linux box mostly as a router, i.e. as a
	  computer that forwards and redistributes network packets, say Y; you
	  will then be presented with several options that allow more precise
	  control about the routing process.

	  The answer to this question won't directly affect the kernel:
	  answering N will just cause the configurator to skip all the
	  questions about advanced routing.

	  Note that your box can only act as a router if you enable IP
	  forwarding in your kernel; you can do that by saying Y to "/proc
	  file system support" and "Sysctl support" below and executing the
	  line

	  echo "1" > /proc/sys/net/ipv4/ip_forward

	  at boot time after the /proc file system has been mounted.

	  If you turn on IP forwarding, you should consider the rp_filter, which
	  automatically rejects incoming packets if the routing table entry
	  for their source address doesn't match the network interface they're
	  arriving on. This has security advantages because it prevents the
	  so-called IP spoofing, however it can pose problems if you use
	  asymmetric routing (packets from you to a host take a different path
	  than packets from that host to you) or if you operate a non-routing
	  host which has several IP addresses on different interfaces. To turn
	  rp_filter on use:

	  echo 1 > /proc/sys/net/ipv4/conf/<device>/rp_filter
	   or
	  echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter

	  Note that some distributions enable it in startup scripts.
	  For details about rp_filter strict and loose mode read
	  <file:Documentation/networking/ip-sysctl.rst>.

	  If unsure, say N here.

config IP_FIB_TRIE_STATS
	bool "FIB TRIE statistics"
	depends on IP_ADVANCED_ROUTER
	help
	  Keep track of statistics on structure of FIB TRIE table.
	  Useful for testing and measuring TRIE performance.

config IP_MULTIPLE_TABLES
	bool "IP: policy routing"
	depends on IP_ADVANCED_ROUTER
	select FIB_RULES
	help
	  Normally, a router decides what to do with a received packet based
	  solely on the packet's final destination address. If you say Y here,
	  the Linux router will also be able to take the packet's source

Annotation

Implementation Notes