XK0-005 · Question #202
Users in the payroll department are not configured to use DNS due to security concerns. The users ask the junior Linux administrator to configure their workstations to access the payroll server at…
The correct answer is C. echo "192.168.204.11 Payroll" >> /etc/hosts. To configure local hostname resolution without using DNS, a specific system file must be modified to map IP addresses to hostnames.
Question
Users in the payroll department are not configured to use DNS due to security concerns. The users ask the junior Linux administrator to configure their workstations to access the payroll server at 192.168.204.11 by the name "Payroll". Which of the following commands should the administrator issue to meet this request?
Options
- Aecho "nameserver 192.168.204.11 #Payroll" >> /etc/resolv.conf
- Becho "net.ipv4.ip_dynaddr=192.168.204.11 Payroll" >> /etc/sysctl.conf
- Cecho "192.168.204.11 Payroll" >> /etc/hosts
- Decho `IPADDR="192.168.204.11" #Payroll' >> /etc/network/interface
How the community answered
(48 responses)- A4% (2)
- B6% (3)
- C73% (35)
- D17% (8)
Why each option
To configure local hostname resolution without using DNS, a specific system file must be modified to map IP addresses to hostnames.
`/etc/resolv.conf` is used to configure DNS nameservers, which contradicts the requirement to avoid DNS.
`/etc/sysctl.conf` is used for kernel runtime parameters and has no function in local hostname resolution.
The `/etc/hosts` file provides local hostname resolution by mapping IP addresses to hostnames. Adding the entry `192.168.204.11 Payroll` to this file will allow the workstation to resolve 'Payroll' to the specified IP address without relying on DNS.
`/etc/network/interface` (or similar files) configures network interfaces, not local hostname mappings, and the provided syntax is incorrect for this purpose.
Concept tested: Local hostname resolution using /etc/hosts
Source: https://linux.die.net/man/5/hosts
Topics
Community Discussion
No community discussion yet for this question.