VMware下solaris10网卡配置

VMware下solaris10网卡配置


一.激活网卡
问题:VMware9安装solaris 10后,用ifconfig -a只能看到一个lo0,说明只有一个本地环回,即网卡没有启动或者系统没有识别到
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
 bash-3.2# dladm show-dev
e1000g0         link: unknown   speed: 0     Mbps       duplex: unknown
说明己识别,只是没有激活,使用以下命令激活:
bash-3.2# ifconfig e1000g0 plumb
bash-3.2# dladm show-dev
e1000g0         link: up        speed: 1000  Mbps       duplex: full
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000842 mtu 1500 index 2
        inet 0.0.0.0 netmask 0
        ether 0:c:29:24:74:cc
若还出现问题,可以修改VMware虚拟机的配置文件
you will probably get the error failed to plumb pcn0
If so follow these steps, if not, and everything magically works..cool
AFTER INSTALL
--------------------
for networking.
--------------------
shutdown the VM
edit the .VMX file in the virtual machine folder on the host OS and add the following line
ethernet0.virtualDev = "e1000"
then startup Solaris
-----------------------------------------------

 

二.设置IP
DHCP:
ifconfig e1000g0 dhcp  
静态IP:
ifconfig e1000g0 192.168.1.2 netmask 255.255.255.0 up  #只是当前会话生效而已,要想重启后仍生效则需要修改配置文件。

最基本的网络配置主要为配置网卡的:ip,gateway,netmasks及defaultrouter
如:在安装solaris的时候,在网络配置选择是选择了dhcp服务,但是我现在想要配置静态的ip及hostname等等
/etc/hosts                           #hostname及对应的ip ,是/etc/inet/hosts的软连接
/etc/hostname.e1000g0     #对应网卡的主机名(网卡名称可以通过ifconfig -a查看)
/etc/netmask                      #子网掩码,是/etc/inet/netmask的软连接            
/etc/defaultrouter                #默认网关
/etc/nodename                  #节点名(或主机名)
/etc/networks                    #network and broadcast,是/etc/inet/networks的软连接

在solaris中只要设置过dhcp,则会优先于静态ip

首先到etc目录,查看一下有没有dhcp目录及dhcp.e1000g0文件,如果有说明启动了dhcp服务,若要配置静态ip需要将其删除,或是改名
 mv  /etc/dhcp.e1000g0{,.bak}
要更改的配置为:
hostname:jlive
ip:192.168.1.2
netmask:255.255.255.0
defaultrouter:192.168.1.1

1.修改/etc/nodename文件,这个文件默认不存在,需要自己建立,内容为jlive
echo  jlive  >/etc/nodename
2.修改/etc/hosts文件,
#
# Internet host table
#
::1     localhost       loghost jlive
127.0.0.1       localhost       loghost jlive
3.修改/etc/defaultrouter,默认不存在,需要自己建立
echo  192.168.1.1  >/etc/defaultrouter
4.修改/etc/hostname.e1000g0,若没有,需要自己建立
echo  192.168.1.2 >/etc/hostname.e1000g0
5.修改/etc/netmask
192.168.1.0   255.255.255.0
6.修改/etc/networks
# The loopback network is used only for intra-machine communication
#
loopback        127

#
# Internet networks
#
arpanet         10              arpa    # Historical

-----------------------------------------------
7.重启网络
svcadm restart network/physical
原文地址:https://www.cnblogs.com/lixuebin/p/10814685.html