華為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.pswp.cn/web/66451.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/66451.shtml
英文地址,請注明出處:http://en.pswp.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;但現有方法要么忽…