LFCS Networking Practice Question
A Linux server is configured with two network interfaces: eth0 (192.168.1.10/24) and eth1 (10.0.0.10/24). The default route is via 192.168.1.1. A network administrator wants to ensure that traffic to the 10.0.0.0/24 network uses eth1 and that the source address for that traffic is 10.0.0.10. Which command will achieve this?
⚠ Common exam trap
The trap here is forgetting to specify the source address or incorrectly using a gateway for a directly attached network.
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
✓
ip route add 10.0.0.0/24 dev eth1 src 10.0.0.10
To direct traffic for a specific directly attached network out a particular interface and use a specific source address, the ip route add command with the dev and src options is used. This ensures packets to 10.0.0.0/24 leave via eth1 with source 10.0.0.10, fulfilling the requirement without affecting other traffic.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ip route add 10.0.0.0/24 via 10.0.0.1 dev eth1
Why it's wrong here
This command routes traffic via a gateway 10.0.0.1 on eth1, but the scenario requires direct connectivity on the 10.0.0.0/24 network, which is directly attached. Using a gateway is unnecessary and may be incorrect if 10.0.0.1 is not the intended next hop. It also does not specify the source address.
- ✗
ip route add 10.0.0.0/24 dev eth1
Why it's wrong here
This command adds a direct route via eth1 but does not specify the source address. The kernel might choose a different source address, such as the primary IP of another interface, leading to asymmetric routing or dropped packets. The requirement explicitly includes using 10.0.0.10 as the source.
- ✓
ip route add 10.0.0.0/24 dev eth1 src 10.0.0.10
Why this is correct
This command adds a route for the 10.0.0.0/24 network directly via eth1 and specifies the source address 10.0.0.10. It ensures that packets to that network are sent out eth1 with the correct source IP, meeting the administrator's requirement without needing a gateway.
- ✗
ip route add default via 10.0.0.1 dev eth1
Why it's wrong here
This sets the default route via eth1, which would redirect all traffic, not just traffic to 10.0.0.0/24. It also does not specify the source address. This would disrupt existing connectivity and is not what the administrator wants.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
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.