您的位置:首页 > 编程语言 > PHP开发

STP RSTP MSTP PVST+学习 (1)

2009-07-24 13:34 1651 查看

STP RSTP MSTP PVST+学习 (1)

2007-08-18 18:52:01 标签:STP   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。/article/4280241.html
BPDU bridge protocol data units802.1d STP 802.1w RSTP 802.1s MSTPSTP spanning-tree protocolRSTP rapid spanning-tree protocolMSTP multilayer spanning-tree protocolSSTP single spanning-tree protcol RSTP 是STP扩展,其主要特点增加了端口状态的快速切换机制,能够实现网络拓朴的快速转换。 Root Bridge 根网桥 Root port 根端口 Designated port 指定端口 Pathcost 路径成本 目的MAC是多播地址 01-80-C2-00-00-00 SPA spanning-tree algorithm 生成树算法 bridge priority 网桥优先级 hello time hello时间 forward delay 转发延时 max age 生存时间path cost 路径成本 port priority 端口优先级 disabled 关闭 blocking 锁定listening 侦听 learing 学习 forwarding 转发

字节 字段 描述
2 协议ID 此处总为0
1 版本 STP的版本。802.1为0
1 消息类型 BPDU的类型(配置BPDU=ox00 TCN=ox80)
1 标志 TC/TCA
8 根ID 根网桥的网桥ID
4 路径开销 到达根网桥的STP开销
8 网桥ID 转发根网桥BPDU的网桥的ID
2 端口 转发根网桥BPDU的网桥的端口ID
2 消息寿命 从根桥发出BPDU之后的秒数,每经过一网桥就减一。即为跳数
2 最大寿命 网桥交根桥看作不可用前保留根桥ID的最大时间
2 hello 时间 根桥连续发出BPDU的间隔
2 转发延迟 网桥监听与学习状态所停留的时间。

算法就是为解决特定问题的一个公式或一组步骤。算法依赖与一套规则,有明确的开始和结束。网桥ID (BID)是 生成树算法所使用的第一个参数。STP使用BID来决定桥接网络的中心,称为根网桥或根交换机。 2个字节网桥优先级。0-65535 。默认32768。0X8000 MAC地址。 24个bit的厂商ID。24个分配的。 BID中的MAC地址是交换机的一个MAC地址。每个交换机都有一个MAC地址池,每个STP实例使用一个作为VLAN生成树实例的BID。 (s,t) (u,v) s<u s=u,且t<v 时 (s,t)<(u,v) 路径开销是生成树算法所使用的第2个参数,用来决定到根交换机的路径。路径开销是用来衡量网桥之间的距离有多么近的。路径开销是两个网桥之间某条路径上所有链路开销的总和。 交换机是用路径开销来决定到根交换机的最佳路径。最短链路组合具有最小累计路径开销,并为到根交换机的最佳路径。 网络上所有交换机必须使用同样的标准。

端口ID是生成树算法使用的第3个参数,用来决定根交换机的路径。IOS 8bit 8bit COS 6bit 10bit s<u s=u , t<v (s,t)<(u,v) 端口优先级是一个可以配置的STP参数,在IOS上交换机其值的范围为0-255.。标准128端口号是catalyst 交换机用来列举端口的数字标志。IOS 为256个端口。

当一个BPDU到达交换机端口时,交换机会使用上面4个参数来判断该BPDU是否比该端口已经存储的BPDU更好。如果新收到的BPDU(或本地生成的BPDU)更好,则替换原有的值。 当一个网桥第一被激活时,其上的所有端口每隔2秒(默认hello 时间)发送一次BPDU。如果一个端口发现从其他网桥收到的BPDU比自己的更好,则本地端口就停止发送BPDU。如果有20秒(MAX AGE)的时间没有从邻居收到这个更好的BPDU,本地端口就重新开始发送BPDU。最大生存时间是最佳BPDU超时的时间。 选举一个根交换机选举一个根端口选举指定端口 在一个稳定状态的网络中,BPDU从根网桥流出,沿着这些无环支路到达网络中每一个网段。 root war 网桥战争 选举根交换机









一个网桥的根端口就是按照路径开销最靠近根交换机的端口。每一个非根交换机都必须选举一个根端口。网桥跟踪根路径开销,它是到根交换机所经链路的开销之和。

当一个端口收到BPDU时该开销会增加,而它们发送时并不增加 桥接网络中的每个网段都必须有一个指定端口。一个网段的指定端口是连接在该网段上的一个桥接端口,它通过该网段即向根交换机发送流量也从根交换机接收流量。这一方法的背后的思路就是假如每条链路只有一个端口来处理流量,所有的环路就会被打破。一个网段的指定网桥就是包含该网段的指定端口的网桥。 根网桥根端口指定交换机指定端口 接入端口在指定端口选举中不扮演角色。中继端口是用来连接其他交换机的。接入端口是用来连接到主机或路由器的。 STP 都是在中继端口上交互的。 BackboneFastblocking start 阻塞状态bridge ID 网桥IDCST common spanning tree 公共生成树Edge port 边缘端口EtherChannel 以太信道forward delay 转发延时forwarding state 转发状态link aggregation control protcol 链路汇聚控制协议MST mono spanning tree 单生成树multiple instance of spanning tree protocol MISTP 多实例生成树协议per-vlan spanning-tree PVST 每VLAN生成树prot aggreation protocol PagP 端口聚合协议port number 端口号port priority 端口优先级uplinkfastportfast 禁用状态是管理性的关闭STP状态。它不是正常STP端口过程的一部分。 阻塞状态 丢弃从所连接的网段上收到的数据帧和通过交换而来内部转发的帧。接收BPDU并直接传递给系统模块没有地址数据库不传递从系统模块收到的BPDU接收并相应网络管理消息,单并不传递他们 侦听状态 如果一个网桥在它启动或者一定时间内没有收到BPDU后就立即认为自己是根交换机,端口进入侦听状态。 丢弃所有连接网段收到的帧或其他端口交换来的帧没有地址数据库接收BPDU并直接传递给系统模块处理从系统模块模块收到的BPDU接收并响应网络管理消息 选举根交换机,根端口和指定端口发生在侦听状态期间。在指定端口选举中失败的端口成为一个非指定端口,并回到阻塞状态。剩下的指定端口或根端口在15秒后进入学习状态 学习状态 丢弃所连接网段上收到的帧丢弃从其他端口交换来需要转发的帧将位置状态包含进自己的地址数据库里接收BPDU并直接传递给系统模块接收,处理并传递从系统模块收到的BPDU。接收并响应网络管理消息 学习状态开始创建桥接表。收集诸如数据源帧VLAN等信息的一种STP状态。 转发状态 转发状态是一种在端口上即接收又发送数据流量的STP状态 转发从所链接网段上收到的帧转发从其他端口交换来需要转发的帧将位置状态信息包含到自己的地址数据库接收BPDU,并将其直接传递给系统模块处理从系统模块来的BPDU接收并响应网络管理消息 STP Overview STP is a layer 2 link management protocol that provides path redundancy while preventing loops in the network.STP 是在数据链路层提供冗余并预防环路的管理协议For Layer 2 Ethernet network to function proerly , only one active path can exist between any two stations.STP协议使两个站点间只有一条活跃的链路Multiple active paths among end stations cause loops in the network.如果在站点间存在多个活跃的链路If a loop exists in the network,end stations might receive duplicate messages.将可能导致站点接收到多个帧的副本Switches might also learn end-staion MAC address on multiple Layer 2 interface.交换机在多个接口上学习到相同终端的MAC地址These conditions result in an unstable network.这些情况使网络变的不稳定Spanning-tree operation is transparent to end stations,which cannot detect whether they are connected to a single LAN segment or a switched LAN of multiple segments. 不论你是链接在一个LAN 分段上还是连接在多个分段上终端都是无法察觉的。因为STP是对终端透明的。The STP uses a spanning-tree algorithm to select one switch of a redundantly connected network as the root of the spanning tree.STP通过算法计算出根。 The alogorithm calculates the best loop-free path through a switched Layer 2 network by assigninga role to each port based on the role of the prot in the acitve topology:并且拓朴中每个端口都会处在下面的某种状态 Root A forwarding port elected for the spanning-tree topology根 选举出的转发端口 Designated A forwarding port elected for every switched LAN segement指定 每个分段选举出的转发端口 Alternate A blocked port providing an alternate path to root bridge in the spanning tree预备 处在监听状态的端口 Backup A blocked port in a loopback configuration备份 锁定的端口 enable state enable on VLAN1spanning-tree mode PVST+ (rapid PVST+ and MSTP are desabled)switch priority 32768spanning-tree port priority (configurable on a per-interface basis) 128spanning-tree port cost (configurable on a per-interface basis) 1000mb/s 4 100mb/s 19 10 mb/s 100spanning-tree VLAN port priority (configurable on a per-vlan basis) 128spanning-tree VLAN port cost(confgiurable on a per-vlan basis) 1000mb/s 4 100mb/s 19 10mb/s 100spanning-tree timers hello time 2 seconds forward-delay time 15 seconds maximum-aging time 20 seconds transmit hold count 6 BPDUS Bridge ID, switch priority and extended system id The IEEE 802.1D standard requires that each switch has an unique birdge identifier (bridge ID).IEEE 802.1D 需要每个交换机都有唯一的桥IDcontrols the selection of the root swtich.来进行根网桥的选举 Because each VLAN is considered as a different logical bridege with PVST+ and rapid PVST+,thesame switch must have a different bridge IDs for each configured VLAN.因为 PVST+ 和 快速 PVST+ 每VLAN生成树。就需要交换机针对每个VLAN 有不同的BID。 Each VLAN on the switch has a unique 8-byte bridge ID .每个VLAN 都需要有唯一的8byte的桥ID The 2 most-significant byte are used for the switch priority , and the remaining 6 byte are derived from the switch MACaddress.2 个字节来表示优先级。6格字节为交换机的MAC地址 The switch support the IEEE802.1t spanning-tree extensions, and some of the bits previously used for the switch priority are now used as the vlan identifier.交换机支持 IEEE 802.1t ,把原来表示交换机优先级的bit用来表示vlan 号。 The result is that fewer MAC addresses are reserved for the switch.and a larger range of VLAN IDs can be supportd. all while maintaining the uniqueness of the bridge ID .交换机优先级字段变成4bit。另外12bit来表示vlan ID。相加形成唯一的桥ID。 the 2 bytes previously used for the switch priority are reallocated into a 4-bit priority value and a 12-bit extended system ID value equal to the vlan ID.4bit 的交换机优先级+12 bit 扩展系统ID, 12bit 扩展系统ID等于VLAN ID

spanning-tree users the extended system ID, the switch priority, and the allocated spanning-tree MAC address to make the bridge ID unique for each VLAN.生成树使用扩展系统ID。利用优先级 vlan号 MAC 地址生成唯一的桥ID。 support for the extended system ID affects how you manually configure the root switch, the secondary root switch, and the switch priority of a VLAN. 通过扩展系统ID 你可以手动配置VLAN 的根交换机,第二根和交换机优先级。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: