配置 VRRP 多备份组实验

引入
VRRP介绍

实验名称
配置 VRRP 多备份组。

实验目的
配置 VRRP 多备份组,实现 VRRP 的负载均衡模式。

背景描述
某集团公司其总部在北京,其分公司在上海,为了实现分公司与总公司之间的高可用性,所以在分公司的网络中考虑配置 VRRP,实现通过两条线路连接到总公司,两条线路互为备份。在做方案时考虑,如果配置 VRRP 单备份组,那么会导致备份线路闲置无法使用,造成浪费,因此考虑采用 VRRP 多备份组的方案,两条线路互为备份,并且同时都转发数据。

需求分析
采用 VRRP 技术可以实现分公司双链路接入总部,解决单点故障的问题。对于备份线路闲
置导致浪费的问题,可以通过 VRRP 多备份组技术解决,将路由器配置到多个 VRRP 组中,并且在不同的 VRRP 中担任不同的角色,从而保证接入线路上的路由器都能够承担转发任务。

实验拓扑
在这里插入图片描述
预备知识
路由器基本配置知识、OSPF 基本配置、VRRP 工作原理

实验原理
建立多个 VRRP 备份组,将路由器配置到多个 VRRP 组中,并且在不同的 VRRP 组中承担不同的角色。这样,不同的路由器在不同的 VRRP 组中都会承担本 VRRP 组中的转发任务,不会出现设备或线路闲置的情况,同时两条线路也能互为备份。

实验步骤

路由器RA

RA(config)#interface serial 1/2
RA(config-if)#ip address 200.1.1.1 255.255.255.252
RA(config-if)#exit

RA(config) #interface FastEthernet 1/0
RA(config-if)#ip address 12.1.1.1 255.255.255.0
RA(config-if)#exit

RA(config)#router ospf
RA(config-router)#network 12.1.1.0 0.0.0.255 area 0.0.0.0
RA(config-router)#network 200.1.1.0 0.0.0.3 area 0.0.0.0

RA(config)#interface FastEthernet 1/0
RA(config-if)#vrrp 32 ip 12.1.1.254
RA(config-if)#vrrp 32 priority 120     //将路由器 RA 在 VRRP 组 32 中优先级配置 120 ,成为 Master 路由器
(config-if)#vrrp 32 track serial 1/2 30    //配置路由器 RA 在 VRRP 组 32 中监控 serial 1/2 端口,当端口状态转为 DOWN 时,RA 在 VRRP 组32 中优先级降低 30
RA(config-if)#vrrp 33 ip 12.1.1.253     //将路由器 RA 配置为 VRRP 组 33 中的路由器

路由器RB

RB(config)#interface FastEthernet 1/0
RB(config-if)#ip address 12.1.1.2 255.255.255.0
RB(config-if)#exit

RB(config)#interface FastEthernet 1/1
RB(config-if)#ip address 65.1.1.1 255.255.255.252
RB(config-if)#exit

RB(config)#router ospf
RB(config-router)#network 12.1.1.0 0.0.0.255 area 0.0.0.0
RB(config-router)#network 65.1.1.0 0.0.0.3 area 0.0.0.0

RB(config)#interface FastEthernet 1/0
RB(config-if)#vrrp 32 ip 12.1.1.254     //将路由器 RB 配置为 VRRP 组 32 中的路由器
RB(config-if)#vrrp 33 priority 120     //将路由器 RB 配置为 VRRP 组 33 中的路由器,优先级为 120
RB(config-if)#vrrp 33 ip 12.1.1.253
RB(config-if)#vrrp 33 track FastEthernet 1/1 30

路由器RC

RC(config)#interface serial 1/2
RC(config-if)#ip address 200.1.1.2 255.255.255.252
RC(config-if)#clock rate 64000
RC(config-if)#exit

RC(config)#interface FastEthernet 1/1
RC(config-if)#ip address 65.1.1.2 255.255.255.252
RC(config-if)#exit

RC(config)#interface FastEthernet 1/0
RC(config-if)#ip address 172.16.1.1 255.255.255.0
RC(config-if)#exit

RC(config)#router ospf
RC(config-router)#network 65.1.1.0 0.0.0.3 area 0.0.0.0
RC(config-router)#network 172.16.1.0 0.0.0.255 area 0.0.0.0
RC(config-router)#network 200.1.1.0 0.0.0.3 area 0.0.0.0

验证测试
使用 show vrrp brief 来验证配置
在这里插入图片描述
从 show 命令输出结果可以看出,路由器 RA 在 VRRP 组 32 中角色为 Master 路由器,在VRRP 组 33 中角色为 Backup 路由器。

注意事项
在 VRRP 多组中,需要为不同的客户端配置不同的网关地址,以达到负载分担的目的.

发布了30 篇原创文章 · 获赞 205 · 访问量 2996

猜你喜欢

转载自blog.csdn.net/Long_UP/article/details/105617092
今日推荐