高可用性:HSRP、VRRP、GLBP、SLB、Syslog、SNMP、堆叠

实验一:HSRP的配置(可以使用路由器或者三层交换机)

拓扑图

实验二:VRRP的配置

拓扑图

实验三:GLBP的配置

(1)拓扑图

Router0(config-if)#glbp 1 name TEST(配置一个名字,可选)

Router0(config-if)#glbp 1 authentication md5 key-string xu(配置认证,防止非法设备接入)

Router0(config-if)#glbp 1 timers 3 10

Router0(config-if)#glbp 1 priority 200 (配置优先级,优先级高的路由器成为AVG,控制AVG(active virtual gateway)的选举,而不是AVF)

Router0(config-if)#glbp 1 preempt(配置路由器会进行AVG抢占,否则,即使优先级再高,也不会成为AVG)

Router0(config-if)#glbp 1 preempt delay minimum 1(配置AVG抢占延时为1秒)

Router0(config-if)#glbp 1 weighting 200 lower 170 upper 180(配置路由器的权重为200,低限为170,高限为180。当路由器出现故障后,如果权重低于高限(170)时

,该路由器将不会成为AVF,也就不会转发数据,故障排除后,如果权重高于低限(180)时,路由器重新成为AVF,才能转发数据,此外如果基于权重的负载均衡,则权重越大

,转发数据的机会就越大)

Router0(config-if)#glbp 1 weigthting tack 100 decrement 50(配置跟踪目标100,即跟踪fa0/1接口,如果fa0/1故障则权重减去50.由于路由器的权重为200,fa0/1如果

故障,则权重为200-50=150,该值小于170,路由器不转发数据,当fa0/1恢复时,权重恢复200,高于180,路由器恢复转发数据的能力。可以配置多个跟踪目标)

Router0(config-if)#glbp 1 forwarder preempt(配置该路由器会抢占成为AVF)

Router0(config-if)#glbp 1 forwarder preempt delay minimum 25(配置该路由器会抢占成为AVF的延迟时间为25秒,默认值为30秒)

Router0(config-if)#glbp 1 load-balancing round-robin(配置均衡的策略,默认是round-robin(轮询方式),其他策略有host-dependent(根据不同主机的源MAC地址进

行平衡)、weighted(根据路由器的权重分配,权重高的被分配的可能性越大))

Router1(config)#track 100 interface fa0/1 line-protocol

Router1(config)#int fa0/0

Router1(config-if)#glbp 1 ip 192.168.1.254

Router1(config-if)#glbp 1 name TEST

Router1(config-if)#glbp 1 authentication md5 key-string xu

Router1(config-if)#glbp 1 timers 3 10

Router1(config-if)#glbp 1 priority 180

Router1(config-if)#glbp 1 preempt

Router1(config-if)#glbp 1 preempt delay minimum 1

Router1(config-if)#glbp 1 weighting 200 lower 170 upper 180

Router1(config-if)#glbp 1 weigthting tack 100 decrement 50

Router1(config-if)#glbp 1 forwarder preempt

Router1(config-if)#glbp 1 forwarder preempt delay minimum 25

Router1(config-if)#glbp 1 load-balancing round-robin

Router2(config)#track 100 interface fa0/1 line-protocol

Router2(config)#int fa0/0

Router2(config-if)#glbp 1 ip 192.168.1.254

Router2(config-if)#glbp 1 name TEST

Router2(config-if)#glbp 1 authentication md5 key-string xu

Router2(config-if)#glbp 1 timers 3 10

Router2(config-if)#glbp 1 priority 160

Router2(config-if)#glbp 1 preempt

Router2(config-if)#glbp 1 preempt delay minimum 1

Router2(config-if)#glbp 1 weighting 200 lower 170 upper 180

Router2(config-if)#glbp 1 weigthting tack 100 decrement 50

Router2(config-if)#glbp 1 forwarder preempt

Router2(config-if)#glbp 1 forwarder preempt delay minimum 25

Router2(config-if)#glbp 1 load-balancing round-robin

Router3(config)#track 100 interface fa0/1 line-protocol

Router3(config)#int fa0/0

Router3(config-if)#glbp 1 ip 192.168.1.254

Router3(config-if)#glbp 1 name TEST

Router3(config-if)#glbp 1 authentication md5 key-string xu

Router3(config-if)#glbp 1 timers 3 10

Router3(config-if)#glbp 1 priority 140

Router3(config-if)#glbp 1 preempt

Router3(config-if)#glbp 1 preempt delay minimum 1

Router3(config-if)#glbp 1 weighting 200 lower 170 upper 180

Router3(config-if)#glbp 1 weigthting tack 100 decrement 50

Router3(config-if)#glbp 1 forwarder preempt

Router3(config-if)#glbp 1 forwarder preempt delay minimum 25

Router3(config-if)#glbp 1 load-balancing round-robin

(4)查看GLBP信息

Router0#show glbp

Router0#clear arp-cache 

实验四:SLB的配置

(1)拓扑图

实验五:Syslog的配置


实验六:SNMP的配置

实验七:堆叠的配置

本文出自 “银河系|计算机网络” 博客,谢绝转载!


发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注