nerdexam
CompTIA

XK0-005 · Question #1549

A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.)

The correct answer is B. sysctl -w net.ipv4.ip_forward=1 C. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf. This command immediately enables IPv4 forwarding by setting the system control variable for the current session. This command makes the change persistent by appending the configuration to the /etc/sysctl.conf file, which will be applied at every boot. To apply the changes made…

System Management

Question

A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.)

Options

  • Asysctl net.ipv4.ip_forward
  • Bsysctl -w net.ipv4.ip_forward=1
  • Cecho "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
  • Decho 1 > /proc/sys/net/ipv4/ip_forward
  • Esysctl -p
  • Fecho "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    76% (25)
  • D
    3% (1)
  • E
    12% (4)
  • F
    3% (1)

Explanation

This command immediately enables IPv4 forwarding by setting the system control variable for the current session. This command makes the change persistent by appending the configuration to the /etc/sysctl.conf file, which will be applied at every boot. To apply the changes made in the sysctl configuration file, you could also run E. sysctl -p, but it is not required for persistence since that file will automatically apply on reboot.

Topics

#sysctl#Kernel Parameters#Persistent Configuration#Linux Networking

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice