当前位置: 首页 > news >正文

链路聚合详解

链路聚合详解

        • 华为交换机链路聚合:
        • Linux链路聚合bond
        • 配置

华为交换机链路聚合:

方式一:配置手工负载分担方式的链路聚合
[CORE1] interface Eth-Trunk 1
[CORE1-Eth-Trunk1] trunkport GigabitEthernet 0/0/5 to 0/0/6
[CORE1-Eth-Trunk1] port link-type access
[CORE1-Eth-Trunk1] port default vlan 300
[CORE1-Eth-Trunk1] quit
方式二:配置LACP模式的链路聚合
[CORE1] interface Eth-Trunk 1
[CORE1-Eth-Trunk1] mode lacp
[CORE1-Eth-Trunk1] trunkport GigabitEthernet 0/0/5 to 0/0/6
[CORE1-Eth-Trunk1] port link-type access
[CORE1-Eth-Trunk1] port default vlan 300
[CORE1-Eth-Trunk1] quit
# 在CORE1上配置系统优先级为100,使其成为LACP主动端[CORE1] lacp priority 100
# 在CORE1上配置活动接口上限阈值为2[CORE1] interface Eth-Trunk 1
[CORE1-Eth-Trunk1] max active-linknumber 2
[CORE1-Eth-Trunk1] quit
# 在CORE1上配置接口优先级确定活动链路(配置GE0/0/5GE0/0/6为活动链路)[CORE1] interface GigabitEthernet 0/0/5
[CORE1-GigabitEthernet0/0/5] lacp priority 100
[CORE1-GigabitEthernet0/0/5] quit
[CORE1] interface GigabitEthernet 0/0/6
[CORE1-GigabitEthernet0/0/6] lacp priority 100
[CORE1-GigabitEthernet0/0/6] quit

Linux链路聚合bond


1、mode=0(balance-rr)(平衡抡循环策略)2、mode=1(active-backup)(-备份策略)3、mode=2(balance-xor)(平衡策略,根据hash策略平衡)4、mode=3(broadcast)(广播策略,高可靠较浪费资源)5、mode=4(802.3ad)(IEEE 802.3ad 动态链接聚合)6、mode=5(balance-tlb)(适配器传输负载均衡)7、mode=6(balance-alb)(适配器适应性负载均衡)

配置

cat /etc/sysconfig/network-scripts/ifcfg-p2p1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
NAME=p2p1
DEVICE=p2p1
ONBOOT=yes
MASTER=bond0
SLAVE=yes[root@dev2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-p2p2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
NAME=p2p2
DEVICE=p2p2
ONBOOT=yes
MASTER=bond0
SLAVE=yescat /etc/sysconfig/network-scripts/ifcfg-bond0 
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
IPADDR=192.168.1.2
PREFIX=24
GATEWAY=192.168.1.254
ONBOOT=yes
DNS1=8.8.8.8
BOOTPROTO=none
BONDING_OPTS="mode=4 miimon=100"开机自动加载模块到内核
#echo 'alias bond0 bonding' >> /etc/modprobe.d/dist.conf
#echo 'options bonding mode=0 miimon=200' >> /etc/modprobe.d/dist.conf
#echo 'ifenslave bond0 eth0 eth1' >>/etc/rc.local
miimon=100##查看bond0状态
cat /proc/net/bonding/bond0 
http://www.lryc.cn/news/135226.html

相关文章:

  • Shell编程学习之if分支语句的应用
  • 2023.8 - java - 泛型
  • 【数据结构练习】链表面试题锦集一
  • 自然语言处理从入门到应用——LangChain:链(Chains)-[通用功能:SequentialChain和TransformationChain]
  • 什么是卷积神经网络
  • 银行数字化转型程度-根据年报词频计算(2012-2021年)
  • 微信开发之一键修改群聊备注的技术实现
  • [oneAPI] 基于BERT预训练模型的SQuAD问答任务
  • 机器学习笔记之优化算法(十七)梯度下降法在强凸函数的收敛性分析
  • shell脚本中linux命令的特殊用法记录
  • Nvidia H100:今年55万张够用吗?
  • 【Vue2.0源码学习】生命周期篇-初始化阶段(initLifecycle)
  • Android开发基础知识总结(三)简单控件(上)
  • 在Qt窗口中添加右键菜单
  • Day8 智慧商城
  • LeetCode:Hot100python版本之回溯
  • 分布式事务理论基础
  • 线性代数强化第三章
  • 搭建自己的私有 开源LoRaWAN 网络服务器(The ThingsStack)---之配置
  • 多维时序 | MATLAB实现SCNGO-CNN-Attention多变量时间序列预测
  • clickhouse的删除和更新
  • 微前端 - qiankun
  • 前端编辑页面修改后和原始数据比较差异
  • docker第一次作业
  • Springboot3.0.0+集成SpringDoc并配置knife4j的UI
  • 电脑运行缓慢?4个方法,加速电脑运行!
  • 3.Docker 搭建 MySQL8.0
  • Mybatis的SqlSource SqlNode BoundSql
  • html动态爱心代码【二】(附源码)
  • 【Rust】Rust学习 第十六章无畏并发