Courseiva
Networking →easyMultiple Choice

LFCS Networking Practice Question

A Linux server has a single Ethernet interface eth0. The administrator needs to assign a static IPv4 address 192.0.2.10/24 with gateway 192.0.2.1 on a system that uses systemd-networkd. Which file should be created or edited to configure this interface?

⚠ Common exam trap

It's easy for candidates to confuse the configuration file locations of different network management tools, such as ifupdown, NetworkManager, or netplan, with the native systemd-networkd format.

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

✓

/etc/systemd/network/10-eth0.network

systemd-networkd uses .network files stored in /etc/systemd/network/ (or /run and /usr/lib). A file such as 10-eth0.network with a [Match] section for eth0 and a [Network] section specifying Address=192.0.2.10/24 and Gateway=192.0.2.1 is the correct way to assign a static IPv4 configuration. The other paths belong to different network management frameworks.

Answer analysis

Option-by-option breakdown

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

  • ✗

    /etc/network/interfaces

    Why it's wrong here

    This file is used by the ifupdown package, common on Debian and Ubuntu systems, not by systemd-networkd. Editing it will have no effect on a system where systemd-networkd manages the interfaces. The question specifically states that systemd-networkd is in use, so the configuration must be placed in a .network file.

  • ✓

    /etc/systemd/network/10-eth0.network

    Why this is correct

    systemd-networkd reads .network files from /etc/systemd/network/, /run/systemd/network/, and /usr/lib/systemd/network/. A file named 10-eth0.network in /etc/systemd/network/ is the correct location to define a static address, gateway, and DNS for eth0. The numeric prefix controls processing order, and the [Match] section must match the interface name.

  • ✗

    /etc/netplan/01-netcfg.yaml

    Why it's wrong here

    Netplan is a configuration abstraction used by Ubuntu and some other distributions that can render configurations for systemd-networkd or NetworkManager. However, it is not part of systemd-networkd itself; the native configuration format is the .network file. On a pure systemd-networkd system, the .network file is the direct and appropriate choice.

  • ✗

    /etc/sysconfig/network-scripts/ifcfg-eth0

    Why it's wrong here

    This file is used by the legacy network service (initscripts) on Red Hat-based systems, not by systemd-networkd. While some distributions may still support it, it is not read by systemd-networkd. The correct location for systemd-networkd is a .network file under /etc/systemd/network/.

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 →

How Courseiva writes practice questions · Editorial policy

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.