
绑定的前提条件:芯片组型号相同,而且网卡应该具备自己的BIOS芯片。操作过程:1、编辑虚拟网络接口配置文件,指定网卡IP (没有这个文件我们可以从以前的配置文件复制一个过来,减少输入的文字.)[root @heng ~] # cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-bond0 确保 /etc/sysconfig/network-scripts/ifcfg-bond0 的内容和以下内容相同[root @heng ~] # cat /etc/sysconfig/network-scripts/ifcfg-bond0DEVICE=bond0BOOTPROTO=staticBROADCAST=192.168.1.255IPADDR=192.168.1.202NETMASK=255.255.255.0ONBOOT=yesTYPE=Ethernet 2、编辑 /etc/sysconfig/network-scripts/ifcfg-eth0 与 /etc/sysconfig/network-scripts/ifcfg-eth1 ,确保编辑后的内容和以下所显示的内容相同[root @heng ~] # cat /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=none [root @heng ~] # cat /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1ONBOOT=yesBOOTPROTO=none 3、编辑 /etc/moprobe.conf 文件,加入如下一行内容,以使系统在启动时加载bonding模块,对外虚拟网络接口设备为bond0。请确保文件编辑后所显示的内容与以下内容相同[root @heng ~] # cat /etc/moprobe.confalias eth0 pcnet32alias scsi_hostadapter mptbasealias scsi_hostadapter1 mptscsihalias eth1 pcnet32alias bond0 bondingoptions bond0 miimon=100 mode=0# 红色字体为添加的内容 4、编辑 /etc/rc.d/rc.local ,请确保修改后的文件所显示的内容与以下内容相同[root @heng ~] # cat /etc/rc.d/rc.local#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don’t# want to do the full Sys V style init stuff.touch /var/lock/subsys/localifenslave bond0 eth0 eth1#红色字体为添加的内容 到这里配置已经完成,重启计算机,然后用 ifconfig 查看网卡信息,会看见多了一个名称为 bond0 的网卡。
