nerdexam
CompTIACompTIA

XK0-005 · Question #1549

XK0-005 Question #1549: Real Exam Question with Answer & Explanation

The correct answer is B: sysctl -w net.ipv4.ip_forward=1. 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

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

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 PracticeBrowse All XK0-005 Questions