Exam EX200 All QuestionsBrowse all questions from this exam
Question 70

SIMULATION -

Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.

1. echo "1" >/proc/sys/net/ipv4/ip_forward

2. vi /etc/sysctl.conf net.ipv4.ip_forward=1

    Correct Answer:

    To enable IP forwarding on a system for the specified subnets (172.24.0.0/16 and 172.25.0.0/16), you need to perform two steps. First, to immediately enable IP forwarding, you can write '1' to the /proc/sys/net/ipv4/ip_forward file using the command 'echo "1" > /proc/sys/net/ipv4/ip_forward'. This change, however, is not persistent across reboots. To ensure that IP forwarding is re-enabled after each reboot, you need to modify the /etc/sysctl.conf file to include the line 'net.ipv4.ip_forward = 1'. The correct steps to accomplish this are as follows: 1) echo '1' > /proc/sys/net/ipv4/ip_forward, and 2) add 'net.ipv4.ip_forward = 1' to /etc/sysctl.conf. This two-step approach ensures both immediate and persistent changes to the IP forwarding setting.

Discussion
mattd81

sysctl -w net.ipv4.ip_forward=1

ly01

This does not persist. Official solution is correct