Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)

摘要:
信息:此操作可能需要几秒钟。请稍候…完成。[SWA]1922:47:46-08:00SWADS/4/DATASYNC_CFGCHANGE:OID1.3.6.1.4.1.2011.5.25.191.3.1配置已更改。当前变化数为5,变化循环数为0,最大记录数为4095。[SWA]displaystp//查看STP协议状态协议状态:已禁用//STP协议已关闭协议标准:IEEE802.1s版本:3CISTBridge优先级:32768//网桥ID的默认优先级为32768 MAC地址:4c1f-ca8-6f8最大值:20//最大老化持续时间为20秒转发延迟:15//转发延迟为15秒你好:2//问候持续时间为2秒最大值:20[SWA][SWA]Stpenable//启用STPWarning:TheglobalSTPstatewell已更改。持续

》Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)

》》实验开始,先上拓扑图参考:

Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)第1张

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SWA
[SWA]stp ?         //查询STP协议下配置命令
  bpdu-filter           STP BPDU filter
  bpdu-protection       Specify BPDU protection function
  bridge-diameter       Specify bridge diameter
  converge              Specify STP converge mode
  disable               Disable Spanning Tree Protocol (STP)   //禁用STP
  edged-port            Specify edge port
  enable                Enable Spanning Tree Protocol (STP)    //启用STP
  instance              Spanning tree instance
  max-hops              Specify max hops
  mcheck                Specify mcheck
  mode                  Specify state machine mode
  pathcost-standard     Specify STP port path cost standard
  priority              Specify bridge priority      //指定桥优先级
  process               The MSTP process
  region-configuration  Enter MSTP region view
  root                  Specify root switch
  snooping              STP snooping
  tc-protection         Enable the TC-BPDU Protection function
  timer                 Specify timer configuration
  timer-factor          Specify aged out time factor

[SWA]stp disable          //关闭STP
Warning: The global STP state will be changed. Continue? [Y/N]y
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA]
Jun  7 2019 22:47:46-08:00 SWA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.

[SWA]display stp         //查看STP协议状态
 Protocol Status       :Disabled    //STP协议已经被关闭       
 Protocol Standard     :IEEE 802.1s             
 Version               :3             
 CIST Bridge Priority  :32768    //桥ID的默认优先级为32768             
 MAC address           :4c1f-cca8-6f8e             
 Max age(s)            :20     //最大老化时长为20秒             
 Forward delay(s)      :15     //转发延时为15秒         
 Hello time(s)         :2    //问候时长为2秒        
 Max hops              :20 
[SWA]
[SWA]stp enable          //开启STP
Warning: The global STP state will be changed. Continue? [Y/N]y
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA]
Jun  7 2019 22:49:06-08:00 SWA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.
[SWA]
[SWA]display stp         //查看STP协议状态
-------[CIST Global Info][Mode MSTP]-------     //默认配置是MSTP
CIST Bridge         :32768.4c1f-cca8-6f8e
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc27-5e6e / 20000
CIST RegRoot/IRPC   :32768.4c1f-cca8-6f8e / 0
CIST RootPortId     :128.25
BPDU-Protection     :Disabled
TC or TCN received  :10
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:24m:6s
Number of TC        :2
Last TC occurred    :GigabitEthernet0/0/3
----   -- more --    ----
[SWA]
[SWA]stp mode ?         //查询修改生成树模式的配置命令
  mstp  Multiple Spanning Tree Protocol (MSTP) mode
  rstp  Rapid Spanning Tree Protocol (RSTP) mode
  stp   Spanning Tree Protocol (STP) mode

[SWA]stp mode stp        //修改生成树模式为STP
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA]
Jun  7 2019 23:19:36-08:00 SWA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[SWA]dis stp         //查看STP协议状态
-------[CIST Global Info][Mode STP]-------     //默认配置已改为STP(SWB如法炮制,也改为STP)
CIST Bridge         :32768.4c1f-cca8-6f8e
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc27-5e6e / 20000
CIST RegRoot/IRPC   :32768.4c1f-cca8-6f8e / 0
CIST RootPortId     :128.25
BPDU-Protection     :Disabled
TC or TCN received  :26
TC count per hello  :2
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:30m:21s
Number of TC        :2
Last TC occurred    :GigabitEthernet0/0/3
----   -- more --    ----
[SWA]
[SWA]stp priority ?    //修改桥优先级
  INTEGER<0-61440>  Bridge priority, in steps of 4096    //输入的桥优先级必须是4096的倍数

[SWA]stp priority 0    //修改SWA的桥优先级为0(SWA配置为根桥,因为SWB的桥优先级还是32678)
[SWA]
Jun  7 2019 23:39:36-08:00 SWA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 8, the c
hange loop count is 0, and the maximum number of records is 4095.
[SWA]dis stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :0    .4c1f-cca8-6f8e
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :0    .4c1f-cca8-6f8e / 0
CIST RegRoot/IRPC   :0    .4c1f-cca8-6f8e / 0
CIST RootPortId     :0.0
BPDU-Protection     :Disabled
TC or TCN received  :81
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:12m:59s
Number of TC        :6
Last TC occurred    :GigabitEthernet0/0/1
  ---- More ----
[SWB]dis stp bri     //查看配置(STP协议收敛后,SWB的G0/0/1端口成为了根端口)
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/1        ROOT  DISCARDING      NONE
   0    GigabitEthernet0/0/2        ALTE  DISCARDING      NONE
   0    GigabitEthernet0/0/3        DESI  FORWARDING      NONE
====================================
[SWA]int g0/0/1       //进入SWA的G0/0/1端口配置
[SWA-GigabitEthernet0/0/1]stp port priority ?         //查询修改端口优先级的命令
  INTEGER<0-240>  Port priority, in steps of 16        //优先级按16的倍数调整(默认为128)

[SWA-GigabitEthernet0/0/1]stp port priority 240        //将SWA的G0/0/1端口优先级调整为240(大于128)
[SWA-GigabitEthernet0/0/1]
Jun  7 2019 23:51:47-08:00 SWA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.
[SWA-GigabitEthernet0/0/1]q
[SWA]     //(或者配置SWA的G0/0/2端口,修改优先级为16,小于128。这样也可以实现实验效果)
====================================
[SWB]dis stp bri     //查看配置(修改SWA的G0/0/1端口优先级后,SWB的G0/0/2端口成为了根端口)
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/1        ALTE  DISCARDING      NONE
   0    GigabitEthernet0/0/2        ROOT  FORWARDING      NONE      //SWB的G0/0/2端口被选举为根端口
   0    GigabitEthernet0/0/3        DESI  FORWARDING      NONE
[SWB]dis stp int g0/0/1       //查看G0/0/1端口下STP协议状态(关于配置根端口,还可以通过修改端口开销PC使G0/0/2成为根端口)
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :32768.4c1f-cc27-5e6e
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :0    .4c1f-cca8-6f8e / 20000       //根路径开销RPC为20000
CIST RegRoot/IRPC   :32768.4c1f-cc27-5e6e / 0
CIST RootPortId     :128.1
BPDU-Protection     :Disabled
TC or TCN received  :114
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:25m:13s
Number of TC        :18
Last TC occurred    :GigabitEthernet0/0/1
----[Port1(GigabitEthernet0/0/1)][FORWARDING]----
 Port Protocol       :Enabled
 Port Role           :Root Port
 Port Priority       :128
 Port Cost(Dot1T )   :Config=auto / Active=20000       //G0/0/1端口开销PC为20000
 Designated Bridge/Port   :0.4c1f-cca8-6f8e / 128.25
 Port Edged          :Config=default / Active=disabled
 Point-to-point      :Config=auto / Active=true
 Transit Limit       :147 packets/hello-time
 Protection Type     :None
 Port STP Mode       :STP 
 Port Protocol Type  :Config=auto / Active=dot1s
 BPDU Encapsulation  :Config=stp / Active=stp
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 0
 TC or TCN send      :18
 TC or TCN received  :53
 BPDU Sent           :367             
          TCN: 1, Config: 366, RST: 0, MST: 0
 BPDU Received       :1128             
          TCN: 0, Config: 1128, RST: 0, MST: 0
----[Port2(GigabitEthernet0/0/2)][DISCARDING]----
 Port Protocol       :Enabled
 Port Role           :Alternate Port
 Port Priority       :128
 Port Cost(Dot1T )   :Config=auto / Active=20000       //G0/0/2端口开销PC也是20000
 Designated Bridge/Port   :0.4c1f-cca8-6f8e / 128.26
 Port Edged          :Config=default / Active=disabled
 Point-to-point      :Config=auto / Active=true
 Transit Limit       :147 packets/hello-time
 Protection Type     :None
 Port STP Mode       :STP 
 Port Protocol Type  :Config=auto / Active=dot1s
 BPDU Encapsulation  :Config=stp / Active=stp
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 0
 TC or TCN send      :19
 TC or TCN received  :53
 BPDU Sent           :369             
          TCN: 2, Config: 367, RST: 0, MST: 0
 BPDU Received       :1402             
          TCN: 0, Config: 1402, RST: 0, MST: 0
  ---- More ----

[SWB]int g0/0/1
[SWB-GigabitEthernet0/0/1]stp cost ?      //查询修改端口(路径)开销的命令
  INTEGER<1-200000000>  Port path cost

[SWB-GigabitEthernet0/0/1]stp cost 30000    //修改G0/0/1的端口开销为30000(大于G0/0/2的端口开销20000)
[SWB-GigabitEthernet0/0/1]
Jun  8 2019 00:34:18-08:00 SWB DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.
[SWB-GigabitEthernet0/0/1]q
                  //(或者将G0/0/2的端口开销调小为1999,小于20000。这样也可以实现实验效果)
[SWB]dis stp bri
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/1        ALTE  DISCARDING      NONE
   0    GigabitEthernet0/0/2        ROOT  FORWARDING      NONE     //端口G0/0/2被选举为根端口
   0    GigabitEthernet0/0/3        DESI  FORWARDING      NONE
[SWB]      
[SWB]int g0/0/3
[SWB-GigabitEthernet0/0/3]stp edged-port ?         //查询边缘端口配置命令
  disable  Disable edge port
  enable   Enable edge port

[SWB-GigabitEthernet0/0/3]stp edged-port enable        //配置G0/0/3端口为边缘端口
[SWB-GigabitEthernet0/0/3]
Jun  8 2019 00:48:48-08:00 SWB DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.

[SWB-GigabitEthernet0/0/3]dis stp int g0/0/3
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :32768.4c1f-cc27-5e6e
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :0    .4c1f-cca8-6f8e / 20000
CIST RegRoot/IRPC   :32768.4c1f-cc27-5e6e / 0
CIST RootPortId     :128.2
BPDU-Protection     :Disabled
TC or TCN received  :185
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:14m:58s
Number of TC        :21
Last TC occurred    :GigabitEthernet0/0/2
----[Port3(GigabitEthernet0/0/3)][FORWARDING]----
 Port Protocol       :Enabled
 Port Role           :Designated Port
 Port Priority       :128
 Port Cost(Dot1T )   :Config=auto / Active=20000
 Designated Bridge/Port   :32768.4c1f-cc27-5e6e / 128.3
 Port Edged          :Config=enabled / Active=enabled     //端口G0/0/3已配置为边缘端口,且为活动状态
 Point-to-point      :Config=auto / Active=true
 Transit Limit       :147 packets/hello-time
 Protection Type     :None
 Port STP Mode       :STP 
 Port Protocol Type  :Config=auto / Active=dot1s
 BPDU Encapsulation  :Config=stp / Active=stp
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 20
 TC or TCN send      :136
 TC or TCN received  :0
 BPDU Sent           :2309             
          TCN: 0, Config: 2309, RST: 0, MST: 0
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0, MST: 0
[SWB-GigabitEthernet0/0/3] 

免责声明:文章转载自《Huawei-R&amp;amp;S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Flink 写数据到MySql (JDBC Sink)Contiki学习入门之概览下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Windows下DVWA安装指南

注意:DVWA需要依赖httpd、PHP、MySQL、php-mysql等应用或组件,最简单的方法是安装wampserver(http://www.wampserver.com/),安装完了所需的各种依赖部件全部搞定。 1、下载DVWA(http://www.dvwa.co.uk/) 2、要确保可以进入http://localhost/phpmyadmin...

jenkins基于Ansible自动发布/回滚/管理

看着似乎用jenkins基于ansible发布spring boot/cloud类的jar包程序,或者tomcat下的war包的需求挺多的,闲来无事,也说说自己做过的jenkins基于ansible的发布方法。 规范与标准 无规矩不成方圆,要做好后期的自动化,标准化是少不了的,下面是我们这边规划的一些标准(非强制,根据自己实际情况调整) 应用名称:{应用...

cdn引入element-ui

在index.html中: <script src="http://t.zoukankan.com/static/js/vue.js"></script> <link href="https://cdn.bootcss.com/element-ui/2.4.5/theme-chalk/index.css" re...

BUI 框架使用指南

  指南说明:只适用于对框架的剥离 如果不需要剥离则原来的东西直接粘贴就行  在主界面中使用时需要加入一下引用bui.js jquery.js config.js 末尾的文件 BUI.use(位置1, function ()  其中位置一需要填写你的main-min.js 文件所在的路径以及main的文件名 例如我的文件在Resouce/JS/main-...

使用Dockerfile制作镜像

组成部分 基础镜像信息 FROM 维护者信息 MAINTAINER、LABEL 镜像操作指令 RUN、COPY、ADD、EXPOSE、WORKDIR、ONBUILD、USER等 容器启动时执行指令 CMD、ENTRYPOINT 1、MAINTAINER (docker1.7以后的版本已被LABEL替代,但仍兼容此字段) 格式: MAINTAINER &...

Flask 基础组件(二):配置文件

配置参数 flask中的配置文件是一个flask.config.Config对象(继承字典),默认配置为: { 'DEBUG': get_debug_flag(default=False), 是否开启Debug模式 'TESTING':...