码迷,mamicode.com
首页 > 其他好文 > 详细

思科pvst实现流量负载均衡

时间:2018-05-11 00:08:33      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:VLAN   PVST   负载均衡   思科生成树   每VLAN生成树   

技术分享图片
1、根据拓扑配置PC地址为192.168.1.1-192.168.1.4
2、配置下方的交换机
交换机创建vlan 10 20
Switch(config)#vlan 10
Switch(config)#vlan 20
把交换机相连的接口改成trunk
Switch(config)#Interface range f0/1-2
Switch(config-if)Switchport mode trunk
Switch(config-if)exit
接口划入vlan
Switch(config)#interface f0/3
Switch(config-if)#switchport access vlan 10
Switch(config-if)#interface f0/4
Switch(config-if)#switchport access vlan 20
Switch(config-if)#
2、配置左上方的交换机
交换机创建vlan 10 20
Switch(config)#vlan 10
Switch(config)#vlan 20
把交换机相连的接口改成trunk
Switch(config)#Interface range f0/1-2
Switch(config-if)Switchport mode trunk
Switch(config-if)exit
接口划入vlan
Switch(config)#interface f0/3
Switch(config-if)#switchport access vlan 10
Switch(config-if)#interface f0/4
Switch(config-if)#switchport access vlan 20
配置此交换机为vlan 10的根,vlan 20的备份
witch(config)#spanning-tree vlan 10 root primary
Switch(config)#spanning-tree vlan 20 root secondary

4、右上方的交换机配置
交换机创建vlan 10 20
Switch(config)#vlan 10
Switch(config)#vlan 20
把交换机相连的接口改成trunk
Switch(config)#Interface range f0/1-2
Switch(config-if)Switchport mode trunk
Switch(config-if)exit
配置此交换机为vlan 20的根,vlan 10的备份
switch(config)#spanning-tree vlan 20 root primary
Switch(config)#spanning-tree vlan 10 root secondary

5、可以用show spanning-tree
Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000A.F37D.977E
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000D.BD52.1362
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 P2p

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 24586
Address 000D.BD52.1362
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24586 (priority 24576 sys-id-ext 10)
Address 000D.BD52.1362
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 24596
Address 000A.F37D.977E
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 28692 (priority 28672 sys-id-ext 20)
Address 000D.BD52.1362
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 P2p
Fa0/4 Desg FWD 19 128.4 P2p

可以抓包看VLAN10和VLAN20 的流量走向,VLAN10 走左边,VLAN20 走右边

思科pvst实现流量负载均衡

标签:VLAN   PVST   负载均衡   思科生成树   每VLAN生成树   

原文地址:http://blog.51cto.com/ronning/2115058

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!