Linux网卡bond
最编程
2024-02-04 22:07:06
...
网卡bond的模式
网卡绑定mode共有七种(0~6) bond0、bond1、bond2、bond3、bond4、bond5、bond6。 常用的有三种:
mode=0:平衡负载模式,有自动备援,但需要”Switch”支援及设定。
mode=1:自动备援模式,其中一条线若断线,其他线路将会自动备援。
mode=6:平衡负载模式,有自动备援,不必”Switch”支援及设定。
配置网卡bond
确认NetworkManager关闭
service NetworkManger stop
chkconfig NetworkManger off
修改网卡配置文件
添加MASTER、SLAVE配置项
eth0:
$vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
SLAVE=yes
MASTER=bond0
eth1:
$vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
SLAVE=yes
MASTER=bond0
bond0(不存在,需要自己创建):
$vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
修改modprobe.d(bond6模式)
$vi /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 miimon=100 mode=6
重启network
service network restart
检查
ip a可以看到eth0\eth1上的master为bond0
推荐阅读
-
10,000 字的 Linux 流程概念
-
Linux 学习] SSH 连接出现主机密钥验证失败的原因和解决方案以及 ssh-keygen 命令的用法
-
2024-04-23 用于查看内存占用情况的 linux 命令 free -h 和 cat /proc/meminfo- i. 要查看 Linux 系统中的内存占用情况,可以使用 free 命令或 top 命令。下面简要介绍这两条命令:
-
Linux : ln
-
linux 屏幕技巧:记录屏幕日志
-
B0102 Linux centos7.9 操作系统的安装和维护
-
android - 如何操作应用程序的私人数据目录(删除、使用 linux 权限重新创建/恢复selinux 权限)
-
Linux-Orient 项目 B 站的二次元世界一瞥
-
[linux] centos7 关闭蜂鸣器声音
-
Ascension Linux 管理密码,Ascension Linux 终端用户指南