网卡bonding绑定

目录

一、概念

1、概述:

二、实验

1、绑定案例:


一、概念

1、概述:

将多个物理网卡进行排列组合,形成逻辑网卡,网卡的高可用

绑定模式

mode0(平衡负载模式):平时两块网卡均工作,且自动备援,但需要在与服务器本地 网卡相连的交换机设备上进行端口聚合来支持绑定技术。

mode1(自动备援模式):平时只有一块网卡工作,在它故障后自动替换为另外的网卡。

mode1(自动备援模式):平时只有一块网卡工作,在它故障后自动替换为另外的网卡。

二、实验

1、绑定案例:

首先服务器准备两块网卡

配置我们的网卡

##编辑ens160

vim /etc/sysconfig/network-scripts/ifcfg-ens160

TYPE=Ethernet

BOOTPROTO=none

NAME=ens160

DEVICE=ens160

ONBOOT=yes

MASTER=bond0

SLAVE=yes

###编辑ens224

vim /etc/sysconfig/network-scripts/ifcfg-ens224

TYPE=Ethernet

BOOTPROTO=none

NAME=ens224

DEVICE=ens224

ONBOOT=yes

MASTER=bond0

SLAVE=yes

###编辑bond0,根据自己的情况配置相应的IP、网关、DNS

TYPE=Ethernet

BOOTPROTO=none

NAME=bond0

DEVICE=bond0

ONBOOT=yes

IPADDR=192.168.115.100

PREFIX=24

GATEWAY=192.168.115.150

DNS1=8.8.8.8
#添加bond配置文件

vim /etc/modprobe.d/bond.conf

#插入

alias bond0 bonding

options bonding mode=6 miimon=200

##关闭网络图形化服务

systemctl stop NetworkManager

###加载模块

insmod /usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/net/bonding/bonding.ko.xz

或者 modprobe bonding

重启网卡

systemctl restart network

#添加bond配置文件

vim /etc/modprobe.d/bond.conf

#插入

alias bond0 bonding

options bonding mode=6 miimon=200

##关闭网络图形化服务

systemctl stop NetworkManager

###加载模块

insmod /usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/net/bonding/bonding.ko.xz

或者 modprobe bonding

重启网卡

systemctl restart network

查看绑定结果

cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: load balancing (round-robin)

MII Status: up

MII Polling Interval (ms): 0

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: ens160

MII Status: up

Speed: 10000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:0c:29:3f:e8:9e

Slave queue ID: 0

Slave Interface: ens224

MII Status: up

Speed: 10000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:0c:29:3f:e8:a8

Slave queue ID: 0

相关推荐
DianSan_ERP6 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
2501_946205526 天前
晶圆机器人双臂怎么选型?适配2-12寸晶圆的末端效应器有哪些?
服务器·网络·机器人
linux kernel6 天前
第七部分:高级IO
服务器·网络
数字护盾(和中)6 天前
BAS+ATT&CK:企业主动防御的黄金组合
服务器·网络·数据库
~远在太平洋~6 天前
Debian系统如何删除多余的kernel
linux·网络·debian
unfeeling_6 天前
Keepalived实验
linux·服务器·网络
坐吃山猪6 天前
OpenClaw04_Gateway常见问题
网络·gateway·openclaw
上海云盾商务经理杨杨6 天前
2025年重大网络安全事件回顾与趋势分析
网络·安全·web安全
kylezhao20196 天前
C# 的开闭原则(OCP)在工控上位机开发中的具体应用
网络·c#·开闭原则