改变Solaris网络接口的配置方式:手动 or DHCP?

If you have build 62 or later

nwamd is a system daemon to manage network interfaces. This daemon is started automatically and should not be invoked directly. It does not constitute a programming interface.

 

Whether this daemon is enabled or not depends on your installation medium. To check, enter the following at the command line:

     % svcs svc:/network/physical

The two instances will be listed: one as disabled, the other as online. If the nwam instance is online then this daemon will be running. The two instances correspond to the two modes of network configuration: the default instance is for manual mode, while the nwam instance is for auto-magic mode.

To go from manual mode to auto-magic mode:

     % svcadm disable svc:/network/physical:default

     % svcadm enable svc:/network/physical:nwam

To go from auto-magic mode to manual mode:

     % svcadm disable svc:/network/physical:nwam

     % svcadm enable svc:/network/physical:default

Warning: when switching modes like this, all network interfaces will be brought down then back up, thus if a different IP address is configured in this process, existing applications and sessions may be disrupted.

Note that in auto-magic mode, there is a limitation that only one link is active at a time. This mode is thus not recommended for machines which use more than one link at once. For machines with wired and wireless links, wired is preferred by default, although this can be adjusted by altering the order of the lines in the plain text file /etc/nwam/llp. Note, however, that this interface is Volatile and may change in a future release.

For the old build

This is just for a reference, no test has been done:

 

The easiest way is to do a Solaris Express Developer Edition install.

It does that automatically by default.

 

The next easiest way is to specify that you want to use DHCP when

asked during a regular install.

 

The next possible way is to use "sys-unconfig" to return the system

back to the just-installed state, and answer the questions it asks on

reboot.

 

Finally, for the hard way, you can do something like this:

 

       # echo > /etc/hostname.XXX

       # touch /etc/dhcp.XXX

 

... replacing "XXX" with the name of the Ethernet interface of

interest.  If the problem is that you don't know the name of the

Ethernet interface, then try doing "ifconfig -a plumb ; ifconfig -a".

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值