温馨提示:欢迎对技术感兴趣的新手朋友们,希望这些知识点能对大家有帮助。如果有什么不解或疑惑或建议,可留言小编,我将尽快给予解决。感谢大家的支持和关注,谢谢!!

学习目标

· 掌握启用和禁用RSTP的配置方法

· 掌握边缘端口的配置方法

· 掌握RSTP BPDU保护功能的配置方法

· 掌握RSTP环路保护功能的配置方法

拓扑图

图3.2 配置RSTP实验拓扑图

场景

公司的网络使用了两层网络结构,核心层和接入层,并采用了冗余设计。您是公司的网络管理员,需要通过使用RSTP来避免网络中产生二层环路问题。本实验中,还将通过配置RSTP的一些特性来加快RSTP收敛速度,并配置相关保护功能。

操作步骤

步骤一 实验环境准备

实验中使用的是空配置设备,确保设备空配置启动。如果STP被禁用,则需执行stp enable命令启用STP。

步骤二 清除设备上已有的配置

如果设备有配置,请清除配置。

清除配置命令reset saved-configuration

<SW1>reset saved-configuration

Warning: The action will delete the saved configuration in the device.

The configuration will be erased to reconfigure. Continue? [Y/N]:y

Warning: Now clearing the configuration in the device.

重启设备

<SW1>reboot

Info: The system is now comparing the configuration, please wait.

Warning: All the configuration will be saved to the configuration file for the next startup:, Continue?[Y/N]:n

Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.

System will reboot! Continue?[Y/N]:y

等设备重启动完成,就是空配置了。

步骤三 配置RSTP并验证RSTP配置

执行stp mode rstp命令配置SW1和SW2的STP模式为RSTP。

配置SW1的STP模式

<Huawei>system-view

[Huawei]sysname SW1

[SW1]stp mode rstp

配置SW2的STP模式

<Huawei>system-view

[Huawei]sysname SW2

[SW2]stp mode rstp

执行display stp命令查看RSTP的简要信息。

[SW1]display stp

-------CIST Global Info-------

CIST Bridge :32768.4c1f-cc16-05ac

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-cc16-05ac / 0

CIST RegRoot/IRPC :32768.4c1f-cc16-05ac / 0

……output omit……

[SW2]display stp

-------CIST Global Info-------

CIST Bridge :32768.4c1f-cc78-50fb

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-cc16-05ac / 20000

CIST RegRoot/IRPC :32768.4c1f-cc78-50fb / 0

……output omit……

预告:下一集将介绍配置边缘端口、BPDU保护功能、环路保护功能等,明天更新。


微思郭仔
31 声望2 粉丝

微思IT认证培训-思科、华为、红帽、oracle、VMware、PMP、CISP等,一切为了成为更好的自己,加油!!!