古人已用三冬足,年少今开万卷余。这篇文章主要讲述华为防火墙VRRP直路部署,上下行连接交换机相关的知识,希望能为你提供帮助。
项目需求企业的两台FW的业务接口都工作在三层,上下行分别连接二层交换机。上行交换机连接运营商的接入点,运营商为企业分配的IP地址为1.1.1.1。现在希望两台FW以主备备份方式工作。正常情况下,流量通过FW_A转发。当FW_A出现故障时,流量通过FW_B转发,保证业务不中断。
eNSP拓扑
配置步骤[FW1]interface GigabitEthernet 1/0/1
[FW1-GigabitEthernet1/0/1]ip address 10.2.0.1 24
[FW1-GigabitEthernet1/0/1]quit
[FW1]interface GigabitEthernet 1/0/3
[FW1-GigabitEthernet1/0/3]ip address 10.3.0.1 24
[FW1-GigabitEthernet1/0/3]quit
[FW1]interface GigabitEthernet 1/0/6
[FW1-GigabitEthernet1/0/6]ip address 10.10.10.1 24
[FW1-GigabitEthernet1/0/6]quit
[FW1]firewall zone trust
[FW1-zone-trust]add interface GigabitEthernet 1/0/3
[FW1-zone-trust]quit
[FW1]firewall zone untrust
[FW1-zone-untrust]add interface GigabitEthernet 1/0/1
[FW1-zone-untrust]quit
[FW1]firewall zone dmz
[FW1-zone-dmz]add interface GigabitEthernet 1/0/6
[FW1-zone-dmz]quit
[FW2]interface GigabitEthernet 1/0/1
[FW2-GigabitEthernet1/0/1]ip address 10.2.0.2 24
[FW2-GigabitEthernet1/0/1]quit
[FW2]interface GigabitEthernet 1/0/3
[FW2-GigabitEthernet1/0/3]ip address 10.3.0.2 24
[FW2-GigabitEthernet1/0/3]quit
[FW2]interface GigabitEthernet 1/0/6
[FW2-GigabitEthernet1/0/6]ip address 10.10.10.2 24
[FW2-GigabitEthernet1/0/6]quit
[FW2]firewall zone trust
[FW2-zone-trust]add interface GigabitEthernet 1/0/3
[FW2-zone-trust]quit
[FW2]firewall zone untrust
[FW2-zone-untrust]add interface GigabitEthernet 1/0/1
[FW2-zone-untrust]quit
[FW2]firewall zone dmz
[FW2-zone-dmz]add interface GigabitEthernet 1/0/6
[FW2-zone-dmz]quit
FW1:
[FW1]ip route-static 0.0.0.0 0.0.0.0 1.1.1.10
FW2
[FW2]ip route-static 0.0.0.0 0.0.0.0 1.1.1.10
FW1
[FW1]interface GigabitEthernet 1/0/1
[FW1-GigabitEthernet1/0/1]vrrp vrid 1 virtual-ip 1.1.1.1 24 active
[FW1-GigabitEthernet1/0/1]quit
[FW1]interface GigabitEthernet 1/0/3
[FW1-GigabitEthernet1/0/3]vrrp vrid 2 virtual-ip 10.3.0.3 active
[FW1-GigabitEthernet1/0/3]quit
FW2
[FW2]interface GigabitEthernet 1/0/1
[FW2-GigabitEthernet1/0/1]vrrp vrid 1 virtual-ip 1.1.1.1 24 standby
[FW2-GigabitEthernet1/0/1]quit
[FW2]interface GigabitEthernet 1/0/3
[FW2-GigabitEthernet1/0/3]vrrp vrid 2 virtual-ip 10.3.0.3 standby
[FW2-GigabitEthernet1/0/3]quit
FW1
[FW1]hrp enable
HRP_S[FW1]hrp interface GigabitEthernet 1/0/6 remote 10.10.10.2
HRP_M[FW1]quit
HRP_M<
FW1>
sy
FW2
[FW2]hrp enable
HRP_S[FW2]hrp interface GigabitEthernet 1/0/6 remote 10.10.10.1
HRP_M[FW2]quit
HRP_M<
FW2>
sy
FW1
HRP_M[FW1]security-policy
HRP_M[FW1-policy-security] rule name trust_to_untrust
HRP_M[FW1-policy-security-rule-trust_to_untrust]source-zone trust
HRP_M[FW1-policy-security-rule-trust_to_untrust]destination-zone untrust
HRP_M[FW1-policy-security-rule-trust_to_untrust]source-address 10.3.0.0 24
HRP_M[FW1-policy-security-rule-trust_to_untrust]action permit
FW2
HRP_M[FW2]security-policy
HRP_M[FW2-policy-security] rule name trust_to_untrust
HRP_M[FW2-policy-security-rule-trust_to_untrust]source-zone trust
HRP_M[FW2-policy-security-rule-trust_to_untrust]destination-zone untrust
HRP_M[FW2-policy-security-rule-trust_to_untrust]source-address 10.3.0.0 24
HRP_M[FW2-policy-security-rule-trust_to_untrust]action permit
FW1:
# 配置NAT策略,当内网用户访问Internet时,将源地址由10.3.0.0/16网段转换为地址池中的地址(1.1.1.2-1.1.1.5)。
HRP_M[FW1]nat address-group group1
HRP_M[FW1-address-group-group1]section 0 1.1.1.2 1.1.1.5
HRP_M[FW1-address-group-group1]security-policy
HRP_M[FW1-policy-security] rule name trust_to_untrust
HRP_M[FW1-policy-security-rule-trust_to_untrust]source-zone trust
HRP_M[FW1-policy-security-rule-trust_to_untrust]destination-zone untrust
HRP_M[FW1-policy-security-rule-trust_to_untrust]source-address 10.3.0.0 24
HRP_M[FW1-policy-security-rule-trust_to_untrust]action permit
HRP_M[FW1-policy-security-rule-trust_to_untrust]nat-policy
HRP_M[FW1-policy-nat] rule name policy_nat1
HRP_M[FW1-policy-nat-rule-policy_nat1] source-zone trust
HRP_M[FW1-policy-nat-rule-policy_nat1] destination-zone untrust
HRP_M[FW1-policy-nat-rule-policy_nat1]source-address 10.3.0.0 16
HRP_M[FW1-policy-nat-rule-policy_nat1]action source-nat address-group group1
FW2
HRP_M[FW2]nat address-group group1
HRP_M[FW2-address-group-group1]section 0 1.1.1.2 1.1.1.5
HRP_M[FW2-address-group-group1]security-policy
HRP_M[FW2-policy-security] rule name trust_to_untrust
HRP_M[FW2-policy-security-rule-trust_to_untrust]source-zone trust
HRP_M[FW2-policy-security-rule-trust_to_untrust]destination-zone untrust
HRP_M[FW2-policy-security-rule-trust_to_untrust]source-address 10.3.0.0 24
HRP_M[FW2-policy-security-rule-trust_to_untrust]action permit
HRP_M[FW2-policy-security-rule-trust_to_untrust]nat-policy
HRP_M[FW2-policy-nat] rule name policy_nat1
HRP_M[FW2-policy-nat-rule-policy_nat1]source-zone trust
HRP_M[FW2-policy-nat-rule-policy_nat1]destination-zone untrust
HRP_M[FW2-policy-nat-rule-policy_nat1]source-address 10.3.0.0 16
HRP_M[FW2-policy-nat-rule-policy_nat1]action source-nat address-group group1
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 1.1.1.10 24
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]ip route-static 0.0.0.0 16 1.1.1.1
结果验证
FW1:
【华为防火墙VRRP直路部署,上下行连接交换机】
FW2:
FW1:
FW2:
FW1:
FW2:
推荐阅读
- 网络协议之:memcached binary protocol详解
- #yyds干货盘点# 解决剑指offer(数据流中的中位数)
- 安装MySQL
- [ C语言 ] 还不懂指针的一定要进来,带你初识指针,简单使用指针,它没有你想的那么难。
- 机器人工程就业面如何前景是否广阔
- zabbix--源码安装报错总结
- ROS1机器人多机网络通信案例turtlesim
- ROS2 Humble测试版安装笔记
- zabbix--图形字体乱码