XK0-004 · Question #29
A Linux administration is using a Linux system as a router. During the tests, the administrator discovers that IP packets are not being sent between the configured interfaces. Which of the following…
The correct answer is B. echo "1" > /proc/sys/net/ipv4/ip_forward. Linux disables IP packet forwarding between interfaces by default. Writing 1 to the correct /proc kernel parameter enables the system to route IPv4 packets.
Question
A Linux administration is using a Linux system as a router. During the tests, the administrator discovers that IP packets are not being sent between the configured interfaces. Which of the following commands enables this feature for IPv4 networks?
Options
- Acat /proc/sys/net/ipv4/ip_route > 1
- Becho "1" > /proc/sys/net/ipv4/ip_forward
- Cecho "1" > /proc/sys/net/ipv4/ip_route
- Decho "1" > /proc/sys/net/ipv4/ip_net
How the community answered
(60 responses)- A3% (2)
- B80% (48)
- C5% (3)
- D12% (7)
Why each option
Linux disables IP packet forwarding between interfaces by default. Writing 1 to the correct /proc kernel parameter enables the system to route IPv4 packets.
The path /proc/sys/net/ipv4/ip_route does not control forwarding, and using cat with output redirection to a literal '1' is not a valid way to set a kernel parameter.
The virtual file /proc/sys/net/ipv4/ip_forward is the kernel runtime parameter that controls whether IPv4 packets are forwarded between network interfaces. Writing '1' to it with echo enables forwarding immediately without a reboot, allowing the Linux host to function as a router.
The path /proc/sys/net/ipv4/ip_route does not exist as a kernel tunable for enabling packet forwarding between interfaces.
The path /proc/sys/net/ipv4/ip_net does not exist and serves no function related to enabling IPv4 packet forwarding.
Concept tested: Enabling IPv4 packet forwarding via /proc
Source: https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html
Topics
Community Discussion
No community discussion yet for this question.