Courseiva
Network Client ManagementhardMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

Exhibit

Refer to the exhibit.

```
# nmcli device show eth0
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:1A:2B:3C:4D:5E
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     MyConnection
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.1.100/24
IP4.GATEWAY:                            192.168.1.1
IP4.DNS[1]:                             8.8.8.8
IP4.DNS[2]:                             8.8.4.4
```

Based on the exhibit, which command would change the DNS server to 1.1.1.1 for the connection MyConnection?

⚠ Common exam trap

Watch out — candidates often confuse the case-sensitive property name (`ipv4.dns` vs `IP4.DNS`) or mistake the `+` prefix for setting rather than appending, leading them to choose options that either use incorrect syntax or do not achieve the intended replacement.

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 MyConnection ipv4.dns 1.1.1.1

The `nmcli con mod` command modifies an existing connection profile, and the `ipv4.dns` property sets the DNS server for IPv4. The property name is case-sensitive and must be lowercase `ipv4.dns` as per NetworkManager's D-Bus API. This command replaces any existing DNS servers with the specified value.

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 MyConnection IP4.DNS 1.1.1.1

    Why it's wrong here

    The property name is ipv4.dns, not IP4.DNS.

  • nmcli con mod MyConnection ipv4.dns 1.1.1.1

    Why this is correct

    This is the correct nmcli command to modify the DNS setting for the connection.

  • nmcli dev mod eth0 ipv4.dns 1.1.1.1

    Why it's wrong here

    Device modification is temporary and not persistent; connection modification is required.

  • nmcli con mod MyConnection +ipv4.dns 1.1.1.1

    Why it's wrong here

    +ipv4.dns appends to the list, but the question asks to change (replace) the DNS server.

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.