HCIE-Security Day17:防火墙双机热备实验(五):防火墙旁挂交换机,交换机静态路由引流
双机热备比较常见的是旁挂部署在数据中心核心交换机上,且两台防火墙之间形成双机热备。
目录
旁挂组网的优点
实验五:防火墙旁挂交换机,交换机静态路由引流
需求和拓扑
操作步骤
1、公网部分
2、防火墙部分
3、核心交换部分
4、汇聚交换部分
5、接入交换部分
验证和分析
旁挂组网的优点
1、可以在不改变现有网络物理拓扑的情况下,将防火墙部署到网络中。
2、可以有选择低将通过核心交换机的流量引导到防火墙上,即对需要进行安全检测的流量引导到防火墙上进行处理,对不需要进行安全检测的流量直接通过交换机转发。
将流量由交换机引导到旁挂的防火墙上主要由两种常见方式:静态路由方式和策略路由方式,这一节就是通过实验验证静态路由方式。
一般核心交换机与上行路由器和下行汇聚交换机之间运行ospf,由于ospf的路由优先级高于静态路由,所以流量到达核心交换机后会根据ospf路由直接被转发到上行或者下行的设备,而不会根据静态路由被引流到防火墙上。
所以必须在核心交换机上配置vrf功能,将一台交换机虚拟成连接上行的交换机public和连接下行的交换机vrf。将两个交换机完全隔离出来,流量就会根据静态路由被送到防火墙上。
实验五:防火墙旁挂交换机,交换机静态路由引流
这个实验是比较综合的,主要的难点其实在核心交换机的配置上面,以及汇聚层stp和vrrp的配合。防火墙部分其实是比较简单的,无非是配置了两条上下行的静态路由,以及配置了vrrp和hrp。
需求和拓扑
两台FW旁挂在数据中心的核心交换机侧,保证数据中心网络安全。通过核心交换机的流量都会被引流到旁挂的FW上进行安全检测,引流的方式为静态路由方式。企业希望两台FW以主备备份方式工作。正常情况下,流量通过FW_A转发。当FW_A出现故障时,流量通过FW_B转发,保证业务不中断。
分析
如果希望通过静态路由方式将经过核心交换机的流量引导到FW,则需要在核心交换机上配置静态路由,下一跳为防火墙接口的地址。但是由于核心交换机与上行路由器和下行汇聚交换机之间运行OSPF,因此流量到达核心交换机后会直接被转发到上行或下行设备,而不会被引流到FW上。
所以如果希望通过静态路由引流,就必须在核心交换机上配置VRF功能,将一台交换机虚拟成连接上行的交换机(根交换机Public)和连接下行的交换机(虚拟交换机VRF)。由于虚拟出的两个交换机完全隔离开来,流量就会被送到FW上。即虚拟出的交换机分别和上行路由器之间运行ospf,和下行汇聚交换机之间运行ospf,但是交换机--防火墙--交换机之间运行静态路由。那么就需要在防火墙和一份为二的交换机各自配置vrrp备份组,使得它们可以通过vrrp备份组的虚拟地址进行通信。在FW上需要配置静态路由,下一跳分别为VRRP备份组3和VRRP备份组4的地址。在Public上配置静态路由,下一跳为VRRP备份组2的地址。在VRF上配置静态路由,下一跳为VRRP备份组1的地址。
对拓扑进行抽象
操作步骤
1、公网部分
1.1 接口地址配置
//r1和r2主要是对接口地址和环回口地址进行配置,保证后续路由可通 [r1]dis cu interface interface GigabitEthernet0/0/0ip address 12.1.1.1 255.255.255.0 interface GigabitEthernet0/0/1ip address 1.1.1.1 255.255.255.0 interface LoopBack0ip address 11.11.11.11 255.255.255.255 <r2>dis cu interface interface GigabitEthernet0/0/0ip address 12.1.1.2 255.255.255.0 interface GigabitEthernet0/0/1ip address 2.1.1.1 255.255.255.0 interface LoopBack0ip address 22.22.22.22 255.255.255.255
1.2 动态路由配置
<r1>dis cu con ospf [V200R003C00] # ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 11.11.11.11 0.0.0.0 network 12.1.1.1 0.0.0.0 //r2类似
2、防火墙部分
2.1 接口地址和安全区域配置
//接口地址 <f1>dis cu inter interface GigabitEthernet1/0/0ip address 10.0.0.1 255.255.255.0 interface GigabitEthernet1/0/1ip address 10.1.0.1 255.255.255.0 interface GigabitEthernet1/0/6ip address 10.10.0.1 255.255.255.0 //安全区域 dis cu con zone firewall zone trustadd interface GigabitEthernet0/0/0add interface GigabitEthernet1/0/0 firewall zone untrustadd interface GigabitEthernet1/0/1 firewall zone dmzadd interface GigabitEthernet1/0/6 //f2配置类似
2.2 静态路由配置
//f1<f1>dis cu | in ip rou 2022-02-19 12:57:48.310 ip route-static 0.0.0.0 0.0.0.0 10.1.0.6 ip route-static 192.168.0.0 255.255.0.0 10.0.0.6 //f2类似
2.3、双机热备配置
2.3.1 配置vrrp备份组
interface GigabitEthernet1/0/0vrrp vrid 1 virtual-ip 10.0.0.3 active interface GigabitEthernet1/0/1vrrp vrid 2 virtual-ip 10.1.0.3 active
2.3.2 配置hrp检测
hrp interface GigabitEthernet1/0/6 remote 10.10.0.2
2.3.3 启动双机热备
hrp
2.4、配置安全策略
security-policyrule name 1source-zone trustsource-zone untrustdestination-zone trustdestination-zone untrustaction permit
3、核心交换部分
3.1 虚拟交换机配置
//配置vrf实例<s1>dis cu configuration vpn-instance ip vpn-instance vrfipv4-familyroute-distinguisher 100:1vpn-target 111:1 export-extcommunityvpn-target 111:1 import-extcommunity//绑定到接口 interface Vlanif1ip binding vpn-instance vrf interface Vlanif2ip binding vpn-instance vrf //s2类似
3.2 vlan接口配置
vlan batch 2 3 5 interface Vlanif1ip address 10.2.0.1 255.255.255.0 interface Vlanif2ip address 10.0.0.4 255.255.255.0interface Vlanif3ip address 10.1.0.4 255.255.255.0interface Vlanif5ip address 1.1.1.2 255.255.255.0//s2配置类似
3.3 物理接口划分
interface GigabitEthernet0/0/1port link-type accessport default vlan 5 interface GigabitEthernet0/0/2port link-type accessport default vlan 2 interface GigabitEthernet0/0/3port link-type accessport default vlan 3 interface GigabitEthernet0/0/4port link-type access interface GigabitEthernet0/0/5port link-type access interface GigabitEthernet0/0/6port link-type trunkport trunk allow-pass vlan 2 interface GigabitEthernet0/0/7port link-type trunkport trunk allow-pass vlan 3
3.4 路由配置
//静态<s1>dis cu | in ip rou ip route-static 192.168.0.0 255.255.0.0 10.1.0.3 ip route-static vpn-instance vrf 11.11.11.11 255.255.255.255 10.0.0.3 ip route-static vpn-instance vrf 22.22.22.22 255.255.255.255 10.0.0.3 //ospf<s1>dis cu configuration ospf ospf 1 router-id 1.1.1.3import-route staticarea 0.0.0.0network 1.1.1.2 0.0.0.0 ospf 2 router-id 1.1.2.1 vpn-instance vrfimport-route staticarea 0.0.0.0network 10.2.0.1 0.0.0.0 //s2类似
3.5 vrrp配置
interface Vlanif2vrrp vrid 3 virtual-ip 10.0.0.6vrrp vrid 3 priority 120interface Vlanif3vrrp vrid 4 virtual-ip 10.1.0.6vrrp vrid 4 priority 120
4、汇聚交换部分
4.1 vlan接口配置
//s3有3个接口,vlanif1负责和上游的s1连接,vlanif2负责做192.168.1.0/24 //的网关,vlanif3负责做192.168.2.0/24的网关。当然vlanif2和vlanif3都是配置 //vrrp的,并且做了负载分担,与mstp做绑定。 vlan batch 1 2 3 interface Vlanif1ip address 10.2.0.3 255.255.255.0 interface Vlanif2ip address 192.168.1.254 255.255.255.0interface Vlanif3ip address 192.168.2.254 255.255.255.0//s4的配置类似
4.2 物理接口划分
interface GigabitEthernet0/0/1port link-type access interface GigabitEthernet0/0/2port link-type trunkundo port trunk allow-pass vlan 1port trunk allow-pass vlan 2 to 3 interface GigabitEthernet0/0/3port link-type access interface GigabitEthernet0/0/4port link-type trunkport trunk allow-pass vlan 2 to 3 interface GigabitEthernet0/0/5port link-type trunkport trunk allow-pass vlan 2 to 3 interface GigabitEthernet0/0/6port link-type trunkport trunk allow-pass vlan 2 to 3 interface GigabitEthernet0/0/7port link-type trunkport trunk allow-pass vlan 2 to 3
4.3 mstp配置
//配置mstp多实例<s3>dis cu configuration mst-region stp region-configurationregion-name huaweirevision-level 12instance 10 vlan 2instance 20 vlan 3active region-configuration stp instance 10 root primary stp instance 20 root secondary //s4类似
4.4 vrrp配置
interface Vlanif2ip address 192.168.1.254 255.255.255.0vrrp vrid 1 virtual-ip 192.168.1.252vrrp vrid 1 priority 120 interface Vlanif3ip address 192.168.2.254 255.255.255.0vrrp vrid 2 virtual-ip 192.168.2.252
4.5 路由配置
ospf 2 router-id 1.1.2.3area 0.0.0.0network 10.2.0.3 0.0.0.0network 192.168.0.0 0.0.255.255//s4类似
5、接入交换部分
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 2 to 3 # interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 2 to 3 # interface Ethernet0/0/1port link-type accessport default vlan 2
验证和分析
1、检查路由情况
<r1>dis ip routing-table | inc 192.168 Route Flags: R - relay, D - download to fib Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.0.0/16 O_ASE 150 1 D 1.1.1.2 GigabitEthernet0/0/1[s3]dis ip routing-table | inc 11.11.11.11 Route Flags: R - relay, D - download to fib Destination/Mask Proto Pre Cost Flags NextHop Interface11.11.11.11/32 O_ASE 150 1 D 10.2.0.2 Vlanif1
2、检查vrrp备份组情况
HRP_M<f1>dis vrrp 2022-02-19 13:09:05.960 GigabitEthernet1/0/0 | Virtual Router 1State : MasterVirtual IP : 10.0.0.3Master IP : 10.0.0.1PriorityRun : 120PriorityConfig : 100MasterPriority : 120Preempt : YES Delay Time : 0 sTimerRun : 60 sTimerConfig : 60 sAuth type : NONEVirtual MAC : 0000-5e00-0101Check TTL : YESConfig type : vgmp-vrrpBackup-forward : disabledCreate time : 2022-02-19 10:34:43Last change time : 2022-02-19 10:34:46GigabitEthernet1/0/1 | Virtual Router 2State : MasterVirtual IP : 10.1.0.3Master IP : 10.1.0.1PriorityRun : 120PriorityConfig : 100MasterPriority : 120Preempt : YES Delay Time : 0 sTimerRun : 60 sTimerConfig : 60 sAuth type : NONEVirtual MAC : 0000-5e00-0102Check TTL : YESConfig type : vgmp-vrrpBackup-forward : disabledCreate time : 2022-02-19 10:34:43Last change time : 2022-02-19 10:34:46
3、检查双机热备情况
HRP_M<f1>dis hrp state verbose 2022-02-19 13:09:33.120 Role: active, peer: standbyRunning priority: 45000, peer: 45000Detail information:GigabitEthernet1/0/0 vrrp vrid 1: activeGigabitEthernet1/0/1 vrrp vrid 2: activeospf-cost: +0ospfv3-cost: +0bgp-cost: +0 HRP_S<f2>dis hrp state verbose 2022-02-19 13:10:35.010 Role: standby, peer: activeRunning priority: 45000, peer: 45000Detail information:GigabitEthernet1/0/0 vrrp vrid 1: standbyGigabitEthernet1/0/1 vrrp vrid 2: standbyospf-cost: +65500ospfv3-cost: +65500bgp-cost: +100
HCIE-Security Day17:防火墙双机热备实验(五):防火墙旁挂交换机,交换机静态路由引流相关推荐
- 华为防火墙双机热备(VGMP+HRP)理论+实操!
文章目录 前言 一:华为防火墙双机热备理论 1.1:概念 1.2:特点 1.3:华为防火墙双机热备的方式 二:华为防火墙双机热备实验 2.1:环境 2.2:拓扑图 2.3:实验目的 2.4:实验过程 ...
- 华为eNSP下防火墙双机热备的实现以及在HRP配置错误时的现象
华为防火墙双机热备基础教程 [华为官方视频] https://ilearningx.huawei.com/courses/course-v1:HuaweiX+EBGTC00000189+2018.9/ ...
- 华为防火墙双机热备技术:HRP、VGMP、VRRP,三大技术值得一学!
防火墙双机热备,主要是提供冗余备份的功能,在网络发生故障的时候避免业务出现中断.防火墙双机热备组网根据防火墙的模式, 分路由模式下的双机热备组网和透明模式下的双机热备组网,下面分别根据防火墙的不同模式 ...
- 华为防火墙双机热备学习笔记(V500)
华为防火墙双机热备学习笔记(V500) 双机产生背景 防火墙与路由器.三层交换机设备双机部署的差别 双机热备协议架构 HRP 心跳线 防火墙的双机部署 VRRP 虚拟路由冗余协议 VGMP vrrp组 ...
- 防火墙实验二——实现域间、域内双向NAT、双机热备实验
实验的拓扑图 这个图是基于防火墙一的图,里面的基本配置都是基于上一个实验来进行的 图片里面交换机.防火墙等的配置 域间双向NAT 首先建立一个新的域间双向的NAT策略 对于源转换地址池的配置 对于目的 ...
- 防火墙双机热备配置实例(三)
今天继续给大家介绍HCIE安全系列相关内容.本文以华为eNSP模拟器为例,实现了配置防火墙双击热备技术配置实例,采用的是上下行交换机配置VRRP的主备模式. 阅读本文,您需要有一定的防火墙配置基础和防 ...
- 防火墙双机热备配置实例(一)
今天继续给大家介绍HCIE安全.本文以华为eNSP模拟器为例,实现了配置防火墙双击热备技术配置实例,采用的是上下行交换机配置VRRP的主备模式. 阅读本文,您需要有一定的防火墙配置基础和防火墙双机热备 ...
- 防火墙双机热备,DHCP服务器,核心交换机负载分担及冗余设计
文章目录 目录: 一.防火墙双机热备技术概念 二.配合使用的相关技术指导 三.设计要求及拓扑图 四:配置过程及相应命令 总结 一.防火墙热备概述: 一般而言,防火墙部署于公司网络的出口 ...
- 防火墙双机热备+负载分担
防火墙双机热备+负载分担实验步骤 防火墙双机热备+负载分担实验以及两者之间的区别,通过实验.配置思路加深理解 负载分担: 防火墙双击热备和负载分担的区别就在于在双机热备模式下,fw1既是pc1的网关, ...
- 华为ENSP之防火墙双机热备
实验目的 防火墙现网典型应用-双机热备 实验过程 分别实现二层,三层的双机热备配置 a.上下联二层环境 接口IP配置举例 int g1/0/0 ip add 10.1.12.253 24 int g1 ...
最新文章
- [转]Anaconda
- python cookbook 小结
- 广告传媒实际税负怎么计算_建材销售类营业额3亿,缺进项致税负高?成立4家独资企业节税90%...
- mysql序列 mybatis_MySQL实现序列(Sequence)效果以及在Mybatis中如何使用这种策略
- tp中自定义跳转页面
- JS处理数据四舍五入
- Luogu3825[NOI2017] 游戏
- 软件测试 之Web项目实战解析(附全套实战项目教程+视频+源码)
- java map 修改键值对_MAP键值对
- C语言基础题练习10道
- Windows平台安装flutter之初体验(安装教程)
- 移动通信基础(5)信道估计
- list去重及求两个list中元素的重复率
- 无向简单图怎么判断_简单图的判定
- html鼠标放上虚化背景图片,如何将网页CSS背景图高斯模糊且全屏显示
- Flutter 自定义组件实战之Cupertino(iOS)风格的复选框
- 【索引分类】位图索引
- Python全国计算机等级考试(2021)
- 中国开源人访谈系列之:清风博主
- 关于如何理解Glibc堆管理器(Ⅹ——完结、补充、注释——Arena、heap_info、malloc_*)