Solaris10下的网络IP配置

操作环境

配置静态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配置内容相同。
[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7180624/viewspace-927268/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7180624/viewspace-927268/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值