首页  ·  知识 ·  基础设施
Solaris10下的网络IP配置
网友  中国IT实验室   数据中心  编辑:德仔   图片来源:网络
操作环境 PC-C204 Solaris 10 u1 x86   配置静态IP {  内网:in
操作环境
PC-C204
Solaris 10 u1 x86
  配置静态IP
{
 内网:inner 192.168.1.1  255.255.255.0
 外网:outer 192.168.224.251  255.255.255.0
}
  外网接口已在安装界面配置完成,现在配置内网接口。
  查看双网卡是否已安装:
ls /dev | grep rtls
rtls
rtls0
rtls1
  网卡型号决定了网卡的名称,我的网卡名称是:rtls开头
  上面显示安装了两个网卡,rtls1就是我们下面的要配置的网卡!
  配置网卡接口名称:
vi /etc/hostname.rtls1
inner
  配置子网掩码:
chmod 644 /etc/inet/netmasks
vi /etc/inet/netmasks
192.168.224.0  255.255.255.0
192.168.1.0   255.255.255.0
  配置网卡接口地址:
chmod 644 /etc/inet/hosts  
vi /etc/inet/hosts
127.0.0.1    localhost   
192.168.224.251 outer  outer.c204.com loghost
192.168.1.1   inner  inner.c204.com
  统一配置文件:
chmod 644 /etc/inet/ipnodes
vi /etc/inet/ipnodes
::1   localhost
127.0.0.1    localhost
192.168.224.251 outer  outer.c204.com loghost
192.168.1.1   inner  inner.c204.com
  重启:
init 6
  网络配置完成后,相关文件的内容:
more /etc/nodename
outer
more /etc/hostname.rtls0
outer
more /etc/hostname.rtls1
inner
more /etc/hosts
127.0.0.1    localhost   
192.168.224.251 outer  outer.c204.com loghost
192.168.1.1   inner  inner.c204.com
more /etc/netmasks
192.168.224.0  255.255.255.0
192.168.1.0   255.255.255.0
more /etc/defaultrouter
192.168.224.1
more /etc/resolv.conf
domain c204.com
nameserver 202.96.134.133
nameserver 202.96.128.68
search c204.com
more /etc/nsswitch.conf
hosts:   files dns
  错误排除
  如果出现如下错误信息,说明主机名没有在主机列表中指定:
  Nov 20 15:25:04 unix /usr/lib/snmp/snmpdx: [ID 702911 daemon.error] unable to get my IP address: gethostbyname(unix) failed [h_errno: host not found(1)]
  可以这样解决,将主机名加入到主机列表:
more /etc/nodename
unix
vi /etc/hosts
127.0.0.1    localhost    unix  loghost
  如果出现如下错误信息,说明你在安装后配置网卡接口名称时使用了主机名:
  Nov 20 15:36:32 unix ip: [ID 482227 kern.notice] ip_arp_done: init failed
  可以这样解决,更改网卡接口名:
vi /etc/hostname.rtls0
litchi
vi /etc/hosts
192.168.1.1  litchi  litchi.c204.com
  如果出现如下错误信息,说明Sendmail在发出警告信息,不是什么错误:
  Nov 20 15:37:21 unix sendmail[318]: [ID 702911 mail.crit] My unqualified host name (localhost) unknown; sleeping for retry
  可以尝试这样配置hosts文件,要求全名称且注意loghost的位置:
more /etc/hosts
127.0.0.1    localhost   
192.168.224.251 outer  outer.c204.com loghost
192.168.1.1   inner  inner.c204.com
  如果你的系统不必运行Sendmail服务,可以停掉它:
svcs disable /network/smtp:sendmail
  查看系统引导信息:
dmesg
  完全限定域名错误
  错误信息:
Nov 29 21:40:37 wan sendmail[712]: [ID 702911 mail.crit]
My unqualified host name (wan) unknown; sleeping for retry
Nov 29 21:41:37 wan sendmail[712]: [ID 702911 mail.alert]
unable to qualify my own domain name (wan) -- using short name
  解决方法:
  这是sendmail发出的警告信息,是由于/etc/inet/hosts文件的配置引起的,下面是正确配置:
127.0.0.1    localhost
192.168.224.111 wan   wan.c204.com  loghost
  注意:主机名后有完全限定域名,可以随意选择域名;loghost要标识在完全限定域名行;
  建议/etc/inet/hosts和/etc/inet/ipnodes配置内容相同。
 
本文作者:网友 来源:中国IT实验室
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读
也许感兴趣的
我们推荐的
主题最新
看看其它的