技术:
生成树协议(spanning-tree),作用是在交换网络中提供冗余备份链路,并且解决交换网络中的环路问题;
 
生成树协议是利用SPA算法,在存在交换环路的网络中生成一个没有环路的树形网络。运用该算法将交换网络的冗余备份链路从逻辑上断开,
        当主链路出现故障时,能够自动的切换到备份链路,保证数据的正常转发;
生成树协议版本:STP、RSTP(快速生成树)、MSTP(多生成树协议);
生成树协议的特点是收敛时间长,从主要链路出现故障到切换至备份链路需要50秒的时间;
 
快速生成树协议在生成树协议的基础上增加了两种端口角色:替换端口和备份端口,分别做为根端口和指定端口的冗余端口。
        当根端口或指定端口出现故障时,冗余端口不需要经过50秒的收敛时间,可以直接切换到替换端口或备份端口,
        从而实现RSTP协议小于1秒的快速收敛。

 

 
 
 
链路备份S2
Switch>enable
Switch#show spanning-tree
Switch#conf t
Switch(config)#hostname S1
S1(config)#inter range f0/1-2
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#exit
S1(config)#spanning-tree mode?
mode
S1(config)#spanning-tree mode ?
S1(config)#spanning-tree mode rapid-pvst

 

 
链路备份S2
Switch>enable
Switch#show spanning-tree
This bridge is the root【找到根桥】
Switch#conf t
Switch(config)#hostname S2
S2(config)#inter range f0/1-2
S2(config-if-range)#exit
S2(config)#spanning-tree mode rapid-pvst【生成树协议】
实现传输数据负载均衡:
Switch(config)#port-channel load-banlan
Switch(config)#port-channel load-balance dst-ip
Switch(config)#exit

 

查看配是否启动:
Switch#show etherchannel summary
posted on 2020-05-14 21:17  topass123  阅读(886)  评论(0编辑  收藏  举报