第五章 MST和HSRP
原创
©著作权归作者所有:来自51CTO博客作者goozoogy的原创作品,请联系作者获取转载授权,否则将追究法律责任
快速生成树
Rapid Spanning tree protocol,RSTP
IEEE 802.1w
RSTP端口角色
根端口、指定端口和阻塞端口
替代端口、备用端口
RSTP端口状态
丢弃、学习、转发
RSTP收敛
如果交换机连续三次没有收到邻接的BPDU信息则认为邻接交换机出现故障,默认的hello时间是两秒,所以RSTP发现故障的时间是6秒,STP的最大寿命是20秒。
将PVST+模式更改为RPVST+:switch(config):spanning-tree mode rapid-pvst
MST多生成树协议IEEE802.1s定义
启用MST模式
Switch(config)#spanning-tree mode mst
进入MST配置模式
Switch(config)#spanning-tree mst configuration
配置MST区域名
Switch(config-mst)#name name
配置区域配置修订号
Switch(config-mst)#revision version
将VLAN映射到MST实例
Switch(config-mst)#instance instance-id vlan vlan-list
HSRP消息
使用UDP,端口号1985
使用组播地址224.0.0.2,TTL值为1
HSRP状态
初始状态 学习状态 监听状态 发言状态 备份状态 活跃状态
HSRP计时器
Hello间隔(默认3s) 保持时间(默认10s)
热备份路由协议HSRP
Cisco私有协议
虚拟路由冗余协议VRRP
IETF制定,RFC 2338
实现原理和过程与HSRP基本相同
在协议细节上与HSRP有所区别
配置为HSRP的成员
Switch(config-if)#standby group-number ip virtual-ip-address
配置HSRP的优先级
Switch(config-if)#standby group-number priority priority-value
HSRP占先权
优先级高的路由器重新获得转发权,成为活跃路由器
HSRP占先权配置
Switch(config-if)#standby group-number preempt
HSRP计时器配置
配置Hello间隔和保持时间
Switch(config-if)#standby group-number times hellotime holdtime
HSRP端口跟踪
跟踪端口不可用时,HSRP优先级降低
活跃路由器可以根据线路情况自动调整
查看HSRP摘要信息
Switch#show standby [type mod/num] [group-number] brief
查看HSRP详细信息
Switch#show standby
STP和热备份实验
实验要求:SW1-3L配置为VLAN2的根网桥
SW2-3L配置为VLAN3,4的根网桥
虚拟IP地址 VLAN2 192.168.2.254/24
(PC网关) VLAN3 192.168.3.254/24
VLAN4 192.18.4.254/24
实验配置:
SW1-3L:
en
conf t
lin co 0
logg sy
exec-t 0 0
exi
no ip do lo
ip routi
int r f0/13 -15
sw m tr
exi
exi
vlan d
vlan 2
vlan 3
vlan 4
exi
conf t
spann vl 2 root pri
spann vl 3 root sec
spann vl 4 root sec
int vlan 2
ip add 192.168.2.1 255.255.255.0
no sh
standby 2 ip 192.168.1.254
standby 2 pri 200
standby 2 pree
standby 2 track f0/13 100
standby 2 track f0/14 100
int vl 3
ip add 192.168.3.1 255.255.255.0
no sh
standby 3 ip 192.168.3.254
standby 3 pri 150
standby 3 pree
int vl 4
ip add 192.168.4.1 255.255.255.0
no sh
standby 4 ip 192.168.4.254
standby 4 pri 150
standby 4 pree
SW2-3L:
en
conf t
lin co 0
logg sy
exec-t 0 0
exi
no ip do lo
ip routi
int r f0/13 -15
sw m tr
exi
exi
vlan d
vlan 2
vlan 3
vlan 4
exi
conf t
spann vl 3 root pri
spann vl 4 root pri
spann vl 2 root sec
int vlan 2
ip add 192.168.2.2 255.255.255.0
no sh
standby 2 ip 192.168.2.254
standby 2 pri 150
standby 2 pree
int vl 3
ip add 192.168.3.2 255.255.255.0
no sh
standby 3 ip 192.168.3.254
standby 3 pri 200
standby 3 pree
standby 3 track f0/13 100
int vl 4
ip add 192.168.4.2 255.255.255.0
no sh
standby 4 ip 192.168.4.254
standby 4 pri 200
standby 4 pree
standby 3 track f0/14 10
SW3:
en
conf t
lin co 0
logg sy
exec-t 0 0
exi
no ip do lo
int r f0/13 -14
sw m tr
exi
exi
vlan d
vlan 2
vlan 3
vlan 4
exi
conf t
int f0/1
sw acc vl 2
int f0/2
sw acc vl 3
SW4
en
conf t
lin co 0
logg sy
exec-t 0 0
exi
no ip do lo
int r f0/13 -14
sw m tr
exi
exi
vlan d
vlan 2
vlan 3
vlan 4
exi
conf t
int f0/1
sw acc vl 2
int f0/2
sw acc vl 4
上一篇:隐藏盘符o,让别人看不见
下一篇:访问控制列表ACL
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
第五章 Dockerfile
5-1 Dockerfile指令
Docker 第五章 -
第五章:if语句
python
if语句 大小写 不执行 -
第五章 多态
1、如果基类的某个行为,在所有的派生类中的表现都是一样的,说明在所有的派生类中都没有必要对基类中的行为进行重新实现,那么基类中的该行为
c++ 开发语言 虚函数 运算符 友元函数 -
Transformer【第五章】
Transformer 是一个 Sequence-to-sequence 的 Model(缩写 Seq2seq) input 是 一个 se
transformer 深度学习 人工智能 语音辨识 机器翻译