xiaochuan 发表于 2018-7-18 08:02:47

Cisco Packet Tracert 之 生成树理解

  实验环境:

  实验目的:
  1、简单描述生成树。
  2、观察那一个交换机是属于根桥。
  3、观察不是根桥的交换机,那个端口是被“阻塞”。
  4、把服务器的端口设置为spanning-tree protfast。
  5、把Switch1 设置为根桥;修改生成树的优先级,数字越少优先级越高。
  操作步骤:
  1、简单描述生成树。
  答:默认的CISCO交换机启用生成树协议,并自动去计算根桥、该禁用那个端口等信息。

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

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

  4、把服务器的端口(fa0/4)设置为spanning-tree protfast。
  CoreSW#conf t
  Enter configuration commands, one per line.End with CNTL/Z.
  CoreSW(config)#int fa0/4
  CoreSW(config-if)#spanning-tree portfast
  %Warning: portfast should only be enabled on ports connected to a single
  host. Connecting hubs, concentrators, switches, bridges, etc... to this
  interfacewhen portfast is enabled, can cause temporary bridging loops.
  Use with CAUTION
  %Portfast has been configured on FastEthernet0/4 but will only
  have effect when the interface is in a non-trunking mode.

  设置protfast的原因如下:
  默认情况下的交换机端口,在交换机启动后,由于 STP 的原因,端口至少需要 30秒后才能够为用户提供数据转发。
  对于一个
  连接了主机或服务器的端口,进行 STP 计算是毫无必要的,因为此类端口即使直接
  转发数据,也不会造成环路,并且 30秒的时间对于需要立即传递数据的主机或服务器来说,是漫长的,因此,此类端口可以配置为跳过 STP 的计算。
  5、把Switch1 设置为根桥;修改生成树的优先级,数字越少优先级越高。
  Switch(config)#spanning-tree vlan 1 priority 4096
  Switch(config)#exit
  Switch#show spanning-tree
  VLAN0001
  Spanning tree enabled protocol ieee
  Root>
  Address   0090.214B.DA35
  This bridge is the root
  Hello Time2 secMax Age 20 secForward Delay 15 sec

  Bridge>  Address   0090.214B.DA35
  Hello Time2 secMax Age 20 secForward Delay 15 sec
  Aging Time20
页: [1]
查看完整版本: Cisco Packet Tracert 之 生成树理解