攻城狮论坛

IE-LAB

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

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

论坛活动~"闲书换金币" 11本书免费送论坛活动~"闲书换金币" 11本书免费送

more +随机图赏Gallery

泰克许国军老师云计算NA公开课视频HCNA-Cloud 华为大数据云计算视频教程泰克许国军老师云计算NA公开课视频HCNA-Cloud 华为大数据云计算视频教程
华为全套HCIE安全视频教程Security LVC公开课 陈世杰 彭定学 王锐 阮维 戴鑫 合力讲演华为全套HCIE安全视频教程Security LVC公开课 陈世杰 彭定学 王锐 阮维 戴鑫 合力讲演
hillstone虚拟化安全培训HCSA-V--云界云格 虚拟化视频教程 专业原厂级讲师hillstone虚拟化安全培训HCSA-V--云界云格 虚拟化视频教程 专业原厂级讲师
Yeslab Hans 2017年最新录制HCNA-HNTD v2.1进阶课程视频33讲Yeslab Hans 2017年最新录制HCNA-HNTD v2.1进阶课程视频33讲
16个方向,全方位学习. Linux运维工程师、架构师全套教程。包含PPT 案例 视频 作业16个方向,全方位学习. Linux运维工程师、架构师全套教程。包含PPT 案例 视频 作业
【2017年-第1期】泰克HCNA华为 安全直通车【最新视频教程】+【扩展资料】【2017年-第1期】泰克HCNA华为 安全直通车【最新视频教程】+【扩展资料】
2017年最新 数据库系统概论(新技术篇)(中国人民大学)教授级大学视频教程2017年最新 数据库系统概论(新技术篇)(中国人民大学)教授级大学视频教程
多位F5工程师的杰作业-F5部署红宝书多位F5工程师的杰作业-F5部署红宝书
超级详细 为了CCIE而录制的CCNA视频教程《CCNA鸿篇巨制版54集》CCIE魔鬼训练营超级详细 为了CCIE而录制的CCNA视频教程《CCNA鸿篇巨制版54集》CCIE魔鬼训练营
华为防火墙视频教程 原理一日通 网络设备防火墙工作原理 设计理念 售前售后攻城狮必备华为防火墙视频教程 原理一日通 网络设备防火墙工作原理 设计理念 售前售后攻城狮必备
教主秦柯 华为防火墙视频50集 USG防火墙进阶讲解 华为防火墙典型配置案例 IPSec教主秦柯 华为防火墙视频50集 USG防火墙进阶讲解 华为防火墙典型配置案例 IPSec
华为安全原厂培训视频教程 新HCNA-Security-中小型企业网安全技术指南(53集)华为安全原厂培训视频教程 新HCNA-Security-中小型企业网安全技术指南(53集)

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

  [复制链接]
查看: 410|回复: 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群

QQ|无图浏览|手机版|网站地图|攻城狮论坛 ( 京ICP备12049419号 )|网站地图

GMT+8, 2017-9-23 22:42 , Processed in 0.296399 second(s), 26 queries , Gzip On, Memcache On.

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

Designed by ARTERY.cn