XK0-006 practice question 7 of 15

A systems administrator needs to enable routing of IP packets between network interfaces. Which of the following kernel parameters should the administrator change?

Full set: 149 questions
Answer options
A: net.ipv4.ip_multicast
B: net.ipv4.ip_route
C: net.ipv4.ip_local_port_range
D: net.ipv4.ip_forward Correct answer
Correct Answer:
D. net.ipv4.ip_forward
Explanation

The net.ipv4.ipforward kernel parameter is a boolean flag that controls IP packet forwarding for IPv4 on a Linux system. When its value is set to 1, the kernel is permitted to forward packets between different network interfaces, effectively allowing the machine to function as a router. A value of 0 (the default on most desktop systems) disables this functionality. This parameter can be changed dynamically using sysctl or made persistent in /etc/sysctl.conf.

Why Incorrect

A. net.ipv4.ipmulticast is related to multicast routing, which is a specific type of routing, not general IP packet forwarding.
B. net.ipv4.iproute is not a valid sysctl kernel parameter. Routing tables are managed with tools like the ip route command.
C. net.ipv4.iplocalportrange defines the ephemeral port range for outgoing connections and is unrelated to packet forwarding.

References

1. The Linux Kernel Archives, Kernel Documentation, Documentation/networking/ip-sysctl.txt. Section ipforward. The document states: "Enable/disable IP forwarding. This is a global switch."

2. Red Hat Enterprise Linux 9 Documentation, Section 3.5. "Configuring the system to function as a router". The guide specifies: "To enable IP forwarding, enter the following command as root: # echo "net.ipv4.ipforward = 1" > /etc/sysctl.d/95-ip-forward.conf".

3. IBM Documentation, "IP forwarding". This official vendor document explains that to enable IP forwarding on Linux, the administrator must set the value of /proc/sys/net/ipv4/ipforward to 1.

Scroll to Top