Solaris 的网卡安全 ------- IPMP
开始配置:
1)验证操作系统版本
-bash-3.00# uname -a
1)验证操作系统版本
-bash-3.00# uname -a
SunOS solaris 5.10 Generic_127128-11 i86pc i386 i86pc
如果想要更详细的
-bash-3.00# more /etc/release
-bash-3.00# more /etc/release
Solaris 10 5/08 s10x_u5wos_10 X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 March 2008
2) 修改EPROM中local-mac-address?= 的参数值,设置网卡使用自己的MAC地址,重启后生效。
#eeprom local-mac-address?=true
3) 设置默认网关
-bash-3.00# cat /etc/defaultrouter
2) 修改EPROM中local-mac-address?= 的参数值,设置网卡使用自己的MAC地址,重启后生效。
#eeprom local-mac-address?=true
3) 设置默认网关
-bash-3.00# cat /etc/defaultrouter
192.168.2.1
4)设置掩码
# vi /etc/netmasks
192.168.2.0 255.255.255.0
5)编辑 /etc/hostname.e1000g0、/etc/hostname.e1000g1、/etc/hosts
# vi /etc/netmasks
192.168.2.0 255.255.255.0
5)编辑 /etc/hostname.e1000g0、/etc/hostname.e1000g1、/etc/hosts
-bash-3.00# more /etc/hosts
#
# Internet host table
#
::1
localhost
127.0.0.1
localhost
192.168.2.101
solaris loghost
192.168.2.102
e1000g0
192.168.2.103
e1000g1
#vi / /etc/hostname.e1000g0
e1000g0 netmask + broadcast + group resting deprecated -failover up addif solaris netmas
e1000g0 netmask + broadcast + group resting deprecated -failover up addif solaris netmas
k + broadcast + failover up
#vi /etc/hostname.e1000g1
#vi /etc/hostname.e1000g1
e1000g1 netmask + broadcast + group resting -failover up
6)重启网卡
-bash-3.00#svcamd restart physical
-bash-3.00#svcamd restart physical
配置完后,两个网卡都正常情况下:
-bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=9040843 mtu 1500 index 2
inet 192.168.2.102 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:50
e1000g0:1: flags=1000843 mtu 1500 index 2
inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
e1000g1: flags=9000843 mtu 1500 index 3
inet 192.168.2.103 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:5a
当e1000g0断了后,ip自动漂移
-bash-3.00#svcamd restart physical
bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=19040803 mtu 1500 index 2
inet 192.168.2.102 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:50
e1000g1: flags=9000843 mtu 1500 index 3
inet 192.168.2.103 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:5a
e1000g1:1: flags=1000843 mtu 1500 index 3
inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
当e1000g0网卡正常后,漂移ip
-bash-3.00#svcamd restart physical
-bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=9040843 mtu 1500 index 2
inet 192.168.2.102 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:50
e1000g0:1: flags=1000843 mtu 1500 index 2
inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
e1000g0:2: flags=1000842 mtu 1500 index 2
inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
e1000g1: flags=9000843 mtu 1500 index 3
inet 192.168.2.103 netmask ffffff00 broadcast 192.168.2.255
groupname resting
ether 0:c:29:c4:5d:5a