solaris10设置IP

设置IP

假设要将IP 设置为192.168.16.2 网关为192.168.16.250

 

查看/dev/下的网卡,比如e1000g0,然后新建/etc/hostname.e1000g0,内容为主机名

 

  1. 设置IP :修改/etc/hosts,/etc/inet/hosts /etc/inet/ipnodes 这三个文件, 内容为 192.168.16.2 主机名 loghost
  2. 设置子网掩码: 更改了/etc/netmasks
  3. 设置缺省网关: 添加或者更新文件/etc/defaultrouter ,内容为:192.168.16.250
  4. 设置主机名: 添加了文件/etc/nodename 内容为主机名
  5. 重启网卡,不需要重启系统即可生效: # svcadm disable physical # svcadm enable physical
  6. 检测IP 是否设置成功 Ifconfig –a 

猜你喜欢

转载自xueqi.iteye.com/blog/1579948
今日推荐