Case 1 使用STP进行负载分担.让VLAN 3到6的流量经过中继链路1;让VLAN 8到10的流量经过中继链路2.如果其中任何一条中继链路出故障,另一条中继链路将起到承载流量的备份链路:
+ j7 W2 }5 z1 F' ?' l 第一种方法,使用端口优先级来进行STP的负载分担.交换机A和B配置如下:
3 O. J2 p$ }/ ^( S3 N !
8 W$ D- d$ s$ y2 |7 W0 ^( y1 N interface fastethernet0/1+ g2 v1 B0 q; x' l" ]) ^) F5 G4 L Q' I
spanning-tree vlan 8-10 port-priority 165 U R+ e) L3 L/ X8 [/ T \
!' {* ]4 g7 B6 R! }
interface fastethernet0/2; U7 g& B1 H7 g0 X/ V
spanning-tree vlan 3-6 port-priority 16
7 v% a: {8 i, o9 Z !" ^ [/ D/ }' d, a* `1 ]! z2 S* M
第二种方法,使用端口的路径开销来进行STP的负载分担.交换机A和B配置如下:* I+ ?: P k& I5 T7 w5 }. x
!" e6 N4 v9 ^* V0 p
interface fastethernet0/1
5 M0 v( b/ e5 p3 Z spanning-tree vlan 3-6 cost 30
: _; J5 n: y% i6 f" v5 P6 V7 b !) v, N' ] {, B; H( a5 j" D4 O
interface fastethernet0/2/ C2 ~* V) I1 A- l. P
spanning-tree vlan 8-10 port-priority 30
+ U. m+ W8 e2 F0 j !' F$ \0 A) ~) b
Monitoring and Maintaining STP1 a& n x+ `) C5 H3 A# \2 R
一些辅助性的命令:
; b# M. m1 s0 l" z( J( ]$ T. r 1.只显示活动端口的STP状态信息:: G/ [0 P+ w9 q7 _' K4 t
Aiko#show spanning-tree active
+ L5 S; G ^3 g \) _2 |: @4 m 2.显示STP的详细信息:
8 @+ [- v! \% d Aiko#show spanning-tree detail1 c9 E7 ^4 v6 M7 }/ s
3.显示特定端口的STP信息:
1 z% p! @* O$ A Aiko#show spanning-tree interface {interface}
! U- @% S* [6 ~4 [- p8 w 4.显示端口状态摘要信息:
3 z) I# S% Y; L# }" f Aiko#show spanning-tree summary [totals] |