如何在ensp中实现要求
时间: 2024-12-01 22:19:09 浏览: 105
要在ENSP(Enterprise Network Simulation Platform)中实现《14RSTP基本配置》文档中的要求,可以按照以下步骤进行:
### 实验步骤
#### 步骤1:关闭生成树并验证广播风暴
1. **关闭生成树**:
- 登录到SW1、SW2和SW3。
- 执行命令 `undo stp enable` 关闭生成树协议。
```shell
[SW1] undo stp enable
[SW2] undo stp enable
[SW3] undo stp enable
```
2. **验证广播风暴**:
- 使用PC1 ping PC2。
- 使用抓包软件(如Wireshark)捕获数据包,观察是否存在广播风暴。
#### 步骤2:配置RSTP并查看根桥
1. **启用RSTP**:
- 登录到SW1、SW2和SW3。
- 执行命令 `stp mode rstp` 启用RSTP。
```shell
[SW1] stp mode rstp
[SW2] stp mode rstp
[SW3] stp mode rstp
```
2. **查看根桥**:
- 执行命令 `display stp` 或 `display stp brief` 查看根桥选举结果。
```shell
[SW1] display stp
[SW1] display stp brief
[SW2] display stp
[SW2] display stp brief
[SW3] display stp
[SW3] display stp brief
```
#### 步骤3:配置STP优先级,使SW1为根桥
1. **设置SW1为根桥**:
- 执行命令 `stp priority 0` 将SW1的优先级设为最低。
```shell
[SW1] stp priority 0
```
2. **验证配置**:
- 再次执行 `display stp` 命令,确认SW1为根桥。
```shell
[SW1] display stp
```
#### 步骤4:配置边缘端口并开启BPDU保护
1. **配置边缘端口**:
- 在SW2和SW3上将G0/0/3接口配置为边缘端口。
```shell
[SW2] interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3] stp edged-port enable
[SW2-GigabitEthernet0/0/3] quit
[SW3] interface GigabitEthernet 0/0/3
[SW3-GigabitEthernet0/0/3] stp edged-port enable
[SW3-GigabitEthernet0/0/3] quit
```
2. **开启BPDU保护**:
- 在SW2和SW3上开启BPDU保护。
```shell
[SW2] stp bpdu-protection
[SW3] stp bpdu-protection
```
3. **验证配置**:
- 使用 `display stp interface g0/0/3` 命令查看G0/0/3接口的状态。
```shell
[SW2] display stp interface GigabitEthernet 0/0/3
[SW3] display stp interface GigabitEthernet 0/0/3
```
#### 步骤5:比较SW1和SW2的G0/0/3状态
1. **查看SW1和SW2的G0/0/3状态**:
- 执行 `display stp interface g0/0/3` 命令,比较两者的状态。
```shell
[SW1] display stp interface GigabitEthernet 0/0/3
[SW2] display stp interface GigabitEthernet 0/0/3
```
2. **注意不同的边缘端口和BPDU保护字段**:
- 检查输出中的“Edge Port”和“BPDU Protection”字段,确认它们是否正确配置。
通过以上步骤,您可以在ENSP中完成《14RSTP基本配置》文档中的所有要求。
阅读全文
相关推荐


















