Solaris 手工配置IP

网友投稿 694 2022-09-25

Solaris 手工配置IP

Solaris 手工配置IP

虽然网上有很多关于这方面的资料,但是没有点到关键的地方,不能解除现实中的难题。

有不少的人按照操作修改完了,却总是不生效,为什么呢?关键就是没有创建defaultrouter文件(系统默认是没有这个文件的,原因是solaris默认开启的是什么包转发的功能),这里面只需填写你的路由网关即可,一般是所在网段的*.*.*.254如果只是修改IP地址,需要设置的文件就只有hosts、netmasks以及defaultrouter了,如果是多网卡还需要修改hostname.interfaceX对于主机名的修改,也并不复杂,只需要修改nodename即可。希望下面的这篇文章能给你带来帮助……    配置静态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 retrynov 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 localhost192.168.224.111 wan wan.c204.com loghost    注意:主机名后有完全限定域名,可以随意选择域名;loghost要标识在完全限定域名行;建议:/etc/inet/hosts和/etc/inet/ipnodes配置内容相同。   希望这篇文章能帮你解除技术上的困扰,O(∩_∩)O~。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:重营销是误解? 花西子欲撕网红标签!(重营销是什么意思)
下一篇:Funny UNIX Shell Commands
相关文章

 发表评论

暂时没有评论,来抢沙发吧~