3,查看网卡配置信息的目录:wxmrc14:/etc/sysconfig/network # ls
. if-up.d ifcfg-lo scripts
.. ifcfg-bond0 ifcfg.template update-log
config ifcfg-eth-bus-pci-0000:0b:00.0 ifcfgeth0 update-log.debug dhcp ifcfg-eth-id-00:1e:0b:be:95:98 ifroute-lo wireless
if-down.d ifcfg-eth-id-00:1e:0b:be:95:9a providers
4,两块网卡的启动模式修改为:none,目的是网卡启动时不使用DHCP模式。
wxmrc14:/etc/sysconfig/network # vi ifcfg-eth-id-00\:1e\:0b\:be\:95\:98
BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='Ddhb.sWQdX4kVaYC'
_nm_name='bus-pci-0000:05:00.0'
5,再在/etc/init.d/network的start段的后面加上网关(SP03的补丁系统大约在462行): route add default gw **.*.*.*(网关IP)
6,重启,使网卡配置生效。执行命令:
/etc/init.d/network restart
意: 注
这种模式bond的网卡,只有bond网卡上具备IP地址,而成员网卡上是没有IP地址的(我们一般使用的bond.sh脚本生成的bond网卡和成员网卡都具有相同的IP和MAC)
wxmsc2:~ # ifconfig
bond0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE
inet addr:192.168.132.139 Bcast:192.168.132.159 Mask:255.255.255.224 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:11646558 errors:0 dropped:0 overruns:0 frame:0
TX packets:7301783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1307158118 (1246.6 Mb) TX bytes:976959137 (931.7 Mb)
bond0:0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE
inet addr:192.168.132.152 Bcast:192.168.132.128 Mask:255.255.255.224 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 00:1C:C4:97:F6:EE
inet6 addr: fe80::21c:c4ff:fe97:f6ee/64 Scope:Link