<!-- wp:quote -->

<p>多生成树协议</p>
<!-- /wp:quote --> <!-- wp:more --> <!-- /wp:more --> <!-- wp:tadv/classic-paragraph --> <h2>MSTP基本概念-多生成树实例(MST Instance)</h2> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph --> <p></p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:paragraph --> <p>多生成树协议是华为默认的stp,融合了stp的控制方法和快速生成树的优点</p> <!-- /wp:paragraph --> <!-- wp:tadv/classic-paragraph --> <p></p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph /--> <!-- wp:tadv/classic-paragraph --> <h2>MSTP基本概念-MST区域(MST Region)</h2> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph --> <p></p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph --> <h2>MST配置标识(MST Configuration Identifier)</h2> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph --> <p></p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph --> <p>我们现在看看这个例子:</p> <p></p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:paragraph --> <p>拓扑图如上图,默认有4个vlan:10、20、30、40然后都是trunk口。然后创建一个实例并激活:</p> <!-- /wp:paragraph --> <!-- wp:tadv/classic-paragraph -->
stp region-configuration
 region-name TEST
 revision-level 1
 instance 1 vlan 10 20
 instance 2 vlan 30 40
 active region-configuration

<p>之后我们其他三个交换机的配置都是一样的,然后我们在LSW1上面把实例1的优先级改成4096,把实例2的优先级改成8192</p>

[LSW1]stp instance  1 priority 4096
[LSW1]stp instance 2 priority 8192

<p>这样配置就意味着LSW1是实例1的根桥,同理在LSW2上面把优先级反过来:</p>

[LSW2]stp instance  1 priority  8192
[LSW2]stp instance 2 priority 4096

<p>这样就是在LSW2上面是实例2的根桥。</p>
<p></p>
<!-- /wp:tadv/classic-paragraph -->

<!-- wp:tadv/classic-paragraph -->
<h2>MSTP基本配置-设置RSTP点到点链路和边缘端口</h2>
<!-- /wp:tadv/classic-paragraph -->

<!-- wp:paragraph -->
<p>边缘接口这个概念和RSTP里面的一样:</p>
<!-- /wp:paragraph -->

<!-- wp:tadv/classic-paragraph -->

[SWC]interface Ethernet 1/0/2
[SWC-Ethernet1/0/2]stp edged-port enable  
[SWC]interface Ethernet 1/0/3
[SWC-Ethernet1/0/3]stp edged-port enable 

<p>这个没什么说的,点到点链路,就是说中间什么也没有接入,只是交换机接交换机配置方法;</p>

[SWA]interface Ethernet 1/0/15
[SWA-Ethernet1/0/15]stp point-to-point force-true

<!-- /wp:tadv/classic-paragraph -->

<!-- wp:paragraph -->
<p>查看命令:</p>
<!-- /wp:paragraph -->

<!-- wp:tadv/classic-paragraph -->

[LSW2]display  stp interface  Ethernet  0/0/3
<h2>配置MSTP最大跳数</h2> <!-- /wp:tadv/classic-paragraph --> <!-- wp:tadv/classic-paragraph -->
[SWA]stp max-hops 30 
[SWA]display stp 
-------CIST Global Info-------
CIST Bridge         :0.000f-e212-f8e1
Bridge Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 30
CIST Root/ERPC      :0.000f-e212-f8e1 / 0
CIST RegRoot/IRPC   :0.000f-e212-f8e1 / 0
CIST RootPortId     :0.0
BPDU-Protection     :disabled
CIST Root Type      :PRIMARY root
TC or TCN received  :3
Time since last TC  :0 days 1h:23m:36s

<p>这个配置是本地有效,这个是BPDU每经过一个交换机+1</p>
<h2>网络直径与时间参数的关系</h2>
<p></p>
<p>修改方法:</p>

[LSW2]stp bridge-diameter 3
[LSW2]stp instance 0 root primary  
<p>如果要修改这个直径必须在instance0的交换机上修改。</p> <!-- /wp:tadv/classic-paragraph --> <!-- wp:paragraph --> <p></p> <!-- /wp:paragraph -->
最后修改:2020 年 02 月 28 日 06 : 51 PM
请俺喝杯咖啡呗