STP PortFast快速端口

更新时间:2023-07-12 05:50:34 阅读: 评论:0

STP PortFast树洞秘密和UplinkFast
实验拓扑
预备知识:
PGA封装
    STP PortFast是一个catalyst的一个特性,能使交换机或中继端口跳过侦听学习状态。立即进入STP转发状态,在基于IOS交换机上,PortFast只能用于连接到终端工作站的接入端口上。
额外补充知识:
    Portfast(端口快速)和UplinkFast(上行快速)是两个极其类似的技术,都是可以使端口从阻塞状态迅速恢复到转发状态,以达到快速收敛的目的。但Portfast技术可应用于所有阻塞端口,而UplinkFast只能应用于接入层交换机的阻塞上行端口(也就是用于级联的端口,但不一定是专门的Uplink端口)。
  缺省情况下,假定交换机的所有端口都将与交换机或者网桥连接,所以所有端口都运行STP算法,即如果网络发生了变化,在端口发送数据之前要等待50s,即20s的由Blocking(阻塞)状态转为Listening(侦听)状态,加上15的Listening过程,再加上15s的由Learning(学习)状态转变为Forwarding(转发)状态。而事实上许多端口会直接连接工作站或者服务器。采用PortFast和UplinkFast技术可以让这些端口节省Listening和Learning状态的时间,立即由Blocking进入Forwarding状态。切换时间可以在2s~4s之间。
PortFas和UplinkFast技术都是针对在启用STP技术后出现的一些问题(如收敛速度慢)的解决方案。它们所要解决的就是由于在端口中启用STP技术后,网络结构发生变化时,需要等待一定的链路侦测、学习时间,而这个时间可能导致网络不通,网络服务器工作不正常。有了PortFast和UplinkFast技术后,这些端口就可以快速地进入数据转发状态,不用等待,确保了网络的正常通信。
排骨炖萝卜 
【注意】PortFast仅适用于阻塞状态端口,让阻塞端口在网络环境变化的情况下直接进入Forwarding状态。而该端口仍然运行STP协议,所以如果检测到环路,端口仍将由Forwarding状态变成Blocking状态。而UplinkFast技术只适用于交换机中呈阻塞状态的上行级联端口,而且在而且该交换机上必须启动了UplinkFast功能,至少有一个上行级联端口处于Blocking的端口(即有冗余链路),链路失效也必须发生在Root Port上。交换机启动了UplinkFast后,由于提高了交换机上所有端口的路径开销,所以不适合作为根桥。
蛋羹
实验步骤:
第一步 在Switch的fa0/1,fa0/2接口上配置PortFast
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#int fa 0/1
switch(config-if)#span
switch(config-if)#spanning-tree ?
cost          Change an interface's spanning tree path cost
port-priority Change an interface's spanning tree priority
portfast      Enable an interface to move directly to forwarding on link up
vlan          VLAN Switch Spanning Tree
switch(config-if)#spanning-tree portfa
switch(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single host.
Connecting hubs, concentrators, switches, bridges, this interface
戒子华为mate20pro参数配置when portfast is enabled, can cau temporary spanning tree loops.
U with caUTION
%Portfast has been configured on FastEthernet0/1 but will only
have effect when the interface is in a non-trunking mode.
// IOS会提示不要将二层设备连接到开启PortFast的端口上,portfast只适合连接服务器等固定ip地址的电脑,不适合连接二层网络设备。
switch(config-if)#end妊娠合并梅毒
第二步 验证PortFast接口
switch#sh spanning-tree int fa 0/1
Port 12 (FastEthernet0/11) of VLAN1 is forwarding
  Port path cost 19, Port priority 128, Port Identifier 128.12.
  DesigNated root has priority 32768, address ccd1.06d4.0000
  DesigNated bridge has priority 32768, address ccd1.06d4.0000
  Designated port id is 128.12, desigNated path cost 0语文课用英语怎么说
  Timers: message age 0, forward delay 0, hold 0
  Number of transitions to forwarding state: 1
  BPDU: nt 47, received 0
  The port is in the portfast mode
//可以看出fa0/1已经转变为portfast

本文发布于:2023-07-12 05:50:34,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1078033.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:端口   状态   连接   网络
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图