一般主机IP地址的解析顺序依次是DNS,NIS,本机host档案。
要改变这个顺序, 在AIX中,可以建立一个/etc/netsvc.conf文件,并在这个档案中加一行:
hosts=local,bind,nis
这样主机IP地址就先从本地档案(/etc/hosts)开始搜索,其次再去DNS server,最後是NIS server。
也可通过执行
要改变这个顺序, 在AIX中,可以建立一个/etc/netsvc.conf文件,并在这个档案中加一行:
hosts=local,bind,nis
这样主机IP地址就先从本地档案(/etc/hosts)开始搜索,其次再去DNS server,最後是NIS server。
也可通过执行
很多系统都由这个文件来指定: /etc/nsswitch.conf
AIX上面就是这个文件/etc/netsvc.conf
# The /etc/netsvc.conf file is used to specify the ordering of name resolution for
# gethostbyname, gethostbyname2, gethostbyaddr routines
# and alias resolution for the sendmail command.
# Any host setting defined in /etc/netsvc.conf file will override the default host order
# and the host setting given in the /etc/irs.conf file.
# The environment variable NSORDER overrides the host settings in the /etc/netsvc.conf file,
# which in turn overrides the host settings in the /etc/irs.conf file.
AIX上面就是这个文件/etc/netsvc.conf
# The /etc/netsvc.conf file is used to specify the ordering of name resolution for
# gethostbyname, gethostbyname2, gethostbyaddr routines
# and alias resolution for the sendmail command.
# Any host setting defined in /etc/netsvc.conf file will override the default host order
# and the host setting given in the /etc/irs.conf file.
# The environment variable NSORDER overrides the host settings in the /etc/netsvc.conf file,
# which in turn overrides the host settings in the /etc/irs.conf file.
| ||||
|
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7734298/viewspace-703511/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7734298/viewspace-703511/