第九课:eNSP VRRP虚拟路由冗余协议配置教程(防火墙双机热备) |
您所在的位置:网站首页 › 群晖双机热备教程 › 第九课:eNSP VRRP虚拟路由冗余协议配置教程(防火墙双机热备) |
系列文章目录 第一课:eNSP第一个网络拓扑配置教程 第二课:eNSP vlan网络拓扑图配置教程 第三课:eNSP WIFI网络拓扑配置教程 第四课:eNSP 路由器路由配置拓扑教程 第五课:eNSP DHCP拓扑配置教程 第六课:eNSP 防火墙拓扑配置教程 第七课:eNSP 单臂路由/多臂路由拓扑配置教程 第八课:eNSP 链路聚合2种方式(手工模式和LACP模式)拓扑配置教程 目录 一、术语&命令说明 二、防火墙双机热备 1、绘制拓扑图 2、配置各个设备的ip 3、配置防火墙区域 4、配置安全策略 5、配置VRRP双机热备 6、配置AR1的静态路由 三、验证 一、术语&命令说明VRRP(Virtual Router Redundancy Protocol),即虚拟路由冗余协议,它是一种容错协议。它通过把几台路由设备联合组成一台虚拟的路由设备,实现网关设备的主备备份,保障网络的可靠通信。 VRRP协议解释VRRP路由器运行VRRP协议的路由器,一个或多个实例的路由器。VRRP组由一组VRRP路由器组成,形成一个备份组,在功能上相当于一台虚拟路由器。在一个VRRP组内的多个路由器接口共用一个虚拟IP地址,这个虚拟IP地址被作为局域网内所有主机的缺省(默认)网关地址。虚拟路由器标识VRID(Virtual Router ID),用于标识VRRP组中的路由器。在同一个VRRP组内的路由器必须有相同的VRID。Master路由器在VRRP组中处于主状态,负责接收发送至用户网关的数据包并进行转发,以及响应PC对于其网关IP地址的ARP请求。Backup路由器在VRRP组中处于备份状态,侦听Master路由器的状态,并在Master路由器发生故障时,接替其工作,从而保证业务流量的平滑切换。Master选举依据优先使用VRRP优先级来选举,优先级取值范围是0~255,默认为100。该值越大,优先级越高。 如果优先级一样,则通过接口的IP地址来选举,IP越大,优先级越高。VRRP报文封装在IP报文里,通过组播地址224.0.0.18发送,TTL为255,协议号为112。HRP(Huawei Redundancy Protocol),即华为冗余备份协议,用来实现防火墙双机之间动态状态数据和关键配置命令的备份。 命令 说明vrrp vrid virtual-ip / [active|standby] VRRP(虚拟路由器冗余协议)的命令: vrrp:启用VRRP。 vrid:虚拟路由器冗余ID,这是你为VRRP组分配的ID。virtual-ip:虚拟IP地址,这是在VRRP组内所有路由器上设置的公共IP地址。 active:使虚拟IP地址处于活动状态。 这条命令的作用是为VRRP组设置一个虚拟IP地址,这样即使主用路由器出现故障,备用路由器也可以继续处理流量,从而提供冗余性。 standby: 通常指的是这个配置是备用路由器的配置。 二、防火墙双机热备 1、绘制拓扑图 2、配置各个设备的ipAR1: [Huawei]int g0/0/0 [Huawei-GigabitEthernet0/0/0]ip add 10.1.1.1 24 [Huawei-GigabitEthernet0/0/0]q [Huawei]int LoopBack 0 [Huawei-LoopBack0]ip add 1.1.1.1 24 FW1: [USG6000V1]sysname FW1 // 改名字 [FW1]undo info-center enable // 关闭更新提示 [FW1]int g1/0/0 [FW1-GigabitEthernet1/0/0]ip add 10.1.1.101 24 [FW1-GigabitEthernet1/0/0]int g1/0/1 [FW1-GigabitEthernet1/0/1]ip add 172.16.1.1 24 [FW1-GigabitEthernet1/0/1]int g1/0/2 [FW1-GigabitEthernet1/0/2]ip add 192.168.1.101 24 FW2: [USG6000V1]sysname FW2 [FW1]undo info-center enable [FW2]int g1/0/0 [FW2-GigabitEthernet1/0/0]ip add 10.1.1.102 24 [FW2-GigabitEthernet1/0/0]int g1/0/1 [FW2-GigabitEthernet1/0/1]ip add 172.16.1.2 24 [FW2-GigabitEthernet1/0/1]int g1/0/2 [FW2-GigabitEthernet1/0/2]ip add 192.168.1.102 24 PC1和PC2: 3、配置防火墙区域FW1: [FW1]firewall zone trust [FW1-zone-trust]add int g1/0/2 [FW1-zone-trust]firewall zone untrust [FW1-zone-untrust]add int g1/0/0 [FW1-zone-untrust]firewall zone dmz [FW1-zone-dmz]add int g1/0/1 [FW1-zone-dmz]q FW2: [FW2]firewall zone trust [FW2-zone-trust]add int g1/0/2 [FW2-zone-trust]fi [FW2-zone-trust]firewall zone untrust [FW2-zone-untrust]add int g1/0/0 [FW2-zone-untrust]firewall zone dmz [FW2-zone-dmz]add int g1/0/1 4、配置安全策略FW1: [FW1]security-policy [FW1-policy-security]rule name heart [FW1-policy-security-rule-heart]source-zone local [FW1-policy-security-rule-heart]destination-zone dmz [FW1-policy-security-rule-heart]action permit [FW1-policy-security-rule-heart]q [FW1-policy-security]rule name tru_to_untru [FW1-policy-security-rule-tru_to_untru]source-zone trust [FW1-policy-security-rule-tru_to_untru]destination-zone untrust [FW1-policy-security-rule-tru_to_untru]action permit FW2: [FW2]security-policy [FW2-policy-security]rule name heart [FW2-policy-security-rule-heart]source-zone local [FW2-policy-security-rule-heart]destination-zone dmz [FW2-policy-security-rule-heart]action permit [FW2-policy-security-rule-heart]q [FW2-policy-security]rule name tru_to_untru [FW2-policy-security-rule-tru_to_untru]source-zone trust [FW2-policy-security-rule-tru_to_untru]destination-zone untrust [FW2-policy-security-rule-tru_to_untru]action permit 5、配置VRRP双机热备PC1 无法ping通AR1,因为PC1的网关写的是待配置的虚拟网关ip;还有一个原因是没配置静态ip FW1: [FW1]int g1/0/0 [FW1-GigabitEthernet1/0/0]vrrp vrid 1 virtual-ip 10.1.1.100 active // 配置上行链路接口的虚拟ip [FW1-GigabitEthernet1/0/0]q [FW1]int g1/0/2 [FW1-GigabitEthernet1/0/2]vrrp vrid 2 virtual-ip 192.168.1.100 active // 配置下行链路的接口虚拟ip [FW1-GigabitEthernet1/0/2]q [FW1]hrp int g1/0/1 remote 172.16.1.2 // 配置心跳线,ip为对端ip [FW1]hrp enable // 开启双机热备功能 HRP_S[FW1]hrp auto-sync // 设置双机热备为自动备份 FW2: [FW2]int g1/0/0 [FW2-GigabitEthernet1/0/0]vrrp vrid 1 virtual-ip 10.1.1.100 standby [FW2-GigabitEthernet1/0/0]int g1/0/2 [FW2-GigabitEthernet1/0/2]vrrp vrid 2 virtual-ip 192.168.1.100 standby [FW2-GigabitEthernet1/0/2]q [FW2]hrp int g1/0/1 remote 172.16.1.1 [FW2]hrp enable HRP_S[FW2]hrp auto-sync 6、配置AR1的静态路由 [Huawei]ip route-static 192.168.1.0 24 10.1.1.100 三、验证PC1 ping通 AR1 继续验证:可以将master防火墙,即FW1的接口shutdown,通过抓包查看是否通过FW2备用交换机正常通信。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |