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, and FW_B forwards traffic from Dept. B. If either FW fails, the other FW forwards all traffic to ensure service continuity.
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 |
|
# Configure OSPF on FW_A.
[FW_A] ospf 10 [FW_A-ospf-100] import-route unr [FW_A-ospf-100] area 0 [FW_A-ospf-100-area-0.0.0.0] network 10.2.0.0 0.0.0.255 [FW_A-ospf-100-area-0.0.0.0] network 10.3.0.0 0.0.0.255
# Configure OSPF on FW_B.
[FW_B] ospf 10 [FW_B-ospf-100] import-route unr [FW_B-ospf-100] area 0 [FW_B-ospf-100-area-0.0.0.0] network 10.2.1.0 0.0.0.255 [FW_B-ospf-100-area-0.0.0.0] network 10.3.1.0 0.0.0.255
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).
[FW_A] hrp nat resource primary-group
The security policy configured on FW_A is automatically backed up to FW_B.
HRP_M[FW_A] security-policy HRP_M[FW_A-policy-security] rule name policy_sec_1 HRP_M[FW_A-policy-security-rule-policy_sec_1] source-zone local trust untrust HRP_M[FW_A-policy-security-rule-policy_sec_1] destination-zone local trust untrust HRP_M[FW_A-policy-security-rule-policy_sec_1] action permit HRP_M[FW_A-policy-security-rule-policy_sec_1] quit HRP_M[FW_A-policy-security] quit
The NAT address pool configured on FW_A is automatically backed up to FW_B.
HRP_M[FW_A] nat address-group addressgroup1 HRP_M[FW_A-nat-address-group-addressgroup1] section 0 1.1.1.10 1.1.1.10 HRP_M[FW_A-nat-address-group-addressgroup1] mode pat HRP_M[FW_A-nat-address-group-addressgroup1] route enable HRP_M[FW_A-nat-address-group-addressgroup1] quit
The NAT policy configured on FW_A is automatically backed up to FW_B.
HRP_M[FW_A] nat-policy HRP_M[FW_A-policy-nat] rule name policy_nat_1 HRP_M[FW_A-policy-nat-policy_nat_1] source-zone trust HRP_M[FW_A-policy-nat-policy_nat_1] destination-zone untrust HRP_M[FW_A-policy-nat-policy_nat_1] action source-nat address-group addressgroup1 HRP_M[FW_A-policy-nat-policy_nat_1] quit HRP_M[FW_A-policy-nat] quit
Run the display hrp state command on FW_A and FW_B respectively to check the HRP status. The following command output shows that HRP is configured successfully.
HRP_M[FW_A] display hrp state
Role: active, peer: active
Running priority: 49010, peer: 49010
Backup channel usage: 3%
Stable time: 0 days, 5 hours, 1 minutes
HRP_S[FW_B] display hrp state
Role: active, peer: active
Running priority: 49010, peer: 49010
Backup channel usage: 3%
Stable time: 0 days, 5 hours, 1 minutes
Run the display firewall session table command on FW_A and FW_B respectively to search for an entry whose source address is the private address of an intranet PC. If the entry exists and the post-NAT IP address exists in the NAT address pool, the NAT policy is successfully configured. Information in the brackets ([]) is the post-NAT or IP address.
HRP_M<FW> display firewall session table
Current Total Sessions : 1
http VPN:public --> public 10.3.2.55:2474[1.1.1.10:3761]-->3.3.3.3:80
When FW_A becomes faulty, run the display hrp state command on FW_A and FW_B respectively to check the HRP status. The following command output shows a successful active/standby device switchover.
HRP_M[FW_A] display hrp state
Role:standby, peer: active (shoule be "active-active")
Running priority: 49012, peer: 49010
Backup channel usage: 0%
Stable time: 0 days, 0 hours, 0 minutes
HRP_S[FW_B] display hrp state
Role: active, peer: standby (shoule be "active-active")
Running priority: 49010, peer: 49012
Backup channel usage: 0%
Stable time: 0 days, 0 hours, 1 minutes
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.1.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 |