exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 70 discussion

Actual exam question from RedHat's EX200
Question #: 70
Topic #: 1
[All EX200 Questions]

SIMULATION -
Successfully resolve to server1.example.com where your DNS server is 172.24.254.254.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
vi /etc/resolv.conf
nameserver 172.24.254.254
host server1.example.com
On every clients, DNS server is specified in /etc/resolv.conf. When you request by name it tries to resolv from DNS server.

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
sugisho
Highly Voted 3 years, 4 months ago
example nmcli c m ens192 1pv4.dns 172.24.254.254 or nmtui
upvoted 5 times
wizojlo
9 months, 1 week ago
absolutey the easiest and also persistent way to do it. just a sidenote, there is a typo (1pv4.dns --> should be ipv4.dns)
upvoted 1 times
...
...
PENNSHARK
Most Recent 10 months, 4 weeks ago
echo "172.24.254.254 server1.example.com" >> /etc/hosts
upvoted 1 times
Lazylinux
3 months, 2 weeks ago
This is old school stuff and name resolutions checks for DNS server first over hosts file and easiest way to do add DNS server IP without the complicated nmcli is to use nmtui (you can use it even in very base OS install and saves heaps of time) nmcli great to have if you have plenty of time i.e. using it at work to waste time and deter your manage from ever thinking of firing you :)
upvoted 1 times
...
...
Acesyo
1 year, 9 months ago
echo "172.24.254.254 server1.example.com" >> /etc/hosts
upvoted 2 times
...
mattd81
2 years, 6 months ago
Can you add this to the vim /etc/hosts file to complete this request?
upvoted 3 times
wizojlo
9 months, 1 week ago
I do not see it like this. /etc/hosts contains domain name and IP address of each custom machine/server we want to add. The question does not provide IP address of the server, only DNS server. The IP of the server itself is unknown and DNS should resolve it. Correct method (and easiest, IMHO) would be to use nmcli like sugisho suggested. Modifying resolv.conf, on the other hand, would only result in temporary solution as this file gets overwritten automatically on each reboot by NetworkManager, unless we add a custom configuration to /etc/NetworkManager/conf.d/something.conf with contents: [main] dns=none Only then can we modify the /etc/resolv.conf manually and it will persist.
upvoted 1 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 ...