LFCS Networking Practice Question
A Linux server has a single network interface enp3s0 that must obtain its IPv4 address automatically from a DHCP server on the local subnet. The administrator prefers to manage this connection with NetworkManager and wants the setting to persist across reboots. Which command will configure the connection profile named 'Wired connection 1' to use DHCP?
⚠ Common exam trap
Many exam-takers confuse device activation with configuration, assuming that connecting a device automatically sets it to DHCP.
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
✓
nmcli con mod 'Wired connection 1' ipv4.method auto
NetworkManager stores connection settings in profiles, and the ipv4.method property controls how IPv4 addressing is obtained. Setting it to auto enables DHCP for that profile. Modifying the profile with nmcli con mod makes the change persistent, unlike temporary ip commands. The other options either configure static addressing, use an invalid command syntax, or only activate an existing profile without changing its addressing method.
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 dev connect enp3s0
Why it's wrong here
This command activates an existing connection profile on the specified device, but it does not change the IPv4 configuration method. If the profile is currently set to manual addressing, connecting it will not make it use DHCP. The command is useful for bringing a connection up, but it does not modify the addressing method as required.
- ✗
ip addr add dev enp3s0 dhcp
Why it's wrong here
The ip addr add command is used to assign a specific static IP address to an interface; it does not accept 'dhcp' as a valid argument and cannot trigger DHCP negotiation. Even if a valid address were given, the change would be temporary and would not persist across reboots, so it does not satisfy the requirement for a persistent DHCP configuration.
- ✗
nmcli con mod 'Wired connection 1' ipv4.method manual
Why it's wrong here
Setting ipv4.method to manual configures the profile for static addressing, which requires you to also specify an IP address, prefix, and gateway. This is the opposite of what the scenario requires, because the interface must receive its address from a DHCP server. Using manual without providing address details would leave the interface without a usable IPv4 configuration.
- ✓
nmcli con mod 'Wired connection 1' ipv4.method auto
Why this is correct
This command modifies the existing NetworkManager connection profile to use automatic IPv4 configuration (DHCP). The 'ipv4.method auto' setting tells NetworkManager to request an address from a DHCP server, and because it modifies the persistent profile, the change survives reboots. It is the correct way to enable DHCP on a specific connection.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 406 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 →
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.