华为ENSP:STP和链路聚合的管理与配置

这里将不再过度阐述STP和链路聚合的理论知识,不清楚的同学可以去观看Cisco文章中的理论知识 

理论知识https://blog.csdn.net/2301_76341691/article/details/145166547?fromshare=blogdetail&sharetype=blogdetail&sharerId=145166547&sharerefer=PC&sharesource=2301_76341691&sharefrom=from_linkhttps://blog.csdn.net/2301_76341691/article/details/145166547?fromshare=blogdetail&sharetype=blogdetail&sharerId=145166547&sharerefer=PC&sharesource=2301_76341691&sharefrom=from_link

目录

一、STP(生成树协议)

二、RSTP(快速生成树)

三、链路聚合(Link Aggregation)

作用:

配置方式:

四、Eth-Trunk技术原理

五、任务

六、拓扑图

七、代码

八、注意事项:


一、STP(生成树协议)

STP是一种网络协议,用于在交换网络中防止冗余链路形成环路,从而避免网络广播风暴和重复拷贝帧等问题。它通过构建一棵自然树来阻塞冗余链路,同时实现链路备份和链路最优化。STP的通信是通过桥协议数据单元(BPDU)进行的,支持STP的交换机之间通过BPDU报文交换信息。

STP的主要概念包括:

  • 根桥(Root Bridge):在STP网络中,每个交换机都会选举出一个根桥,通常是ID号最小的交换机。
  • 根端口(Root Port):非根交换机上连接到根桥的端口被选举为根端口。
  • 指定端口(Designated Port):非根交换机上连接到非根桥的端口被选举为指定端口。

二、RSTP(快速生成树)

RSTP是STP的改进版本,它减少了网络收敛时间,提高了网络的响应速度。RSTP在检测到链路故障时能够更快地调整网络拓扑,从而减少故障的影响

三、链路聚合(Link Aggregation)

链路聚合是一种将多个物理链路捆绑成一个逻辑链路的技术,以提高网络的带宽和可靠性。以下是链路聚合的一些关键点:

作用:
  • 增加带宽:通过将多个物理链路加入一个逻辑链路,实现链路的冗余。
  • 提高可靠性:如果一个物理链路出现故障,其他链路可以接管流量,保证网络的连续性。
配置方式:
  1. 手工聚合:手动将物理接口加入到一个聚合组中,所有物理接口都处于UP状态,可以转发数据。这种方式简单,但需要确保接口的配置相同。
  2. LACP(Link Aggregation Control Protocol):一种基于协议的聚合方式,通过报文协商成员链路,可以设置最大活动链路数量,选择主设备等。

四、Eth-Trunk技术原理

Eth-Trunk技术允许将多个物理接口捆绑成一个逻辑接口,这样既不用替换接口板也不会浪费IP地址资源。这种技术特别适用于网络中需要高带宽和冗余设计的场合。

五、任务

交换机A和交换机B之间配置以太通道,交换机A配置为VLAN10和VLAN20的根交换机,VLAN30和vlan40的备份根交换机,交换机B配置为VLAN30和VLAN40的根交换机,VLAN10和VLAN20的备份根交换机

六、拓扑图

七、代码

 在SWA上的配置:

<Huawei>sys
[Huawei]sysname SWA
[SWA]int Eth-Trunk 1                           //创建一个聚合端口1
[SWA-Eth-Trunk1]bpdu enable 
[SWA-Eth-Trunk1]mode lacp-static               //模式为静态lacp    
[SWA-Eth-Trunk1]q
[SWA]int g0/0/1
[SWA-GigabitEthernet0/0/1]eth-trunk 1          //将g0/0/1加入聚合端口
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-GigabitEthernet0/0/1]q
[SWA]int g0/0/2
[SWA-GigabitEthernet0/0/2]eth-trunk 1          //将g0/0/2加入聚合端口
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-GigabitEthernet0/0/2]qMSTP[SWA]stp region-configuration 
[SWA-mst-region]region-name admin	
[SWA-mst-region]instance 1 vlan 10
[SWA-mst-region]instance 2 vlan 20
[SWA-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-mst-region]q	
[SWA]stp instance 1 root primary 
[SWA]stp instance 2 root secondary 	
[SWA]stp pathcost-standard legacy 
Warning: The path cost of the current process will be set to the default value b
ecause the path cost standard is changed.
[SWA]stp edged-port	
[SWA]stp enable
[SWA]int g0/0/3
[SWA-GigabitEthernet0/0/3]stp root-protection 
[SWA-GigabitEthernet0/0/3]q[SWA]int g0/0/3	
[SWA-GigabitEthernet0/0/3]port link-type trunk
[SWA-port-group-link-type]port trunk all vlan all
[SWA-port-group-link-type]q

在SWB上的配置:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SWB
[SWB]int Eth-Trunk 1
[SWB-Eth-Trunk1]bpdu enable 
[SWB-Eth-Trunk1]mode lacp-static 
[SWB-Eth-Trunk1]q
[SWB]int g0/0/1
[SWB-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWB-GigabitEthernet0/0/1]q
[SWB]int g0/0/2
[SWB-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWB-GigabitEthernet0/0/2]qMSTP[SWB]stp region-configuration 	
[SWB-mst-region]region-name admin	
[SWB-mst-region]instance 1 vlan 10
[SWB-mst-region]instance 2 vlan 20	
[SWB-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWB-mst-region]q	
[SWB]stp instance 1 root secondary 	
[SWB]stp instance 2 root primary 
[SWB]stp pathcost-standard legacy 
Warning: The path cost of the current process will be set to the default value b
ecause the path cost standard is changed.
[SWB]stp enable 
[SWB]int g0/0/3
[SWB-GigabitEthernet0/0/3]stp root-protection 
[SWB-GigabitEthernet0/0/3]q[SWB]int g0/0/3
[SWB-GigabitEthernet0/0/3]port link-type trunk 
[SWB-GigabitEthernet0/0/3]port trunk all vlan all
[SWB-GigabitEthernet0/0/3]q

在SWC上的配置:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SWC
[SWC]stp region-configuration 
[SWC-mst-region]region-name admin
[SWC-mst-region]instance 1 vlan 10
[SWC-mst-region]instance 2 vlan 20
[SWC-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWC-mst-region]q
[SWC]stp pathcost-standard legacy 
Warning: The path cost of the current process will be set to the default value b
ecause the path cost standard is changed.
[SWC]int g0/0/1
[SWC-GigabitEthernet0/0/1]stp instance 2 cost 20000
[SWC-GigabitEthernet0/0/1]q
[SWC]int g0/0/2
[SWC-GigabitEthernet0/0/2]stp instance 1 cost 20000
[SWC-GigabitEthernet0/0/2]q
[SWC]stp enable 
[SWC]int g0/0/3
[SWC-GigabitEthernet0/0/3]stp disable 
[SWC-GigabitEthernet0/0/3]q
[SWC]int g0/0/4
[SWC-GigabitEthernet0/0/4]stp disable 
[SWC-GigabitEthernet0/0/4]q[SWC]vlan ba 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWC]int g0/0/3
[SWC-GigabitEthernet0/0/3]port link-type access 	
[SWC-GigabitEthernet0/0/3]port default vlan 10
[SWC-GigabitEthernet0/0/3]q
[SWC]int g0/0/4
[SWC-GigabitEthernet0/0/4]port link-type access 
[SWC-GigabitEthernet0/0/4]port default vlan 20
[SWC-GigabitEthernet0/0/4]q

八、注意事项:

  • 链路聚合可以应用于二层和三层接口,但需要注意避免形成环路。
  • 在配置链路聚合时,需要考虑端口类型(如Access、Trunk、Hybrid)和VLAN的配置。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/66451.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【PyCharm】连接 Git

【PyCharm】相关链接 【PyCharm】连接 Git【PyCharm】连接Jupyter Notebook【PyCharm】快捷键使用【PyCharm】远程连接Linux服务器【PyCharm】设置为中文界面 要在 PyCharm 中连接 Git&#xff0c;确保您的开发环境已经安装了 Git&#xff0c;并且 PyCharm 能够访问它。 以下…

dl学习笔记:(4)简单神经网络

&#xff08;1&#xff09;单层正向回归网络 bx1x2z100-0.2110-0.05101-0.051110.1 接下来我们用代码实现这组线性回归数据 import torch x torch.tensor([[1,0,0],[1,1,0],[1,0,1],[1,1,1]], dtype torch.float32) z torch.tensor([-0.2, -0.05, -0.05, 0.1]) w torch.…

三、华为交换机 Hybrid

一、Hybrid功能 Hybrid口既可以连接普通终端的接入链路&#xff08;类似于Access接口&#xff09;&#xff0c;又可以连接交换机间的干道链路&#xff08;类似于Trunk接口&#xff09;。它允许多个VLAN的帧通过&#xff0c;并可以在出接口方向将某些VLAN帧的标签剥掉&#xff0…

Tensor 基本操作1 | PyTorch 深度学习实战

目录 创建 Tensor常用操作unsqueezesqueezeSoftmax代码1代码2代码3 argmaxitem 创建 Tensor 使用 Torch 接口创建 Tensor import torch参考&#xff1a;https://pytorch.org/tutorials/beginner/basics/tensorqs_tutorial.html 常用操作 unsqueeze 将多维数组解套&#xf…

Grafana系列之面板接入Prometheus Alertmanager

关于Grafana的仪表板Dashboard&#xff0c;以及面板Panel&#xff0c;参考Grafana系列之Dashboard。可以直接在面板上创建Alert&#xff0c;即所谓的Grafana Alert&#xff0c;参考Grafana系列之Grafana Alert。除了Grafana Alert外&#xff0c;面板也可接入Prometheus Alertma…

Windows 上安装 MongoDB 的 zip 包

博主介绍&#xff1a; 大家好&#xff0c;我是想成为Super的Yuperman&#xff0c;互联网宇宙厂经验&#xff0c;17年医疗健康行业的码拉松奔跑者&#xff0c;曾担任技术专家、架构师、研发总监负责和主导多个应用架构。 近期专注&#xff1a; RPA应用研究&#xff0c;主流厂商产…

LeetCode 2266.统计打字方案数:排列组合

【LetMeFly】2266.统计打字方案数&#xff1a;排列组合 力扣题目链接&#xff1a;https://leetcode.cn/problems/count-number-of-texts/ Alice 在给 Bob 用手机打字。数字到字母的 对应 如下图所示。 为了 打出 一个字母&#xff0c;Alice 需要 按 对应字母 i 次&#xff0c…

PTA乙级1001~1005【c++】

首先讲解一下PTA乙级在哪里。PTA乙级题其实就是PAT (Basic Level) Practice &#xff08;中文&#xff09; 1001 害死人不偿命的(3n1)猜想 #include<iostream> using namespace std;int main() {int cnt 0;int n;cin >> n;while(n ! 1){cnt ;if (n & 1){n …

渗透笔记1

第一天 工具&#xff1a;cs cobalt strike 4.9 / msf kali &#xff08;自带 Ubuntu&#xff09; cs cobalt strike 4.9&#xff1a;server-client server部署在云服务器上&#xff0c;client分别在各地&#xff0c;与server相连接&#xff1b;连接上后就可以共享上线主机。…

用Python实现SVM搭建金融反诈模型(含调试运行)

1.概述 信用卡盗刷一般发生在持卡人信息被不法分子窃取后&#xff0c;复制卡片进行消费或信用卡被他人冒领后激活并消费等情况下。一旦发生信用卡盗刷&#xff0c;持卡人和银行都会遭受一定的经济损失。本节要运用支持向量机分类算法搭建一个金融反欺诈模型。 2.数据集 使用…

HunyuanVideo 文生视频模型实践

HunyuanVideo 文生视频模型实践 flyfish 运行 HunyuanVideo 模型使用文本生成视频的推荐配置&#xff08;batch size 1&#xff09;&#xff1a; 模型分辨率(height/width/frame)峰值显存HunyuanVideo720px1280px129f60GHunyuanVideo544px960px129f45G 本项目适用于使用 N…

第6章 ThreadGroup详细讲解(Java高并发编程详解:多线程与系统设计)

1.ThreadGroup 与 Thread 在Java程序中&#xff0c; 默认情况下&#xff0c; 新的线程都会被加入到main线程所在的group中&#xff0c; main线程的group名字同线程名。如同线程存在父子关系一样&#xff0c; Thread Group同样也存在父子关系。图6-1就很好地说明了父子thread、父…

nginx常用配置 (含负载均衡、反向代理、限流、Gzip压缩、图片防盗链 等示例)

nginx的配置文件通常在 /etc/nginx/nginx.conf , /etc/nginx/conf.d/*.conf 中&#xff0c; 一般直接 改 conf.d目录下的 default.conf文件&#xff0c; 然后 先检测配置文件是否有错误 nginx -t 再重新加载配置文件 或 重启nginx&#xff0c;命令如下 nginx -s reload 或…

Python编程与在线医疗平台数据挖掘与数据应用交互性研究

一、引言 1.1 研究背景与意义 在互联网技术飞速发展的当下,在线医疗平台如雨后春笋般涌现,为人们的就医方式带来了重大变革。这些平台打破了传统医疗服务在时间和空间上的限制,使患者能够更加便捷地获取医疗资源。据相关报告显示,中国基于互联网的医疗保健行业已进入新的…

Linux网络_套接字_UDP网络_TCP网络

一.UDP网络 1.socket()创建套接字 #include<sys/socket.h> int socket(int domain, int type, int protocol);domain (地址族): AF_INET网络 AF_UNIX本地 AF_INET&#xff1a;IPv4 地址族&#xff0c;适用于 IPv4 协议。用于网络通信AF_INET6&#xff1a;IPv6 地址族&a…

1 行命令引发的 Go 应用崩溃

一、前言 不久前&#xff0c;阿里云 ARMS 团队、编译器团队、MSE 团队携手合作&#xff0c;共同发布并开源了 Go 语言的编译时自动插桩技术。该技术以其零侵入的特性&#xff0c;为 Go 应用提供了与 Java 监控能力相媲美的解决方案。开发者只需将 go build 替换为新编译命令 o…

R语言的并发编程

R语言的并发编程 引言 在现代计算中&#xff0c;如何有效地利用计算资源进行数据处理和分析已成为一个重要的研究方向。尤其在大数据时代&#xff0c;数据量的急剧增加让单线程处理方式显得力不从心。为了解决这一问题&#xff0c;各种编程语言都开展了并发编程的研究和应用。…

Flink(十):DataStream API (七) 状态

1. 状态的定义 在 Apache Flink 中&#xff0c;状态&#xff08;State&#xff09; 是指在数据流处理过程中需要持久化和追踪的中间数据&#xff0c;它允许 Flink 在处理事件时保持上下文信息&#xff0c;从而支持复杂的流式计算任务&#xff0c;如聚合、窗口计算、联接等。状…

C#项目生成时提示缺少引用

问题描述 刚从git或svn拉取下来的C#项目&#xff0c;在VS生成时提示缺少引用 解决方案 1、从“管理NuGet程序包”中下载并安装缺少的引用&#xff0c;如果引用较多逐个下载安装会比较麻烦&#xff0c;建议采用下面第2种方案处理 2、通过命令对所有缺少引用进行安装 &#…

EAMM: 通过基于音频的情感感知运动模型实现的一次性情感对话人脸合成

EAMM: 通过基于音频的情感感知运动模型实现的一次性情感对话人脸合成 1所有的材料都可以在EAMM: One-Shot Emotional Talking Face via Audio-Based Emotion-Aware Motion Model网站上找到。 摘要 尽管音频驱动的对话人脸生成技术已取得显著进展&#xff0c;但现有方法要么忽…