A-A+

Cisco Packet Tracert 之 生成树理解

2016年01月05日 电脑网络 暂无评论 阅读 2 views 次

实验环境和实验目的:

1、简单描述生成树。

2、观察那一个交换机是属于根桥。

3、观察不是根桥的交换机,那个端口是被“阻塞”。

4、把服务器的端口设置为spanning-tree protfast。

5、把Switch1 设置为根桥;修改生成树的优先级,数字越少优先级越高。

操作步骤:

1、简单描述生成树。

答:默认的CISCO交换机启用生成树协议,并自动去计算根桥、该禁用那个端口等信息。

2、观察那一个交换机是属于根桥。

3、观察不是根桥的交换机,那个端口是被“阻塞”。

4、把服务器的端口(fa0/4)设置为spanning-tree protfast。

  1. CoreSW#conf t  
  2. Enter configuration commands, one per line.  End with CNTL/Z.  
  3. CoreSW(config)#int fa0/4  
  4.  CoreSW(config-if)#spanning-tree portfast  
  5. %Warning: portfast should only be enabled on ports connected to a single  
  6. host. Connecting hubs, concentrators, switches, bridges, etc... to this  
  7. interface  when portfast is enabled, can cause temporary bridging loops.  
  8.   
  9. Use with CAUTION  
  10. %Portfast has been configured on FastEthernet0/4 but will only  
  11. have effect when the interface is in a non-trunking mode.  

设置protfast的原因如下:

默认情况下的交换机端口,在交换机启动后,由于 STP 的原因,端口至少需要 30秒后才能够为用户提供数据转发。

对于一个连接了主机或服务器的端口,进行 STP 计算是毫无必要的,因为此类端口即使直接
转发数据,也不会造成环路,并且 30秒的时间对于需要立即传递数据的主机或服务器来说,是漫长的,因此,此类端口可以配置为跳过 STP 的计算。

5、把Switch1 设置为根桥;修改生成树的优先级,数字越少优先级越高。

  1. Switch(config)#spanning-tree vlan 1 priority 4096  
  2. Switch(config)#exit  
  3. Switch#show spanning-tree   
  4. VLAN0001  
  5.   Spanning tree enabled protocol ieee  
  6.   Root ID    Priority    4097  
  7.              Address     0090.214B.DA35  
  8.              This bridge is the root  
  9.              Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec  
  10.   
  11.   
  12.   Bridge ID  Priority    4097  (priority 4096 sys-id-ext 1)  
  13.              Address     0090.214B.DA35  
  14.              Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec  
  15.              Aging Time  20  
标签:

给我留言