Courseiva
NetworkinghardMultiple ChoiceObjective-mapped

LFCS Networking Practice Question

A server has two network interfaces: eth0 (192.168.1.10/24) and eth1 (10.0.0.10/24). The default gateway is 192.168.1.1. The administrator wants traffic to 10.0.1.0/24 to go through eth1's gateway 10.0.0.1. Which command adds this route?

⚠ Common exam trap

Candidates often assume the legacy `route` command's syntax is interchangeable with `ip route`, or that the order of `via` and `dev` in `ip route` is fixed, leading them to incorrectly dismiss valid options B or C.

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

Both B and C are correct

Both B and C are valid `ip route add` syntax variations that achieve the same result: adding a route to 10.0.1.0/24 via gateway 10.0.0.1 on interface eth1. The `ip route` command accepts the `via` and `dev` keywords in either order, making both B and C syntactically correct. Option D uses the legacy `route` command with improper syntax (missing `dev` keyword before the interface name), which would fail or produce unexpected behavior.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Both B and C are correct

    Why this is correct

    Both B and C are valid syntax variations of the `ip route add` command that add the required route.

  • ip route add 10.0.1.0/24 via 10.0.0.1 dev eth1

    Why it's wrong here

    This command is a valid syntax for adding the route; however, because another option also uses valid syntax, the correct answer is 'Both B and C are correct' (option A).

  • ip route add 10.0.1.0/24 dev eth1 via 10.0.0.1

    Why it's wrong here

    This command is also a valid syntax for adding the route; similarly, it is correct but the best answer is option A.

  • route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.0.1 eth1

    Why it's wrong here

    This command uses the legacy `route` command with incorrect syntax. The interface name must be preceded by the `dev` keyword (e.g., `route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.0.1 dev eth1`). Therefore, it is incorrect.

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 →

How Courseiva writes practice questions · Editorial policy

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.