Courseiva
Networking →easyMultiple Choice

LFCS Networking Practice Question

A junior administrator must temporarily assign the address 172.16.5.20/24 to interface eth1 on a running server so that a migration can be tested, and the change must not survive a reboot. Which command accomplishes this?

⚠ Common exam trap

The trap here is choosing a NetworkManager or configuration-file method, which makes the address persistent and therefore violates the explicit requirement that the change not survive a reboot.

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 172.16.5.20/24 dev eth1

Temporary address changes are made directly in the kernel with the iproute2 ip addr add command. This affects the running system only and is lost on reboot, which is exactly what the migration test requires. Persistent configuration tools such as NetworkManager profiles or network configuration files would write the change to disk and reapply it at boot.

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 addr add 172.16.5.20/24 dev eth1

    Why this is correct

    The ip addr add command assigns the address to the interface immediately in the running kernel. Because it only modifies runtime state and does not write any configuration file, the address disappears on reboot, which matches the requirement for a temporary change during migration testing.

  • ✗

    ip link set eth1 up && ip route add 172.16.5.20/24 dev eth1

    Why it's wrong here

    Bringing the link up is necessary but does not assign an address, and adding a route whose destination is the host address itself is not how addresses are configured. This sequence would leave eth1 without the required address, so the migration test would fail despite the interface being active.

  • ✗

    ifconfig eth1 172.16.5.20 netmask 255.255.255.0

    Why it's wrong here

    This legacy command does assign an address at runtime and would work on systems that still ship net-tools, but the scenario describes a modern server where iproute2 is the supported toolset. More importantly, the command is not the preferred current method, and the question expects the iproute2 equivalent for assigning an address.

  • ✗

    nmcli con mod eth1 ipv4.addresses 172.16.5.20/24 && nmcli con up eth1

    Why it's wrong here

    This sequence modifies the persistent connection profile stored by NetworkManager, so the address would be reapplied after reboot. That directly violates the requirement that the change not survive a reboot, even though the address would be active in the running system.

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.