nerdexam
CompTIACompTIA

XK0-005 · Question #7

XK0-005 Question #7: Real Exam Question with Answer & Explanation

The correct answer is B: Modify the /etc/hosts file, and add the ::1 localhost entry to the file.. To update local name resolution for IPv6, the IPv6 loopback address ::1 needs to be added to the /etc/hosts file.

System Management

Question

A junior Linux administrator is updating local name resolution to support IPv6. The administrator issues the command cat /etc/hosts and receives the following output: 127.0.0.1 localhost Which of the following actions should the administrator perform to accomplish this task?

Options

  • AModify the /etc/hosts file, and add the ipv6 localhost entry to the file.
  • BModify the /etc/hosts file, and add the ::1 localhost entry to the file.
  • CModify the /etc/hosts file, and add the ipv4 localhost entry to the file.
  • DModify the /etc/hosts file, and add the 0.0.0.0 localhost entry to the file.

Explanation

To update local name resolution for IPv6, the IPv6 loopback address ::1 needs to be added to the /etc/hosts file.

Common mistakes.

  • A. While the general goal is correct, 'ipv6 localhost entry' is too vague and does not specify the correct ::1 IPv6 loopback address.
  • C. Adding an IPv4 localhost entry is irrelevant to updating local name resolution specifically for IPv6, as an IPv4 entry (127.0.0.1 localhost) already exists.
  • D. 0.0.0.0 is a placeholder or unassigned address, not the IPv4 loopback address, and is unrelated to configuring IPv6 localhost resolution.

Concept tested. Linux IPv6 local name resolution

Reference. https://en.wikipedia.org/wiki/Localhost#IPv6_loopback

Topics

#Linux network configuration#IPv6#Local name resolution#/etc/hosts

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions