Linux配置bond(网卡绑定)

1. 建立bonding网卡:ifcfg-bond0

2. 配置开机自动加载bonding驱动

修改内核模块开机自动加载文件/etc/modprobe.conf(根据linux内核版本可能会存在不同,旧的版本可能是modules.conf),以使内核模块开机自动加载bonding驱动程序。

3. 修改配被绑定网卡配

我们要把eth1和eth2这两块网卡绑定到bond0,这两个网卡配置文件都需要修改

4. 启动bonding

5. 验证是否绑定成功:ifconfig查看MAC

bond0 Link encap:Ethernet HWaddr 00:15:17:C3:7B:E5

inet addr:192.168.10.6 Bcast:192.168.10.255 Mask:255.255.255.0

inet6 addr: fe80::215:17ff:fec4:8be0/64 Scope:Link

UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

RX packets:129687 errors:0 dropped:0 overruns:0 frame:0

TX packets:2534730 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:11516581 (10.9 MiB) TX bytes:3449545971 (3.2 GiB)

Eth1 Link encap:Ethernet HWaddr  00:15:17:C3:7B:E5

inet6 addr: fe80::215:17ff:fec4:8be0/64 Scope:Link

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:5574 errors:0 dropped:0 overruns:0 frame:0

TX packets:634713 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:410305 (400.6 KiB) TX bytes:862488772 (822.5 MiB)

Base address:0x5020 Memory:b9960000-b9980000

Eth2Link encap:Ethernet HWaddr 00:15:17:C3:7B:E5

inet6 addr: fe80::215:17ff:fec4:8be0/64 Scope:Link

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:2016 errors:0 dropped:0 overruns:0 frame:0

TX packets:633328 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:167005 (163.0 KiB) TX bytes:862342651 (822.3 MiB)

Base address:0x5000 Memory:b9920000-b9940000

版权声明:
作者:SE_Zhang
链接:https://www.cnesa.cn/1521.html
来源:CNESA
文章版权归作者所有,未经允许请勿转载。

THE END
打赏
海报
Linux配置bond(网卡绑定)
1. 建立bonding网卡:ifcfg-bond0 2. 配置开机自动加载bonding驱动 修改内核模块开机自动加载文件/etc/modprobe.conf(根据linux内核版本可能会存在不同,旧……
<<上一篇
下一篇>>