LPIC-2 Network Client Management Practice Question
What is the recommended way to configure a Linux host to obtain an IP address automatically via DHCP on the eth0 interface?
⚠ Common exam trap
Many candidates confuse the DHCP client configuration keyword 'dhcp' with the client program name 'dhclient', or mistakenly think that editing the DHCP server configuration file is the correct way to configure a client to obtain an IP automatically.
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
✓
Set 'BOOTPROTO=dhcp' in /etc/sysconfig/network-scripts/ifcfg-eth0.
On Red Hat-based Linux distributions, the recommended way to configure an interface for DHCP is to set 'BOOTPROTO=dhcp' in the interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth0. This instructs the network service to use the DHCP protocol to obtain an IP address automatically from a DHCP server. The value 'dhcp' is the standard keyword recognized by the ifcfg scripts, not 'dhclient'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set 'BOOTPROTO=dhclient' in /etc/sysconfig/network-scripts/ifcfg-eth0.
Why it's wrong here
Invalid option; BOOTPROTO should be 'dhcp'.
- ✗
Edit /etc/dhcp/dhcpd.conf to include the host's MAC address.
Why it's wrong here
That's the DHCP server configuration, not client.
- ✗
Use 'networkctl' to set DHCP=yes on eth0.
Why it's wrong here
For systemd-networkd, not network-scripts.
- ✓
Set 'BOOTPROTO=dhcp' in /etc/sysconfig/network-scripts/ifcfg-eth0.
Why this is correct
Standard for network-scripts.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 507 original LPIC-2 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.