网络拓扑实例之VRRP负载分担(四)
组网图形

VRRP负载分担简介
- 负载分担方式是指多台设备同时承担业务,因此负载分担方式需要两个或者两个以上的虚拟路由器,每个虚拟路由器都包括一个Master路由器和若干个Backup路由器,各虚拟路由器的Master路由器可以各不相同。
- 负载分担方式需要建立多个VRRP备份组,各备份组的Master设备可以不同。
- 同一台VRRP设备可以加入多个备份组,在不同的备份组中具有不同的优先级。
组网需求
- 如图1所示,用户HostA和HostC通过Switch双归属到SwitchA和SwitchB。为减轻SwitchA上数据流量的承载压力,HostA以SwitchA为默认网关接入Internet,SwitchB作为备份网关;HostC以SwitchB为默认网关接入Internet,SwitchA作为备份网关,以实现流量的负载均衡。
配置思路
- 配置各设备接口IP地址及路由协议,使各设备间网络层连通。
- 在SwitchA和SwitchB上创建VRRP备份组1和VRRP备份组2,在备份组1中,配置SwitchA为Master设备,SwitchB为Backup设备;在备份组2中,配置SwitchB为Master设备,SwitchA为Backup设备,实现流量的负载均衡。
操作步骤
- 1.配置设备间的网络互连
# 配置设备各接口的IP地址,以SwitchA为例。SwitchB和SwitchC的配置与SwitchA类似,不在赘述。
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100 300 500
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
[SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 300
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 500
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 10.1.10.1 24
[SwitchA-Vlanif100] quit
[SwitchA] interface vlanif 500
[SwitchA-Vlanif500] ip address 10.1.50.1 24
[SwitchA-Vlanif500] quit
[SwitchA] interface vlanif 300
[SwitchA-Vlanif300] ip address 192.168.1.1 24
[SwitchA-Vlanif300] quit
# 配置Switch的二层转发功能。
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 100 500
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] port link-type trunk
[Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 500
[Switch-GigabitEthernet1/0/1] quit
[Switch] interface gigabitethernet 1/0/2
[Switch-GigabitEthernet1/0/2] port link-type trunk
[Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 500
[Switch-GigabitEthernet1/0/2] quit
# 配置SwitchA、SwitchB和SwitchC间采用OSPF协议进行互连。以SwitchA为例,SwitchB和SwitchC的配置与SwitchA类似,不在赘述。
[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.10.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.50.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
- 2.配置VRRP备份组
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.10.111
[SwitchA-Vlanif100] vrrp vrid 1 priority 120 //设备在VRRP备份组中的优先级缺省为100,修改Master设备的优先级大于Backup设备
[SwitchA-Vlanif100] vrrp vrid 1 preempt-mode timer delay 20 //设备在VRRP备份组中缺省采用立即抢占方式。修改Master设备的延迟抢占时间,以避免在网络环境不稳定时,由于双方频繁抢占而导致流量中断的问题
[SwitchA-Vlanif100] quit
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.10.111
[SwitchB-Vlanif100] quit
# 在SwitchA和SwitchB上创建VRRP备份组2,配置SwitchB的优先级为120,抢占延时为20秒,作为Master设备;SwitchA的优先级为缺省值,作为Backup设备。
[SwitchB] interface vlanif 500
[SwitchB-Vlanif500] vrrp vrid 2 virtual-ip 10.1.50.111
[SwitchB-Vlanif500] vrrp vrid 2 priority 120 //设备在VRRP备份组中的优先级缺省为100,修改Master设备的优先级大于Backup设备
[SwitchB-Vlanif500] vrrp vrid 2 preempt-mode timer delay 20 //设备在VRRP备份组中缺省采用立即抢占方式。修改Master设备的延迟抢占时间,以避免在网络环境不稳定时,由于双方频繁抢占而导致流量中断的问题
[SwitchB-Vlanif500] quit
[SwitchA] interface vlanif 500
[SwitchA-Vlanif500] vrrp vrid 2 virtual-ip 10.1.50.111
[SwitchA-Vlanif500] quit
- 3.验证配置结果
# 完成上述配置后,在SwitchA上执行display vrrp命令,可以看到SwitchA在备份组1中作为Master设备,在备份组2中作为Backup设备。
[SwitchA] display vrrp
Vlanif100 | Virtual Router 1
State : Master
Virtual IP : 10.1.10.111
Master IP : 10.1.10.1
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2012-01-12 20:15:46
Last change time : 2012-01-12 20:15:46 Vlanif500 | Virtual Router 2
State : Backup
Virtual IP : 10.1.50.111
Master IP : 10.1.50.2
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-11-12 20:15:46
Last change time : 2018-11-12 20:15:46
# 在SwitchB上执行display vrrp命令,可以看到SwitchB在备份组1中作为Backup设备,在备份组2中作为Master设备。
[SwitchB] display vrrp
Vlanif100 | Virtual Router 1
State : Backup
Virtual IP : 10.1.10.111
Master IP : 10.1.10.1
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2012-01-12 20:15:46
Last change time : 2012-01-12 20:15:46 Vlanif500 | Virtual Router 2
State : Master
Virtual IP : 10.1.50.111
Master IP : 10.1.50.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-11-12 20:15:46
Last change time : 2018-11-12 20:15:46
网络拓扑实例之VRRP负载分担(四)的更多相关文章
- 网络拓扑实例10:MSTP+VRRP组合组网
组网图形 MSTP+VRRP组合简介 网络中部署VRRP负载分担时,多台设备同时承担业务,每个虚拟设备都包括一个Master设备和若干个Backup设备.如果为了接入备份需要同时部署冗余链路,则需要部 ...
- 关于VXLAN的认识-----ovs+vxlan多链路负载分担的实现方法
一.应用环境 目前大部分网关或服务器设备常采用双链路同时接入多条ISP链路的方式来满足网络的负载均衡和主备切换等,实现该功能常用的方法是利用策略路由技术,根据链路的网络状况和权重配置在路由时动态选择不 ...
- 华为S5700系列交换机AR配置静态IP双链路负载分担
适用于:有多个以太WAN口的机型. 业务需求: 运营商1分配的接口IP为100.100.1.2,子网掩码为255.255.255.252,网关IP为100.100.1.1. 运营商2分配的接口IP为2 ...
- 交换机配置OSPF负载分担
组网图形 OSPF负载分担简介 等价负载分担ECMP(Equal-Cost Multiple Path),是指在两个网络节点之间同时存在多条路径时,节点间的流量在多条路径上平均分摊.负载分担的作用是减 ...
- 《ArcGIS Engine+C#实例开发教程》第四讲 状态栏信息的添加与实现
原文:<ArcGIS Engine+C#实例开发教程>第四讲 状态栏信息的添加与实现 摘要:在上一讲中,我们完成了 MapControl 和PageLayoutControl两种视图的同步 ...
- 如何设置nginx日志格式来查看负载分担结果
转载:http://www.cnblogs.com/LoveJulin/p/5082363.html nginx配置好负载分担后,测试的时候,如何查看负载分担情况:通过设置nginx日志显示: ng ...
- HCNA配置手工负载分担模式链路聚合
一.配置手工负载分担模式链路聚合 链路聚合(Link Aggregation)是将—组物理接口捆绑在一起作为一个逻辑接口来增加带宽的一种方法,又称为多接口负载均衡组(Load Sharing Grou ...
- 官网实例详解-目录和实例简介-keras学习笔记四
官网实例详解-目录和实例简介-keras学习笔记四 2018-06-11 10:36:18 wyx100 阅读数 4193更多 分类专栏: 人工智能 python 深度学习 keras 版权声明: ...
- EIGRP-16-其他和高级的EIGRP特性-2-非等价负载分担
与大多数内部路由协议不同的是, EIGRP能够将流量负载分到多条非等价路径上,而不仅仅使用去往目的地最近距离的那一条路径.提供这项功能的特性称为非等价负载分担. 非等价负载分担的核心概念是可行后继 ...
随机推荐
- requirements基本使用
requirements作用描述:很多 Python 项目中经常会包含一个 requirements.txt 文件,里面内容是项目的依赖包及其对应版本号的信息列表,即项目依赖关系清单,其作用是用来重新 ...
- day73:drf:drf视图相关类&路由Routers&创建虚拟环境
目录 1.APIView 2.GenericAPIView:通用视图类 3.5个视图扩展类:ListModelMixin,CreateModelMixin,RetrieveModelMixin,Upd ...
- apktool的下载,安装,反编译和重新打包
一.环境要求 安装java 1.8 以上 命令行运行 java -version 返回版本大于1.8 如果没有,请安装java 1.8 二.下载与安装 下载apktool_x.x.x.jar到本地 官 ...
- Spring Boot学习笔记(二)——HelloWorld实现
提示:要在Eclipse里使用Spring Boot,首先要安装STS插件,前面我们已经安装了STS插件了,可以创建Spring Boot项目了. 1.创建项目: 新建项目,选择Spring Boot ...
- 使用 tabindex 配合 focus-within 巧妙实现父选择器
本文将介绍一个不太实用的小技巧,使用 tabindex 配合 :focus-within 巧妙实现父选择器. CSS 中是否存在父选择器? 这是一个非常经典的问题,到目前为止,CSS 没有真正意义上被 ...
- 【转】Loading PNGs with SDL_image
FROM:http://lazyfoo.net/tutorials/SDL/06_extension_libraries_and_loading_other_image_formats/index2. ...
- httpx和requests之间有什么区别?
requests只能发送同步请求,httpx能够发送同步和异步请求. httpx的api和requests是兼容的,切换的成本几乎是零.在异步模式下,测试大量接口的话,httpx的速度是能够显著得到提 ...
- Java学习的第四十四天
1.例5.4将二维数组的行列互换 public class cjava { public static void main(String []args) { int [][]a=new int [][ ...
- OpenCascade拓扑对象之:有向边和共边
@font-face { font-family: "Times New Roman" } @font-face { font-family: "宋体" } @ ...
- Odoo环境搭建之问题readme
环境及工具 Windows,PyCharm Community Edition,postgresql-13.0-1 启动odoo环境 python odoo-bin 如果你只是还是空壳,启动odoo之 ...