solaris10 修改ip 后是否需要重启?
时间:2010-12-24 来源:dbwriter
solaris10 下 修改ip 要更改 几 个文件
/etc/hosts ---修改ip -- ln 自 /etc/inet/ipnodes
/etc/netmasks --掩码改变时 修改掩码
/etc/defaultrouter --网关改变时,重新制定网关。
修改完成后 。不需重启机器。
使用solaris 的svc 来重启 网卡服务。 svc 类似于 linux 的 service restart network 。 aix 的 startsrc stopsrc lssrc.
bash-3.00# svcadm
Usage: svcadm [-v] [cmd [args ... ]]
svcadm enable [-rst] <service> ... - enable and online service(s)
svcadm disable [-st] <service> ... - disable and offline service(s)
svcadm restart <service> ... - restart specified service(s)
svcadm refresh <service> ... - re-read service configuration
svcadm mark [-It] <state> <service> ... - set maintenance state
svcadm clear <service> ... - clear maintenance state
svcadm milestone [-d] <milestone> - advance to a service milestone
Services can be specified using an FMRI, abbreviation, or fnmatch(5)
pattern, as shown in these examples for svc:/network/smtp:sendmail
svcadm <cmd> svc:/network/smtp:sendmail
svcadm <cmd> network/smtp:sendmail
svcadm <cmd> network/*mail
svcadm <cmd> network/smtp
svcadm <cmd> smtp:sendmail
svcadm <cmd> smtp
svcadm <cmd> sendmail
bash-3.00# svc
svcadm svccfg svcprop svcs
bash-3.00# svcs | grep -i physical
online 14:17:34 svc:/network/physical:default
bash-3.00# svcadm restart svc:/network/physical:default
重启服务后网络ip会修改。