LPIC-2 Advanced Networking Configuration Practice Question
An administrator needs to add a static route to the destination network 192.168.100.0/24 via gateway 10.0.0.1. Which TWO of the following commands accomplish this? (Choose two.)
⚠ Common exam trap
Many exam-takers confuse adding a static route with adding an IP address to an interface (Option C) or with a firewall rule (Option D), and they may overlook that `nmcli` requires an additional activation step to apply the route immediately.
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 192.168.100.0/24 via 10.0.0.1
The `ip route add` command is the modern Linux utility for adding static routes, specifying the destination network and gateway via the `via` keyword. Option E is correct because the legacy `route add -net` command also adds a static route, using the `gw` parameter to define the gateway, and both commands achieve the same result of adding a route to 192.168.100.0/24 via 10.0.0.1.
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 192.168.100.0/24 via 10.0.0.1
Why this is correct
The ip command adds the static route.
- ✗
nmcli connection modify eth0 +ipv4.routes "192.168.100.0/24 10.0.0.1"
Why it's wrong here
The nmcli syntax for adding a route requires the 'via' keyword or different format.
- ✗
ifconfig eth0:1 192.168.100.1 netmask 255.255.255.0
Why it's wrong here
This adds a virtual interface with an IP, not a route.
- ✗
iptables -A FORWARD -s 192.168.100.0/24 -j ACCEPT
Why it's wrong here
This adds a firewall rule, not a route.
- ✓
route add -net 192.168.100.0/24 gw 10.0.0.1
Why this is correct
The route command adds the static route.
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.