XK0-005 · 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. To enable a Linux system to act as a router and forward IPv4 packets between network interfaces, a specific kernel parameter must be set.
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
(26 responses)- A4% (1)
- B88% (23)
- C4% (1)
- D4% (1)
Why each option
To enable a Linux system to act as a router and forward IPv4 packets between network interfaces, a specific kernel parameter must be set.
Using `cat` to read a file and then redirecting its output to a number (`> 1`) is syntactically incorrect for modifying kernel parameters.
The kernel parameter `/proc/sys/net/ipv4/ip_forward` controls IPv4 packet forwarding. Writing the value "1" to this file enables the Linux kernel to forward IP packets between its network interfaces, which is essential for routing functionality.
There is no standard kernel parameter named `/proc/sys/net/ipv4/ip_route` that directly controls IP packet forwarding for routing.
There is no standard kernel parameter named `/proc/sys/net/ipv4/ip_net` that enables or disables IP packet forwarding.
Concept tested: Linux IP forwarding configuration
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-ip_forwarding
Topics
Community Discussion
No community discussion yet for this question.