Courseiva
Network Client ManagementmediumMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

An administrator wants to ensure that a Linux client sends all DNS queries to a specific DNS server without relying on DHCP-provided DNS servers. Which configuration files should be modified?

⚠ Common exam trap

Candidates often assume editing /etc/resolv.conf directly is sufficient, but they fail to recognize that DHCP clients or network management tools will overwrite it, making the change non-persistent unless the DHCP client is explicitly configured to ignore or supersede the provided DNS servers.

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

Edit /etc/dhcp/dhclient.conf to add 'supersede domain-name-servers <desired IP>;'

The dhclient.conf file allows an administrator to override DHCP-provided DNS servers using the 'supersede' directive. This forces the DHCP client to ignore the DNS servers received from the DHCP server and instead use the manually specified DNS server when writing /etc/resolv.conf. This is a standard method for controlling DNS resolution on systems using 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.

  • Configure NetworkManager to ignore DNS from DHCP and set the DNS manually in the connection profile

    Why it's wrong here

    This works if NetworkManager is used, but the question does not specify NetworkManager; dhclient.conf is a more direct method.

  • Edit /etc/dhcp/dhclient.conf to add 'supersede domain-name-servers <desired IP>;'

    Why this is correct

    This overrides DHCP-provided DNS servers and ensures the client uses the specified DNS.

  • Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and set PEERDNS=no and DNS1=<desired IP>

    Why it's wrong here

    This is distribution-specific and may not work if the DHCP client is not configured to respect those settings.

  • Edit /etc/resolv.conf and set the nameserver to the desired IP

    Why it's wrong here

    The DHCP client may overwrite resolv.conf upon lease renewal.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

About these practice questions

Courseiva writes every LPIC-2 question from scratch — 507 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 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.