bond
http://t.zoukankan.com/openstack-elk-p-7614421.html
https://www.linuxquestions.org/linux/answers/Networking/Linux_bonding_howto_0
More Details on : http://unixfoo.blogspot.com/
Howto : Linux bonding
Bonding is creation of a single bonded interface by combining 2 or more ethernet interfaces. This helps in high availability and performance improvement.
Steps for bonding in Fedora Core and Redhat Linux
Step 1.
Create the file ifcfg-bond0 with the IP address, netmask and gateway. Shown below is my test bonding config file.
$ cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.1.12
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
Step 2.
Modify eth0, eth1 and eth2 configuration as shown below. Comment out, or remove the ip address, netmask, gateway and hardware address from each one of these files, since settings should only come from the ifcfg-bond0 file above.
$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:12:17:5C:A7:9D
IPADDR=192.168.1.12
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.1.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes
ONBOOT=yes
Settings for Bond
MASTER=bond0
SLAVE=yes
$ cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=01:12:18:5C:A7:D9
IPADDR=192.168.1.13
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
Settings for bonding
MASTER=bond0
SLAVE=yes
$ cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
HWADDR=00:12:27:5C:A7:9D
IPADDR=192.168.1.12
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.1.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes
MASTER=bond0
SLAVE=yes
Step 3.
Set the parameters for bond0 bonding kernel module. Add the following lines to /etc/modprobe.conf
bonding commands
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
Step 4.
Load the bond driver module from the command prompt.
$ modprobe bonding
Step 5.
Restart the network, or restart the computer.
$ service network restart # Or restart computer
When the machine boots up check the proc settings.
$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.0.2 (March 23, 2006)
Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:13:72:80: 62:f0
Look at ifconfig -a and check that your bond0 interface is active. You are done!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏