nerdexam
CompTIA

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.

Server Side & Network Concepts

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)
  • A
    3% (2)
  • B
    80% (48)
  • C
    5% (3)
  • D
    12% (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.

Acat /proc/sys/net/ipv4/ip_route > 1

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.

Becho "1" > /proc/sys/net/ipv4/ip_forwardCorrect

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.

Cecho "1" > /proc/sys/net/ipv4/ip_route

The path /proc/sys/net/ipv4/ip_route does not exist as a kernel tunable for enabling packet forwarding between interfaces.

Decho "1" > /proc/sys/net/ipv4/ip_net

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

#IP forwarding#IPv4 routing#ip_forward#kernel parameters

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice