PVST+(每个VLAN 的生成树PVST )

实验拓扑:

分别在 SW1 和SW2 上show spanning-tree 查看结果:

SW1#show spanning-tree

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0008.20ff.6400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0008.20ff.6400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 15

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Desg FWD 19 128.23 P2p

Fa0/24 Desg FWD 19 128.24 P2p

SW2#show spanning-tree

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0008.20ff.6400

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

注:以上拓扑中经过选举最终SW1 为根网桥,SW2 的F0/24 为blocking 端口,也是就线路2 成为了备

份链路。

分别在 SW1 和SW2 上创建VLAN2,VLAN3,VLAN4,按如下拓扑要求完成本实验:

在 SW1 上创建VLAN2,VLAN3,VLAN4 并查看:

SW1(config)#vlan 2-4

SW1#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12

Fa0/13, Fa0/14, Fa0/15, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22

2 VLAN0002 active

3 VLAN0003 active

4 VLAN0004 active

在 SW2 上创建VLAN2,VLAN3,VLAN4 并查看:

SW2(config)#vlan 2-4

SW2#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12

Fa0/13, Fa0/14, Fa0/15, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22

2 VLAN0002 active

3 VLAN0003 active

4 VLAN0004 active

按如下拓扑要求完成本实验:

要求:SW2 的VLAN1 和VLAN2 流量通过线路1 到达SW1 , SW2 的VLAN3 和VLAN4 的流量

经过线路2 到达SW1,当其中一条链路有问题走同一链路.

分别在 SW1 SW2 上创建了VLAN2-4 后查看目前的生成树状态.

在SW1 上查看:

命令:show spanning-tree vlan 1

show spanning-tree vlan 2

show spanning-tree vlan 3

show spanning-tree vlan 4

SW1#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0008.20ff.6400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0008.20ff.6400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Desg FWD 19 128.23 P2p

Fa0/24 Desg FWD 19 128.24 P2p

SW1#show spanning-tree vlan 2

VLAN0002

Spanning tree enabled protocol ieee

Root ID Priority 32770

Address 0008.20ff.6400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32770 (priority 32768 sys-id-ext 2)

Address 0008.20ff.6400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Desg FWD 19 128.23 P2p

Fa0/24 Desg FWD 19 128.24 P2p

SW1#show spanning-tree vlan 3

VLAN0003

Spanning tree enabled protocol ieee

Root ID Priority 32771

Address 0008.20ff.6400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32771 (priority 32768 sys-id-ext 3)

Address 0008.20ff.6400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Desg FWD 19 128.23 P2p

Fa0/24 Desg FWD 19 128.24 P2p

SW1#show spanning-tree vlan 4

VLAN0004

Spanning tree enabled protocol ieee

Root ID Priority 32772

Address 0008.20ff.6400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32772 (priority 32768 sys-id-ext 4)

Address 0008.20ff.6400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Desg FWD 19 128.23 P2p

Fa0/24 Desg FWD 19 128.24 P2p

结果:查看生成树状态后发现针对VLAN1,VLAN2,VLAN3,VLAN3,SW1 都是扮演根网桥角

色.SW1 连接SW2 的两个端口F0/23,F0/24 都是指定端口.

在SW2 上查看:

命令:show spanning-tree vlan 1

show spanning-tree vlan 2

show spanning-tree vlan 3

show spanning-tree vlan 4

SW2#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0008.20ff.6400

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

SW2#show spanning-tree vlan 2

VLAN0002

Spanning tree enabled protocol ieee

Root ID Priority 32770

Address 0008.20ff.6400

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32770 (priority 32768 sys-id-ext 2)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

SW2#show spanning-tree vlan 3

VLAN0003

Spanning tree enabled protocol ieee

Root ID Priority 32771

Address 0008.20ff.6400

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32771 (priority 32768 sys-id-ext 3)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

SW2#show spanning-tree vlan 4

VLAN0004

Spanning tree enabled protocol ieee

Root ID Priority 32772

Address 0008.20ff.6400

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32772 (priority 32768 sys-id-ext 4)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

结果:查看生成树状态后发现针对VLAN1,VLAN2,VLAN3,VLAN3,SW2 都是扮演非根网桥角色,

SW2 的端口F0/24 都处在blocking 状态.

问题所在:通过在SW1 和SW2 查看得到的结果我们来分析一下,现在SW1 的VLAN1 和VLAN2

是通过线路1 到达SW1 的,这符合本实验的要求,但VLAN3,VLAN4 到SW1 走线路1 不符合本实验的要

求,VLAN3,VLAN4 到SW1 要求走线路2.

分析:SW2 的VLAN3,VLAN4 到SW1 为什么走线路1 呢?因为SW2 相对于VLAN3,VLAN4 来说到

达SW1 F0/24 都是blocking 状态,F0/23 为转发状态,导致VLNA3,VLAN3 通过F0/23 走线路1 到达SW1.

解决方法:在SW2 上VLAN2,VLAN3 要到达SW1 只要SW2 的F0/23 为blocking 状态,F0/24 为转发

状态,就达到本实验的要求(SW2 的VLAN3,VLAN4 到SW1 走线路2)

之所以SW2 的F0/24 为blocking 状态,是因为相对于VLAN3,VLAN4 来说在通过生成树决策的第4

步时,F0/23 端口号小于F0/23,小的优先,Lowest sender port ID 当两台交换机之间有两条线路直连

时会用到这一项,<本实验就是这样>。通过以上分析,在SW2 上相对于VLAN3,VLAN4 来说,我们可以

更改参数,也就是在生成树决策的第2 步就可以做出决策,即使用Lowest path cost to root bridge

(到达根的最小路径开销)。

在SW2 上相对于VLAN3,VLAN4 更F0/24 到根(SW1)的花费,目前为19,F0/23 到根也为19,我们更

改F0/24 端口到达SW1 的花费为18 就可以满足本实验的要求.

在SW2 上配置以下命令:

SW2(config)#interface fastEthernet 0/24

SW2(config-if)#spanning-tree vlan 3-4 cost 18

查看更改的配置:

SW2#show run int f0/24

interface FastEthernet0/24

spanning-tree vlan 3-4 cost 18

end

做上以上配置后在SW2 上查看当前的VLAN3,VLAN4 的生成树状态:

SW2#show spanning-tree vlan 3

VLAN0003

Spanning tree enabled protocol ieee

Root ID Priority 32771

Address 0008.20ff.6400

Cost 18

Port 24 (FastEthernet0/24)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32771 (priority 32768 sys-id-ext 3)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Altn BLK 19 128.23 P2p

Fa0/24 Root FWD 18 128.24 P2p

SW2#show spanning-tree vlan 4

VLAN0004

Spanning tree enabled protocol ieee

Root ID Priority 32772

Address 0008.20ff.6400

Cost 18

Port 24 (FastEthernet0/24)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32772 (priority 32768 sys-id-ext 4)

Address 000d.bce7.5940

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/23 Altn BLK 19 128.23 P2p

Fa0/24 Root FWD 18 128.24 P2p

通过命令show spanning-tree vlan 3 , show spanning-tree vlan 4 查看,我们发现F0/23 为blocking 状

态,SW2 的VLAN3,VLAN4 到达SW1 的通过F0/24 到达,也就是走线路2,实现在本实验的要求。最终线

路1,线路2 流量走势图:

PVST+(每个VLAN 的生成树PVST 加)的更多相关文章

  1. STP、PVST、MST协议

    • STP:生成树协议        ○ 阻止环形链路的广播风暴    • PVST:VLAN生成树        ○ 是STP的进阶版不仅能阻止广播风暴,还可以做到基于VLAN进行流量均衡.     ...

  2. 2.1-VLAN/TRUNK/VTP

    2.1-VLAN/TRUNK/VTP     注意:配置VLAN时要退出VLAN配置模式才会执行 如果VLAN被删除或者shutdown,那么属于这个vlan的接口将被阻塞(灯一直是橙色,变不了绿色) ...

  3. 交换知识 VLAN VTP STP 单臂路由

    第1章 交换基础 1.1 园区网分层结构 层次 作用 出口层 广域网接入 出口策略 带宽控制 核心层 高速转发 服务器接入 路由选择 汇聚层 流量汇聚 链路冗余 设备冗余 路由选择 接入层 用户接入 ...

  4. 实施生成树 STP 高级

    一.生成树协议的演化 生成树协议可以识别防止二层环路 本节介绍每VLAN快速生成树增强版 PVRST+   和多生成树MST   如何配置协议   以及配置生成树系诶稳定性机制 1.生成树协议的演化 ...

  5. STP-4-每VLAN生成树和Trunk上的STP

    如果在有冗余链路且有多个VLAN的交换网络中只使用 STP实例,那么在稳定状态中,仍会有一些端口处于阻塞状态不被使用,冗余链路实际上变成了备份链路. PVST+特性能为每个VLAN创建一个STP实例. ...

  6. CCNA 之 九 STP生成树协议

    STP生成树 在上一次实验中,使用了单臂路由是两个不同的VLAN之间进行通信,而单臂路由的这种网络拓扑,当一条链路或者路由设备出现故障的时候,整个网络就会瘫痪. 称此网络为:不健壮的,无冗余的网络环境 ...

  7. 交换机VLAN、 TRUNK 、VTP 配置

    交换机VLAN. TRUNK .VTP 配置 1. 配置 CISCO 二层交换机的IP 地址(catalyst 2950 为例) SW1(config)#int vlan 1 //进入管理接口inte ...

  8. Pseudoforest(伪最大生成树)

    Pseudoforest Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total ...

  9. CCNA+NP学习笔记—交换网络篇

    本章关于企业网络的最底层--交换层,难度较低,主要为以后三层的路由做铺垫.所有笔记的分类顺序为:序章→交换层→路由层→运营商,体现了从企业网到互联网的学习顺序. 注:思科设备命令行通常不分大小写!以后 ...

随机推荐

  1. USB LPT 端口映射

    如何设置端口映射(以将LPT1端口映射到共享名为CutePDFW的虚拟打印机上为例),命令如下: NET USE LPT1: \\wcjxixi-d022704\CutePDFW /Persisten ...

  2. 关于LCD的分屏与切屏 Tearing effect

    详细文档(带图片):http://download.csdn.net/detail/xuehui869/5268852 1.LCM之Fmark功能 http://blog.csdn.net/zhand ...

  3. eclipse代码提示优化

    用Eclipse编写Android程序的代码提示功能主要是在java和xml文件中,有时候会失效,默认的提示功能有限. 1)java文件自动提示      Window->Preferences ...

  4. C语言_数字排列顺序

    #include <stdio.h> #include <stdlib.h> #define LENGTH 8 void main() { , , , , , , , }; ; ...

  5. python多线程--theading模块

    使用Condition对象可以在某些事件触发或者达到特定的条件后才处理数据,Condition除了具有Lock对象的acquire方法和release方法外, 还有wait方法,notify方法,no ...

  6. liunx 内存文件 tmpfs

    tmpfs是Linux/Unix系统上的一种基于内存的文件系统.tmpfs可以使用您的内存或swap分区来存储文件 1 创建将被挂载的文件 mkdir /tmp/tmpfs/ 2 写入测试文件内容.大 ...

  7. IE11中的F12无效的问题

    最近做的一个项目中,h5中的video标签IE11在有的机器上兼容,有的机器上不兼容,很是让人头疼.将IE卸载后重装又发现最新的IE11中F12开发者工具失效.面对F12失效的问题,具体解决办法如下: ...

  8. shell编程之服务脚本编写,文件锁以及信号捕获

    shell脚本编程是linux运维工程师必备的技能,也是非常重要的一个技能,所以把shell编程学好,只有好处.基础语法我也就不讲了,学过C语言这些语言的,稍微看一下就能明白shell编程的基础,所以 ...

  9. java动态代理(1)

    来源:http://www.cnblogs.com/jqyp/archive/2010/08/20/1805041.html# java动态代理(JDK和cglib) JAVA的动态代理 代理模式 代 ...

  10. linq中的分组和排序

    一.分组  group 组内成员 by 分组条件 into 组的信息 class Program { static void Main(string[] args) { string[] name = ...