000-221 · Question #225
An administrator changed the hostname of a system from dbtest.company.com to dbprod.company.com using SMIT. The new entry in /etc/hosts is: 192.168.56.100 dbprod.company.com When the administrator…
The correct answer is C. Modify/etc/netsvc.conf and set hosts = local, bind. On AIX, /etc/netsvc.conf governs name resolution order, and setting 'hosts = local, bind' forces the system to consult /etc/hosts before querying DNS.
Question
An administrator changed the hostname of a system from dbtest.company.com to dbprod.company.com using SMIT. The new entry in /etc/hosts is:
192.168.56.100 dbprod.company.com When the administrator issued the host command, the following result was observed. #> host dbprod host: 0827-801 Host name dbprod does not exist. #> host 192.168.56.100 dbtest.company.com is 192.168.56.100 Until DNS records can be updated, which action will allow the host command to return the correct name and IP address?
Options
- AModify/etc/nsswitch.conf and set hosts: files dns
- BModify/etc/resolv.conf and specify the new nameserver
- CModify/etc/netsvc.conf and set hosts = local, bind
- DModify/etc/mrouted.conf and add: dbprod "dbprod" +192.168.56.100
How the community answered
(32 responses)- A6% (2)
- B6% (2)
- C72% (23)
- D16% (5)
Why each option
On AIX, /etc/netsvc.conf governs name resolution order, and setting 'hosts = local, bind' forces the system to consult /etc/hosts before querying DNS.
/etc/nsswitch.conf is the name service switch file used on Linux systems, not AIX; modifying it has no effect on AIX name resolution order.
Modifying /etc/resolv.conf changes which DNS server is queried but does not alter the resolution order to prioritize local /etc/hosts over DNS.
AIX uses /etc/netsvc.conf - not /etc/nsswitch.conf - to define the order in which name resolution services are consulted. Setting 'hosts = local, bind' directs the resolver to check local files (/etc/hosts) first and only fall back to DNS (bind) if not found, so the updated /etc/hosts entry for dbprod.company.com will resolve correctly while DNS records are pending.
/etc/mrouted.conf is a multicast routing daemon configuration file and plays no role in hostname or address resolution.
Concept tested: AIX name resolution order via netsvc.conf
Source: https://www.ibm.com/docs/en/aix/7.2?topic=n-netsvcconf-file
Topics
Community Discussion
No community discussion yet for this question.