Courseiva
Networking →easyMultiple Choice

LFCS Networking Practice Question

An administrator needs to assign a temporary IPv4 address of 10.20.30.40/24 to interface enp0s3 for immediate testing. The change should not persist after a reboot. Which command accomplishes this?

⚠ Common exam trap

The trap here is choosing a persistent configuration tool such as NetworkManager when the scenario explicitly requires the change to be non-persistent.

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 addr add 10.20.30.40/24 dev enp0s3

Temporary address changes are made directly in the kernel with the `ip` utility. Adding an address with `ip addr add` affects only the current runtime state, so a reboot restores the previous configuration. Persistent tools such as NetworkManager or editing configuration files are used when the change must survive restarts.

Answer analysis

Option-by-option breakdown

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

  • ✗

    nmcli con mod enp0s3 ipv4.addresses 10.20.30.40/24

    Why it's wrong here

    The `nmcli con mod` command edits the persistent NetworkManager connection profile. Even without reactivating the connection, it alters stored configuration and is intended for lasting changes, which conflicts with the requirement that the address not survive a reboot.

  • ✗

    ifconfig enp0s3 10.20.30.40 netmask 255.255.255.0 up

    Why it's wrong here

    While `ifconfig` can assign an address, it is deprecated on modern Linux distributions and is not the preferred tool. The scenario asks for a temporary change, and the canonical current command is `ip addr add`; relying on legacy tooling is not the expected answer.

  • ✓

    ip addr add 10.20.30.40/24 dev enp0s3

    Why this is correct

    The `ip addr add` command adds an address to an interface in the running kernel and does not modify any configuration file, so the address disappears after a reboot. This matches the requirement for a temporary address used only for testing.

  • ✗

    ip route add 10.20.30.40/24 dev enp0s3

    Why it's wrong here

    The `ip route add` command manipulates the routing table, not interface addresses. It would attempt to create a route matching the network, which is not the same as assigning a local address to the interface and would not give the host the requested IP.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This LFCS question is part of Courseiva's 406-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 →

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.