On the network shown in Figure 1, the service interfaces of two FWs work at Layer 3 and are directly connected to routers. The FWs and directly connected routers run OSPF.
The FWs are required to work in load balancing mode. In normal cases, FW_A forwards traffic from Dept. A (IP address range: 10.3.0.51 to 10.3.0.100), and FW_B forwards traffic from Dept. B (IP address range: 10.3.0.101 to 10.3.0.150). If either FW fails, the other FW forwards all traffic to ensure service continuity.
To enable private network users to access the Internet, you need to configure a source NAT policy on FW_A and FW_B.
If FW_A and FW_B share one NAT address pool (1.1.1.10) and work properly, they may translate the source IP addresses and source ports of the packets sent from different hosts into the same pair of public IP address and port. To prevent port conflicts, you must specify different port ranges for the active and standby devices.
In this load balancing networking, FWs connect to routers in both upstream and downstream directions. On live networks, you must determine whether OSPF is required based on the upstream and downstream devices and interfaces. The Source NAT configuration remains unchanged.
This example does not apply when uplink interfaces connect to different ISP networks.
Item |
FW_A |
FW_B |
|
|---|---|---|---|
Interface |
GigabitEthernet 0/0/1 IP address: 10.2.0.1/24 Security zone: Untrust GigabitEthernet 0/0/3 IP address: 10.3.0.1/24 Security zone: Trust GigabitEthernet 0/0/7 IP address: 10.10.0.1/24 Security zone: DMZ |
GigabitEthernet 0/0/1 IP address: 10.2.1.1/24 Security zone: Untrust GigabitEthernet 0/0/3 IP address: 10.3.1.1/24 Security zone: Trust GigabitEthernet 0/0/7 IP address: 10.10.0.2/24 Security zone: DMZ |
|
OSPF |
Process ID: 10 Area ID: 0 Network segment for the area: 10.2.0.0/24, 10.3.0.0/24 and 1.1.1.10/32 |
Process ID: 10 Area ID: 0 Network segment for the area: 10.2.0.0/24, 10.3.0.0/24 and 1.1.1.10/32 |
|
of OSPF process 1. In the navigation tree, choose .Area |
0.0.0.0 |
|---|---|
IP Network |
10.2.0.0 |
Mask/Wildcard Mask |
255.255.255.0 |
Area |
0.0.0.0 |
|---|---|
IP Network |
10.3.0.0 |
Mask/Wildcard Mask |
255.255.255.0 |
Set Route Type to UNR.
of OSPF process 10. In the navigation tree, choose .Area |
0.0.0.0 |
|---|---|
IP Network |
10.2.1.0 |
Mask/Wildcard Mask |
255.255.255.0 |
Area |
0.0.0.0 |
|---|---|
IP Network |
10.3.1.0 |
Mask/Wildcard Mask |
255.255.255.0 |
Set Route Type to UNR.
In the hot standby load balancing scenario, If NAPT is configured, the FWs may have conflicting public ports. To prevent such conflicts, configure respective NAT resources (including public IP addresses and ports) for the FWs. You can run the hrp nat resource primary-group command on the active FW. The standby FW will automatically generate the hrp nat resource secondary-group command (if you run the hrp nat resource secondary-group command on the active FW, the standby FW will automatically generate the hrp nat resource primary-group command).
HRP_M[FW_A] hrp nat resource primary-group
The NAT address pool configured on FW_A is automatically backed up to FW_B.
The NAT policy configured on FW_A is automatically backed up to FW_B.
On FW_A and FW_B, choose to view hot standby status. If the following information is displayed, HRP is successfully configured. Normally, Working Mode is Load Sharing for both FW_A and FW_B; Current Status is Active for FW_A and Standby for FW_B. In this case, both FW forward traffic.
Choose and check Matching Count.

On FW_A and FW_B, view the session table. If the post-NAT IP address is an IP address in the NAT address pool, the NAT policy is successfully configured.
To view the session table, choose .

The services are still available even if an interface fault occurs on FW_A. Working Mode is Active/Standby Backup for both FW_A and FW_B; Current Status is Standby for FW_A and Active for FW_B. In this case, FW_B only forwards traffic.
FW_A |
FW_B |
|---|---|
# hrp mirror session enable hrp enable hrp interface GigabitEthernet 0/0/7 remote 10.10.0.2 # hrp nat resource primary-group # hrp track interface GigabitEthernet 0/0/1 hrp track interface GigabitEthernet 0/0/3 # interface GigabitEthernet 0/0/7 ip address 10.10.0.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/1 # firewall zone dmz set priority 50 add interface GigabitEthernet 0/0/7 # ospf 10 import-route unr area 0.0.0.0 network 10.2.0.0 0.0.0.255 network 10.3.0.0 0.0.0.255 # nat address-group addressgroup1 mode pat route enable section 0 1.1.1.10 1.1.1.10 # security-policy rule name policy_sec_1 source-zone local source-zone trust source-zone untrust destination-zone local destination-zone trust destination-zone untrust action permit # nat-policy rule name policy_nat_1 source-zone trust destination-zone untrust action- source-nat address-group addressgroup1 |
# hrp mirror session enable hrp enable hrp interface GigabitEthernet 0/0/7 remote 10.10.0.1 # hrp nat resource secondary-group # hrp track interface GigabitEthernet 0/0/1 hrp track interface GigabitEthernet 0/0/3 # interface GigabitEthernet 0/0/7 ip address 10.10.0.2 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/1 # firewall zone dmz set priority 50 add interface GigabitEthernet 0/0/7 # ospf 10 import-route unr area 0.0.0.0 network 10.2.1.0 0.0.0.255 network 10.3.2.0 0.0.0.255 # nat address-group addressgroup1 mode pat route enable section 0 1.1.1.10 1.1.1.10 # security-policy rule name policy_sec_1 source-zone local source-zone trust source-zone untrust destination-zone local destination-zone trust destination-zone untrust action permit # nat-policy rule name policy_nat_1 source-zone trust destination-zone untrust action- source-nat address-group addressgroup1 |