配置生成树:

[SWA]STP enable

           stp priority 0                            设置优先级为0

           stp mode mstp                         默认为MSTP

           interface Ethernet1/0/1 

           stp edged-port   enable             设置端口为边缘端口

 

[SWB]

STP enable

stp priority 1234

stp mode mstp

interface Ethernet1/0/1

stp edged-port enable

因为SWA的接口优先级最小,所以被选为根桥。SWB为非根桥。SWA的所以端口都为指定端口。SWB的E1/0/23为根端口,E1/0/24为阻塞端口。