Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91836161
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类:

2008-04-22 13:21:47

作者: chiver  出自:
故障现象:系统配置网络(172.31.130.196/255.255.255.224 GW:172.31.130.193)

配置Hosts,defaultrouter,netmasks后重新启动系统,发现IP为192.168.20.153

判断:系统未正常加载hosts文件

解决:查找到./inet/ipnodes配置如下

#
# Internet host table


#
::1 localhost
127.0.0.1 localhost
192.168.20.153 ems loghost

删除最后一行,重启系统解决。

附录:
查找说明后发现,正常情况下不需要修改ipnodes文件。Ipnodes文件在IPV6中使用!

solaris 10 修改网络配置
hostname.interface_name
hosts
defaultrouter
netmasks
nodename

还需要更改/etc/inet/ipnodes
Note :
If you need to add addresses, you must add IPv4 addresses to both the hosts and ipnodes files. You add only IPv6 addresses to the ipnodes file.

Address search order is ipnodes first, then hosts. (solaris 8, 9, 10)
So ipnodes needn't be modified if it's no information about IPv4 address.

But in Solaris 10, a new feature added:

The /etc/nsswitch.conf file policies for the hosts database and ipnodes repositories are synchronized.

In your case, hosts changed but ipnodes untouched so that
system got old ip address from ipnodes.

附:DNS设置
若要使DNS的设置生效,需要两个文件,一个是创建一个文件,另外要修改一个文件。

a.在/etc目录下创建一个名为resolv.conf的文件,里面分别用nameserver IP地址的形式定义好DNS服务器,下面是我的机器中的resolv.conf的内容:

# more resolv.conf
domain jnbdn.com
nameserver 211.97.235.241
nameserver 211.97.168.129
nameserver 202.96.0.133

b.修改/etc下nsswitch.conf文件,将其中的hosts: files更改为

hosts: files dns,networks: files dns 即在files后面再跟一个dns,这样两个文件同时作用,DNS就可以工作了。
阅读(508) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~