网关冗余负载均衡

HSRP(cisco) 和VRRP(通用) 是最常用的网关冗余技术,HSRP 和VRRP 类似,由多个路由器

共同组成一个组,虚拟出一个网关,其中的一台路由器处于活动状态,当它故障时由备份路

由器接替它的工作,从而实现对用户透明的切换。然而我们希望在冗余的同时,能同时实现

负载平衡,以充分利用设备的能力,GLBP (cisco)同时提供了冗余和负载平衡的能力。

配置步骤大致如下:

做好相关端口配置,设置好追踪,设置网关组,根据不同流量设置相应网关,设置不同优先级实现相互分流和替用。

hsrp

router a:

interface f0/0

no shut

ip add 192.168.0.1 255.255.255.0

standby 1 ip 192.168.0.254

standby 1 preempt

standby 1 priority 120

standby 1 track f0/1 30

standby 1 authentication md5 key-string cisco

standby 2 ip 192.168.0.253

standby 2 preempt

standby 2 authentication md5 key-string cisco


router b:

interface f0/0

no shut

ip address 192.168.0.2 255.255.255.0

standby 1 ip 192.168.0.254

standby 1 preempt

standby 1 authentication md5 key-string cisco

standby 2 ip 192.168.0.253

standby 2 authentication md5 key-string cisco

standby 2 priotiry 120

standby 2 track f0/1 30


vrrp

router a:

track 100 interface f0/1 line-protocol

interface f0/0

vrrp 1 ip 192.168.0.254

vrrp 1 priority 120

vrrp 1 preempt

vrrp 1 authentication md5 key-string cisco

vrrp 1 track 100 decrement 30

vrrp 2 ip 192.168.0.253

vrrp 2 preempt

vrrp 2 authentication md5 key-string cisco


router b:

track 100 interface f0/0 line-protocol

interface f0/0

vrrp 1 ip 192.168.0.254

vrrp 1 preempt

vrrp 1 authentication key-string cisco

vrrp 2 ip 192.168.0.253

vrrp 2 preempt

vrrp 2 priority 120

vrrp 2 track 100 decrement 30

vrrp 2 authentication md5 key-string cisco


router a:

int f0/0

glbp 1 ip 192.168.1.254

glbp 1 priority 200

glbp 1 preempt

glbp 1 authentication md5 key-string cisco


router b:

int f0/0

glbp 1 ip 192.168.1.254

glbp 1 priority 180

glbp 1 preempt

glbp 1 authentication md5 key-string cisco

这样,可以实现网关冗余与负载均衡。

你可能感兴趣的:(负载均衡,网关冗余)