suse 10 网卡绑定

Suse10网卡绑定

1.建立配置文件

localhost:/etc/sysconfig/network #touch /etc/modprobe.d/bonding.conf

localhost:/etc/sysconfig/network #vim /etc/modprobe.d/bonding.conf

alias bond0 bonding

options bond0 miimon=100 mode=1

2.配置网卡

localhost:/etc/sysconfig/network # touch ifcfg-bond0

localhost:/etc/sysconfig/network # vim ifcfg-bond0   //添加如下配置

BOOTPROTO='static'

IPADDR='192.168.0.88'

NETMASK='255.255.255.0'

STARTMODE='onboot'

BONDING_MASTER="yes"

BONDING_MODULE_OPTS="mode=active-backup miimon=100 use_carrier=1"

BONDING_SLAVE0='bus-pci-0000:02:01.0'

BONDING_SLAVE1='bus-pci-0000:02:05.0'

注意:文件中SLAVE_PCI码特别重要,获取方式如下(eth1网卡雷同):

localhost:/etc/sysconfig/network # ethtool -i eth0

driver: vmxnet

version: 2.0.8.0

firmware-version: N/A

bus-info: 0000:02:01.0

3.建立网卡mac配置文件(suse网卡默认网卡配置文件为ifcfg-eth-id-xx。。)新添加的网卡没有配置文件可以用ifconfig | grep HWaddr来获取新网卡的mac地址来建立配置文件!


建立ifcfg-eth-id-00\:0C\:29\:57\:19\:FD和ifcfg-eth-id-00\:0c\:29\:57\:19\:f3配置文件

localhost:/etc/sysconfig/network # cat ifcfg-eth-id-00\:0C\:29\:57\:19\:FD

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

localhost:/etc/sysconfig/network # cat ifcfg-eth-id-00\:0c\:29\:57\:19\:f3

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

4添加网卡驱动:

localhost:/etc/sysconfig/network # modprobe bonding

5重新启动网卡:

localhost:/etc/sysconfig/network # rcnetwork restart

6检查绑定情况:

localhost:~ # cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.0.1 (January 9, 2006)


Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth0

MII Status: up                     //此及以下三个UP表示成功

!!

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0


Slave Interface: eth0

MII Status: up

Link Failure Count: 0

Permanent HW addr: 00:0c:29:57:19:f3


Slave Interface: eth1

MII Status: up

Link Failure Count: 0

Permanent HW addr: 00:0c:29:57:19:fd

或者是:

localhost:~ # ifconfig | grep HWaddr                 //MAC地址一致也表示成功!

bond0     Link encap:Ethernet  HWaddr 00:0C:29:57:19:F3

eth0      Link encap:Ethernet  HWaddr 00:0C:29:57:19:F3

eth1      Link encap:Ethernet  HWaddr 00:0C:29:57:19:F3




你可能感兴趣的:(SuSE,网卡绑定)