This section provides a Web example for configuring hot standby in load balancing mode in which multiple virtual systems configured on the FW connect to different downstream subnets through switches and share an upstream public system interface to connect to routers.
Item |
Data |
Description |
|---|---|---|
Interfaces |
Interface number: GigabitEthernet 0/0/1 IP address: 192.168.0.2/30 Security zone: Untrust |
Upstream interface of public system public |
Interface number: GigabitEthernet 0/0/2 IP address: 10.3.1.2/24 Security zone: Trust |
Downstream interface of virtual system vsysa |
|
Interface number: GigabitEthernet 0/0/3 IP address: 10.3.2.2/24 Security zone: Trust |
Downstream interface of virtual system vsysb |
|
Interface number: GigabitEthernet 0/0/7 IP address: 10.10.0.1/24 Security zone: DMZ |
Heartbeat interface |
|
VRRP groups |
VRRP group 1: 10.3.1.1/24 active |
- |
VRRP group 2: 10.3.2.1/24 standby |
- |
|
Routes |
Blackhole route Destination IP address: 1.1.1.1/32 |
Blackhole route configured for the NAT address pool of public system public to prevent route loops |
OSPF 100 Advertised network segment: 192.168.0.0/30 Static routes imported |
OSPF configuration of public system public |
Item |
Data |
Description |
|---|---|---|
Interfaces |
Interface number: GigabitEthernet 0/0/1 IP address: 192.168.0.10/30 Security zone: Untrust |
Upstream interface of public system public |
Interface number: GigabitEthernet 0/0/2 IP address: 10.3.1.3/24 Security zone: Trust |
Downstream interface of virtual system vsysa |
|
Interface number: GigabitEthernet 0/0/3 IP address: 10.3.2.3/24 Security zone: Trust |
Downstream interface of virtual system vsysb |
|
Interface number: GigabitEthernet 0/0/7 IP address: 10.10.0.2/24 Security zone: DMZ |
Heartbeat interface |
|
VRRP groups |
VRRP group 1: 10.3.1.1/24 standby |
- |
VRRP group 2: 10.3.2.1/24 active |
- |
|
Routes |
Blackhole route Destination IP address: 1.1.1.1/32 |
Blackhole route configured for the NAT address pool of public system public to prevent route loops |
OSPF 100 Advertised network segment: 192.168.0.8/30 Static routes imported |
OSPF configuration of public system public |
Item |
Data |
Description |
|---|---|---|
Interfaces |
Interface number: GigabitEthernet 0/0/1 IP address: 192.168.0.1/30 |
Connecting to FW public system public |
Interface number: GigabitEthernet 0/0/2 IP address: 192.168.0.5/30 |
Connecting to Router2 |
|
OSPF |
OSPF 100 Advertised network segment: 192.168.0.0/30 Default routes imported |
- |
Item |
Data |
Description |
|---|---|---|
Interfaces |
Interface number: GigabitEthernet 0/0/1 IP address: 192.168.0.9/30 |
Connecting to FW public system public |
Interface number: GigabitEthernet 0/0/2 IP address: 192.168.0.6/30 |
Connecting to Router1 |
|
OSPF |
OSPF 100 Advertised network segment: 192.168.0.8/30 Default routes imported |
- |
The virtual system names and IDs on FW_A and FW_B must be the same. After the virtual systems are created, you can choose and check whether the virtual system names and configuration sequences are consistent in Virtual System List.
Security policies can be backed up. That is, policies configured on FW_A can be automatically synchronized to FW_B. If you have configured security policies separately on FW_A and FW_B before configuring hot standby, ensure that their configurations and the sequences in which they are configured are the same on FW_A and FW_B. Otherwise, services may become abnormal after active/standby switchover.
On FW_A, configure a NAT policy for the public system to allow intranet users to access the Internet. The NAT policy configured on FW_A can be automatically synchronized to FW_B.
The following part uses Huawei routers to illustrate the configuration.
# Configure Router1.
[router1] interface GigabitEthernet 0/0/1 [router1-GigabitEthernet0/0/1] ip address 192.168.0.1 30 [router1-GigabitEthernet0/0/1] quit [router1] interface GigabitEthernet 0/0/2 [router1-GigabitEthernet0/0/2] ip address 192.168.0.5 30 [router1-GigabitEthernet0/0/2] quit [router1] ospf 100 [router1-ospf-100] default-route-advertise [router1-ospf-100] area 0 [router1-ospf-100-area-0.0.0.0] network 192.168.0.0 0.0.0.3 [router1-ospf-100-area-0.0.0.0] quit [router1-ospf-100] quit
# Configure Router2.
[router2] interface GigabitEthernet 0/0/1 [router2-GigabitEthernet0/0/1] ip address 192.168.0.9 30 [router2-GigabitEthernet0/0/1] quit [router2] interface GigabitEthernet 0/0/2 [router2-GigabitEthernet0/0/2] ip address 192.168.0.6 30 [router2-GigabitEthernet0/0/2] quit [router2] ospf 100 [router2-ospf-100] default-route-advertise [router2-ospf-100] area 0 [router2-ospf-100-area-0.0.0.0] network 192.168.0.8 0.0.0.3 [router2-ospf-100-area-0.0.0.0] quit [router2-ospf-100] quit
Access from the private network to the Internet succeeds. In the public system and virtual system of FW_A and FW_B, choose to check sessions. If both FWs have sessions with backup flags, sessions have been successfully backed up after hot standby is configured.
Ping an IP address on the Internet from an intranet PC and remove the network cable from GigabitEthernet 0/0/2 on FW_A. FW status switchover occurs, the status of FW_A changes from Active to Standby, and no ping packets are discarded. Then, in the public system of FW_A, choose . The status of upstream interface GigabitEthernet 0/0/1 also changes to Down, which is consistent with that of GigabitEthernet 0/0/2.
Then insert the network cable back to GigabitEthernet 0/0/2 on FW_A. The status of FW_A changes from Standby to Active, no ping packets are discarded, and the interfaces in the Link-Group become Up again.
Ping an IP address on the Internet from an intranet PC and remove the network cable from GigabitEthernet 0/0/3 on FW_B. FW status switchover occurs, the status of FW_B changes from Active to Standby, and no ping packets are discarded. Then, in the public system of FW_B, choose . The status of upstream interface GigabitEthernet 0/0/1 also changes to Down, which is consistent with that of GigabitEthernet 0/0/3.
Then insert the network cable back to GigabitEthernet 0/0/3 on FW_B. The status of FW_B changes from Standby to Active, no ping packets are discarded, and the interfaces in the Link-Group become Up again.
Configuration script of the public system:
FW_A |
FW_B |
|---|---|
# hrp enable hrp interface GigabitEthernet 0/0/7 remote 10.10.0.2 hrp track interface GigabitEthernet 0/0/1 hrp mirror session enable hrp nat resource primary-group # interface GigabitEthernet 0/0/1 ip address 192.168.0.2 255.255.255.252 link-group 1 # interface GigabitEthernet 0/0/2 ip binding vpn-instance vsysa ip address 10.3.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.1.1 active link-group public 1 # interface GigabitEthernet 0/0/3 ip binding vpn-instance vsysb ip address 10.3.2.2 255.255.255.0 vrrp vrid 2 virtual-ip 10.3.2.1 standby link-group public 1 # interface GigabitEthernet 0/0/7 ip address 10.10.0.1 255.255.255.0 # interface Virtual-if0 ip address 172.16.0.1 255.255.255.0 # interface Virtual-if1 ip address 172.16.1.1 255.255.255.0 # interface Virtual-if2 ip address 172.16.2.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/2 add interfac Virtual-if0 # firewall zone dmz set priority 50 add interface GigabitEthernet 0/0/7 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/1 # vsys enable resource-class r0 resource-class r1 resource-item-limit session reserved-number 10000 maximum 50000 resource-item-limit bandwidth 20 outbound resource-item-limit policy reserved-number 300 resource-item-limit user reserved-number 300 resource-item-limit user-group reserved-number 30 # vsys name vsysa assign interface GigabitEthernet 0/0/2 assign resource-class r1 # vsys name vsysb assign interface GigabitEthernet 0/0/3 assign resource-class r1 # ip route-static 10.3.1.0 255.255.255.0 vpn-instance vsysa ip route-static 10.3.2.0 255.255.255.0 vpn-instance vsysb # ospf 100 import-route static area 0.0.0.0 network 192.168.0.0 0.0.0.3 # security-policy rule name policy_sec source-zone trust destination-zone untrust action permit # nat address-group addressgroup1 mode pat route enable section 0 1.1.1.1 1.1.1.1 # nat-policy rule name policy_nat source-zone trust destination-zone untrust source-address 10.3.1.0 24 source-address 10.3.2.0 24 action source-nat address-group addressgroup1 |
# hrp enable hrp interface GigabitEthernet 0/0/7 remote 10.10.0.1 hrp track interface GigabitEthernet 0/0/1 hrp mirror session enable hrp nat resource secondary-group # interface GigabitEthernet 0/0/1 ip address 192.168.0.10 255.255.255.252 link-group 1 # interface GigabitEthernet 0/0/2 ip binding vpn-instance vsysa ip address 10.3.1.3 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.1.1 standby link-group public 1 # interface GigabitEthernet 0/0/3 ip binding vpn-instance vsysb ip address 10.3.2.3 255.255.255.0 vrrp vrid 2 virtual-ip 10.3.2.1 active link-group public 1 # interface GigabitEthernet 0/0/7 ip address 10.10.0.2 255.255.255.0 # interface Virtual-if0 ip address 172.16.0.2 255.255.255.0 # interface Virtual-if1 ip address 172.16.1.2 255.255.255.0 # interface Virtual-if2 ip address 172.16.2.2 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/2 add interfac Virtual-if0 # firewall zone dmz set priority 50 add interface GigabitEthernet 0/0/7 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/1 # vsys enable resource-class r0 resource-class r1 resource-item-limit session reserved-number 10000 maximum 50000 resource-item-limit bandwidth 20 outbound resource-item-limit policy reserved-number 300 resource-item-limit user reserved-number 300 resource-item-limit user-group reserved-number 30 # vsys name vsysa assign interface GigabitEthernet 0/0/2 assign resource-class r1 # vsys name vsysb assign interface GigabitEthernet 0/0/3 assign resource-class r1 # ip route-static 10.3.1.0 255.255.255.0 vpn-instance vsysa ip route-static 10.3.2.0 255.255.255.0 vpn-instance vsysb # ospf 100 import-route static area 0.0.0.0 network 192.168.0.8 0.0.0.3 # security-policy rule name policy_sec source-zone trust destination-zone untrust action permit # nat address-group addressgroup1 mode pat route enable section 0 1.1.1.1 1.1.1.1 # nat-policy rule name policy_nat source-zone trust destination-zone untrust source-address 10.3.1.0 24 source-address 10.3.2.0 24 action source-nat address-group addressgroup1 |
Configuration script of vsysa:
FW_A |
FW_B |
|---|---|
# switch vsys vsysa # interface GigabitEthernet 0/0/2 ip binding vpn-instance vsysa ip address 10.3.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.1.1 active link-group public 1 # interface Virtual-if1 ip address 172.16.1.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/2 # firewall zone untrust set priority 5 add interface Virtual-if1 # ip route-static 0.0.0.0 0.0.0.0 public # security-policy rule name vsysa_to_vsysb source-zone trust destination-zone untrust source-address 10.3.1.0 24 destination-address 10.3.2.0 24 action deny rule name policy_sec source-zone trust destination-zone untrust source-address 10.3.1.0 24 action permit |
# switch vsys vsysa # interface GigabitEthernet 0/0/2 ip binding vpn-instance vsysa ip address 10.3.1.3 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.1.1 standby link-group public 1 # interface Virtual-if1 ip address 172.16.1.2 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet 0/0/2 # firewall zone untrust set priority 5 add interface Virtual-if1 # ip route-static 0.0.0.0 0.0.0.0 public # security-policy rule name vsysa_to_vsysb source-zone trust destination-zone untrust source-address 10.3.1.0 24 destination-address 10.3.2.0 24 action deny rule name policy_sec source-zone trust destination-zone untrust source-address 10.3.1.0 24 action permit |
Configuration script of vsysb:
FW_A |
FW_B |
|---|---|
# switch vsys vsysb # interface GigabitEthernet 0/0/3 ip binding vpn-instance vsysb ip address 10.3.2.2 255.255.255.0 vrrp vrid 2 virtual-ip 10.3.2.1 standby link-group public 1 # interface Virtual-if2 ip address 172.16.2.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 Virtual-if2 # ip route-static 0.0.0.0 0.0.0.0 public # security-policy rule name vsysb_to_vsysa source-zone trust destination-zone untrust source-address 10.3.2.0 24 destination-address 10.3.1.0 24 action deny rule name policy_sec source-zone trust destination-zone untrust source-address 10.3.2.0 24 action permit |
# switch vsys vsysb # interface GigabitEthernet 0/0/3 ip binding vpn-instance vsysb ip address 10.3.2.3 255.255.255.0 vrrp vrid 2 virtual-ip 10.3.2.1 active link-group public 1 # interface Virtual-if2 ip address 172.16.2.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 Virtual-if2 # ip route-static 0.0.0.0 0.0.0.0 public # security-policy rule name vsysb_to_vsysa source-zone trust destination-zone untrust source-address 10.3.2.0 24 destination-address 10.3.1.0 24 action deny rule name policy_sec source-zone trust destination-zone untrust source-address 10.3.2.0 24 action permit |