网卡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

相关推荐
一只栖枝1 小时前
网络安全 vs 信息安全的本质解析:数据盾牌与网络防线的辩证关系关系
网络·网络安全·信息安全·it·信息安全认证
CertiK2 小时前
CertiK《Hack3d:2025年第二季度及上半年Web3.0安全报告》(附报告全文链接)
网络
一只小鱼儿吖3 小时前
进程代理单窗口单IP技术:原理、应用与实现
网络·网络协议·tcp/ip
稳联技术3 小时前
Ethernet IP与Profinet共舞:网关驱动绿色工业的智慧脉动
网络·网络协议·tcp/ip
学习3人组3 小时前
CentOS配置网络
linux·网络·centos
~山有木兮4 小时前
LiteHub中间件之限流实现
网络·http·中间件
cui_win5 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
BD_Marathon5 小时前
虚拟机网络检查
网络
cocologin7 小时前
RIP 技术深度解析
运维·网络·网络协议
GalaxyPokemon8 小时前
RPC-Client模块
网络·网络协议·rpc