LFCS Networking Practice Question
A server has two network interfaces: eth0 (10.0.0.10/24) and eth1 (192.168.1.10/24). The server needs to act as a router for a subnet 172.16.0.0/24, forwarding packets between it and the 10.0.0.0/24 network. Which sysctl parameter must be set to a value of 1 to enable IP forwarding?
⚠ Common exam trap
Both `net.ipv4.conf.all.forwarding` and `net.ipv4.ip_forward` can enable IP forwarding. Candidates may think only one is correct, but both are valid. The trap is to know that the `all.forwarding` parameter is also effective.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
net.ipv4.conf.all.forwarding
Both option A and option D are valid sysctl parameters for enabling IP forwarding. `net.ipv4.conf.all.forwarding` enables forwarding globally across all interfaces, while `net.ipv4.ip_forward` is the classic global parameter. Setting either to 1 allows the server to forward packets between interfaces, making both correct in this scenario.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
net.ipv4.conf.all.forwarding
Why this is correct
This parameter enables IP forwarding globally for all network interfaces. It is a valid and effective method, so Option A is correct.
- ✗
net.core.forwarding
Why it's wrong here
`net.core.forwarding` is not a valid sysctl parameter; the correct parameters are under the `net.ipv4` hierarchy.
- ✗
net.ipv4.tcp_forwarding
Why it's wrong here
`net.ipv4.tcp_forwarding` does not exist; TCP forwarding is not controlled by this parameter.
- ✓
net.ipv4.ip_forward
Why this is correct
This is the classic kernel parameter for enabling IP forwarding globally. It is also correct; setting it to 1 enables forwarding.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.