好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



MSR系列路由器

通过VRRP实现负载均衡功能的配置 

关键字:MSR; VRRP; 负载均衡

一、组网需求

       两台路由器RTARTB加入两个vrrp组,实现冗余备份,同时实现负载分担。

设备清单MSR系列路由器三台,二层交换机一台,PC两台。

二、组网图:

1-1 MSR vrrp组网图

IP地址说明:

(如图所示:RTARTC之间为192.168.1.0/24网段,RTCRTB之间为192.168.2.0/24网段)

    RTA E0/0: 172.10.1.1/16      E0/1: 192.168.1.1/24

    RTB E0/0: 172.10.1.2/16      E0/1: 192.168.2.1/24

    RTC E0/0: 192.168.1.2/24     E0/1: 192.168.2.2/24

    Vrrp虚接口1: 172.10.2.1

    Vrrp虚接口2: 172.10.3.1

 

三、配置步骤:

1.配置PC1IP地址:172.10.1.6/16, 默认网关指向172.10.2.1

2.配置PC2IP地址:172.10.1.7/16, 默认网关指向172.10.3.1

RTA配置

#

interface Ethernet0/0

 port link-mode route

 ip address 172.10.1.1 255.255.0.0

 vrrp vrid 1 virtual-ip 172.10.2.1

 vrrp vrid 1 priority 150

 vrrp vrid 2 virtual-ip 172.10.3.1

#

interface Ethernet0/1

 port link-mode route

 ip address 192.168.1.1 255.255.255.0

#

rip 1

 network 172.10.0.0

 network 192.168.1.0

RTB配置

#

interface Ethernet0/0

 port link-mode route

 ip address 172.10.1.2 255.255.0.0

 vrrp vrid 1 virtual-ip 172.10.2.1

 vrrp vrid 2 virtual-ip 172.10.3.1

 vrrp vrid 2 priority 150

#

interface Ethernet0/1

 port link-mode route

 ip address 192.168.2.1 255.255.255.0

#

rip 1

 network 172.10.0.0

 network 192.168.2.0

RTC配置

#

interface Ethernet 0/0

ip address 192.168.1.2 255.255.255.0

#

interface Ethernet 0/1

ip address 192.168.2.2 255.255.255.0

#

interface LoopBack1

ip address 192.168.8.8 255.255.255.255

#

rip

network 192.168.1.0

network 192.168.2.0

network 192.168.8.0

四、结果分析

1              配置完成后PC1tracert RTC上的Loopback1接口数据包经过RTA到达RTCPC2tracert RTCLoopback1接口数据包经过RTB到达RTC

2                 shutdownRTAE0/0端口后查看RTBvrrp信息有如下结果

after shut down RTA E0/0:

---------------------------

[RTB]dis vrrp

 IPv4 Standby Information:

 Run Method      : VIRTUAL-MAC

 Virtual Ip Ping : Enable

 Interface       : Ethernet0/0

 VRID            : 1                    Adver. Timer    : 1

 Admin Status    : UP                   State           : Master

 Config Pri      : 100                  Run Pri         : 100

 Preempt Mode    : YES                  Delay Time      : 0

 Auth Type       : NONE

 Virtual IP      : 172.10.2.1

 Virtual MAC     : 0000-5e00-0101

 Master IP       : 172.10.1.2

 

 Interface       : Ethernet0/0

 VRID            : 2                    Adver. Timer    : 1

 Admin Status    : UP                   State           : Master

 Config Pri      : 150                  Run Pri         : 150

 Preempt Mode    : YES                  Delay Time      : 0

 Auth Type       : NONE

 Virtual IP      : 172.10.3.1

 Virtual MAC     : 0000-5e00-0102

 Master IP       : 172.10.1.2

可以看到,此时两个vrrp的虚拟网关均为在RTB侧。

X Close
X Close