STP协议-ensp实验

交换机原理:当XXX.XXX.1.1向XXX.XXX.1.2传递数据,先发送ARP请求寻找1.2路径,1.2发出reply,携带自己的MAC地址和进入交换机的接口,交换机记录这些信息生成MAC映射表和端口映射表。

由于核心层交换机冗余一主一备,实现高可靠性,这种做法与下层交换机形成环路

环路引起广播风暴,由于交换机发出数据请求为广播,在两台核心层交换机之间产生环路,不断以广播形式在环路中连续发送。每个数据包都消耗设备的CPU资源,占用设备带宽

环路引起MAC地址表动荡不稳定,相同的MAC地址对应两个不同的目的端口

STP生成树协议遵守802.1d标准

RSTP快速生成树协议遵守802.1w标准

MSTP多协议生成树协议802.1

消除环路:

1、配置BPDU(桥接协议数据单元)仅用于STP,每台交换机互发BPDU,用于选举根交换机,数值越小越优先,作为根桥。

其他交换机上的根端口RP(root port作为到根桥最近的端口)根端口用于接收BPDU,并转发数据。ID较小的作为阻塞端口AP,接受BPDU不转发,平时作为拥塞模式,等到SW1-SW2出现故障后,LSW3上的AP开始转换为DP转发数据。

扫描二维码关注公众号,回复: 12439403 查看本文章

根桥上指定端口DP(director port)用于接收和转发BPDU报文和数据,从根桥到所在网段的方向的端口

 

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sy w2
[w2]stp en
Sep 15 2020 16:25:35-08:00 w2 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 4, the ch
ange loop count is 0, and the maximum number of records is 4095.
[w2]stp mode stp
[Huawei]sysname W1

[W1]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[W1]stp pri	
[W1]stp priority 4096
[Huawei]sy W2
[W2]
Sep 15 2020 16:24:36-08:00 W2 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 4, the ch
ange loop count is 0, and the maximum number of records is 4095.

[W2]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.	
[W2]stp priority 8096

通过dis stp来显示各交换机根桥及端口情况

Bridge ID是交换机STP标识符,8个字节,2个字节优先级和6个字节MAC地址。MAC地址为交换机背板MAC地址,

Bridge ID开销越小的交换机成为根桥。stp priority(0-61440)

路径开销与带宽成反比

猜你喜欢

转载自blog.csdn.net/myjy1992/article/details/108600533