环境:
OS:Aix 5.3.10
今天想在服务上能够上网,于是在/etc/resolv.conf文件中添加了DNS的地址,如下所示:
# more /etc/resolv.conf
nameserver 192.168.1.1
退出Xmanager后再次登陆,无法登陆,提示信息如下:
The DT messaging system could not be started.
To correct the problem;
1、Choose [OK] to return to the login screen.
2、select fallsafe session from the login screen's option menu and log in.
3、Check to see that the hostname is correct in:
/etc/hosts
Other hostname problems can be corrected by using the command:
smit mktcpip
4、Check to see that if a search list is speclified in /etc/resolv.conf,it
includes the domain your machine si configured on
网上搜索了相关的解决办法,都是说/etc/hosts,/etc/netsvc.conf这两个文件配置不正确导致的,我刚开始也这么认为,再次检查这两个文件,没有发现配置不对的地方.
hosts文件内容如下
# Internet Address Hostname # Comments
# 192.9.200.1 net0sample # ethernet name/address
# 128.100.0.1 token0sample # token ring name/address
# 10.2.0.2 x25sample # x.25 name/address
127.0.0.1 loopback # loopback (lo0) name/address
192.168.1.185 hxl
我试着ping hxl
# ping hxl
PING hxl: (121.10.40.147): 56 data bytes
64 bytes from 121.10.40.147: icmp_seq=0 ttl=58 time=68 ms
64 bytes from 121.10.40.147: icmp_seq=1 ttl=58 time=17 ms
64 bytes from 121.10.40.147: icmp_seq=2 ttl=58 time=46 ms
奇怪,我明明是配置了主机名hxl对应的ip是192.168.1.185,怎么ping的时候会指向一个莫名其妙的地址呢,后来想了想应该是解释顺序出了问题.ping hxl会首先向DNS解释,所以指向一个其他网络的地址.修改/etc/netsvc.conf文件,在最后一行添加:
hosts=local,bind,nis
解释顺序设置为本地,DNS,NIS,也可通过执行export NSORDER=local,bind,nis改变环境变量NSORDER 来改变顺序,这样重新使用xmanager登陆,问题解决.
-- The End --
阅读(1150) | 评论(0) | 转发(0) |