exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 251 discussion

Actual exam question from CompTIA's XK0-005
Question #: 251
Topic #: 1
[All XK0-005 Questions]

A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The administrator runs a few commands and receives the following output:

# cat /etc/hosts
10.10.10.55 portal.comptia.org

# host portal.comptia.org
portal.comptia.org has address 192.168.1.55

#cat /etc/resolv.conf
nameserver 10.10.10.5

Which of the following tasks should the administrator perform to resolve this issue?

  • A. Update the name server in resolv.conf to use an external DNS server.
  • B. Remove the entry for portal.comptia.org from the local hosts file.
  • C. Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.
  • D. Clear the local DNS cache on the workstation and rerun the host command.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
NastyNutsu
2 months ago
Selected Answer: B
as it, the internal users can still access the website if they can route to 192.168.1.55 internally. External users may face issues if the DNS resolves to the internal address 192.168.1.55. the issues here is /etc/hosts is overriding the DNS resolution. by removing the conflicting entry from the local hosts file, the workstation will reply on the DNS server to resolve the address of the website, which should provide the correct IP address (192.168.1.55)
upvoted 2 times
NastyNutsu
2 months ago
The /etc/hosts file on the workstation is overriding the DNS resolution and pointing portal.comptia.org to 10.10.10.55, which is causing the issue. By clearing the entry 10.10.10.55 portal.comptia.org from the /etc/hosts file, the workstation will then rely on the DNS server to resolve portal.comptia.org correctly to 192.168.1.55.
upvoted 1 times
...
...
sterguy
3 months ago
Selected Answer: B
I believe it is B because your system checks host file first then pings the dns if host file doesn't have a entry for what your looking for.
upvoted 3 times
...
Monty97
7 months, 1 week ago
Selected Answer: B
The issue is likely caused by a conflicting entry for portal.comptia.org in the local /etc/hosts file, which is mapping the domain to an incorrect IP address (10.10.10.55). The correct IP address for portal.comptia.org according to DNS resolution is 192.168.1.55. Option A: Updating the name server in resolv.conf to use an external DNS server wouldn't resolve the issue since the issue is related to the local hosts file. Option C: Adding a network route wouldn't address the DNS resolution issue. Option D: Clearing the local DNS cache and rerunning the host command might help if there were changes made to DNS configurations, but the root cause here is the conflicting entry in the hosts file. Removing the entry for portal.comptia.org from the local hosts file (/etc/hosts) will allow the system to resolve the domain through DNS properly.
upvoted 2 times
...
makuziker
8 months, 1 week ago
Selected Answer: D
I argue that B does not make sense here. We can see that there is a local DNS entry mapping portal.comptia.org -> 10.10.10.55. But, the actual DNS resolution, from the `host` command, is different, portal.comptia.org -> 192.168.1.55. Something is taking priority over the local DNS in /etc/hosts. If we delete the entry in /etc/hosts, I doubt it will resolve our connection problem, because the system is getting its DNS resolution from something else, possibly a cache. I think we should flush the local DNS cache and try again. We should also verify what is the correct IP it should resolve to. Perhaps we SHOULD also remove the entry from /etc/hosts, but for the reason that the private DNS server (at 10.10.10.5) should be responsible for resolving DNS, not workstations.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago