双网卡bounding
# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPADDR=103.10.84.96
NETMASK=255.255.255.128
GATEWAY=103.10.84.1
BONDING_OPTS="mode=1 miimon=100 primary=eth0"
# cat /etc/sysconfig/network-scripts/ifcfg-eth2
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth2
HWADDR=90:b1:1c:09:83:06
ONBOOT=yes
MASTER=bond0
SLAVE=yes
# cat /etc/sysconfig/network-scripts/ifcfg-eth3
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth3
ONBOOT=yes
HWADDR=90:b1:1c:09:83:07
MASTER=bond0
SLAVE=yes
# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
挂载模块
#modprobe bonding
查看模块
lsmod | grep bonding
mode=0 表示负载均衡方式,两块网卡都工作,需要交换机作支持。
mode=1 表示冗余方式,网卡只有一个工作,一个出问题启用另外的。
mode=6 表示负载均衡方式,两块网卡都工作,不需要交换机作支持。
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPADDR=103.10.84.96
NETMASK=255.255.255.128
GATEWAY=103.10.84.1
BONDING_OPTS="mode=1 miimon=100 primary=eth0"
# cat /etc/sysconfig/network-scripts/ifcfg-eth2
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth2
HWADDR=90:b1:1c:09:83:06
ONBOOT=yes
MASTER=bond0
SLAVE=yes
# cat /etc/sysconfig/network-scripts/ifcfg-eth3
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth3
ONBOOT=yes
HWADDR=90:b1:1c:09:83:07
MASTER=bond0
SLAVE=yes
# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
挂载模块
#modprobe bonding
查看模块
lsmod | grep bonding
mode=0 表示负载均衡方式,两块网卡都工作,需要交换机作支持。
mode=1 表示冗余方式,网卡只有一个工作,一个出问题启用另外的。
mode=6 表示负载均衡方式,两块网卡都工作,不需要交换机作支持。

浙公网安备 33010602011771号