思科生成树协议:STP(spanning-tree protocol)
目的是防止环路
一,确定根桥root-bridge(一个网络有且只有一个根桥)
1,show version
2,查看base ethernet MAC address
3,比较其大小,最小的交换机为root-bridge
二,确定根端口RP:root port(都在非根桥交换机上)(一个交换机有且只有一个RP)
1,比根桥的BID:bridge ID
2,比cost值:10M=100;100M=19;1G=4;10G=2;
3,比发送方BID
4,比发送方PID=端口优先级+端口号
三,确定指定端口DP:designation port(根桥的所有接口都是指定端口)
1,比根桥的BID:bridge ID
2,比cost值:10M=100;100M=19;1G=4;10G=2;
3,比发送方BID
4,比发送方PID=端口优先级+端口号
四,确定非指定端口NDP(block)
1,show version
2,查看base ethernet MAC address
3,比较其大小,最大的交换机的接口为NDP
思科每vlan生成树协议:PVST(per-vlan spanning-tree)(思科设备默认都是pvst)
优点是冗余,负载均衡
一,spanning-tree mode pvst
现在是所有的vlan都是从fa 0/1-fa 0/1走,只需要设法让vlan 40,vlan 50,vlan 60从fa 0/2-fa 0/2走就可以了
二,对于vlan 40;vlan 50;vlan 60来说,应该将switch1的fa 0/2调为RP,fa 0/1设为NDP
1,修改自已的cost
switch1:int fa 0/2
spanning-tree vlan 40 cost 10
spanning-tree vlan 50 cost 10
spanning-tree vlan 60 cost 10
2,修改发送端PID:端口优先级
switch0:int fa 0/2
spanning-tree vlan 40 port-priority 0
spanning-tree vlan 50 port-priority 0
spanning-tree vlan 60 port-priority 0
思科快速生成树RSTP:rapid-pvst
优点是快速收敛
spanning-tree mode rapid-pvst
思科多生成树MSTP:multiple spanning tree
基于实例instance的负载均衡
一,spanning-tree mode mst
二,spanning-tree mst configuration
name ccnp
revision 10
instance 1 vlan 1-5
instance 2 vlan 6-10
三,spanning-tree mst 1 priority 4096
spanning-tree mst 1 cost 19
四,show spanning-tree mst
show spanning-tree mst configuration
转载于:https://blog.51cto.com/yuanhl86/980565