vim ifcfg-bond0(管理平面)
BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=0 miimon=100' #mode=0 bond模式:0-6
BONDING_SLAVE0='eth0'
BONDING_SLAVE1='eth1'
BOOTPROTO='static'
BROADCAST=''
IPADDR='*.*.*.*'
NETMASK='255.255.248.0'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
less ifcfg-eth0
DEVICE='eth0'
BOOTPROTO='none'
ONBOOT='yes'
MASTER='bond0'
SLAVE='yes'
MTU=''
NAME='82576 Gigabit Network Connection'
TYPE'Ethernet'
STARTMODE='auto'
USERCTL='no'
PREFIXLEN='32'
less ifcfg-eth1
DEVICE='eth1'
BOOTPROTO='none'
ONBOOT='yes'
MASTER='bond0'
SLAVE='yes'
NAME='82576 Gigabit Network Connection'
TYPE'Ethernet'
STARTMODE='auto'
USERCTL='no'
PREFIXLEN='32'
vim /etc/modprobe.d/bonding.conf
#追加
alias bond0 bonding
options bonding mode=0 miimon=200
加载模块(重启系统后就不用手动再加载了)
# modprobe bonding
确认模块是否加载成功:
[root@test ~]# lsmod | grep bonding
bonding 100065 0
重启网络,然后确认一下状况:
[root@test ~]# /etc/init.d/network restart
[root@test ~]# cat /proc/net/bonding/bond0
vim /etc/init.d/after.local
#!/bin/sh
ifenslave bond0 eth0 eth1
chmod 700 /etc/init.d/after.local
ethtool
ifconfig eth0 down(无输出)
# ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes