solaris网络配置(solaris 10)

时间:2021-03-23 16:44:55
激活网卡,配置IP地址 假如网卡名称为pcn0 ifconfig -a  #查看网卡信息
ifconfig pcn0 plumb  #激活网卡
ifconfig pcn0 unplumb  #关闭网卡
ifconfig pcn0 192.168.1.133 netmask 255.255.255.0 up #配置IP地址

solaris要上网还需要配置以下四个文件:
/etc/hosts or /etc/inet/hosts
/etc/defaultrouter
/etc/resolv.conf
/etc/nsswitch.conf
  其中defaultrouter与resolv.conf两个文件需要新建   配置: /etc/hosts or /etc/inet/hosts
127.0.0.1         localhost
192.168.0.3       lion        loghost
  /etc/defaultrouter
192.168.1.1
  /etc/resolv.conf
nameserver 202.96.64.68
  /etc/nsswitch.conf
hosts:   files   dns