本站已运行

攻城狮论坛

IE-LAB

红盟过客

作者: aaa121055
查看: 531|回复: 11

more +今日重磅推荐Recommend No.1

所有IT类厂商认证考试题库下载所有IT类厂商认证考试题库下载

more +随机图赏Gallery

Python学习视频 0起点视频 入门到项目实战篇 Python3.5.2视频教程 共847集 能学102天Python学习视频 0起点视频 入门到项目实战篇 Python3.5.2视频教程 共847集 能学102天
约21套Python视频合集 核心基础视频教程(共310G,已压缩)约21套Python视频合集 核心基础视频教程(共310G,已压缩)
最新20180811录制 IT爱好者-清风羽毛 - 网络安全IPSec VPN实验指南视频教程最新20180811录制 IT爱好者-清风羽毛 - 网络安全IPSec VPN实验指南视频教程
最新20180807录制EVE开机自启动虚拟路由器并桥接物理网卡充当思科路由器最新20180807录制EVE开机自启动虚拟路由器并桥接物理网卡充当思科路由器
最新2018/07/29录制 IT爱好者清风羽毛-Cisco IOS ZBF防火墙视频最新2018/07/29录制 IT爱好者清风羽毛-Cisco IOS ZBF防火墙视频
乾颐堂 教主技术进化论 2018年 最新1-30期合集视频(各种最新技术杂谈视频)乾颐堂 教主技术进化论 2018年 最新1-30期合集视频(各种最新技术杂谈视频)
Cisco CCW售前销售报价系统使用方法Cisco commerce workspaceCisco CCW售前销售报价系统使用方法Cisco commerce workspace
2018.6.20 广州 CCNA战报 908 PASS2018.6.20 广州 CCNA战报 908 PASS
[KiKi原创]EVE-NG Community2.0.3-92 v1.4 中英双语一键切换.支持热插拔修改版[KiKi原创]EVE-NG Community2.0.3-92 v1.4 中英双语一键切换.支持热插拔修改版
2018.06.03 上海 943 CCNA R&S PASS2018.06.03 上海 943 CCNA R&S PASS
CCNA(200-125)题库V3.0(2018.04.07)的题库一共453道选择题的中文翻译+题库中参...CCNA(200-125)题库V3.0(2018.04.07)的题库一共453道选择题的中文翻译+题库中参...
2018.5.6 参加CCNA 考试通过。分享考试经验和那些试题2018.5.6 参加CCNA 考试通过。分享考试经验和那些试题

[学习笔记] 老外写的SPT分析(你肯定没见过)

  [复制链接]
查看: 531|回复: 11
开通VIP 免金币+免回帖+批量下载+无广告
I was abit bored, so i did this quick guide on STP.

I think i am addicted to this forum...heheh

Anyways, I hope you will find it useful.

Please be patient for the picture to load!!

老外写的SPT分析(你肯定没见过)

老外写的SPT分析(你肯定没见过) - 攻城狮论坛 - 老外写的SPT分析(你肯定没见过)

CCNA考试 官方正规报名 仅需1500元
回复 论坛版权

使用道具 举报

aaa121055 [Lv4 初露锋芒] 发表于 2016-3-11 11:32:11 | 显示全部楼层
And here is one on STP covers most of the stuff

-----------
STP
-----------

1.Main function to remove switching loops,broadcast storms caused due to arp requests
2.802.1d

---------
BPDU
---------
1.Bridge Protocol data unit
2.Used to share STP info
3.Multicats on LAN
4.Used to learn topology
5.If loops are found switch will disable them
6.Sent every 2 secs
7.Contains bridge ID:2 byte priority+6byte MAC address
8.Default priority 32768.Can vary from 0-65535
9.BPDU sent initially contains following
--Root bridge ID.Initially every switch thinks it is the root
-- Cost to reach the root.Initially this will be zero.Cost from 0-65535
--Senders Bridge ID
10.Bridges save a copy of only the best BPDU seen on every port.
11.When making this evaluation, it considers all of the BPDUs received on the port, as well as the BPDU that would be sent on that port.
12.As every BPDU arrives, it is checked against this four-step sequence to see if it is more attractive (lower in value) than the existing BPDU saved for that port.
13.Only the lowest value BPDU is saved.
14.Bridges send configuration BPDUs until a more attractive BPDU is received.


---------
STP process
---------------
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports


Step 1.Electing the root bridge
1.Each bridge sends BPDU claiming itself to be root,with cost 0 and its own bridge id
2.BPDU message used to identify root,its BID and cost is called Hello BPDU
3.If root hears a BPDU with lower BID (either priority or MAC) than itself,stops advertising itself and starts forwarding Hello BPDUs of that swutch
4. Different roots and STP instance for each VLAN

3.You can modify the path cost by modifying the cost of a port.
Switch(config-if)# spanning-tree cost value

Four-Step decision Sequence
Step 1 - Lowest BID
Step 2 - Lowest Path Cost to Root Bridge
Step 3 - Lowest Sender BID
Step 4 - Lowest Port ID

Step 2:
1.Elect root port:Port with lowest cost to reach root bridge.
2.Port cost value inverse of bandwidth
3.Port cost values
10 Mpbs -100
100 Mbps-19
1Gbps-4
10Gbps-2

4.Port also has priority assigned.Default is 32.Lower priority preferred
5.Path cost calculated as follows.Root adv BPDU with 0 cost.When other bridge receives it it increments the cost with the cost of the port on which the BPDU enters the bridge.
6.Advertises updated BPDU with its cost added
7.Remember that path costs are incremented as a BPDU comes into a port, not
when a BPDU is advertised out of a port

*******Steps to choose root port*******
1.Choose the path with the lowest accumulated path cost to the root if there is
a choice between two or more paths to reach the root.
2. If there is a tie between port priorities, choose the neighboring switch (that
your switch would go through to reach the root) with the lowest switch ID value.
3. If you have multiple paths, and they all go through the same neighboring switch,
choose the port with the lowest priority value.
4. If the priority values are the same between the ports, choose the physically
lowest-numbered port on the switch (on a 1900, that would be Ethernet 0/1).

Step3.Elect designated port

Besides each switch having a root port, each segment also has a single port that is uses to reach the root. This port is called a designated port.
1.The connected switch on the segment with the lowest accumulated path cost
to the root bridge will be used.
2. If there is a tie in accumulated path costs between two switches, then the
switch with the lowest switch ID will be chosen.
3. If it happens that it is the same switch, but with two separate connections
to the LAN segment, the switch port with the lowest priority is chosen.
4. If there is still a tie (the priorities of the ports on this switch are the same),
then the physically lowest numbered port on the switch is chosen
5.every active port on the root switch is a designated port.

**********Port states in STP**********
¦Blocked
¦ Listening
¦ Learning
¦ Forwarding
¦ Disabled

********Blocking**********
Ports will go into blocking under the foll conditions
1.During election of root switch
2.If a BPDU with better cost is heard on a port than current existing one being used
3.If its not a root or designated port
Will remain in blocking state for 20 secs called MAx age seconds.Listens for BPDUs,but does not process any user data.

********Listening*********
After 20 secs of being in blocked state port transitions to listening state
In listening state port is listening to BPDUs to learn new topology but does not process user traffic.This last for 15 secs called forward delay time.

**********************Learning*****************
In this state user data is not forwarded, but MAC addresses are learned from any traffic that is seen.
The learning state lasts for 15 seconds and is also called the forward delay.
BPDUs are still processed.

************Forwarding**********
1.Ports process BPDU
2.Learn MAc addresses
3.Forward user traffic


***********Disabled********
Port not participating in STP

Total time for STP to converge is 20+15+15=50 secs

Step 1.Elect Root Bridge:

Check the priority forst.Since priorities are not given default priority assumed.Hence lowest MAC address will become root bridge.That is Switch C.All ports on Switch C will be designated ports hence forwarding

Step 2.Elect Root ports

For Switch A the root port will be port connecting Switch D since it has the lowest path cost that is 8 (4+4) to the root

For Switch B:Direst connection to switch C with path cost 4

For switch D:Direct connection to switch C

Step 3:Designated ports

For LAN segment between

Switch A -Switch B=Switch Bport will be designated port since its port on the LAN has lowest path cost to root i.e 4 as compared to Switch A i.e 19.Hence switch A port will be blocking

Switch B-Switch D=Both ports of Switch D and Switch B have same path cost 4.But Switch D has lower mac hence its port will be designated port with path cost 4.Switch B port will be blocking

Switch A-SwitchC=Switch C port will be designated port hence Switch A port is blocking


------------------------------------------------
RSTP-Rapid Spanning Tree protocol
__________________________________

1.802.1w spec
2.additional port roles
--alternate port
-- backup port
3.New port role of discarding state instead of blocking
4.Faster covergence

*********RSTP link types********
1.Point to point:between 2 switches.Improves convergence on full duplex
2.Link type shared:Typically when a hub is connected to a switch and the PCs are connected to hub.RSTP does not do anything for such links
3.Edge type:When pc is connected to switch port directly:places in forwarding state from blocking immediately

*********Port states********
1.Listening
2.Learning
3.Forwarding.
4.Discarding
5.Disabled

**********RSTP process*********
1.Does not wait for max age secs.Instead it considers root dead if no info recd for 3 times hello time
2.Similar to Cisco Backbone Fast feature it acceps inferior BPDUs.
3.If link between Sw A and SwB fails then Switch B gets inferior BPDUs.IN three times hello interval it informs switch C to set to root port.
4.Edge ports are transitioned to foirwarding from discarding.Similar to port fast
5.RSTP removes the need for listening state and reduces the time required for learning state by
actively discovering the network’s new state.
6.STP passively waits on new BPDUs, and reacts
to them, during the listening and learning states.
7.With RSTP, the switches negotiate with neighboring switches.
8.When ports that can be transitioned immediately to forwarding state
are discovered, they are transitioned immediately.

***********Optional STP features**************
1.Etherchannel:Allows from 2 to max 8 links between 2 switches to be viewed as a single logical interface.STP will not converge if one of them goes down.
2.Etherchannel config:Interface sub command :channel-group <channel-group no> mode <auto,on,desirable>
3.Show cmds:show etherchannel <group no> <brief|detail|port|portchannel|summary>:Diplays logical interface as port channel eg Po1 for channel group 1
2.Portfast:Access port transitioned to forwarding immediately

*************Spanning tree configuration************
1.(config)#spanning-tree vlan <id> root:Changes switch to root for that vlan.Set its priority to Courrent root port priority-100 or 24,576 less

2.(config)#spanning-tree vlan <id> priority <value>:Changes priority of switch for this vlan from default 32768 to value specified

3.(config-if)#spanning-tree cost <value>:Set value of port cost

***********Show commands**********
1.show spanning-tree:shows details of STP including port states
2.show spanning-tree vlan <no>:Show STP details for that vlan
3.show spanning-tree <interface> <value>:shows details for particular port
4.debug spanning-tree:provides info on messages on STP
回复 支持 反对

使用道具 举报

mmmvvv [Lv5 不断成长] 发表于 2016-3-11 12:28:32 | 显示全部楼层
轻松3步 无限次刷金币 每次200 只需20秒http://bbs.vlan5.com/thread-14477-1-1.html;
回复 支持 反对

使用道具 举报

写的真的很不错
回复 支持 反对

使用道具 举报

支持一下:lol
回复 支持 反对

使用道具 举报

dafayang [Lv5 不断成长] 发表于 2016-3-12 09:12:15 | 显示全部楼层
谢谢楼主,共同发展
回复 支持 反对

使用道具 举报

loovle [Lv5 不断成长] 发表于 2016-3-12 13:32:49 | 显示全部楼层
帮你顶下哈!!
回复 支持 反对

使用道具 举报

knightt [Lv5 不断成长] 发表于 2016-3-13 12:21:25 | 显示全部楼层
有竞争才有进步嘛
回复 支持 反对

使用道具 举报

lantern [Lv5 不断成长] 发表于 2016-3-13 13:31:25 | 显示全部楼层
沙发!沙发!
回复 支持 反对

使用道具 举报

沙发!沙发!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|无图浏览|手机版|网站地图|攻城狮论坛

GMT+8, 2018-12-10 11:08 , Processed in 0.388334 second(s), 19 queries , Gzip On, Memcache On.

Powered by Discuz! X3.2 © 2001-2013 Comsenz Inc.

Designed by ARTERY.cn