配置网络接口,bond,team

it2025-01-22  22

网卡

学习配置:bond 网络接口,支持2块网卡 学习配置:team 网络接口,支持8块网卡

bond

【1】bond网络:Red Hat Enterprise Linux 允许管理员是使用bonding内核模块合称为通道绑定 接口的特殊网络。 接口将多个网络接口绑定到一个通道。根据选择的绑定模式,通道绑定使两个或更多的网络接口作为一个网络接口,从而增加带宽和提供冗余性

基本命令

nmcli connection show ##查看网卡信息 nmcli connection delete ‘name’ ##删除 ifconfig eth0 down ##关掉eth0 ifconfig eth0 up ##添加eth0 type:创建的类型 con-name:链接名 ifname:网卡名 mode:选择bond模式,可以用tab补齐可以看其他形式 nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.212/24 nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0 nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0

实验之前:将已拥有的物理网卡(eth0)删干净 另:

nmcli设定team

nmcli connection add con-name team0 ifname team0 type team config '{"runner":{"name":"loadbalance"}}' ip4 172.25.254.212/24 nmcli connection add con-name eth0 ifname eth0 type team-slave master team0 nmcli connection add con-name eth0 ifname eth1 type team-slave master team1 teamdctl team0 stat ##查看team状态

另:

最新回复(0)