Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23534
  • 博文数量: 7
  • 博客积分: 15
  • 博客等级: 民兵
  • 技术积分: 82
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-14 11:40
文章分类

全部博文(7)

文章存档

2014年(7)

我的朋友

分类: SOLARIS

2014-03-06 15:53:28

Solaris双网卡绑定


1、查看网卡设备

-bash-3.00# dladm show-link
e1000g0         类型: 非 vlan   mtu: 1500       设备: e1000g0
e1000g1         类型: 非 vlan   mtu: 1500       设备: e1000g1

2、修改EPROM

-bash-3.00# eeprom local-mac-address?=true

3、把网卡添加到组

-bash-3.00# ifconfig e1000g0 group test
-bash-3.00# ifconfig e1000g1 group test

4、修改host文件

-bash-3.00# cat /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost       loghost
::1     localhost       loghost solaris
192.168.10.2    solaris
192.168.10.3    test1
192.168.10.4    test2

5、修改netmasks文件

-bash-3.00# cat /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
192.168.10.0    255.255.255.0

6、修改defaultrouter文件

-bash-3.00# cat /etc/defaultrouter
192.168.10.1

7、修改网卡配置文件

-bash-3.00# cat /etc/hostname.e1000g0
solaris netmask + broadcast + group test up addif 192.168.10.3 netmask + broadcast + deprecated -failover up
-bash-3.00# cat /etc/hostname.e1000g1
192.168.10.4 netmask + broadcast + deprecated group test -failover standby up
-bash-3.00#

8、重启网卡检查网卡状态

-bash-3.00#svcadm restart physical
-bash-3.00# 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.10.2 netmask ffffff00 broadcast 192.168.10.255
        groupname test
        ether 0:c:29:3d:29:60
e1000g0:1: flags=9040843 mtu 1500 index 2
        inet 192.168.10.3 netmask ffffff00 broadcast 192.168.10.255
e1000g1: flags=69040842 mtu 1500 index 3
        inet 192.168.10.4 netmask ffffff00 broadcast 192.168.10.255
        groupname test
        ether 0:c:29:3d:29:6a

9、进行网卡切换(中断主网卡)

-bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=19000802 mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname test
        ether 0:c:29:3d:29:60
e1000g0:1: flags=19040803 mtu 1500 index 2
        inet 192.168.10.3 netmask ffffff00 broadcast 192.168.10.255
e1000g1: flags=29040842 mtu 1500 index 3
        inet 192.168.10.4 netmask ffffff00 broadcast 192.168.10.255
        groupname test
        ether 0:c:29:3d:29:6a
e1000g1:1: flags=21000843 mtu 1500 index 3
        inet 192.168.10.2 netmask ffffff00 broadcast 192.168.10.255
-bash-3.00#

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