LFCS Networking Practice Question
A company has a server with two network interfaces: eth0 (192.168.1.10/24, gateway 192.168.1.1) and eth1 (10.0.0.10/24, gateway 10.0.0.1). The server needs to reach a remote network 172.16.0.0/16 via a VPN tunnel that terminates at 10.0.0.5 on eth1. Which command should be used to add a route for this traffic?
⚠ Common exam trap
The trap here is that candidates often forget to specify the `via` next-hop IP when the destination is not directly connected, or they mistakenly use the default gateway instead of the VPN tunnel endpoint, assuming all external traffic goes through the same gateway.
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 172.16.0.0/16 via 10.0.0.5 dev eth1
The VPN tunnel endpoint is at 10.0.0.5 on the eth1 network, so traffic to 172.16.0.0/16 must be forwarded via that next-hop IP address using the eth1 interface. The `ip route add` command with `via 10.0.0.5 dev eth1` explicitly sets the gateway and egress interface, ensuring packets are sent through the VPN tunnel.
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 172.16.0.0/16 via 10.0.0.5 dev eth1
Why this is correct
Correct. The route must specify the next-hop IP of the VPN tunnel endpoint (10.0.0.5) on the correct interface (eth1) to ensure traffic to 172.16.0.0/16 is sent through the tunnel.
- ✗
ip route add 172.16.0.0/16 via 10.0.0.5 dev eth0
Why it's wrong here
Incorrect. The next-hop 10.0.0.5 is reachable via eth1, not eth0. Using eth0 would not reach the tunnel endpoint.
- ✗
ip route add 172.16.0.0/16 via 192.168.1.1 dev eth0
Why it's wrong here
Incorrect. The default gateway 192.168.1.1 is on eth0 and does not lead to the VPN tunnel. This would send traffic out the wrong interface to the default gateway, bypassing the tunnel.
- ✗
ip route add 172.16.0.0/16 dev eth1
Why it's wrong here
Incorrect. The command lacks a next-hop IP; it would attempt to send traffic directly to 172.16.0.0/16, which is not directly connected and would fail without a gateway.
Go deeper
Related to this question
About these practice questions
One of 507 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.