centos7.9服务器网卡聚合_bond0_物理网卡聚合
创始人
2025-01-18 02:02:13
0

Linux网卡链路聚合

一、Linux配置,centos7.9首先启动bonding模块:modprobe bonding;查看bonding模块状态命令:cat /proc/net/bonding/bond0

1、在Linux系统上,可以使用bonding模块来实现网口聚合。以下是一个简单的示例配置文件/etc/sysconfig/network-scripts/ifcfg-bond0,假设我们创建了一个名为bond0的聚合组:

[root@localhost network-scripts]# cat ifcfg-bond0

TYPE=Bond

NAME=bond0

DEVICE=bond0    //没有这个名称定义会出现网卡重启失败BONDING_MASTER=yes

BOOTPROTO=none

ONBOOT=yes

IPADDR=192.168.132.233

NETMASK=255.255.255.0

GATEWAY=192.168.132.1

BONDING_OPTS="mode=4 miimon=100"

  1. 然后,对应的两个物理网口的配置文件/etc/sysconfig/network-scripts/ifcfg-eth0和/etc/sysconfig/network-scripts/ifcfg-eth1如下:

[root@localhost network-scripts]# cat ifcfg-enp2s0

DEVICE=enp2s0

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

[root@localhost network-scripts]# cat ifcfg-enp3s0

DEVICE=enp3s0

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

在这个示例中,我们创建了一个名为bond0的聚合组,并将eth0和eth1作为从属网口。BONDING_OPTS中的mode=4表示使用802.3ad模式(即LACP),miimon=100表示每100毫秒检测链路状态。

重启网卡

  • 交换机配置(以H3C交换机为例)
  1. 创建一个聚合组Trk1,并指定聚合组的工作模式为LACP:

interface Bridge-Aggregation 1

description Link Aggregation Group

link-aggregation mode dynamic //指定了聚合使用了LACP模式

  1. 接下来,将端口1和端口2加入到聚合组Trk1中:

interface GigabitEthernet 1/0/1

port link-aggregation group 1 

interface GigabitEthernet 1/0/2

port link-aggregation group 1

  1. 配置模式

interface Bridge-Aggregation 1

port link-type access

port access vlan XXX

  1. 思科交换机配置

interface Port-channel1

 description server bond

 switchport access vlan 132

 switchport mode access

interface GigabitEthernet1/0/11

 switchport access vlan 132

 switchport mode access

 channel-group 1 mode active

interface GigabitEthernet1/0/12

 switchport access vlan 132

 switchport mode access

 channel-group 1 mode active

相关内容

热门资讯

据统计!开心泉州免费辅助器!竟... 据统计!开心泉州免费辅助器!竟然存在有辅助神器(有挂详细)-哔哩哔哩1、玩家可以在开心泉州免费辅助器...
重大科普!wepoker轻量版... 重大科普!wepoker轻量版有透视吗,约局吧德州透视,开挂教程(有挂透视)-哔哩哔哩1、wepok...
有玩家发现!逗娱碰胡辅助器!确... 有玩家发现!逗娱碰胡辅助器!确实是有辅助安装(确实有挂)-哔哩哔哩逗娱碰胡辅助器透视方法中分为三种模...
来一盘!wpk透视怎么安装,h... 来一盘!wpk透视怎么安装,hhpoker的辅助是真的吗,详细教程(有挂功能)-哔哩哔哩1、全新机制...
现有说明如下!丽水茶苑辅助平台... 现有说明如下!丽水茶苑辅助平台购买!切实真的是有辅助脚本(有人有挂)-哔哩哔哩1、丽水茶苑辅助平台购...
六分钟了解!poker wor... 六分钟了解!poker world辅助器,hhpoker透视脚本,曝光教程(有挂技巧)-哔哩哔哩1、...
近日!wepoker破解版内购... 近日!wepoker破解版内购!其实有挂辅助工具(有挂方法)-哔哩哔哩1、wepoker破解版内购破...
重大通报!hhpoker哪个俱... 重大通报!hhpoker哪个俱乐部靠谱,hhpoker软件靠谱吗,分享教程(有挂透明挂)-哔哩哔哩1...
此事引发广泛关注!传送屋辅助器... 此事引发广泛关注!传送屋辅助器!总是真的是有辅助脚本(有挂教程)-哔哩哔哩传送屋辅助器辅助器是一种具...
每日必看!wejoker手机版... 每日必看!wejoker手机版透视脚本,hhpoker透视方法,详情教程(有挂分享)-哔哩哔哩该软件...