A server administrator is preparing to deploy a new version of a corporate web application. The production site, app.corpnet.local, resolves to the IP address 10.10.1.50 via the company's internal DNS server. The new staging version of the application is hosted on a separate server with the IP address 10.20.1.100. The administrator needs to test the staging version from their management workstation by accessing app.corpnet.local in a browser. This name resolution change must only affect the administrator's workstation and be easily reversible. Which of the following is the most appropriate action for the administrator to take?
Create a CNAME record in DNS that points from staging.corpnet.local to app.corpnet.local.
Add an entry for app.corpnet.local pointing to 10.20.1.100 in the local hosts file on the management workstation.
Update the A record for app.corpnet.local to 10.20.1.100 on the authoritative DNS server.
Change the primary DNS server address on the management workstation's network adapter to 10.20.1.100.
The correct action is to add an entry to the local hosts file on the management workstation. The operating system checks the hosts file for name-to-IP mappings before it queries a DNS server. By adding a line that maps app.corpnet.local to 10.20.1.100, the administrator can override the DNS record for their machine only. This change is local, immediate, and easily reversed by removing or commenting out the entry, making it the ideal solution for this testing scenario. Modifying the authoritative DNS A record would redirect all users to the staging server, which is not desired. Changing the workstation's DNS server to the staging server's IP would break all other name resolution, as the web server is not a DNS server. Creating a CNAME record is incorrect as it maps a hostname to another hostname, not to an IP address, and it would also be a network-wide change.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the hosts file?
Open an interactive chat with Bash
How do DNS and the hosts file differ?
Open an interactive chat with Bash
Why is editing the hosts file better than changing the DNS A record in this scenario?