Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90424
  • 博文数量: 9
  • 博客积分: 2056
  • 博客等级: 大尉
  • 技术积分: 365
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-26 10:43
文章分类
文章存档

2009年(8)

2008年(1)

我的朋友

分类:

2009-08-23 15:10:57

    Solaris 10的一个网卡可以配置多个ip,solaris10可以使用ifconfig命令进行临时设置10和使用编辑/etc/host /etc/hostname的方法来设置ip.

    1、首先先确定机器网卡名字:ifconfig -a

root@my1 # ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
e1000g0: flags=1000843 mtu 1500 index 2
        inet 192.168.0.21 netmask ffffff00 broadcast 192.168.0.255
        groupname x41001
        ether 0:14:4f:45:e1:de 

    2、使用ifconfig 命令方式配置多个ip (重启后失效)

ifconfig e1000g0:1 plumb (启用e1000g0:1网卡)
ifconfig e1000g0:1 192.168.0.22 netmask 255.255.255.0 up (配置第二个ip地址)

    3、编辑/etc/host /etc/hostname方式配置ip (重启后有效)

编辑/etc/hosts文件如下
more /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost       
192.168.0.21    my1   
192.168.0.22 my2
编辑/etc/hostname.e10000:1
more /etc/hostname.e10000:1
my2





阅读(1443) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~