HCIP-Security V4.0 Lab Guide
HCIP-Security V4.0 Lab Guide
HCIP-Security
Lab Guide
Version: V4.0
2
Copyright © Huawei Technologies Co., Ltd. 2022. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any
means without prior written consent of Huawei Technologies Co., Ltd.
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of
their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made
between Huawei and the customer. All or part of the products, services and features
described in this document may not be within the purchase scope or the usage scope.
Unless otherwise specified in the contract, all statements, information, and
recommendations in this document are provided "AS IS" without warranties,
guarantees or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has
been made in the preparation of this document to ensure accuracy of the contents, but
all statements, information, and recommendations in this document do not constitute
a warranty of any kind, express or implied.
Overview
This document is used for HCIP-Security certification training course. It is applicable to
candidates who are preparing for HCIP-Security exams and readers who want to
understand security basics, virtual systems, traffic management, user authentication, VPN
technologies and troubleshooting, content security, attack defense, campus network design
and construction, and security technology configuration and deployment.
Description
This lab guide contains 15 labs. Starting from hot backup of network security devices, this
guide describes how to configure the firewall virtual system, traffic management,
intelligent uplink selection, IPsec VPN, SSL VPN, anti-DDoS, content security, vulnerability
and threat prevention, 802.1X wireless authentication, and Portal wireless authentication.
The labs simulate faults in dual-device hot backup, IPsec VPN, SSL VPN, and Portal wireless
authentication for troubleshooting.
This lab guide consists of the following labs:
⚫ Lab 1: hot standby. The firewalls working in hot standby mode can automatically
switch between the active and standby states based on the validity of the links where
the outbound interfaces reside, ensuring service continuity.
⚫ Lab 2: hot standby troubleshooting. In this lab, faults that may occur during
deployment and maintenance of firewalls working in hot standby mode are
simulated, and faults are effectively located. This lab helps you learn how to
troubleshoot hot standby faults.
⚫ Lab 3: traffic management. This lab focuses on IP address-based bandwidth
management. This lab aims to help you understand how to configure IP address-
based bandwidth management on the firewall.
⚫ Lab 4: communication between virtual systems. This lab helps you understand
application scenarios of virtual system communication and master the configuration
methods.
⚫ Lab 5: firewall intelligent uplink selection. By deploying the intelligent uplink
selection on the firewall, you can select the optimal path for load balancing based on
link quality.
⚫ Lab 6: IPsec site-to-multisite application. By configuring the site-to-multisite IPsec
VPN on the firewall, you can learn how to configure the site-to-multisite IPsec VPN
and connect the networks.
⚫ Lab 7: IPsec VPN troubleshooting. By solving problems that may occur during
deployment and maintenance in the IPsec VPN site-to-multisite scenario, you can
learn how to understand the IPsec VPN troubleshooting roadmap.
⚫ Lab 8: SSL VPN troubleshooting. By solving problems that may occur during
deployment and maintenance of SSL VPN network extension, you can learn how to
understand the SSL VPN troubleshooting roadmap.
⚫ Lab 9: anti-DDoS. Anti-DDoS devices are deployed at the enterprise egress to check
the traffic from the Internet to the enterprise intranet and block threats in real time.
This lab describes how to use and configure anti-DDoS devices.
⚫ Lab 10: vulnerability and threat defense. In this lab, the intrusion prevention function
is configured on the firewall device to defend against SQL injection attacks initiated
by Internet users on the intranet web server. This lab helps you understand and
master how to use the IPS function of the firewall.
⚫ Lab 11: content security filtering. The URL filtering is deployed on the egress firewall
to prevent employees from accessing game portals. The file blocking is deployed to
block the download of executable files, reducing the risk of information leakage and
virus infection on the intranet. The data filtering is deployed to filter files or
applications containing confidential information, reducing the risk of leakage. All
these operations help you understand how to configure firewall content security.
⚫ Lab 12: 802.1X authentication. Enterprises usually deploy WLANs to provide wireless
office environments for employees and 802.1X authentication is leveraged to
authenticate access users. This lab describes how to implement 802.1X
authentication.
⚫ Lab 13: Portal authentication. Enterprises usually deploy WLANs to provide wireless
office environments for employees and Portal authentication is leveraged to
authenticate access users. This lab describes how to implement Portal authentication.
⚫ Lab 14: Portal authentication troubleshooting. This lab simulates common faults that
may occur during configuring and using Portal authentication and describes how to
troubleshoot these faults.
⚫ Lab 15: comprehensive exercise. It covers the design of a typical campus network,
including the tasks of configuring link redundancy, device redundancy, VPN encrypted
data transmission, service isolation, important service assurance, user authentication,
user behavior audit, attack defense, and WLAN security policies. After completing
these lab tasks, you shall understand the design logic of typical campus network
topologies, master security protection methods of campus networks, and finally be
able to build campus networks.
Common Icons
Device Introduction
To meet the HCIP-Security lab requirements, it is recommended that each lab environment
adopt the following configurations.
The following table lists the devices, models, and versions.
Note: The port, output, and configuration information of devices in this document is
provided based on the recommended topology. The actual information may vary according
to the lab environment.
You can use a switch supporting Layer 3 functions as the switch for interconnection, with
no specific requirement on the version.
Usage Instruction
Candidates must have basic understanding of datacom and HCIA-Security technologies. To
reduce the pressure of datacom and basic configurations on candidates, the labs in the
HCIP-Security lab guide focus on key devices and technologies, the configurations of
interconnected devices in the lab topologies are displayed in the pre-configurations of the
final configuration reference sections of each lab. The pre-configurations enables Layer 2
communication, routing, and others.
Experiment Topology
Contents
1.1 Introduction
1.1.1 About This Lab
Hosts on an enterprise intranet need to access the Internet. To prevent link interruption
caused by network device faults or external uncontrollable factors, redundancy needs to
be added to enterprise network devices to enhance network reliability.
In this lab, two firewalls are deployed in hot standby mode as gateways, and two routers
are deployed as egress devices of the enterprise network. This ensures smooth
communication between the intranet and Internet when a single device is faulty.
1.1.2 Objectives
⚫ Firewalls connect to routers in the upstream direction and switches in the
downstream direction and work in load balancing mode.
⚫ Eth-Trunk and Bidirectional Forwarding Detection (BFD) are deployed to improve hot
standby reliability.
SW1 and Mirror-SW simulate the Internet. The lab purpose is that PC1 and the FTP server
on the intranet can communicate with the Internet.
The configuration of SW1 and Mirror-SW simulating the Internet, as well as SW2 and SW3
functioning as access switches to connect to endpoints is not described in the following
procedure. For details, see 1.4 Configuration Reference.
Disable the unused interfaces of FW1, FW2, RT1, and RT2 in the lab.
Network outbound
Layer 3 sub- 4.4.4.2/30 interface,
G0/0/1.2
interface Termination VLAN 2 connecting to
Mirror-SW
Layer 3
LoopBack0 33.33.33.1/32 OSPF Router-ID
interface
Network outbound
Layer 3 sub- 3.3.3.2/30 interface,
G0/0/1.40
interface Termination VLAN 40 connecting to
Mirror-SW
Layer 3
LoopBack0 44.44.44.1/32 OSPF Router-ID
interface
Interface for
Layer 3 10.3.1.2/30 connecting to RT1
G0/0/2
interface Security zone: Untrust in the upstream
direction
FW1
G0/0/3 Eth-trunk 0 Hot standby
10.10.10.1/24
Aggregation heartbeat
G0/0/4 Security zone: DMZ interfaces
interface
Layer 3
LoopBack0 11.11.11.1/32 OSPF Router-ID
interface
Interface for
Layer 3 10.6.1.2/30 connecting to RT2
G0/0/2
interface Security zone: Untrust in the upstream
direction
Layer 3
LoopBack0 22.22.22.1/32 OSPF Router-ID
interface
Interface for
Layer 3 directly connecting
SW1 VLANIF2 4.4.4.1/30
interface to the egress
interface of RT1
Interface for
Layer 3 directly connecting
VLANIF40 3.3.3.1/30
interface to the egress
interface of RT2
Network 172.16.20.10/24
PC1 Ethernet0 Endpoint
adapter Gateway: 172.16.20.1/24
Set basic network parameters according to the table in 1.1.4 Lab Planning.
SW1, SW2, SW3, and Mirror-SW are pre-configured. For details, see 1.4 Configuration
Reference.
# When configuring IP addresses for firewall interfaces, assign the interfaces to security
zones according to Table 1-1. G0/0/1 on FW1 is used as an example. The configuration of
other interfaces is similar to that of G0/0/1.
[FW1-zone-untrust] quit
Configure OSPF on corresponding interfaces on FW1, FW2, RT1, and RT2 as planned, with
the OSPF process ID being 1.
# Configure OSPF on FW1 and enable OSPF on the interconnection interfaces, PC1 gateway
interface, and PC2 gateway interface.
# Configure OSPF on FW2 and enable OSPF on the interconnection interfaces, PC1 gateway
interface, and PC2 gateway interface.
Whether OSPF packets are controlled by security policies depends on whether the firewall
packet-filter basic-protocol enable command is configured. By default, firewall packet-filter
basic-protocol enable is enabled on the USG6000E V6R7 firewalls. That is, OSPF packets
are controlled by security policies. This section describes how to make OSPF packets not
controlled by firewall security policies using the undo firewall packet-filter basic-protocol
enable command.
# Disable the function of controlling OSPF packets through security policies on FW1 and
FW2.
# On RT2, add a default route to the Internet (SW1 in the networking topology).
# Configure a source NAT policy on RT1 for source address translation when intranet users
access the Internet.
# Configure a source NAT policy on RT2 for source address translation when intranet users
access the Internet.
# Import an external default route (that is, the default route destined for SW1) to OSPF
on RT1.
[RT1] ospf 1
[RT1-ospf-1] import-route static
[RT1-ospf-1] default-route-advertise always
[RT1-ospf-1] quit
# Import an external default route (that is, the default route destined for SW1) to OSPF
on RT2.
[RT2] ospf 1
[RT2-ospf-1] import-route static
[RT2-ospf-1] default-route-advertise always
[RT2-ospf-1] quit
FW1 and FW2 have learned routes in the entire OSPF area. FW1 has an external default
route destined for RT1, and FW2 has an external default route destined for RT2.
Configure a VGMP group on firewalls to monitor the uplink interfaces, add the downlink
interfaces to a VRRP group, and use an Eth-Trunk interface as the heartbeat interface.
# Configure GigabitEthernet0/0/3 and GigabitEthernet0/0/4 as Eth-Trunk 0 on FW1.
# Configure VRRP group 1 on the downlink service interface GE0/0/6 of FW1 and set the
status of the VRRP group to standby. Configure VRRP group 1 on the downlink service
interface GE0/0/5 of FW2 and set the status of the VRRP group to active.
# Configure VRRP group 2 on the downlink service interface GE0/0/5 of FW1 and set the
status of the VRRP group to active. Configure VRRP group 2 on the downlink service
interface GE0/0/6 of FW2 and set the status of the VRRP group to standby.
# Configure the function of adjusting the OSPF cost based on VGMP status on the firewalls.
# In load sharing networking, configure quick session backup on the firewalls in case of
inconsistent paths for forward and return packets.
# Specify the heartbeat interface and enable hot standby on the firewalls.
Because FW1 and FW2 work in hot standby mode, the security policy configuration on FW1
is automatically synchronized to FW2. Therefore, you only need to configure a security
policy on FW1.
# Configure a security policy to allow intranet users to access the Internet.
HRP_M[FW1] security-policy
HRP_M[FW1-policy-security] rule name policy_sec1
HRP_M[FW1-policy-security-rule-policy_sec1] source-zone trust
HRP_M[FW1-policy-security-rule-policy_sec1] destination-zone untrust
HRP_M[FW1-policy-security-rule-policy_sec1] action permit
HRP_M[FW1-policy-security-rule-policy_sec1] quit
Firewalls monitor the outbound interfaces through interworking between BFD and hot
standby. When the outbound interface of the link where FW1 resides goes Down, FW2
switches to the active device and takes over service traffic.
# Enable BFD globally on FW1 and configure BFD session 1 with peer IP address 4.4.4.2,
local source IP address 10.3.1.2, local discriminator 20, and remote discriminator 10.
HRP_M[FW1] bfd
HRP_M[FW1-bfd] quit
HRP_M[FW1] bfd 1 bind peer-ip 4.4.4.2 source-ip 10.3.1.2
HRP_M[FW1-bfd-session-1] discriminator local 20
HRP_M[FW1-bfd-session-1] discriminator remote 10
HRP_M[FW1-bfd-session-1] commit
HRP_M[FW1-bfd-session-1] quit
# Enable BFD globally on RT1 and configure BFD session 1 with peer IP address 10.3.1.2,
local source IP address 4.4.4.2, local discriminator 10, and remote discriminator 20.
[RT1] bfd
[RT1] bfd 1 bind peer-ip 10.3.1.2 source-ip 4.4.4.2
[RT1-bfd-session-1] discriminator local 10
[RT1-bfd-session-1] discriminator remote 20
[RT1-bfd-session-1] commit
[RT1-bfd-session-1] quit
# Enable BFD globally on FW2 and configure BFD session 2 with peer IP address 3.3.3.2,
local source IP address 10.6.1.2, local discriminator 40, and remote discriminator 30.
HRP_S[FW2] bfd
HRP_S[FW2-bfd] quit
HRP_S[FW2] bfd 2 bind peer-ip 3.3.3.2 source-ip 10.6.1.2
HRP_S[FW2-bfd-session-2] discriminator local 40
HRP_S[FW2-bfd-session-2] discriminator remote 30
HRP_S[FW2-bfd-session-2] commit
HRP_S[FW2-bfd-session-2] quit
# Enable BFD globally on RT2 and configure BFD session 2 with peer IP address 10.6.1.2,
local source IP address 3.3.3.2, local discriminator 30, and remote discriminator 40.
[RT2] bfd
[RT2] bfd 2 bind peer-ip 10.6.1.2 source-ip 3.3.3.2
[RT2-bfd-session-2] discriminator local 30
[RT2-bfd-session-2] discriminator remote 40
[RT2-bfd-session-2] commit
[RT2-bfd-session-2] quit
Set basic network parameters according to the table in 1.1.4 Lab Planning.
SW1, SW2, SW3, and Mirror-SW are pre-configured. For details, see 1.4 Configuration
Reference.
# When configuring IP addresses for firewall interfaces, assign the interfaces to security
zones according to Table 1-1. G0/0/2 on FW1 is used as an example. The configuration of
other firewall interfaces is similar to that of G0/0/2. For basic configurations of router and
switch interfaces, see Table 1-1.
Configure OSPF on FW1, FW2, RT1, and RT2 as planned, set the router ID to the IP address
of Loopback0 on each device, set the OSPF process ID to 1, and advertise the network
segments where Loopback0 interfaces reside in the OSPF area.
Configure OSPF on FW1 and advertise the network segments where the interconnection
interfaces and the interfaces functioning as the gateways of PC1 and FTP server reside in
the OSPF area.
# Choose Network > Route > OSPF and create an OSPF process in OSPF Process List.
# Choose Network > Route > OSPF, click the newly created OSPF process in OSPF Process
List, and click Advanced Settings to continue OSPF configurations.
Configure OSPF on FW2 and advertise the network segments where the interconnection
interfaces and the interfaces functioning as the gateways of PC1 and FTP server reside in
the OSPF area.
# Choose Network > Route > OSPF and create an OSPF process in OSPF Process List.
# Choose Network > Route > OSPF, click the newly created OSPF process in OSPF Process
List, and click Advanced Settings to continue OSPF configurations.
Whether OSPF packets are controlled by security policies depends on whether the firewall
packet-filter basic-protocol enable command is configured. By default, firewall packet-filter
basic-protocol enable is enabled on the USG6000E V6R7 firewalls. That is, OSPF packets
are controlled by security policies. This section describes how to make OSPF packets not
controlled by firewall security policies using the undo firewall packet-filter basic-protocol
enable command.
# Click CLI Console in the lower right corner on the web UI of FW1 and FW2, and run the
following commands:
<FW1> system-view
Enter system view, return user view with Ctrl+Z.
[FW1] undo firewall packet-filter basic-protocol enable
[FW1]
<FW2> system-view
Enter system view, return user view with Ctrl+Z.
[FW2] undo firewall packet-filter basic-protocol enable
[FW2]
# On RT2, add a default route to the Internet (SW1 in the networking topology).
# Configure a source NAT policy on RT1 for source address translation when intranet users
access the Internet.
# Configure a source NAT policy on RT2 for source address translation when intranet users
access the Internet.
# Import an external default route (that is, the default route to SW1) to OSPF on RT1.
[RT1]ospf 1
[RT1-ospf-1]import-route static
[RT1-ospf-1]default-route-advertise always
[RT1-ospf-1]quit
# Import an external default route (that is, the default route to SW1) to OSPF on RT2.
[RT2]ospf 1
[RT2-ospf-1]import-route static
[RT2-ospf-1]default-route-advertise always
[RT2-ospf-1]quit
# Choose Network > Route > Routing Table on the web UI of FW1 to check OSPF routes.
# Choose Network > Route > Routing Table on the web UI of FW2 to check OSPF routes.
FW1 and FW2 have learned routes in the entire OSPF area. FW1 has an external default
route destined for RT1, and FW2 has an external default route destined for RT2.
Configure a VGMP group on firewalls to monitor the uplink interfaces, add the downlink
interfaces to a VRRP group, and use an Eth-Trunk interface as the heartbeat interface.
# Configure GigabitEthernet0/0/3 and GigabitEthernet0/0/4 as Eth-Trunk 0 on FW1.
# Enable BFD globally on RT1 and configure BFD session 1 with peer IP address 10.3.1.2,
local source IP address 4.4.4.2, local discriminator 10, and remote discriminator 20.
[RT1] bfd
[RT1] bfd 1 bind peer-ip 10.3.1.2 source-ip 4.4.4.2
[RT1-bfd-session-1] discriminator local 10
[RT1-bfd-session-1] discriminator remote 20
[RT1-bfd-session-1] commit
[RT1-bfd-session-1] quit
# On FW1, choose System > High Availability > Dual-System Hot Standby, click Edit, and
set the parameters as follows:
# Enable BFD globally on RT2 and configure BFD session 2 with peer IP address 10.6.1.2,
local source IP address 3.3.3.2, local discriminator 30, and remote discriminator 40.
[RT2] bfd
[RT2] bfd 2 bind peer-ip 10.6.1.2 source-ip 3.3.3.2
[RT2-bfd-session-2] discriminator local 30
[RT2-bfd-session-2] discriminator remote 40
[RT2-bfd-session-2] commit
[RT2-bfd-session-2] quit
# On FW2, choose System > High Availability > Dual-System Hot Standby, click Edit, and
set the parameters as follows:
Because FW1 and FW2 work in hot standby mode, the security policy configuration on FW1
is automatically synchronized to FW2. Therefore, you only need to configure a security
policy on FW1.
# Configure a security policy to allow intranet users to access the Internet.
1.3 Verification
After the preceding configurations are complete, check the final implementation effect.
1. The FTP server can ping the Internet address 3.3.3.1 (IP address of VLANIF 40 on
SW1).
2. PC1 can ping the Internet address 4.4.4.1 (IP address of VLANIF 2 on SW1).
3. Manually disable the uplink interface G0/0/2 on FW1. The FTP server and PC1 can
still ping an Internet address.
4. Manually enable the uplink interface G0/0/2 on FW1 and disable the uplink interface
G0/0/2 on FW2. The FTP server and PC1 can still ping an Internet address.
# Ping 3.3.3.1 on SW1 from the FTP server. The connectivity is normal.
# Tracert 4.4.4.1 on SW1 from PC1. The traffic path is PC1 -> SW3 -> FW2 -> RT2 -> SW1.
# Manually disable G0/0/2 on FW1. Ping 3.3.3.1 on SW1 from the FTP server. The
connectivity is normal. Ping and tracert 3.3.3.1 on SW1 from the FTP server. The traffic
path is as follows:
FTP Server -> SW3 -> FW2 -> RT2 -> SW1.
# Manually enable G0/0/2 on FW1 and disable G0/0/2 on FW2. Ping 4.4.4.1 on SW1 from
PC1. The connectivity is normal. Tracert 4.4.4.1 on SW1 from PC1. The traffic path is PC1
-> SW2 -> FW1 -> RT1 -> SW1.
#
bfd
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.2
dot1q termination vid 2
ip address 4.4.4.2 255.255.255.252
nat outbound 3500
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.1.1.1 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.3.1.1 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface LoopBack0
ip address 33.33.33.1 255.255.255.255
#
bfd 1 bind peer-ip 10.3.1.2 source-ip 4.4.4.2
discriminator local 10
discriminator remote 20
commit
#
ospf 1 router-id 33.33.33.1
default-route-advertise always
import-route static
area 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 4.4.4.1
#
return
#
interface GigabitEthernet0/0/3
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/4
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.30.2 255.255.255.0
vrrp vrid 2 virtual-ip 172.16.30.1 active
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/6
undo shutdown
ip address 172.16.20.2 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.20.1 standby
ospf enable 1 area 0.0.0.0
#
interface LoopBack0
ip address 11.11.11.1 255.255.255.255
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
add interface Eth-Trunk0
#
bfd 1 bind peer-ip 4.4.4.2 source-ip 10.3.1.2
discriminator local 20
discriminator remote 10
commit
#
ospf 1 router-id 11.11.11.1
area 0.0.0.0
#
security-policy
rule name policy_sec1
source-zone trust
destination-zone untrust
action permit
#
return
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
return
1.5 Quiz
What are the prerequisites before configuring hot standby?
Answer: The two firewalls that form a hot standby group must have the same model, and
the same number and types of boards installed in the same layout.
2.1 Introduction
2.1.1 About This Lab
Two firewalls are deployed at the egress of an enterprise network. To improve network
reliability, the two firewalls need to work in hot standby mode. During deployment, faults
may occur when hot standby is configured.
In this lab, a pre-configured script is used to set hot standby failure points for trainees to
practice troubleshooting.
2.1.2 Objectives
⚫ Understand the networking principles of hot standby in load sharing mode.
⚫ Master the key configurations of hot standby.
⚫ Learn how to troubleshoot networking faults of hot standby in load sharing mode.
Network
Layer 3 4.4.4.2/30 outbound
G0/0/1.2 sub- interface,
interface Termination VLAN 2 connected to
Mirror-SW
Layer 3
LoopBack0 33.33.33.1/32 OSPF Router-ID
interface
Network
Layer 3 3.3.3.2/30 outbound
G0/0/1.40 sub- interface,
interface Termination VLAN 40 connected to
Mirror-SW
Layer 3
LoopBack0 44.44.44.1/32 OSPF Router-ID
interface
Interface for
Layer 3 10.3.1.2/30 connecting to RT1
G0/0/2
interface Security zone: Untrust in the upstream
direction
gateways need to
be configured
Layer 3
LoopBack0 11.11.11.1/32 OSPF Router-ID
interface
Interface for
Layer 3 10.6.1.2/30 connecting to RT2
G0/0/2
interface Security zone: Untrust in the upstream
direction
Layer 3
LoopBack0 22.22.22.1/32 OSPF Router-ID
interface
PVID: 1 Interconnection
G0/0/3 Trunk
Allow-pass VLAN: 2, 40 interface
Interface for
Layer 3 directly connecting
VLANIF2 4.4.4.1/30
SW1 interface to the egress
address of RT1
Interface for
Layer 3 directly connecting
VLANIF40 3.3.3.1/30
interface to the egress
address of RT2
through
Construct the network according to the lab topology, disable the interfaces that are not
used in the lab, and import the pre-configured scripts to the corresponding devices.
# RT1's configuration
#
sysname RT1
#
acl number 3500
rule 5 permit ip
#
bfd
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.2
dot1q termination vid 2
# RT2's configuration
#
sysname RT2
#
acl number 3500
rule 5 permit ip
#
bfd
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.40
dot1q termination vid 40
ip address 3.3.3.2 255.255.255.252
nat outbound 3500
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.1.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/4
undo portswitch
# FW1's configuration
#
sysname FW1
#
undo firewall packet-filter basic-protocol enable
#
interface Eth-Trunk0
ip address 10.10.10.1 255.255.255.0
alias HRP-heart-interface
#
hrp enable
hrp interface Eth-Trunk0 remote 1.1.1.1
hrp mirror session enable
hrp standby config enable
hrp load balance device
hrp track interface GigabitEthernet0/0/2
hrp track bfd-session 20
#
bfd
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.3.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/3
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/4
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.30.2 255.255.255.0
vrrp vrid 2 virtual-ip 172.16.30.1 active
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/6
undo shutdown
ip address 172.16.20.2 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.20.1 active
ospf enable 1 area 0.0.0.0
#
interface LoopBack0
ip address 11.11.11.1 255.255.255.255
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
add interface Eth-Trunk0
#
bfd 1 bind peer-ip 4.4.4.2 source-ip 10.3.1.2
discriminator local 20
discriminator remote 10
commit
#
ospf 1 router-id 11.11.11.1
area 0.0.0.0
#
security-policy
rule name policy_sec1
source-zone trust
destination-zone untrust
action permit
#
return
# FW2's configuration
#
sysname FW2
#
undo firewall packet-filter basic-protocol enable
#
interface Eth-Trunk0
set priority 50
#
bfd 2 bind peer-ip 3.3.3.2 source-ip 10.6.1.2
discriminator local 40
discriminator remote 30
commit
#
ospf 1 router-id 22.22.22.2
area 0.0.0.0
#
security-policy
rule name policy_sec1
source-zone trust
destination-zone untrust
action permit
#
return
# SW1's configuration
#
sysname SW1
#
vlan batch 2 40
#
interface vlanif2
ip address 4.4.4.1 255.255.255.252
#
interface vlanif40
ip address 3.3.3.1 255.255.255.252
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
return
# SW2's configuration
#
sysname SW2
#
vlan batch 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/14
port link-type access
port default vlan 30
#
return
# SW3's configuration
#
sysname SW3
#
vlan batch 40
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/13
port link-type access
port default vlan 40
#
return
# Mirror-SW's configuration
#
sysname Mirror-SW
#
vlan batch 2 40
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
return
In this lab, the firewalls work in hot standby load sharing mode. The firewalls are connected
to switches in the downstream direction and routers in the upstream direction. The
heartbeat interface is the Eth-Trunk interface aggregated by GigabitEthernet0/0/3 and
GigabitEthernet0/0/4. The correct configuration roadmap is as follows:
1. Monitor the status of uplink and downlink interfaces on firewalls.
2. Configure VRRP groups that connect to the downstream switches.
Both FW1 and FW2 consider themselves as the active device in hot standby and are
unaware of the status of the peer device. Therefore, you need to locate the fault according
to the preceding configuration roadmap.
# Check the configuration of FW1 and FW2 to monitor the uplink and downlink interfaces.
# Check the status of the interfaces monitored by FW1 and FW2. The command output
shows that the status is Up, which is normal.
# Check the status of VRRP groups on FW1. Normally, GigabitEthernet 0/0/5 on FW1 is the
active interface of VRRP group 2, and GigabitEthernet 0/0/6 is the standby interface of
VRRP group 1.
----------------------------------------------------------------
1 Master GE0/0/6 Vgmp 172.16.20.1
2 Master GE0/0/5 Vgmp 172.16.30.1
# Check the status of VRRP groups on FW2. Normally, GigabitEthernet 0/0/5 on FW2 is the
active interface of VRRP group 1, and GigabitEthernet 0/0/6 is the standby interface of
VRRP group 2.
The status of the VRRP groups on FW1 and FW2 is Master, and the VRID of the VRRP
groups on GigabitEthernet 0/0/5 and GigabitEthernet 0/0/6 of FW2 is 2, which does not
meet the expectation.
VRRP group 1 consists of GigabitEthernet 0/0/5 on FW2 and GigabitEthernet 0/0/6 on FW1.
In normal cases, GigabitEthernet 0/0/5 on FW2 is the active interface, and GigabitEthernet
0/0/6 on FW1 is the standby interface.
VRRP group 2 consists of GigabitEthernet 0/0/5 on FW1 and GigabitEthernet 0/0/6 on FW2.
In normal cases, GigabitEthernet 0/0/5 on FW1 is the active interface, and GigabitEthernet
0/0/6 on FW2 is the standby interface.
# Check the interface configuration of VRRP group 2.
The command output shows that the VRID of the VRRP group on GigabitEthernet 0/0/5 of
FW2 is 2 and needs to be changed to 1. In addition, GigabitEthernet 0/0/6 of FW1 should
be the standby interface.
# Modify the VRRP configuration of GigabitEthernet 0/0/5 on FW2.
After the preceding check, ensure that the VRRP group configuration is correct.
# Check the status of the VRRP groups on FW1 and FW2.
The command output shows that the VRRP status is normal. Proceed to the next step.
# Check the configuration of the heartbeat interface on FW1.
#
interface Eth-Trunk0
ip address 10.10.10.1 255.255.255.0
alias HRP-heart-interface
#
#
interface Eth-Trunk0
ip address 10.10.10.2 255.255.255.0
alias HRP-heart-interface
#
Compare the heartbeat interface configuration of FW1 and FW2. It is found that the peer
IP address configured on FW1 is incorrect.
# Modify the IP address of the peer heartbeat interface on FW1.
# Ping the HRP heartbeat interface on FW2 from the HRP heartbeat interface on FW1.
The heartbeat interfaces of the firewalls in a hot standby group need to communicate with
each other, which is the prerequisite of the hot standby networking. You are advised to
add the heartbeat interfaces to the DMZ. By default, the DMZs can communicate with each
other.
# Check the security zone configuration on FW1.
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
add interface Eth-Trunk0
#
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
The command output shows that the HRP heartbeat interface on FW2 is not added to any
security zone.
# Add the heartbeat interface Eth-Trunk 0 on FW2 to the DMZ.
FW1 and FW2 form a hot standby networking in load sharing mode.
# Check the status of VRRP groups on FW1.
The command output shows that the VRRP group meets the following requirements:
VRRP group 1 consists of GigabitEthernet 0/0/5 on FW2 and GigabitEthernet 0/0/6 on FW1.
In normal cases, GigabitEthernet 0/0/5 on FW2 is the active interface, and GigabitEthernet
0/0/6 on FW1 is the standby interface.
VRRP group 2 consists of GigabitEthernet 0/0/5 on FW1 and GigabitEthernet 0/0/6 on FW2.
In normal cases, GigabitEthernet 0/0/5 on FW1 is the active interface, and GigabitEthernet
0/0/6 on FW2 is the standby interface.
In conclusion, the hot standby troubleshooting lab is complete.
rule 5 permit ip
#
bfd
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.40
dot1q termination vid 40
ip address 3.3.3.2 255.255.255.252
nat outbound 3500
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.1.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.6.1.1 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface LoopBack0
ip address 44.44.44.1 255.255.255.255
#
bfd 2 bind peer-ip 10.6.1.2 source-ip 3.3.3.2
discriminator local 30
discriminator remote 40
commit
#
ospf 1 router-id 44.44.44.1
default-route-advertise always
import-route static
area 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 3.3.3.1
#
return
bfd
#
interface Eth-Trunk0
ip address 10.10.10.1 255.255.255.0
alias HRP-heart-interface
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.3.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/3
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/4
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.30.2 255.255.255.0
vrrp vrid 2 virtual-ip 172.16.30.1 active
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/6
undo shutdown
ip address 172.16.20.2 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.20.1 standby
ospf enable 1 area 0.0.0.0
#
interface LoopBack0
ip address 11.11.11.1 255.255.255.255
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
add interface Eth-Trunk0
#
bfd 1 bind peer-ip 4.4.4.2 source-ip 10.3.1.2
discriminator local 20
discriminator remote 10
commit
#
ospf 1 router-id 11.11.11.1
area 0.0.0.0
#
security-policy
rule name policy_sec1
source-zone trust
destination-zone untrust
action permit
#
return
sysname Mirror-SW
#
vlan batch 2 40
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
return
2.4 Quiz
During troubleshooting, why are all VRRP groups on FW1 and FW2 in the Master state
when the hot standby relationship is not established between FW1 and FW2?
Answer: If hot standby is configured on both devices but hot standby negotiation fails, both
devices consider themselves as the active device and set their VRRP groups to the Master
state.
3.1 Introduction
3.1.1 About This Lab
An enterprise deploys a firewall at the network border as the egress gateway so that
intranet users can access the Internet. In the office environment, to improve the work
efficiency of employees, the enterprise intend to allocate a fixed traffic quota and
bandwidth rate to each employee and control the online duration of employees.
In this lab, the upload/download bandwidth from each intranet PC to the Internet is limited
to 400 kbit/s and 600 kbit/s, a fixed traffic quota is allocated to each employee, and the
online duration of each employee is controlled.
3.1.2 Objectives
⚫ Learn how to configure a traffic policy to limit the upload/download bandwidth of
intranet PCs.
⚫ Implement local Portal authentication for enterprise employees.
⚫ Allocate a fixed traffic quota to each employee.
Interface for
G0/0/15 Access PVID: 300 connecting to the
FTP/WWW Server
SW1
On the same
Layer 3
VLANIF 40 3.3.3.1/30 network segment as
interface
an RT2 interface
Interface for
Layer 3
VLANIF 300 100.20.1.1/24 connecting to the
interface
FTP/WWW Server
Interface for
G0/0/1 connecting to an
SW3 Access PVID: 40 endpoint
Interface for
G0/0/13
connecting to FW2
172.16.20.111/24
Intranet test
PC1 Ethernet0 NIC Gateway: endpoint
172.16.20.3/24
Server Gateway:
100.20.1.1/24
<FW2> system-view
[FW2] interface GigabitEthernet0/0/2
[FW2-GigabitEthernet0/0/2] ip address 100.6.1.2 255.255.255.252
[FW2-GigabitEthernet0/0/2] quit
[FW2] firewall zone untrust
[FW2-zone-untrust] add interface GigabitEthernet0/0/2
[FW2-zone-untrust] quit
# Configure an IP address for GigabitEthernet0/0/5, and add the interface to the Trust zone.
[FW2] security-policy
[FW2-policy-security] rule name trust-untrust
[FW2-policy-security-rule-trust-untrust] source-zone trust
[FW2-policy-security-rule-trust-untrust] destination-zone untrust
[FW2-policy-security-rule-trust-untrust] source-address 172.16.20.0 24
[FW2-policy-security-rule-trust-untrust] action permit
[FW2-policy-security-rule-trust-untrust] quit
[FW2-policy-security] quit
# Configure a default route so that intranet traffic can be properly forwarded to a router
on the Internet.
# Configure a source NAT policy on an outbound interface so that intranet users can use
the public IP address of an interface on FW2 to access the Internet.
[FW2] nat-policy
[FW2-policy-nat] rule name easyip
[FW2-policy-nat-rule-easyip] source-zone trust
[FW2-policy-nat-rule-easyip] destination-zone untrust
[FW2-policy-nat-rule-easyip] source-address 172.16.20.0 mask 255.255.255.0
[FW2-policy-nat-rule-easyip] action source-nat easy-ip
[FW2-policy-nat-rule-easyip] quit
[FW2-policy-nat] quit
[FW2] traffic-policy
[FW2-policy-traffic] profile ftp
[FW2-policy-traffic-profile-ftp] bandwidth maximum-bandwidth whole downstream 20000
[FW2-policy-traffic-profile-ftp] bandwidth maximum-bandwidth per-ip downstream 2000
[FW2-policy-traffic-profile-ftp] quit
[FW2-policy-traffic] quit
To complete identity authentication on internal users who intend to access the Internet,
security policies must be implemented to permit packets from the Trust zone to the Local
zone.
# Configure the Portal authentication.
[FW2] auth-policy
[FW2-policy-auth] default action auth
[FW2-policy-auth] rule name portal
[FW2-policy-auth-rule-portal] source-zone trust
[FW2-policy-auth-rule-portal] destination-zone untrust
[FW2-policy-auth-rule-portal] action auth
[FW2-policy-auth-rule-portal] quit
[FW2-policy-auth] quit
# Set the user name to staff and password to Huawei@123 on the firewall.
# Configure a security policy to allow access from the Trust zone to the Local zone so that
intranet users can be authenticated.
[FW2] security-policy
[FW2-policy-security] rule name trust-local
[FW2-policy-security-rule-trust-local] source-zone trust
[FW2-policy-security-rule-trust-local] destination-zone local
[FW2-policy-security-rule-trust-local] action permit
[FW2-policy-security-rule-trust-local] quit
[FW2-policy-security] quit
# Configure a quota control policy for user staff on the firewall to limit the traffic volume
to 2048 MB and the online duration to 4 hours during working hours each day. If the traffic
volume or online duration is exceeded, user staff cannot access the Internet.
[FW2] quota-policy
[FW2-policy-quota] profile staff-limit
[FW2-policy-quota-profile-staff-limit] stream-daily 2048 reminder-threshold 80
[FW2-policy-quota-profile-staff-limit] time-daily 240 reminder-threshold 80
[FW2-policy-quota-profile-staff-limit] rule name staff-limit
[FW2-policy-quota-rule-staff-limit] user username staff
[FW2-policy-quota-rule-staff-limit] action quota profile staff-limit
[FW2-policy-quota-rule-staff-limit] quit
# Configure security policies. # Choose Policy > Security Policy to create a security policy.
Set parameters to allow packet exchange between a specified intranet segment and the
Internet.
# Configure a default route. # Choose Network > Route > Static Route to create a static
route, so that intranet traffic can be forwarded to the router on the Internet.
# Configure a source NAT policy on an outbound interface. # Choose Policy > NAT Policy >
NAT Policy to create a NAT policy so that intranet users can directly use the public IP
address of an interface on FW2 to access the Internet.
# Choose Policy > Bandwidth Management > Traffic Policy to configure a corresponding
traffic policy for Internet access users.
Configure local user authentication. Intranet users must pass identity authentication before
accessing the Internet. The user name and password are set on the firewall and the security
policy must be configured to permit packets from the Trust zone to the Local zone for user
authentication.
# Choose Object > User > default and set the Internet Access Authentication Mode to Portal
authentication.
# Choose Object > User > default. Create a user named staff and set the password to
Huawei@123.
# Choose Object > User > Authentication Policy. Create an authentication policy named
Portal, which requires users to pass identity authentication before accessing the Untrust
zone from the Trust zone.
# Choose Policy > Quota Control Policy > Quota Control Policy and create a quota control
policy named staff-limit. In this policy, user staff can use a maximum of 2048 MB traffic
and 4 hours of online duration during working hours each day. After the quota is exceeded,
user staff cannot access the Internet.
# Choose Policy > Security Policy to create a security policy. Select or enter the parameters.
Configure security policies to permit the access from the Trust zone to the Local zone and
allows intranet users to be authenticated.
3.3 Verification
After the preceding configurations are complete, check the final implementation effect.
1. When Portal authentication is not performed on PC1, PC1 cannot access the Internet
and cannot ping the FTP/WWW Server.
2. Enter any IP address, for example, http://1.1.1.1, in the address box of the browser on
PC1 to trigger user authentication on the firewall. Enter the user name and password
to log in. After the login is successful, PC1 can ping the FTP/WWW Server.
3. Check whether the traffic policy takes effect. Use PC1 to download files from the
FTP/WWW Server through FTP.
4. Check whether the quota control policy takes effect. Use PC1 to download a large
number of files from the FTP/WWW Server through FTP. When the quota is
exceeded, PC1 cannot download files any more.
# PC1 cannot ping the FTP/WWW Server when user authentication is not performed.
# Enter http://1.1.1.1 in the address box of the browser on PC1. On the page that is
displayed, enter the configured user name and password to log in.
# After PC1 is authenticated successfully, PC1 can ping the FTP/WWW Server successfully.
# After the traffic policy is configured, the rate at which intranet user PC1 downloads files
from the FTP/WWW Server on the Internet is limited.
# After the traffic policy is canceled, the rate at which the user downloads the same file
from the Internet is not limited.
interface GigabitEthernet0/0/4
undo portswitch
ip address 100.6.1.1 255.255.255.252
#
ip route-static 100.20.1.0 255.255.255.0 3.3.3.1
#
3.5 Quiz
What are the differences between bandwidth management policies and quota control
policies?
Answers:
4.1 Introduction
4.1.1 About This Lab
A large-scale enterprise, comprising R&D and marketing departments, uses the firewall as
the egress gateway of its network. The enterprise wants to use the virtual system function
of the firewall to manage the networks of R&D and marketing departments separately,
thereby implementing refined management of access permissions between the two
departments and between the departments and the Internet. This can ensure network
security while meeting service requirements.
In this lab, deploy a firewall as the gateway, and use a switch to simulate the Internet to
demonstrate virtual system configuration.
4.1.2 Objectives
⚫ Learn how to create virtual systems and allocate virtual system resources.
⚫ Implement communication between virtual systems and the public system.
⚫ Implement communication between virtual systems.
⚫ Enable the R&D and marketing departments in the enterprise to use the same public
IP address of the public system to access the Internet.
The preceding figure shows device connections. For details about IP address planning, see
Table 4-1.
Virtual systems named vsysa and vsysb are created on the firewall. GigabitEthernet0/0/6
belongs to vsysa, GigabitEthernet0/0/7 belongs to vsysb, and GigabitEthernet0/0/1 belongs
to the public system.
SW1 simulates the Internet. This part of configurations is not described in the configuration
procedure. For details, see 4.4 Configuration Reference.
10.3.0.100/24
PC4 Ethernet0 NIC Terminal
Gateway: 10.3.0.1/24
10.3.1.100/24
PC5 Ethernet0 NIC Terminal
Gateway: 10.3.1.1/24
Set basic network parameters according to the table in 4.1.4 Lab Planning.
SW1 has been preconfigured. For details, see 4.4 Configuration Reference.
<FW> system-view
[FW] vsys enable
Configure a resource class, create virtual systems vsysa and vsysb in the public system, and
allocate resources to the virtual systems.
# Configure a resource class.
[FW] resource-class r1
[FW-resource-class-r1] resource-item-limit session reserved-number 10000 maximum 50000
[FW-resource-class-r1] resource-item-limit policy reserved-number 300
[FW-resource-class-r1] resource-item-limit bandwidth 20 entire
[FW-resource-class-r1] quit
# Configure interfaces for the public system and add them to security zones.
# Configure a route from the public system to the Internet to divert traffic from hosts in
the R&D and marketing departments to the Internet. 100.1.1.1 is the next-hop address of
the route from the public system to the Internet.
# Configure a security policy in the public system to permit traffic from hosts in the R&D
and marketing departments to the Internet.
[FW] security-policy
[FW-policy-security] rule name trust_to_untrust
[FW-policy-security-rule-trust_to_untrust] source-zone trust
[FW-policy-security-rule-trust_to_untrust] destination-zone untrust
[FW-policy-security-rule-trust_to_untrust] source-address 10.3.0.0 24
[FW-policy-security-rule-trust_to_untrust] source-address 10.3.1.0 24
[FW-policy-security-rule-trust_to_untrust] action permit
[FW-policy-security-rule-trust_to_untrust] quit
[FW-policy-security] quit
# Configure a source NAT policy for the public system to translate the source IP addresses
of the packets from the R&D and marketing departments to the Internet into the IP address
of the public interface GE0/0/1 in the public system.
[FW] nat-policy
[FW-policy-nat] rule name nat1
[FW-policy-nat-rule-nat1] source-zone trust
[FW-policy-nat-rule-nat1] egress-interface GigabitEthernet 0/0/1
[FW-policy-nat-rule-nat1] source-address 10.3.0.0 24
[FW-policy-nat-rule-nat1] source-address 10.3.1.0 24
[FW-policy-nat-rule-nat1] action source-nat easy-ip
[FW-policy-nat-rule-nat1] quit
[FW-policy-nat] quit
Configure interfaces for vsysa, add them to security zones, and configure routes and
security policies for vsysa.
# Switch from the user view of the public system to the system view of vsysa.
# Configure a route from vsysa to the public system to divert the traffic from hosts in the
R&D department accessing the Internet to the public system.
# Configure a security policy in vsysa to allow hosts on the IP address range of 10.3.0.100
to 10.3.0.110 in the R&D department to access the Internet.
[FW-vsysa] security-policy
[FW-vsysa-policy-security] rule name to_internet_allow
[FW-vsysa-policy-security-rule-to_internet_allow] source-zone trust
[FW-vsysa-policy-security-rule-to_internet_allow] destination-zone untrust
[FW-vsysa-policy-security-rule-to_internet_allow] source-address range 10.3.0.100 10.3.0.110
[FW-vsysa-policy-security-rule-to_internet_allow] action permit
[FW-vsysa-policy-security-rule-to_internet_allow] quit
# Configure a security policy in vsysa to allow all hosts in the R&D department to access
hosts in the marketing department.
[FW-vsysa] security-policy
[FW-vsysa-policy-security] rule name to_market_allow
[FW-vsysa-policy-security-rule-to_market_allow] source-zone trust
[FW-vsysa-policy-security-rule-to_market_allow] destination-zone untrust
[FW-vsysa-policy-security-rule-to_market_allow] destination-address 10.3.1.0 24
[FW-vsysa-policy-security-rule-to_market_allow] action permit
[FW-vsysa-policy-security-rule-to_market_allow] quit
# Configure a security policy in vsysa to forbid hosts beyond the IP address range of
10.3.0.100 to 10.3.0.110 in the R&D department to access the Internet.
Configure interfaces for vsysb, add them to security zones, and configure routes and
security policies for vsysb.
# Switch from the user view of vsysa to the system view of vsysb.
[FW-vsysa] quit
<FW-vsysa> quit
[FW] switch vsys vsysb
<FW-vsysb> system-view
# Configure a route from vsysb to the public system to divert the traffic from hosts in the
marketing department accessing the Internet to the public system.
# Configure a security policy in vsysb to allow all hosts in the marketing department to
access the Internet.
[FW-vsysb] security-policy
[FW-vsysb-policy-security] rule name to_internet_allow
[FW-vsysb-policy-security-rule-to_internet_allow] source-zone trust
[FW-vsysb-policy-security-rule-to_internet_allow] destination-zone untrust
[FW-vsysb-policy-security-rule-to_internet_allow] action permit
[FW-vsysb-policy-security-rule-to_internet_allow] quit
Configure routes in the public system and security policies in vsysa and vsysb for employees
in the R&D and marketing departments to communicate with each other.
# Switch from the user view of vsysb to the user view of the public system.
[FW-vsysb] quit
<FW-vsysb> quit
# Configure routes.
# Enter vsysa and configure a security policy to permit traffic from hosts in vsysb to access
hosts in vsysa.
# Enter vsysb and configure a security policy to permit traffic from hosts in vsysa to access
hosts in vsysb.
Set basic network parameters according to the table in 4.1.4 Lab Planning.
SW1 has been preconfigured. For details, see 4.4 Configuration Reference.
# Choose System > Virtual System > Virtual System, enable the virtual system function,
and click Apply.
Configure a resource class, create virtual systems vsysa and vsysb in the public system, and
allocate resources to the virtual systems.
# Choose System > Virtual System > Resource Class and click Add.
# Choose System > Virtual System > Virtual System. On the Virtual System List page, click
Add to create virtual system vsysa and allocate resources to it.
# Choose System > Virtual System > Virtual System. On the Virtual System List page, click
Add to create virtual system vsysb and allocate resources to it.
Configure interfaces for the public system and add them to security zones.
# Choose Network > Interface and click next to an interface to be configured. Set
parameters and then click OK to configure GigabitEthernet0/0/1, as shown in the following
figure.
Configure a route to divert traffic from hosts in the R&D and marketing departments to
the Internet.
# Choose Network > Route > Static Route and click Add. Configure a route from the public
system to the Internet to divert traffic from hosts in the R&D and marketing departments
to the Internet. 100.1.1.1 is the next-hop address of the route from the public system to
the Internet.
Configure a security policy to permit traffic from hosts in the R&D and marketing
departments to the Internet.
# Choose Policy > Security Policy > Security Policy, click Add Security Policy, and configure
a security policy in the public system to permit traffic from hosts in the R&D and marketing
departments to the Internet.
Configure a NAT policy to translate the source IP addresses of the packets from the R&D
and marketing departments to the Internet into the IP address of the public interface
GE0/0/1 in the public system.
# Choose Policy > NAT Policy > NAT Policy, click Add, and configure a source NAT policy
in the public system to translate the source IP addresses of the packets from the intranet
to the Internet into the IP address of the public interface GE0/0/1 in the public system.
Configure interfaces for vsysa, add them to security zones, and configure routes and
security policies for vsysa.
# Select vsysa from the Virtual System drop-down list in the upper right corner to access
vsysa.
# Choose Network > Interface and click next to an interface to be configured. Set
parameters and then click OK to configure GigabitEthernet0/0/6, as shown in the following
figure.
# Choose Network > Route > Static Route, click Add, and configure a route from vsysa to
the public system to divert the traffic from hosts in the R&D department accessing the
Internet to the public system.
# Choose Policy > Security Policy > Security Policy, click Add Security Policy, and configure
a security policy for vsysa to allow hosts in the IP address range of 10.3.0.100 to 10.3.0.110
in the R&D department to access the Internet.
# Choose Policy > Security Policy > Security Policy, click Add Security Policy, and configure
a security policy for vsysa to allow all hosts in the R&D department to access hosts in the
marketing department.
# Choose Policy > Security Policy > Security Policy, click Add Security Policy, and configure
a security policy for vsysa to forbid hosts beyond the IP address range of 10.3.0.100 to
10.3.0.110 in the R&D department to access the Internet.
Configure interfaces for vsysb, add them to security zones, and configure routes and
security policies for vsysb.
# Select vsysb from the Virtual System drop-down list in the upper right corner to access
vsysb.
# Choose Network > Interface and click next to an interface to be configured. Set
parameters and then click OK to configure GigabitEthernet0/0/7, as shown in the following
figure.
# Choose Network > Route > Static Route, click Add, and configure a route from vsysb to
the public system to divert the traffic from hosts in the R&D department accessing the
Internet to the public system.
# Choose Policy > Security Policy > Security Policy, click Add Security Policy, and configure
a security policy in vsysb to allow all hosts in the marketing department to access the
Internet.
Configure routes in the public system and security policies in vsysa and vsysb for employees
in the R&D and marketing departments to communicate with each other.
# Select public from the Virtual System drop-down list in the upper right corner to access
the public system.
# Choose Network > Route > Static Route and click Add to configure routes.
# Enter vsysa and configure a security policy to permit traffic from hosts in vsysb to access
hosts in vsysa.
# Enter vsysb and configure a security policy to permit traffic from hosts in vsysa to access
hosts in vsysb.
4.3 Verification
After the preceding configurations are complete, check the final implementation effect.
1. Only hosts on the IP address range of 10.3.0.100 to 10.3.0.110 in the R&D
department can access the Internet.
2. Hosts on network segment 10.3.1.0/24 in the marketing department can access the
Internet.
3. Hosts in the R&D and marketing departments can communicate with each other.
# Change the IP address of a host in the R&D department to 10.3.0.100/24 and the gateway
address to 10.3.0.1/24 and verify that the host can ping 100.1.1.1 (IP address of VLANIF 1
on SW1) on the Internet.
# Change the IP address of a host in the R&D department to 10.3.0.120/24 and the gateway
address to 10.3.0.1/24 and verify that the host cannot ping 100.1.1.1 (IP address of VLANIF
1 on SW1) on the Internet.
# Change the IP address of a host in the marketing department to 10.3.1.100/24 and the
gateway address to 10.3.1.1/24 and verify that the host can ping 100.1.1.1 (IP address of
VLANIF 1 on SW1) on the Internet.
# Verify that a host in the R&D department can ping a host in the marketing department.
# Verify that a host in the marketing department can ping a host in the R&D department.
#
vsys name vsysa 1
assign interface GigabitEthernet0/0/6
assign resource-class r1
#
vsys name vsysb 2
assign interface GigabitEthernet0/0/7
assign resource-class r1
#
ip vpn-instance default
ipv4-family
#
ip vpn-instance vsysa
ipv4-family
ipv6-family
#
ip vpn-instance vsysb
ipv4-family
ipv6-family
#
#
interface GigabitEthernet0/0/1
undo shutdown
ip address 100.1.1.8 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
service-manage netconf permit
#
interface GigabitEthernet0/0/6
undo shutdown
ip binding vpn-instance vsysa
ip address 10.3.0.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage telnet permit
#
interface GigabitEthernet0/0/7
undo shutdown
ip binding vpn-instance vsysb
ip address 10.3.1.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage telnet permit
#
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 local
set priority 100
#
firewall zone trust
set priority 85
add interface Virtual-if0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
ip route-static vpn-instance vsysa 10.3.1.0 255.255.255.0 vpn-instance vsysb
ip route-static vpn-instance vsysb 10.3.0.0 255.255.255.0 vpn-instance vsysa
#
security-policy
rule name trust_to_untrust
source-zone trust
destination-zone untrust
source-address 10.3.0.0 mask 255.255.255.0
source-address 10.3.1.0 mask 255.255.255.0
action permit
#
nat-policy
rule name nat1
source-zone trust
egress-interface GigabitEthernet0/0/1
source-address 10.3.0.0 mask 255.255.255.0
source-address 10.3.1.0 mask 255.255.255.0
action source-nat easy-ip
#
switch vsys vsysa
#
interface GigabitEthernet0/0/6
undo shutdown
ip binding vpn-instance vsysa
ip address 10.3.0.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage telnet permit
#
interface Virtual-if1
ip address 172.16.1.1 255.255.255.0
#
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/7
#
firewall zone untrust
set priority 5
add interface Virtual-if2
#
firewall zone dmz
set priority 50
#
security-policy
rule name to_internet_allow
source-zone trust
destination-zone untrust
action permit
rule name vsysa_to_vsysb
source-zone untrust
destination-zone trust
source-address 10.3.0.0 mask 255.255.255.0
destination-address 10.3.1.0 mask 255.255.255.0
action permit
#
ip route-static 0.0.0.0 0.0.0.0 public
#
4.5 Quiz
What are the functions of Virtual-if interfaces configured in the public system and virtual
systems on a firewall?
Answer: A Virtual-if is a logical interface that is automatically generated during the creation
of a virtual system for communication with other virtual systems. The link status and
protocol status of a Virtual-if interface are always up. For communication between virtual
systems, each involved Virtual-if interface must be configured with an IP address and added
to a security zone in order to operate correctly.
5.1 Introduction
5.1.1 About This Lab
Assume that an enterprise has a 100 M link connected to ISP1 and a 50M link connected
to ISP2. The enterprise requires that traffic be forwarded to ISP1 and ISP2 links based on
the bandwidth ratio to ensure full utilization of bandwidth resources. When one ISP link is
overloaded, subsequent traffic will be forwarded on the other ISP link to ensure access
availability.
In this lab, a global route selection policy based on link bandwidth load balancing is
deployed on the firewall to meet enterprise requirements.
5.1.2 Objectives
⚫ Understand the intelligent uplink selection mode of a firewall.
⚫ Understand how to configure intelligent uplink selection on the firewall.
SW, and SW1 are not described in the configuration procedure. For details, see section 5.4
Configuration Reference.
Interface for
Layer 3 100.5.1.2/30 connecting to the
G0/0/1
interface Security zone: Untrust outbound interface of
ISP1 and RT2
Interface for
Layer 3 100.3.1.2/30 connecting to the
FW1 G0/0/2
interface Security zone: Untrust outbound interface of
ISP2 and RT1
172.16.20.2/24
Layer 3 Interface for
G0/0/6 172.16.40.2/24 sub
interface connecting to SW3
Security zone: Trust
Interface for
Allow-pass VLAN: 2,
G0/0/3 Trunk connecting to Mirror-
40
SW
connecting to Server1
Interface for
G0/0/14 Access PVID: 2000 connecting to the
Server2
G0/0/1
PVID: 1
Mirror- Interconnection
G0/0/2 Trunk Allow-pass VLAN: 2,
SW interface
40
G0/0/3
Interface for
G0/0/2
connecting to FW1
Interface for
SW3 G0/0/13 Access PVID: 50
connecting to PC1
Interface for
G0/0/14
connecting to PC2
172.16.20.10/24
PC1 Ethernet0 NIC Gateway: Endpoint PC
172.16.20.2/24
172.16.40.10/24
PC2 Ethernet0 NIC Gateway: Endpoint PC
172.16.40.2/24
100.20.1.2/24
Server1 Ethernet0 NIC Gateway: Endpoint
100.20.1.1/24
100.40.1.2/24
Server2 Ethernet0 NIC Gateway: Endpoint
100.40.1.1/24
Set basic network parameters according to the table in 5.1.4 Lab Planning.
RT1, RT2, SW1, Mirror-SW, and SW3 have been preconfigured. For details, see section 5.4
Configuration Reference.
# Configure health check on FW1 and create a health check task for ISP1 and ISP2 links
respectively. Assume that the destination network segment is 100.20.1.0/24 for ISP1 and is
100.40.1.0/24 for ISP2.
<FW1> system-view
[FW1] healthcheck enable
[FW1] healthcheck name isp1-healthcheck
[FW1-healthcheck-isp1-healthcheck] destination 100.20.1.2 interface GigabitEthernet0/0/1 protocol
icmp
[FW1-healthcheck-isp1-healthcheck] quit
[FW1] healthcheck name isp2-healthcheck
[FW1-healthcheck-isp2-healthcheck] destination 100.40.1.2 interface GigabitEthernet0/0/2 protocol
icmp
[FW1-healthcheck-isp2-healthcheck] quit
100.20.1.2 and 100.40.1.2 are existing device addresses on ISP1 and ISP2 networks, that is,
Server1 and Server2 in the networking diagram.
# Configure a global route selection policy to load balance traffic by link bandwidth.
[FW1] multi-interface
[FW1-multi-inter] mode proportion-of-bandwidth
[FW1-multi-inter] add interface GigabitEthernet0/0/1
[FW1-multi-inter] add interface GigabitEthernet0/0/2
[FW1-multi-inter] quit
[FW1] security-policy
[FW1-policy-security] rule name trust-untrust
[FW1-policy-security-rule-trust-untrust] source-zone trust
[FW1-policy-security-rule-trust-untrust] destination-zone untrust
[FW1-policy-security-rule-trust-untrust] action permit
[FW1-policy-security-rule-trust-untrust] quit
# Configure a source NAT policy on an outbound interface so that intranet users can
directly use the public IP address of FW1 to access the Internet.
[FW1] nat-policy
[FW1-policy-nat] rule name trust-untrust
[FW1-policy-nat-rule-trust-untrust] source-zone trust
[FW1-policy-nat-rule-trust-untrust] destination-zone untrust
[FW1-policy-nat-rule-trust-untrust] action source-nat easy-ip
[FW1-policy-nat-rule-trust-untrust] quit
Set basic network parameters according to the table in 5.1.4 Lab Planning.
RT1, RT2, SW1, Mirror-SW, and SW3 have been preconfigured. For details, see section 5.4
Configuration Reference.
Enable the health check function of the firewall and create a health check for ISP1 and
ISP2 respectively. Assume that the destination network segment is 100.20.1.0/24 for ISP1
and is 100.40.1.0/24 for ISP2.
# Choose Object > Health Check. Click Add in the Health Check List area to create a health
check for ISP1.
100.20.1.2 and 100.40.1.2 are existing device addresses on ISP1 and ISP2 networks
respectively.
Step 3 Set the parameters of the interface in the Untrust zone of the FW.
Set the IP addresses and gateway addresses of G0/0/1 and G0/0/2, and add them to the
Untrust zone. Configure the bandwidth and overload protection thresholds of the links
where the interfaces reside. Apply the corresponding health check on the interfaces.
# Choose Network > Interface and click next to the interface to be configured. Select
or set parameters and click OK. Configure GigabitEthernet0/0/1 and GigabitEthernet0/0/2,
as shown in the following figures.
Step 4 Set the parameters of the interface in the Trust zone of the FW.
Configure the IP address for GigabitEthernet0/0/6, and add the interface to the Trust zone.
# Choose Network > Interface and click next to the interface to be configured. Select
or set parameters and click OK to configure GigabitEthernet0/0/6, as shown in the
following figure.
Configure a global route selection policy of the firewall, set load balancing by link
bandwidth, and add GigabitEthernet0/0/1 and GigabitEthernet0/0/2 to the outbound
interface list.
# Choose Network > Route > Intelligent Uplink Selection. In the Global Routing Policy area,
click Edit.
Configure a source NAT policy on an outbound interface so that intranet users can directly
use the public IP address of an interface on FW1 to access the Internet.
# Choose Policy > NAT Policy > NAT Policy and click Add.
5.3 Verification
# After the configuration is complete, check whether health link detection can be started
normally. If the status is up, the destination address is reachable. If the status is down, the
destination address is unreachable.
# After the global route selection policy is configured, check whether the link is available.
If the current status is displayed as a green up arrow, the link is available. If the current
status is displayed as a red down arrow, the link is unavailable.
undo shutdown
ip address 172.16.20.2 255.255.255.0
ip address 172.16.40.2 255.255.255.0 sub
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
multi-interface
mode proportion-of-bandwidth
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
security-policy
rule name trust-untrust
source-zone local
source-zone trust
destination-zone untrust
action permit
#
nat-policy
rule name trust-untrust
source-zone trust
destination-zone untrust
action source-nat easy-ip
#
#
interface GigabitEthernet0/0/14
port link-type access
port default vlan 2000
#
5.5 Quiz
How to implement traffic load balancing by link weight among egress links?
Reference answer: When configuring a global route selection policy, set the intelligent
uplink selection mode to load balancing by link weight instead of load balancing by link
bandwidth. Configure the outbound interfaces that directly connected to ISP1 and ISP2 on
the firewall as intelligent uplink selection member interfaces, and set weights for the
interfaces.
6.1 Introduction
6.1.1 About This Lab
An enterprise network consists of the headquarters and two branches. The egress gateways
are firewalls, but they are located in different geographical areas. The headquarters and
branches need to communicate with each other across the Internet. To ensure data security,
IPsec VPNs need to be established between the headquarters and branch 1 and branch 2
to encrypt exchanged data.
In this lab, IPsec VPNs are established between the firewalls of the headquarters and two
branches to implement secure communication.
6.1.2 Objectives
⚫ Complete basic interface configurations and route configurations.
⚫ Complete the IPsec VPN site-to-multisite configuration.
⚫ Configure firewall security policies of the IPsec VPN.
Internet. SW2 and SW3 are access switches. SW1 functions as a Layer 3 switch on the
Internet. The WWW server, PC2, and PC5 connect to the network as users.
Branch network planning: Uplink and downlink ports of the SW2 and SW3 are access ports,
and PCs are assigned to corresponding VLANs. Configure the gateway of the WWW server
on FW1 and the gateway of PC2 on FW2.
Internet zone network planning: RT1, RT2, and SW1 are at Layer 3. Static routes are used
to ensure that the outbound addresses of FW1, FW2, and FW3 are reachable.
Headquarters network planning: Configure an IP address for PC5 whose gateway is on FW3.
The configurations of RT1, RT2, Mirror-SW, SW1, SW2, and SW3 are not described in the
configuration procedure. For details, see section 6.4 Configuration Reference.
G0/0/1
Mirror- PVID: 1 Interconnection
G0/0/2 Trunk
SW Allow-pass VLAN: 2, 40 interface
G0/0/3
172.16.40.10/24
Layer 3
PC2 Ethernet0 Gateway: Endpoint
interface
172.16.40.2/24
Layer 3 100.100.1.10/24
PC5 Ethernet0 Endpoint
interface Gateway:
100.100.1.1/24
Set basic network parameters according to the table in 6.1.4 Lab Planning.
RT1, RT2, SW1, SW2, SW3, and Mirror-SW are pre-configured. For details, see section 6.4
Configuration Reference.
# Configure IP addresses and security zones for GigabitEthernet0/0/2 and
GigabitEthernet0/0/5 on FW1.
<FW1> system-view
[FW1] interface GigabitEthernet 0/0/2
[FW1-GigabitEthernet0/0/2] ip address 10.3.1.2 255.255.255.252
[FW1-GigabitEthernet0/0/2] quit
[FW1-zone-trust] quit
<FW2> system-view
[FW2] interface GigabitEthernet 0/0/2
[FW2-GigabitEthernet0/0/2] ip address 10.6.1.2 255.255.255.252
[FW2-GigabitEthernet0/0/2] quit
<FW3> system-view
[FW3] interface GigabitEthernet 0/0/1
[FW3-GigabitEthernet0/0/1] ip address 100.1.1.8 255.255.255.0
[FW3-GigabitEthernet0/0/1] quit
Configure default routes to the Internet on the FW1, FW2, and FW3.
Configure interzone security policies on FW1, FW2, and FW3 to allow the traffic to be
transmitted between the Local zone and the Untrust zone. In this way, the outbound
interfaces of FW1, FW2, and FW3 can be pinged with each other.
# Configure a security policy for the Untrust-to-Local interzone on FW1.
[FW1] security-policy
[FW1-policy-security] rule name untrust-local
[FW1-policy-security-rule-untrust-local] source-zone untrust
[FW1-policy-security-rule-untrust-local] source-zone local
[FW1-policy-security-rule-untrust-local] destination-zone untrust
[FW1-policy-security-rule-untrust-local] destination-zone local
[FW1-policy-security-rule-untrust-local] action permit
[FW1-policy-security-rule-untrust-local] quit
[FW1-policy-security] quit
# By default, the firewall interface does not allow the ping test. To facilitate the test, you
can enable the ping function on the interface.
The configuration of the Untrust-to-Local interzone security policy on FW2 and FW3 is the
same as that on FW1, and is not mentioned here.
In this example, there are multiple branches. IPsec VPN is established on FW3 at the
headquarters in template mode, and it is established on FW1 and FW2 at branches in
ISAKMP mode.
# Create ACL 3500 on FW1 to match the interesting traffic from FW1 at the branch to FW3
at the headquarters.
# Create an IPsec proposal 1 on FW1. You do not need to set default parameters.
# Create ACL 3500 on FW2 to match the interesting traffic from FW2 at the branch to FW3
at the headquarters.
# Create an IPsec proposal 1 on FW2. You do not need to set default parameters.
[FW2-ipsec-proposal-1] quit
# Create ACL 3500 on FW3 to match the interesting traffic from FW3 at the headquarters
to FW1 and FW2 at the branch.
# Create an IPsec proposal 1 on FW3. You do not need to set default parameters.
# Configure an IPsec template and invoke the interesting traffic, IPsec proposal, and IKE
peer in the template.
Configure interzone security policies on FW1, FW2, and FW3 to allow PCs in the Trust zone
and those in the Untrust zone to access each other. In this way, the WWW server, PC2, and
PC5 can be pinged with each other.
# Configure a Trust-to-Untrust interzone security policy on FW1.
[FW1] security-policy
[FW1-policy-security] rule name trust-untrust
[FW1-policy-security-rule-trust-untrust] source-zone trust
[FW1-policy-security-rule-trust-untrust] destination-zone untrust
[FW1-policy-security-rule-trust-untrust] source-address 172.16.30.0 mask 255.255.255.0
[FW1-policy-security-rule-trust-untrust] destination-address 100.100.1.0 mask 255.255.255.0
[FW1-policy-security-rule-trust-untrust] action permit
[FW1-policy-security-rule-trust-untrust] quit
[FW1-policy-security] quit
[FW1] security-policy
[FW2] security-policy
[FW2-policy-security] rule name trust-untrust
[FW2-policy-security-rule-trust-untrust] source-zone trust
[FW2-policy-security-rule-trust-untrust] destination-zone untrust
[FW2-policy-security-rule-trust-untrust] source-address 172.16.40.0 mask 255.255.255.0
[FW2-policy-security-rule-trust-untrust] destination-address 100.100.1.0 mask 255.255.255.0
[FW2-policy-security-rule-trust-untrust] action permit
[FW2-policy-security-rule-trust-untrust] quit
[FW2-policy-security] quit
[FW2] security-policy
[FW2-policy-security] rule name untrust-trust
[FW2-policy-security-rule-untrust-trust] source-zone untrust
[FW2-policy-security-rule-untrust-trust] destination-zone trust
[FW2-policy-security-rule-untrust-trust] source-address 100.100.1.0 mask 255.255.255.0
[FW2-policy-security-rule-untrust-trust] destination-address 172.16.40.0 mask 255.255.255.0
[FW2-policy-security-rule-untrust-trust] action permit
[FW2-policy-security-rule-untrust-trust] quit
[FW2-policy-security] quit
[FW3] security-policy
[FW3-policy-security] rule name trust-untrust
[FW3-policy-security-rule-trust-untrust] source-zone trust
[FW3-policy-security-rule-trust-untrust] destination-zone untrust
[FW3-policy-security-rule-trust-untrust] source-address 100.100.1.0 mask 255.255.255.0
[FW3-policy-security-rule-trust-untrust] destination-address 172.16.40.0 mask 255.255.255.0
[FW3-policy-security-rule-trust-untrust] destination-address 172.16.30.0 mask 255.255.255.0
[FW3-policy-security-rule-trust-untrust] action permit
[FW3-policy-security-rule-trust-untrust] quit
[FW3-policy-security] quit
[FW3] security-policy
[FW3-policy-security] rule name untrust-trust
[FW3-policy-security-rule-untrust-trust] source-zone untrust
[FW3-policy-security-rule-untrust-trust] destination-zone trust
[FW3-policy-security-rule-untrust-trust] source-address 172.16.30.0 mask 255.255.255.0
[FW3-policy-security-rule-untrust-trust] source-address 172.16.40.0 mask 255.255.255.0
Set basic network parameters according to the table in 6.1.4 Lab Planning.
RT1, RT2, SW1, SW2, SW3, and Mirror-SW are pre-configured. For details, see section 6.4
Configuration Reference.
# Configure IP addresses for interfaces on FW1, FW2, and FW3, and assign the interfaces
to corresponding security zones. On the web UI of FW1, choose Network > Interface, and
configure IP addresses and security zones for GigabitEthernet0/0/2 and
GigabitEthernet0/0/5.
Configure default routes to the Internet on the FW1, FW2, and FW3.
# On FW1, choose Network > Route > Static Route to create a default route to the Internet.
# On FW2, choose Network > Route > Static Route to create a default route to the Internet.
# On FW3, choose Network > Route > Static Route to create a default route to the Internet.
Configure interzone security policies on FW1, FW2, and FW3 to allow the traffic to be
transmitted between the Local zone and the Untrust zone. In this way, the outbound
interfaces of FW1, FW2, and FW3 can be pinged with each other.
# On FW1, choose Policy > Security Policy > Security Policy and create a security policy
named untrust-local.
The configuration of the Untrust-to-Local interzone security policy on FW2 and FW3 is the
same as that on FW1, and is not mentioned here.
In this case, there are multiple branches. IPsec VPN is established in site-to-multisite mode
on FW3 at the headquarters, and in site-to-site mode on FW1 and FW2 at branches.
# Choose Network > IPSec > IPSec on the FW1 to create an IPsec policy. Virtual systems,
basic configurations, data flows to be encrypted, and security proposals have been
configured.
# On FW2, choose Network > IPSec > IPSec to create an IPsec policy. Virtual systems, basic
configurations, data flows to be encrypted, and security proposals have been configured.
# On FW3, choose Network > IPSec > IPSec to create an IPsec policy. Virtual systems, basic
configurations, data flows to be encrypted, and security proposals have been configured.
Configure interzone security policies on FW1, FW2, and FW3 to allow PCs in the Trust zone
and those in the Untrust zone to access each other. In this way, the WWW server, PC2, and
PC5 can be pinged with each other.
# On FW1, choose Policy > Security Policy > Security Policy and create a security policy
named trust-untrust.
# On FW1, choose Policy > Security Policy > Security Policy and create a security policy
named untrust-trust.
# On FW2, choose Policy > Security Policy > Security Policy and create a security policy
named trust-untrust.
# On FW2, choose Policy > Security Policy > Security Policy and create a security policy
named untrust-trust.
# On FW3, choose Policy > Security Policy > Security Policy and create a security policy
named trust-untrust.
# On FW3, choose Policy > Security Policy > Security Policy and create a security policy
named untrust-trust.
6.3 Verification
The final result is that the IPsec VPNs between FW1 and FW3 and between FW2 and FW3
are established, and the IKE SA and IPsec SA can be queried. At the same time, the WWW
server and PC5, and PC2 and PC5 can be pinged with each other.
# Ping the IP address of PC5 from the WWW server. The ping operation succeeds.
# Ping the IP address of PC5 from the PC2. The ping operation succeeds.
===============================
Interface: GigabitEthernet0/0/2
===============================
-----------------------------
IPSec policy name: “1”
Sequence number : 10
Acl group : 3500/IPv4
Acl rule : 10
Mode : ISAKMP
-----------------------------
Connection ID : 45
Encapsulation mode: Tunnel
Holding time : 0d 0h 27m 45s
Tunnel local : 10.3.1.2/500
Tunnel remote : 100.1.1.8/500
Flow source : 172.16.30.0/255.255.255.0 0/0-65535
Flow destination : 100.100.1.0/255.255.255.0 0/0-65535
===============================
-----------------------------
IPSec policy name: “1”
Sequence number : 1
Acl group : 3500/IPv4
Acl rule :5
Mode : ISAKMP
-----------------------------
Connection ID :8
Encapsulation mode: Tunnel
Holding time : 0d 0h 39m 43s
Tunnel local : 10.6.1.2/500
Tunnel remote : 100.1.1.8/500
Flow source : 172.16.40.0/255.255.255.0 0/0-65535
Flow destination : 100.100.1.0/255.255.255.0 0/0-65535
Interface: GigabitEthernet0/0/1
===============================
-----------------------------
IPSec policy name: “1”
Sequence number : 1
Acl group : 3500/IPv4
Acl rule : 15
Mode : Template
-----------------------------
Connection ID : 53
Tunnel index : 2684354576
Encapsulation mode: Tunnel
Holding time : 0d 0h 35m 4s
Tunnel local : 100.1.1.8/500
Tunnel remote : 10.3.1.2/500
Flow source : 100.100.1.0/255.255.255.0 0/0-65535
Flow destination : 172.16.30.0/255.255.255.0 0/0-65535
-----------------------------
IPSec policy name: “1”
Sequence number : 1
Acl group : 3500/IPv4
Acl rule : 20
Mode : Template
-----------------------------
Connection ID : 49
Tunnel index : 2684354574
Encapsulation mode: Tunnel
Holding time : 0d 0h 45m 56s
Tunnel local : 100.1.1.8/500
Tunnel remote : 10.6.1.2/500
Flow source : 100.100.1.0/255.255.255.0 0/0-65535
Flow destination : 172.16.40.0/255.255.255.0 0/0-65535
proposal 1
tunnel local applied-interface
sa trigger-mode auto
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.3.1.2 255.255.255.252
service-manage ping permit
ipsec policy 1
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.30.2 255.255.255.0
service-manage http permit
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface MEth0/0/0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 10.3.1.1
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 172.16.30.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.30.0 mask 255.255.255.0
action permit
#
return
set priority 5
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 10.6.1.1
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 172.16.40.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.40.0 mask 255.255.255.0
action permit
#
return
sysname SW2
#
vlan batch 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/15
port link-type access
port default vlan 30
#
return
6.5 Quiz
Can branches communicate with each other after this lab is complete?
Reference answer: In this lab, branches cannot communicate with each other through IPsec
VPN.
7.1 Introduction
7.1.1 About This Lab
A medium-or large-sized enterprise has two branches. The headquarters and branches are
located in different cities, which need to communicate with each other. Data access
between the headquarters and branches needs to cross the Internet. IPsec VPNs are
established between the headquarters and branches 1 and 2 to encrypt exchanged data.
In addition, services of branches 1 and 2 need to communicate with each other.
In this lab, a pre-configured script is used to simulate the problems that may occur during
the deployment. You need to meet the requirements for secure communication between
the branch and headquarters.
7.1.2 Objectives
⚫ Learn how to configure IPsec VPN.
⚫ Master the key points for configuring IPsec VPN in NAT scenarios.
⚫ Master the troubleshooting methods of IPsec VPN.
⚫ Implement the communication of enterprise branches through IPsec VPN.
According to the scenario where IPsec VPN is established between the headquarters and
multiple branches, SW2 and SW3 are access switches, SW1 functions as a Layer 3 switch
on the Internet, and WWW server, PC2, and PC5 function as user access networks.
1. Branch network planning: On SW2 and SW3, the uplink and downlink interfaces are
access interfaces. The gateway of the WWW server is on FW1, and the gateway of
PC2 is on FW2.
2. Internet zone network planning: RT1, RT2, and SW1 are at Layer 3. Static routes are
used to ensure that the outbound addresses of FW1, FW2, and FW3 are reachable.
3. Headquarters network planning: The gateway of PC5 is deployed on FW3.
4. FW1 at branch 1 needs to establish an IPsec VPN with FW3 at the headquarters. The
WWW server at branch 1 needs to access the Internet.
5. FW2 at branch 2 needs to establish an IPsec VPN with FW3 at the headquarters. PCs
at branch 2 are not allowed to access the Internet. PC2 at branch 2 needs to
communicate with PC5 at the headquarters.
6. Branch 1 and branch 2 need to communicate with each other. For security purposes,
the headquarters requires that data transmitted between branches be forwarded by
the headquarters.
Interface for
Layer 3 10.3.1.2/30 connecting to the
GE0/0/2
interface Security zone: Untrust outbound interface of
FW1 Internet and RT1
Interface for
Layer 3 10.6.1.2/30 connecting to the
GE0/0/2
interface Security zone: Untrust outbound interface of
FW2 Internet and RT1
Interface for
Layer 3 100.1.1.8/24 connecting to the
GE0/0/1
interface Security zone: Untrust outbound interface of
FW3 Internet and SW1
Interface for
G0/0/1 Access PVID: 30
connecting to FW1
SW2 Interface for
G0/0/15 Access PVID: 30 connecting to WWW
server
Interface for
G0/0/1 Access PVID: 40
connecting to FW2
SW3
Interface for
G0/0/14 Access PVID: 40
connecting to PC2
G0/0/1
Mirror- PVID: 1 Interconnection
G0/0/2 Trunk
SW Allow-pass VLAN: 2, 40 interface
G0/0/3
172.16.30.10/24
WWW Layer 3
Ethernet0 Gateway: Endpoint
Server interface
172.16.30.2/24
172.16.40.10/24
Layer 3
PC2 Ethernet0 Gateway: Endpoint
interface
172.16.40.2/24
100.100.1.10/24
Layer 3
PC5 Ethernet0 Gateway: Endpoint
interface
100.100.1.1/24
Construct the network according to the lab topology, disable the interfaces that are not
used in the lab, and import the pre-configuration scripts to the corresponding devices for
device pre-configuration.
# Pre-configure FW1.
<FW1>
sysname FW1
#
acl number 3500
rule 5 permit ip source 172.16.30.0 0.0.0.255 destination 100.100.1.0 0.0.0.255
#
ipsec proposal 1
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-256
#
ike proposal 1
encryption-algorithm aes-256
dh group14
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key Admin@123
ike-proposal 1
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
#
ipsec policy 1 10 isakmp
security acl 3500
ike-peer 1
proposal 1
tunnel local applied-interface
sa trigger-mode auto
#
interface GigabitEthernet0/0/2
undo shutdown
# Pre-configure FW2.
<FW2>
sysname FW2
#
acl number 3500
rule 5 permit ip source 172.16.40.2 0.0.0.0 destination 100.100.1.0 0.0.0.255
#
ipsec proposal 1
transform ah
ah authentication-algorithm sha2-256
#
ike proposal 1
encryption-algorithm aes-256
dh group14
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key Huawei@123
ike-proposal 1
remote-address 100.100.1.1
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
ikev2 authentication sign-hash sha2-256
#
ipsec policy 1 1 isakmp
security acl 3500
ike-peer 1
proposal 1
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.6.1.2 255.255.255.252
service-manage ping permit
ipsec policy 1
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.40.2 255.255.255.0
service-manage ping permit
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface MEth0/0/0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 10.6.6.1
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 172.16.40.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.40.0 mask 255.255.255.0
action permit
#
return
# Pre-configure FW3.
<FW3>
sysname FW3
#
acl number 3500
rule 5 permit ip source 100.100.1.0 0.0.0.255 destination 172.16.30.0 0.0.0.255
rule 10 permit ip source 100.100.1.0 0.0.0.255 destination 172.16.40.0 0.0.0.255
#
ipsec proposal 1
esp authentication-algorithm sha2-256
esp encryption-algorithm aes-256
#
ike proposal 1
encryption-algorithm aes-256
dh group14
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key Huawei@123
ike-proposal 1
rsa encryption-padding oaep
source-zone untrust
destination-zone trust
source-address 172.16.30.0 mask 255.255.255.0
source-address 172.16.40.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
#
return
# Pre-configure RT1.
<RT1>
sysname RT1
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.2
dot1q termination vid 2
ip address 4.4.4.2 255.255.255.252
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.3.1.1 255.255.255.252
#
ip route-static 0.0.0.0 0.0.0.0 4.4.4.1
#
return
# Pre-configure RT2.
<RT2>
sysname RT2
#
interface GigabitEthernet0/0/1
undo portswitch
#
interface GigabitEthernet0/0/1.40
dot1q termination vid 40
ip address 3.3.3.2 255.255.255.252
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.6.1.1 255.255.255.252
#
ip route-static 0.0.0.0 0.0.0.0 3.3.3.1
#
return
# Pre-configure SW1.
<SW1>
sysname SW1
#
vlan batch 2 40
#
interface vlanif1
ip address 100.1.1.1 255.255.255.0
#
interface vlanif2
ip address 4.4.4.1 255.255.255.252
#
interface vlanif40
ip address 3.3.3.1 255.255.255.252
#
interface GigabitEthernet0/0/2
port link-type trunk
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
ip route-static 10.3.1.0 255.255.255.252 4.4.4.2
ip route-static 10.6.1.0 255.255.255.252 3.3.3.2
#
return
# SW2 and SW3 are used only for transmitting the traffic. Ensure that the uplink and
downlink interfaces belong to the same VLAN. You can retain the default settings or refer
to the configurations of SW2 and SW3 in configuration reference.
# Pre-configure Mirror-SW.
# Configure the IP addresses of the NIC on the WWW server, PC2, and PC5 according to
the 7.1.4 Lab Planning.
The prerequisite for establishing an IPsec VPN between two firewalls is that the outbound
interfaces can ping each other, and the Untrust-to-Local interzone security policy does not
block IPsec packets and port numbers. At the same time, one end triggers the
establishment of SAs. Both the IKE SA and IPsec SA exist. Service can be transmitted only
when the encrypted interesting traffic contains service addresses.
# Verify that FW1 can ping G0/0/1 of FW3.
# Use the service address gateway on FW1 to ping the service address gateway of the
headquarters.
If no IKE SA or IPsec SA is found, the IPsec VPN fails to be established. In this case, you
need to establish the IKE SA first. Check the configuration of IKE phase 1.
# Display the cause of an IKE negotiation failure.
Peer : 100.1.1.8
Port : 500
version : v2
Reason : authentication fail
Detail : recv peer auth fail notification(pre-share-key)
Error-time : 20XX-XX-XX
The IKE negotiation fails because the pre-shared key authentication fails.
# Check the pre-configuration of IKE phase 1 on FW1.
#
ike proposal 1
encryption-algorithm aes-256
dh group14
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key Admin@123
ike-proposal 1
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
#
ike proposal 1
encryption-algorithm aes-256
dh group14
authentication-algorithm sha2-256
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key Huawei@123
ike-proposal 1
remote-address 100.100.1.1
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
ikev2 authentication sign-hash sha2-256
#
The pre-shared keys configured on the IKE peers of FW1 and FW2 are inconsistent.
# Change the IKE peer key of FW1.
# Use the service address gateway on FW1 to ping the service address gateway of the
headquarters again.
# If IKE SA and IPsec SA exist but service traffic fails to be transmitted, check whether ACL
3500 matches service traffic.
It is found that the number of ACL 3500 does not increase. Therefore, it can be determined
that the traffic is not processed by the IPsec module. When processing packets, the firewall
performs NAT first and uses the IPsec module to match the packets. Source NAT is required
for branch 1 to access the Internet.
# Check the NAT configuration of the firewall.
nat-policy
rule name nat
source-zone local
source-zone trust
destination-zone untrust
action source-nat easy-ip
The preceding NAT configuration indicates that the source NAT is performed when traffic
is forwarded from the Local and Trust zones of FW1 to the Untrust zone. The outbound
interface of the FW1's route is G0/0/2. Therefore, the source address of the traffic received
by the IPsec module is 10.3.1.2, which cannot match ACL 3500.
# Delete the NAT policy before modifying NAT configurations.
[FW1] nat-policy
[FW1-policy-nat] undo rule name nat
# Reconfigure NAT.
[FW1] nat-policy
[FW1-policy-nat] rule name IPSec-deny
[FW1-policy-nat-rule-IPSec-deny] destination-address 100.100.1.0 mask 255.255.255.0
[FW1-policy-nat-rule-IPSec-deny] source-zone local
[FW1-policy-nat-rule-IPSec-deny] source-zone trust
[FW1-policy-nat-rule-IPSec-deny] destination-zone untrust
[FW1-policy-nat-rule-IPSec-deny] action no-nat
[FW1-policy-nat-rule-IPSec-deny] quit
[FW1-policy-nat] rule name nat
[FW1-policy-nat-rule-nat] source-zone local
[FW1-policy-nat-rule-nat] source-zone trust
[FW1-policy-nat-rule-nat] destination-zone untrust
[FW1-policy-nat-rule-nat] action source-nat easy-ip
[FW1-policy-nat-rule-nat] quit
[FW1-policy-nat] quit
The NAT policy of USG6000E V600R007 matches traffic from top to bottom. First, the traffic
matches the IPSec-deny rule to disable NAT for the traffic destined for 100.100.1.0/24 at
the headquarters, and then the traffic matches the IPsec interesting traffic. Furthermore,
the firewall initiates an IKE negotiation, and uses the nat rule to ensure that users on FW1
can access the Internet.
# Use the service address gateway on FW1 to ping the service address gateway of the
headquarters again.
# Use the WWW server at branch 1 to ping PC5 at the headquarters. The ping operation
succeeds.
After the fault between branch 1 and the headquarters is rectified, PCs are reachable to
each other.
Perform the check by referring to the troubleshooting roadmap for branch 1 and
headquarters in Step 2.
# Verify that FW2 fails to ping G0/0/1 of FW3.
# The security policy on FW2 permits traffic from the Local zone to the Untrust zone.
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
# Check the routing table. The default route from FW2 to the Internet is not found.
Destinations : 19 Routes : 19
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.6.1.0/30 Direct 0 0 D 10.6.1.2 GigabitEthernet0/0/2
10.6.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2
10.6.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.40.0/24 Direct 0 0 D 172.16.40.2 GigabitEthernet0/0/5
172.16.40.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/5
172.16.40.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/5
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
It is found that the next hop of the default route is incorrectly configured. Change the next
hop to 10.6.1.1.
# Perform the ping test again. FW2 can ping G0/0/1 of FW3.
# On FW2, use the service address gateway to ping the service address gateway of the
headquarters to trigger IKE negotiation.
IKE SA information :
Conn-ID Peer VPN Flag(s) Phase RemoteType RemoteID
--------------------------------------------------------------------------------------------------------
14 100.1.1.8/500 RD|ST|A v2:1 IP 100.1.1.8
Number of IKE SA : 1
--------------------------------------------------------------------------------------------------------
The check result shows that the IKE SA negotiation is normal but the IPsec SA does not
exist, which indicates that the IKE negotiation in phase 1 succeeds but the IKE negotiation
in phase 2 fails. This problem is usually caused by inconsistent interconnection parameters.
# Check the IPsec proposal configuration on FW2.
It is found that the transmission mode of the IPsec proposal on FW2 is AH, but the
transmission mode on FW3 is ESP. The configurations are inconsistent.
# Modify IPsec proposal 1 on FW2 as follows:
# On FW2, use the service address gateway to ping the service address gateway of the
headquarters again to trigger IKE negotiation.
The service IP address can be pinged, indicating that the IKE SA and IPsec SA are
successfully negotiated.
# Ping PC5 from PC2. The ping operation fails and service traffic fails to be transmitted.
The service gateway addresses on the two firewalls are reachable to each other, but service
traffic fails to be transmitted. In this case, you need to check whether the gateway settings
of the PC are correct. In this lab, PC's gateway is correct by default.
# Check the matching count of ACL 3500.
The count of the ACL before and after PC2 pings PC5 is both 5, which does not increase.
Check the configuration again. It is found that the source address of ACL 3500 does not
contain the entire service network segment of FW2.
# Modify the configuration of ACL 3500 on FW2.
# Use PC2 at branch 2 to ping PC5 at the headquarters. Services are normal.
After the fault between branch 2 and the headquarters is rectified, PCs are reachable to
each other.
The traffic between branches needs to be forwarded by the headquarters. The traffic is
forwarded along the following path: WWW server→ FW1 → FW3 → FW2 → PC2.
Through data exchange, no IPsec VPN needs to be established between branches. The
WWW server at branch 1 accesses PC2 at branch 2. When a packet reaches FW1 of branch
1, FW1 performs IPsec VPN encapsulation on the packet and forwards it to FW3. FW3
forwards the packet to FW2 through the IPsec VPN. The logic for PC2 to access the WWW
server is the same.
# Use the WWW server at branch 1 to ping PC2 at branch 2.
# Check whether the ACL of branch 1 is matched. If so, encrypt and send the traffic to the
headquarters over the IPsec VPN tunnel..
Check the ACL on FW1 and find that the interesting traffic from WWW server network
segment to PC2 network segment is not configured and needs to be added.
# On the ACL 3500 of FW1, add the interesting traffic from WWW server network segment
to PC2 network segment.
Similarly, the interesting traffic of FW2 and FW3 also need to be added.
# On the ACL 3500 of FW2, add the interesting traffic from PC2 network segment to WWW
server network segment.
# On the ACL 3500 of FW3, add the interesting traffic from WWW server network segment
to PC2 network segment and from PC2 network segment to PC1 network segment.
If the traffic is not matched by the interesting traffic in IPsec VPN, source NAT may be
performed on the traffic.
# Check the NAT configuration on FW1.
#
nat-policy
rule name IPSec-deny
source-zone local
source-zone trust
destination-zone untrust
destination-address 100.100.1.0 mask 255.255.255.0
action no-nat
rule name nat
source-zone local
source-zone trust
destination-zone untrust
action source-nat easy-ip
#
It is found that the FW1 performs source NAT on the traffic sent from the WWW server to
PC2.
# Modify the NAT configuration on FW1.
[FW1] nat-policy
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 172.16.30.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.30.0 mask 255.255.255.0
action permit
#
It is found that Untrust-to-Trust interzone security policy does not permit traffic from
network segment 172.16.40.0/24.
# Modify the security policy of FW1.
[FW1] security-policy
[FW1-policy-security] rule name trust-untrust
[FW1-policy-security-rule-trust-untrust] destination-address 172.16.40.0 mask 255.255.255.0
[FW1-policy-security-rule-trust-untrust] rule name untrust-trust
[FW1-policy-security-rule-untrust-trust] source-address 172.16.40.0 mask 255.255.255.0
[FW1-policy-security-rule-untrust-trust] quit
[FW1-policy-security] quit
[FW2] security-policy
[FW2-policy-security] rule name trust-untrust
[FW2-policy-security-rule-trust-untrust] destination-address 172.16.30.0 mask 255.255.255.0
[FW2-policy-security-rule-trust-untrust] rule name untrust-trust
[FW2-policy-security-rule-untrust-trust] source-address 172.16.30.0 mask 255.255.255.0
[FW2-policy-security-rule-untrust-trust] quit
[FW2-policy-security] quit
Branches can communicate with each other after the troubleshooting is complete.
7.3 Verification
After the troubleshooting is complete, the corresponding result verification is displayed at
the end of the step. The final symptom is as follows:
1. An IPsec VPN is established between FW1 and FW3. The WWW server on FW1 can
access the Internet, PC5 at the headquarters, and PC2 at branch 2.
2. An IPsec VPN is established between FW2 and FW3. The PC2 on FW2 can access PC5
at the headquarters and the WWW server at branch 1.
3. PC5 on FW3 can access the WWW server and PC2 at the branches.
ike peer 1
pre-shared-key Huawei@123
ike-proposal 1
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
#
ipsec policy 1 10 isakmp
security acl 3500
ike-peer 1
proposal 1
tunnel local applied-interface
sa trigger-mode auto
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.3.1.2 255.255.255.252
service-manage ping permit
ipsec policy 1
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.30.2 255.255.255.0
service-manage http permit
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface MEth0/0/0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 10.3.1.1
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 172.16.30.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet0/0/7
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
#
security-policy
rule name untrust-local
source-zone untrust
source-zone local
destination-zone untrust
destination-zone local
action permit
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.30.0 mask 255.255.255.0
destination-address 172.16.40.0 mask 255.255.255.0
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 172.16.30.0 mask 255.255.255.0
source-address 172.16.40.0 mask 255.255.255.0
destination-address 100.100.1.0 mask 255.255.255.0
action permit
#
return
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.3.1.1 255.255.255.252
#
ip route-static 0.0.0.0 0.0.0.0 4.4.4.1
#
return
#
return
interface GigabitEthernet0/0/14
port link-type access
port default vlan 40
#
return
7.5 Quiz
To meet the requirements of mutual access between branches through IPsec VPN, how to
configure security policies on the firewall at the headquarters?
Reference answer: The firewall at the headquarters needs to permit traffic transmitted
between the Untrust zone to the Untrust zone. (By default, the traffic between the same
zones of the same firewall is automatically permitted.)
8.1 Introduction
8.1.1 About This Lab
The firewall is deployed at the egress of the enterprise headquarters. Internet users access
services of the enterprise headquarters in SSL VPN network extension mode.
In this lab, a pre-configured script is used to simulate the problems that may occur during
the deployment. You need to meet the requirements for secure communication between
Internet users and the headquarters.
8.1.2 Objectives
⚫ Learn how to configure SSL VPN.
⚫ Master the SSL VPN troubleshooting roadmap.
⚫ Enable Internet users to communicate with the headquarters.
FW2 functions as the security device at the egress of the enterprise network. The legal PC
establishes a tunnel connection with FW2 through SSL VPN network extension and accesses
PC1 through SSL VPN.
Key configurations of device interfaces are described in 8.3 Configuration Reference.
Interface for
SW1
G0/0/14 Access PVID: 1000 connecting to the
legal PC
Interface for
G0/0/1 Access PVID: 1 connecting to
SW3 FW2
Interface for
G0/0/13 Access PVID: 1
connecting to PC1
Interface for
connecting to the
Layer 3
GE0/0/2 10.6.1.2/30 outbound
interface
FW2 interface of
Internet and RT2
Layer 3
GE0/0/5 172.16.10.1/24 Gateway of PC1
interface
PC Gateway: 100.20.1.1
172.16.10.2/24
PC1 Ethernet0 NIC Endpoint
Gateway: 172.16.10.1
Construct the network according to the lab topology, disable the interfaces that are not
used in the lab, and import the pre-configuration scripts to the corresponding devices for
device pre-configuration.
# Pre-configure SW1.
#
sysname SW1
#
vlan batch 2 40 1000
#
interface vlanif40
ip address 3.3.3.1 255.255.255.252
#
interface vlanif1000
ip address 100.20.1.1 255.255.255.0
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 40
#
interface GigabitEthernet0/0/14
port link-type access
port default vlan 1000
#
ip route-static 10.6.1.0 255.255.255.252 3.3.3.2
#
return
# Pre-configure RT2.
sysname RT2
#
interface GigabitEthernet0/0/1.40
dot1q termination vid 40
ip address 3.3.3.2 255.255.255.252
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.6.1.1 255.255.255.252
#
ip route-static 0.0.0.0 0.0.0.0 3.3.3.1
#
Return
# Pre-configure FW2.
#
sysname FW2
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.6.1.2 255.255.255.252
service-manage ping permit
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.10.1 255.255.255.0
service-manage ping permit
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/2
#
ip route-static 0.0.0.0 0.0.0.0 10.6.1.1
#
v-gateway public ssl version tlsv12
v-gateway public ssl public-key algorithm rsa
v-gateway public ssl ciphersuit custom aes256-sha aes128-sha
v-gateway ssl-renegotiation-attack defend enable
v-gateway ssl weak-encryption enable
v-gateway gateway interface GigabitEthernet0/0/2 private
v-gateway gateway alias gateway
#
#****BEGIN***gateway**1****#
v-gateway gateway
basic
ssl version tlsv12
ssl timeout 5
# Pre-configure SW3.
#
sysname SW3
#
interface GigabitEthernet0/0/1
port link-type access
#
interface GigabitEthernet0/0/13
port link-type access
#
Return
# Pre-configure Mirror-SW.
#
sysname Mirror-SW
#
vlan 40
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
##
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
return
Before configuring SSL VPN, you should ensure that legal PC can communicate with the
outbound interface GigabitEthernet0/0/1 of FW2 and FW2 can communicate with PC1.
# On the legal PC, ping the outbound interface GigabitEthernet0/0/1 of FW2. The ping
operation succeeds.
# Use the UniVPN client software on the legal PC to create an SSL VPN connection.
# On the home page of the UniVPN client software, select the new VPN connection and
click Connect.
# On the login page that is displayed, enter the user name user01 and password
Huawei@123, and click Login.
# Click Continue.
# A message is displayed in the lower right corner of the computer, indicating that the
login is successful.
The SSL VPN in network extension mode is used. After the VPN dial-up of the legal PC is
successful, check whether the CMD of the legal PC contains the route to the headquarters.
Check the FW2 at the headquarters and permit the traffic from the area where the legal
PC resides to the area where the internal service resides.
# Check whether the IP address assigned by FW2 is obtained from the CMD of the legal
PC.
The check result shows that the legal PC has no route to the network segment of FW2
service address. This problem needs to be solved.
# Check the configuration of the SSL VPN network extension routing mode on FW2.
v-gateway gateway
basic
ssl version tlsv12
ssl timeout 5
ssl lifecycle 1440
ssl public-key algorithm rsa
ssl ciphersuit custom aes256-sha aes128-sha
service
network-extension enable
network-extension keep-alive enable
network-extension keep-alive interval 120
network-extension netpool 10.10.1.1 10.10.1.10 255.255.255.0
netpool 10.10.1.1 default
network-extension mode manual
It is found that the routing mode of network extension is set to manual routing mode, but
the specific route to the service address of the headquarters is not added in manual routing
mode.
# Complete the network extension configuration on FW2 and add specific routes to the
headquarters network in manual routing mode.
# After the SSL VPN configuration is modified on FW2, the VPN of legal PC is forcibly
terminated. After re-dialing in to the VPN, check the IP address obtained by legal PC.
# Ping the service address 172.16.10.2 of the headquarters on the legal PC.
It is found that the service address is unreachable. The routing table of the legal PC has
sent the data packet to FW2. Therefore, you need to check the FW2 configuration.
# Enable the debugging function on FW2 to view detailed information about data packets
processed on FW2.
Ping the service address 172.168.10.2 of the headquarters on the legal PC to trigger the
service.
<FW2>
INFO_01:Sec Policy match rule id:0x0, action:0, log:0, condition SrcZone:2, DstZone:1, SrcGroup:0,
DstGroup:0, SrcIp:a0a0102, DstIp:ac100a02,Pro:1, SrcPort:8, DstPort:0, User:8000, App:131071, Url:1-
60000-0, Vsys:0,AccessType:0, DeviceType:0, VlanId:0, SrcLocId:2098, DstLocId:2098, SrcMacId:0,
DstMacId:0,SrcDomainId:2048-2048, DstDomainId:2048-2048, accRtn:0, TrafficLog:0
The ping packet matches the security policy whose ID is 0x0. In USG6500E
V600R007C20SPC500, rule id 0x0 indicates the default security policy. That is, the packet
does not match any specific security policy. Because the default action of the security policy
is deny, the packet is denied.
# Modify the security policy on FW2.
[FW2] security-policy
[FW2-policy-security] rule name untrust-trust
[FW2-policy-security-rule-untrust-trust] source-zone untrust
[FW2-policy-security-rule-untrust-trust] destination-zone trust
[FW2-policy-security-rule-untrust-trust] destination-address 172.16.10.0 mask 255.255.255.0
[FW2-policy-security-rule-untrust-trust] action permit
[FW2-policy-security-rule-untrust-trust] quit
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.6.1.2 255.255.255.252
service-manage ping permit
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.10.1 255.255.255.0
service-manage ping permit
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/2
#
ip route-static 0.0.0.0 0.0.0.0 10.6.1.1
#
v-gateway public ssl version tlsv12
v-gateway public ssl public-key algorithm rsa
v-gateway public ssl ciphersuit custom aes256-sha aes128-sha
v-gateway ssl-renegotiation-attack defend enable
v-gateway ssl weak-encryption enable
v-gateway gateway interface GigabitEthernet0/0/2 private
v-gateway gateway alias gateway
#
#****BEGIN***gateway**1****#
v-gateway gateway
basic
ssl version tlsv12
ssl timeout 5
ssl lifecycle 1440
ssl public-key algorithm rsa
ssl ciphersuit custom aes256-sha aes128-sha
service
network-extension enable
network-extension keep-alive enable
network-extension keep-alive interval 120
network-extension netpool 10.10.1.1 10.10.1.10 255.255.255.0
netpool 10.10.1.1 default
network-extension mode manual
network-extension manual-route 172.16.10.0 255.255.255.0
security
policy-default-action permit vt-src-ip
certification cert-anonymous cert-field user-filter subject cn group-filter subject cn
certification cert-anonymous filter-policy permit-all
certification cert-challenge cert-field user-filter subject cn
certification user-cert-filter key-usage any
undo public-user enable
hostchecker
cachecleaner
vpndb
group /default
role
role default
role default condition all
role default network-extension enable
#****END****#
#
security-policy
rule name untrust-local
source-zone untrust
destination-zone local
destination-address 10.6.1.2 mask 255.255.255.255
action permit
rule name untrust-trust
source-zone untrust
destination-zone trust
source-address 10.10.1.0 mask 255.255.255.0
source-address 100.100.1.0 mask 255.255.255.0
destination-address 172.16.1.0 mask 255.255.255.0
destination-address 172.16.10.0 mask 255.255.255.0
destination-address 172.16.40.0 mask 255.255.255.0
action permit
#
The following configurations are saved in the database and are not displayed in the configuration file.
user-manage user user01 domain default
password Huawei@123
parent-group /default
#
return
8.4 Quiz
In addition to the manual routing mode, what are the other routing modes of the SSL VPN
on the firewall? What are their logics?
Reference answer: There are three routing modes for SSL VPN: split routing mode, full
routing mode, and manual routing mode.
In split routing mode, The data sent from the client to the intranet is identified by the
system routing table and forwarded by the vNIC, and the vNIC uses the virtual IP address
as the source IP address of the data. The data destined for the local subnet is forwarded
by a NIC, and the NIC uses the actual IP address as the source IP address of the data.
Therefore, network extension forwards only the data to the intranet. At the same time, the
vNIC also forwards the data not destined for the local subnet.
In full routing mode, No matter what resources the device accesses, the data is intercepted
by the virtual NIC, and the vNIC forwards the data to the virtual gateway.
In manual routing mode, configure a static route to the intranet on the device. The client
identifies the data destined for the intranet and forwards the data through the vNIC.
9 Anti-DDoS
9.1 Introduction
9.1.1 About This Lab
Large-scale DDoS attacks may occur on the Internet. An enterprise deploys anti-DDoS
devices at the network egress to check traffic from the Internet to the intranet, blocking
threats in real time.
In this lab, static traffic diversion is deployed in off-path mode to block packets from known
attack sources on the Internet to access the enterprise intranet.
9.1.2 Objectives
⚫ Learn how to use the Abnormal Traffic Inspection & Control System (ATIC)
management center to manage anti-DDoS devices.
⚫ Understand how to use the SecoManager management center.
⚫ Learn how to divert traffic based on the Modular QoS Command-Line Interface
(MQC).
⚫ Understand the usage logic of source NAT and destination NAT in the anti-DDoS
scenario.
⚫ Manage anti-DDoS devices through the SecoManager to block traffic.
traffic (from the Internet to the intranet) to the anti-DDoS cleaning device for
cleaning.
3. Anti-DDoS area: The ATIC manages and delivers corresponding policies to the anti-
DDoS detecting and cleaning devices.
4. Intranet area of the enterprise headquarters: The web server on the intranet needs to
provide services for the Internet and the gateway of the web server is deployed on
the firewall.
Interface for
G0/0/1 Access PVID: 1
connecting to FW1
SW2 Interface for
G0/0/15 Access PVID: 1 connecting to WWW
Server
device
Traffic diversion
interface, connecting
Layer 3
VLANIF15 1.1.1.1/24 to G0/0/0.15 on the
interface
anti-DDoS cleaning
device
Traffic injection
interface, connecting
Layer 3
VLANIF20 2.2.2.1/24 to G0/0/0.20 on the
interface
anti-DDoS cleaning
device
vpn instance:
Layer 3 _management_vpn_ Management
MEth0/0/0
interface interface
192.168.2.10/24
Anti-
DDoS Traffic diversion
detecting Layer 3
G0/0/0 / interface, connecting
device interface
to Mirror-SW
vpn instance:
Layer 3 _management_vpn_ Management
MEth0/0/0
interface interface
192.168.2.12/24
Anti- Layer 3 Traffic diversion
DDoS G0/0/0.15 1.1.1.2/24
interface interface
cleaning
device Layer 3 Traffic injection
G0/0/0.20 2.2.2.2/24
interface interface
Set basic network parameters according to the table in 9.1.4 Lab Planning.
SW1, SW2, and Mirror-SW are pre-configured. For details, see 9.4 Configuration Reference.
You need to run commands to specify and activate the related functions on the anti-DDoS
detecting and cleaning devices.
# Specify the CPU detection function on the anti-DDoS detecting device.
After specifying the CPU detection function, you need to save the configuration and restart
the device to make the configuration of the detection interface take effect.
# Save the configuration and restart the anti-DDoS detecting device.
[check] quit
<check> save
Warning: The current configuration will be written to the device. Continue? [Y/N]:Y
Info: Please input the file name(*.cfg, *.zip, *.dat):
Now saving the current configuration to the slot 0 ..
Info: Save the configuration successfully.
<check> reboot
slot 0:
Next startup system software: flash:/AntiDDoS1900_V600R021C00SPC100.cc
Next startup saved-configuration file: flash:/vrpcfg.zip
Next startup paf file: default
Next startup patch package: flash:/AntiDDoS1900_V600R021SPH001.PAT
# Enable the detection and the traffic statistics collection function on the interface of the
anti-DDoS detecting device.
# Enable the cleaning and the traffic statistics collection function on the interfaces of the
anti-DDoS cleaning device and configure IP addresses for the interfaces.
[DDoS1-check] snmp-agent
[DDoS1-check] snmp-agent sys-info version v3
# Configure an SNMPv3 user and user group, and configure the authentication key and
encryption key.
# Grant the read, write, and alarm reporting permissions to the user group on the device.
[DDoS1-check] snmp-agent group v3 group1 privacy read-view mib2view write-view mib2view notify-
view mib2view
# Enable the SNMP Trap function on the device and set the source port.
# Configure the NETCONF administrator and the corresponding service type, level, and
authentication type, and enable SSH.
[DDoS1-check] aaa
[DDoS1-check-aaa] local-user netconf-admin password irreversible-cipher Hello@123
[DDoS1-check-aaa] local-user netconf-admin privilege level 3
[DDoS1-check-aaa] local-user netconf-admin service-type ssh
[DDoS1-check-aaa] quit
[DDoS1-check] ssh user netconf-admin
[DDoS1-check] ssh user netconf-admin authentication-type all
[DDoS1-check] ssh user netconf-admin service-type all
# Configure the STelnet protocol on the device and configure the local key pair.
# Set the VTY user authentication mode to AAA and configure the VTY user interface to
support SSH.
[DDoS1-check] aaa
[DDoS1-check-aaa] local-user admin123 password
Please configure the login password (8-128)
It is recommended that the password consist of four types of characters, including lowercase letters,
uppercase letters, numerals and special characters.
Please enter password:Huawei@123
Please confirm password: Huawei@123
[DDoS1-check-aaa] local-user admin123 service-type ssh
[DDoS1-check-aaa] local-user admin123 privilege level 3
[DDoS1-check-aaa] quit
# Create an SSH user and configure the authentication mode and service type.
For details about the configuration on the anti-DDoS cleaning device, see the preceding
operations.
# On the anti-DDoS detecting device, set the source address for sending logs to the address
of the local GigabitEthernet0/0/3 interface and the address of the log receiving server to
the address of the SecoManager server.
# On the anti-DDoS cleaning device, set the source address for sending logs to the address
of the local GigabitEthernet0/0/3 interface and the address of the log receiving server to
the address of the SecoManager server.
# On the SecoManager web UI, choose Device Management > Device > Device from the
main menu. In the More drop-down list, click SSH Public Key Fingerprint Policy and set the
parameters as follows:
# On the SecoManager web UI, choose Device Management > Device > Device from the
main menu. In the Add Device drop-down list, click Auto Discover, set the parameters as
follows, and click Start Scanning.
# Choose Device Management > Device > Device and click Information collection on the
right to collect anti-DDoS information to the SecoManager.
# Choose Device Management > Device > AntiDDoS Collector, click Associate device in the
upper left corner, select two devices as shown in the following figure, and click OK.
# Choose AntiDDoS Attack Defense > Attack Defense > Zone, create a Zone named test,
and set the parameters as follows.
# Choose AntiDDoS Attack Defense > Attack Defense > Zone. Click the drop-down list in
front of test to display the detailed protection policies of the two devices.
# Click Edit, modify the ICMP policies of DDoS1-check and DDoS1-clean, and deploy the
policies.
# Choose AntiDDoS Attack Defense > Attack Defense > Zone, select test, and click Deploy.
# On RT1, divert the traffic (from the Internet to the intranet) to the anti-DDoS cleaning
device. That is, redirect the inbound traffic that pass through GigabitEthernet0/0/1.2 on
RT1 to the IP address of GigabitEthernet0/0/0.15 on the anti-DDoS cleaning device.
On the anti-DDoS cleaning device, configure a default route to inject cleaned data packets
back to the traffic injection interface (2.2.2.1) on RT1. The anti-DDoS cleaning device has
the configuration about security zones and security policy. Therefore, you need to add
interfaces to security zones and configure the security policy for allowing traffic to pass
through.
# Configure a route for traffic injection.
The anti-DDoS cleaning device sends cleaned traffic to VLANIF 20 on RT1 through a static
route, and RT1 needs to forward the traffic to WWW Server on the intranet. To achieve
this need, configure destination NAT on VLANIF 20 of RT1. When WWW Server returns
packets to Attack PC, there must be a default route destined for the Internet and source
NAT must be configured on the router.
# Configure destination NAT on VLANIF 20 of RT1.
# Configure a default route destined for the Internet and source NAT on RT1.
# On FW1, add interfaces to corresponding security zones and configure the security policy
for allowing traffic to pass through.
9.3 Verification
In this lab, the alarm threshold for the Zone to receive ICMP packets is set to 1 time/s in
the anti-DDoS devices. If the packet sending rate exceeds the threshold, the system
considers that an attack occurs. Open multiple CMD windows on Attack PC and
continuously ping WWW Server on the enterprise intranet. The anti-DDoS devices block
the ping requests and the SecoManager generates an event alarm.
This lab simulates a scenario where an Internet user attacks the enterprise intranet server.
The enterprise intranet server uses the public IP address 10.10.10.10 to provide services for
Internet users. In the lab, NAT Server is configured on VLANIF 20 of RT1 according to the
traffic direction to meet service and test requirements.
# After completing the configuration according to the configuration procedure, open
multiple CMD windows on Attack PC and ping 10.10.10.10 at the same time.
The ping results are intermittent, indicating that the anti-DDoS function takes effect.
# On the SecoManager, choose AntiDDoS Attack Defense > Attack Defense > Zone. An
anomaly is displayed. Click Attacked to view details.
# Cancel traffic diversion configured on RT1 and perform the ping test again. No packet
loss occurs.
#
interface GigabitEthernet0/0/13
port link-type access
port default vlan 11
#
ip route-static 10.10.10.0 255.255.255.0 4.4.4.2
#
return
accounting-scheme default
accounting-mode none
local-user policy security-enhance
local-aaa-user password policy administrator
domain default
authentication-scheme default
accounting-scheme default
local-user admin123 password irreversible-cipher
$1d$e2Qq>~HR#9ffEg90$B2s7SwidM51WMQLv=Mf9E)A[9!s3hINKS.UI;o[0$
local-user admin123 privilege level 3
local-user admin123 service-type ssh
local-user netconf-admin password irreversible-cipher
$1d$"FzPBP.$>~"oJ&$Q$K]jjC8S8ZEJzo01*}NpQO7SOAY1,tM82^".&~^!;$
local-user netconf-admin privilege level 3
local-user netconf-admin service-type ssh
#
interface MEth0/0/0
ip binding vpn-instance _management_vpn_
ip address 192.168.2.10 255.255.255.0
#
interface GE0/0/0
anti-ddos flow-statistic enable
anti-ddos detect enable
#
interface GE0/0/3
ip address 192.168.2.13 255.255.255.0
#
snmp-agent sys-info version v3
snmp-agent group v3 group1 privacy read-view mib2view write-view mib2view notify-view mib2view
snmp-agent group v3 testgroup privacy read-view mib2view write-view mib2view notify-view
mib2view
#
snmp-agent mib-view included mib2view iso
snmp-agent usm-user v3 admin
snmp-agent usm-user v3 admin group group1
snmp-agent usm-user v3 admin authentication-mode sha2-256
cipher %+%##!!!!!!!!!"!!!!#!!!!*!!!!ag]j2t^t\"cw8cA*D"!!M*/I;@&kH;f_zv)!!!!!2jp5!!!!!!;!!!!u|::,#ny>WT0jC.:ee
$Z22u:XI]jI#>#+:S!!!!!%+%#
snmp-agent usm-user v3 admin privacy-mode aes256
cipher %+%##!!!!!!!!!"!!!!#!!!!*!!!!ag]j2t^t\"Okf&,JCeD7y/&K/YXJJS[tDZL!!!!!2jp5!!!!!!;!!!!2o)~@a\R4I2U2`V
;_YpB-g(W5,b;_Nr7a.Q!!!!!%+%#
#
snmp-agent trap source GE0/0/3
#
snmp-agent protocol source-interface MEth0/0/0
undo snmp-agent protocol source-status all-interface
undo snmp-agent protocol source-status ipv6 all-interface
#
undo snmp-agent proxy protocol source-status all-interface
undo snmp-agent proxy protocol source-status ipv6 all-interface
#
snmp-agent trap enable
#
stelnet server enable
snetconf server enable
ip address 10.10.10.0 24
ip address 4.4.4.2 32
anti-ddos destination-ip session-limit protocol udp max-speed 10000
bandwidth-limit destination-ip type udp max-speed 50000
bandwidth-limit destination-ip type icmp max-speed 1
bandwidth-limit destination-ip type tcp-fragment max-speed 1000
bandwidth-limit destination-ip type udp-fragment max-speed 1000
bandwidth-limit destination-ip type other max-speed 100000
anti-ddos rst-flood session-check
anti-ddos syn-flood source-detect mode advanced
anti-ddos tcp-abnormal-flood alert-rate 500
anti-ddos syn-flood source-limit max-number 20 duration 3
anti-ddos dns format-check alert-rate 500
anti-ddos dns-request-flood source-detect
anti-ddos ack-flood session-check
anti-ddos udp-flood fingerprint-learn enable
anti-ddos udp-malformed-flood alert-rate 500
anti-ddos udp-flood defend alert-speed 500
anti-ddos https-flood defend alert-rate 20000
anti-ddos https-flood ssl-defend illegal-session-num 3 interval 5
anti-ddos https-flood ssl-defend incomplete-negotiation enable
anti-ddos tls-flood large-resource resource-size 100 illegal-ratio 90 min-number 50 interval 5
anti-ddos tls-flood fixed-resource illegal-ratio 90 min-number 20 interval 5
anti-ddos tls-flood concurrent-connection alert-number 10000
anti-ddos http-flood defend alert-request 5000
anti-ddos http-flood detect-uri source-statistic illegal-ratio 90 min-number 20 interval 5
anti-ddos http-flood detect-uri index 1 uri / full-matching
anti-ddos http-flood large-resource resource-size 100 illegal-ratio 90 min-number 50 interval 5
anti-ddos http-flood illegal-session-check
anti-ddos http-flood illegal-session-check null-method-check enable
anti-ddos http-flood illegal-session-check range-header-check enable
anti-ddos http-flood illegal-session-check multi-method-check enable
anti-ddos http-flood concurrent-connection alert-number 10000
anti-ddos tcp-connection-flood alert-number 20000
anti-ddos tcp-connection-flood alert-rate 5000
anti-ddos tcp-connection-flood illegal-session-check packet-min-number 1 interval 5
anti-ddos tcp-connection-flood illegal-session-check illegal-session-num 3 interval 5
anti-ddos dns-request-limit source-ip other max-rate 200
anti-ddos first-packet-check tcp interval upper-limit 1
anti-ddos first-packet-check udp interval upper-limit 2
anti-ddos first-packet-check syn interval lower-limit 2 upper-limit 4
anti-ddos first-packet-check syn-ack interval lower-limit 2 upper-limit 4
anti-ddos filter attack alert-rate 10000
anti-ddos source-port statistic enable
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GE0/0/0
#
firewall zone untrust
set priority 5
add interface GE0/0/3
#
firewall zone dmz
set priority 50
#
security-policy
default action permit
rule name pass
action permit
#
return
9.5 Quiz
1. Describe the direction of traffic from Attack PC to WWW Server.
Answer: Attack PC -> SW1 -> Mirro-SW -> RT1 -> Anti-DDoS (cleaning device) -> RT1
-> FW1 -> SW1 -> WWW Server.
2. When the anti-DDoS device configuration is cleared and the devices are
reconfigured, the SecoManager cannot manage the anti-DDoS devices. What are the
possible causes?
Answer: SNMP, NETCONF, and STelnet usernames and passwords on the SecoManager
and the anti-DDoS devices should be the same for device management. Check whether
the usernames and passwords are the same. After the STelnet user names and
passwords are created on anti-DDoS devices, the passwords must be changed upon
the first login. The passwords configured on the SecoManager must be the same as
the new passwords set on the anti-DDoS devices.
10 Vulnerability Defense
10.1 Introduction
10.1.1 About This Lab
On an enterprise network, the enterprise server provides web services for external users.
Authorized Internet users can access web server resources on the intranet. However,
unauthorized Internet users may exploit SQL injection vulnerabilities to access data in the
database on the intranet without authorization and steal users' personal information,
causing information leakage. Therefore, the intrusion prevention function should be
configured on the firewall to defend against SQL injection attacks (initiated by Internet
users) targeting the web server on the enterprise intranet.
10.1.2 Objectives
⚫ Understand the principles and exploitation methods of SQL injection vulnerabilities in
Hypertext Preprocessor (PHP) through Damn Vulnerable Web Application (DVWA)
instances.
⚫ Understand how to configure the intrusion prevention function on the firewall for
threat prevention.
10.1.3.2/30
Layer 3 Interface for
G0/0/2 Security zone:
interface connecting to RT1
Untrust
FW1
172.16.30.1/24 Interface for
Layer 3
G0/0/5 connecting to the
interface Security zone: Trust SW2 device
20.20.20.2/24
Network
Attack PC Ethernet0 Gateway: Terminal
adapter
20.20.20.1/24
WWW Network
Ethernet0 172.16.30.10/24 Terminal
Server adapter
Interface for
connecting to
Mirror-SW and the
Layer 3
G0/0/1 20.20.20.1/24 interface IP address
interface
RT1 is the gateway IP
address of Attack
PC.
Note: For details about network configurations, see the pre-configurations in this lab. This
chapter describes only the SQL injection vulnerability test and the process of intrusion
prevention.
Set basic network parameters according to the table in 10.1.4 Lab Planning.
RT1 has been pre-configured. For details, see 10.3 Configuration Reference.
# On Attack PC, enter http://172.16.30.10:8080 in the address bar of the browser to open
the DVWA system. Enter the user name admin and password password for login as shown
in the following figure.
# After login, change the DVWA security level to low as shown in the following figure.
# Enter a correct user ID (for example, 1) and click Submit. The First name and Surname
of the ID are displayed.
# Enter the user ID 1. The user name and password can be returned normally. Add ' after
1.
The data is successfully returned. Then, enter 1 and 1=2 at the injection point.
The data is still successfully returned. Therefore, the injection is not a numeric injection
because the return value is not affected by numbers.
# Enter 0' or 1# at the injection point to determine whether the injection is a character
injection.
All the contents in the database can be queried. Therefore, the injection is a character
injection.
# Use the order by [num] statement to query the length of the information list. Enter 1'
order by 1#.
The data is properly displayed on the result page. Enter 1' order by 2#.
The data is properly displayed on the result page. Enter 1' order by 3#.
When 3 is entered, an error message is displayed. The preceding figure shows the error
information. Therefore, it is determined that the length of the query result is two columns.
# Craft the ' union select user(),database()# statement to query the current database user
and database name.
The result indicates that the current database user is root@localhost and the database
name is dvwa.
# Craft the 1' and 1=2 union select version(),database()# statement to query the current
database version.
# Choose System > Update Center > Signature Database Update, select the row where the
IPS signature database resides, click Update Locally, import the IPS signature database, and
click Update as shown in the following figure.
Note: The IPS signature database can be updated only after the license is loaded.
# Choose Object > Security Profiles > Intrusion Prevention. On the Intrusion Prevention
Profile List page, click Add and enter the name and description as shown in the following
figure.
# Click the Signature Filter List tab, click Add, and set parameters as shown in the following
figures.
# Click OK to complete the configuration of the web signature filter. The result is shown
in the following figure.
# Click Commit in the upper right corner to make the configurations take effect.
# Choose Policy > Security Policy > Security Policy. On the Security Policy List tab page,
click Add Security Policy. Set or select parameters to protect the intranet server against
attacks from external users as shown in the following figure.
10.2.3 Verification
# On Attack PC, access the DVWA page and use the ' union select user(),database()#
statement to query the current database user and database name.
The page is blocked by the IPS device as shown in the following figure.
# Query threat logs on the IPS device as shown in the following figure.
# Click a threat name to view detailed information as shown in the following figure.
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.1.3.1 255.255.255.0
#
ip route-static 172.16.30.0 255.255.255.0 10.1.3.2
#
source-zone untrust
destination-zone trust
action permit
rule name outside
source-zone trust
destination-zone untrust
action permit
#
10.4 Quiz
Is a license required for intrusion prevention?
Answer: Before updating a signature database, ensure that the license for the update
service has been purchased and activated.
11.1 Introduction
11.1.1 About This Lab
On an enterprise network, employees need to access the Internet. To control the Internet
access permissions of employees, the enterprise wants to use the URL filtering, file blocking,
and data filtering functions of the firewall to meet the following requirements:
URL filtering prevents employees from accessing game portal websites such as
www.example.com, improving work efficiency and preventing a great amount of
bandwidth consumption.
File blocking blocks the download of executable files from the Internet, reducing the risk
of information leakage and virus infection on the intranet.
Data filtering filters files or applications that contain confidential information, reducing the
risk of leakage.
11.1.2 Objectives
⚫ Learn how to configure URL filtering, file blocking, and data filtering on the CLI and
web UI.
Interface for
Layer 3
G0/0/1.2 4.4.4.2/30 connecting to Mirror-
interface
RT1 SW
Interconnection
interface – interface
G0/0/15 Access PVID: 1003
for connecting to
FTP/web server
Layer 3
VLANIF 1003 172.17.100.1/24 Gateway of the server
interface
Interface for
G0/0/2 Access PVID: 40
connecting to FW1
SW3
Interface for
G0/0/13 Access PVID: 40
connecting to PC1
172.17.100.10/24
FTP/Web
Ethernet 0 NIC Gateway: Endpoint
Server
172.17.100.1/24
172.16.20.111/24
PC1 Ethernet 0 NIC Gateway: Endpoint
172.16.20.2/24
Set basic network parameters according to the table in 11.1.4 Lab Planning.
SW1, SW3, Mirror-SW, and RT1 have been preconfigured. For details, see section 11.4
Configuration Reference.
# Configure the IP address for GigabitEthernet0/0/2 of FW1, and add the interface to the
Untrust zone.
<FW1> system-view
# Configure the IP address for GigabitEthernet0/0/6, and add the interface to the Trust
zone.
# Configure a security policy and invoke the URL filtering security profile.
[FW1] security-policy
[FW1-policy-security] rule name sec_url_policy
[FW1-policy-security-rule-sec_url_policy] source-zone trust
[FW1-policy-security-rule-sec_url_policy] destination-zone untrust
[FW1-policy-security-rule-sec_url_policy] source-address 172.16.20.111 24
[FW1-policy-security-rule-sec_url_policy] profile url-filter url_profile
[FW1-policy-security-rule-sec_url_policy] action permit
[FW1-policy-security-rule-sec_url_policy] quit
[FW1-policy-security] quit
# Configure a NAT policy to translate the source IP address of the client into the IP address
of an outbound interface on FW1 to access the Internet.
[FW1] nat-policy
[FW1-policy-nat] rule name trust-untrust
[FW1-policy-nat-rule-trust-untrust] source-zone trust
[FW1-policy-nat-rule-trust-untrust] destination-zone untrust
[FW1-policy-nat-rule-trust-untrust] action source-nat easy-ip
[FW1-policy-nat-rule-trust-untrust] quit
[FW1-policy-nat] quit
# Configure a security policy and invoke the file blocking security profile and data filtering
security profile.
[FW1] security-policy
[FW1-policy-security] rule name sec_filter
[FW1-policy-security-rule-sec_filter] source-zone trust
[FW1-policy-security-rule-sec_filter] destination-zone untrust
[FW1-policy-security-rule-sec_filter] profile data-filter secret
[FW1-policy-security-rule-sec_filter] profile file-block profile
[FW1-policy-security-rule-sec_filter] action permit
[FW1-policy-security-rule-sec_filter] quit
[FW1-policy-security] quit
# Configure a default route so that intranet traffic can be normally forwarded to a router
on the Internet.
Set basic network parameters according to the table in section 11.1.4 Lab Planning.
SW1, SW3, Mirror-SW, and RT1 have been preconfigured. For details, see section 11.4
Configuration Reference.
# Configure interfaces on FW1. Configure IP addresses for the interfaces and add the
interfaces to security zones.
# Choose Network > Interface and click next to the interface to be configured. Select
or set parameters and click OK to configure GigabitEthernet0/0/6, as shown in the
following figure.
# Choose Object > URL Category and click Add. Set parameters and enter a URL to be
filtered.
Configure a URL filtering security profile, and set the default action and user-defined URL
category action.
# Choose Object > Security Profiles > URL Filtering and click Add. Select or enter the
parameters and set Default Action to Block.
Configure a security policy to allow packet exchange between a specified internal network
segment and the Internet, and configure content security URL filtering.
# Choose Policy > Security Policy > Security Policy and click Add Security Policy. Set
parameters, configure a security policy to allow packet exchange between a specified
intranet segment and the Internet, and configure URL filtering.
Configure a NAT policy to translate the source IP address of the client into the IP address
of an outbound interface on FW1 to access the Internet.
# Choose Policy > NAT Policy > NAT Policy and click Add. Set parameters for the NAT policy.
Configure a security profile to block the download of executable files from the Internet.
# Choose Object > Security Profiles > File Blocking and click Add. Set the download
direction. Set File Type to Executable File, Direction to Download, and Action to Block.
# Choose Object > Keyword Group and click Add. Choose Keyword List > Add. Set Matching
Mode to Text, Text to secret, and Weight to 1.
# Choose Object > Security Profiles > Data Filtering and click Add. Click Data Filtering Rule >
Add, set Keyword Groups, set Direction to Upload, and set Action to Block.
# After the configuration is complete, click Commit in the upper right corner to make the
configuration take effect.
# Choose Policy > Security Policy and click Add Security Policy. Select or enter the
parameters and set File Blocking and Data Filtering.
11.3 Verification
# Access a game page on PC1. It is found that the page is blocked by the firewall.
# Cancel the URL filtering policy and the user can access the game page.
# Disable security policy sec_url_policy. Use the XSFP software on the client of PC1 to
connect to the Internet FTP server and then download executable files from the Internet
through FTP. The download is blocked and the Status is displayed as Error on the
transmission page.
# Cancel the file blocking policy and the user can download executable files from the
Internet.
# Use the XSFP software on PC1 to connect to the FTP server on the Internet and upload
confidential files containing keyword secret to the Internet through FTP. It is found that
the upload operation is blocked and the Status is displayed as Error on the transmission
page.
# Cancel the data filtering policy and the user can upload confidential files to the Internet.
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
#
ip route-static 0.0.0.0 0.0.0.0 100.3.1.1
#
url-filter category user-defined name "illegal website"
add url 172.17.100.10/illegal/game.html
#
profile type url-filter name url_profile
category user-defined name "illegal website" action block
default action block
#
profile type file-block name profile
rule name download
file-type pre-defined name EXE MSI RPM OCX A ELF DLL PE SYS
application all
direction download
action block
#
keyword-group name secret
user-defined-keyword name secret
expression match-mode text secret
undo case-sensitive enable
#
profile type data-filter name secret
rule name secret
keyword-group name secret
file-type all
application all
action block
#
security-policy
default action permit
rule name sec_url_policy
source-zone trust
destination-zone untrust
source-address address-set 172.16.20.111/24
profile url-filter url_profile
action permit
rule name sec_filter
source-zone trust
destination-zone untrust
11.5 Quiz
What are the common parameters in a URL filtering profile?
Reference answer: default action, blacklist and whitelist, and URL filtering level.
12 802.1X Authentication
12.1 Introduction
12.1.1 About This Lab
Enterprises usually deploy WLANs to provide wireless office environments for employees.
For security purposes, 802.1X authentication is leveraged to authenticate employees.
Because there are a large number of employees, the RADIUS server is used to manage
employee accounts and permissions in a unified manner.
This lab describes how to implement 802.1X authentication.
12.1.2 Objectives
⚫ Learn to onboard an AP.
⚫ Learn to configure a WLAN profile.
⚫ Understand how to configure WLAN 802.1X authentication.
2. Layer 2 networking is used between the AP and WAC. The DHCP address pools of the
AP and terminal are obtained from the WAC.
3. Layer 2 networking is used between the WAC and RADIUS server. AAA
authentication for the wireless terminal is performed by the RADIUS server.
4. FW2 only transparently transmits packets.
5. SSID for network access: 802.1X authentication is required for connecting to the Wi-
Fi named HCIP-Security. In addition, to enhance PC access management, the RADIUS
server delivers ACLs to restrict terminal access to resources.
SW3
iMaster
Network Server interface
NCE- Ethernet0 192.168.2.201/24
adapter IP address
Campus
Complete basic configurations for the interconnection interfaces between the WAC and
SW3, as well as those between SW3 and the AP according to the table in 12.1.4 Lab
Planning. Complete basic configurations for the interconnection interfaces between SW3
and FW2, as well as those between FW2 and SW2. Configure firewall security policies to
allow traffic to pass through.
# Configure GigabitEthernet0/0/2 on the WAC.
# Configure GE0/0/5 and GE0/0/6 on FW2 and add the interfaces to the security zone.
[FW2] security-policy
[FW2-policy-security] rule name pass
[FW2-policy-security-rule-pass] action permit
[FW2-policy-security-rule-pass] quit
[FW2-policy-security] quit
The WAC needs to provide a management address for the AP and a service address for
wireless users. Configure VLAN 4000 for the DHCP server on the management network
segment and VLAN 4001 for the DHCP server on the user network segment according to
12.1.4 Lab Planning.
# Enable the DHCP function on the WAC.
# Configure the gateway IP address on the management network segment of the AP and
select the global DHCP address pool.
# Configure the DHCP server on the management network segment of the AP.
# Configure the gateway IP address on the network segment of wireless services and select
the global DHCP address pool.
# Configure the authentication IP address for wireless users to communicate with iMaster
NCE-Campus.
[AC-VLANIF10] quit
# Enable the function of establishing CAPWAP DTLS sessions through the preset certificate.
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
# Create a regulatory domain profile, configure the country code of the WAC in the profile,
and bind the profile to the AP group.
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 1 ap-mac 14ab-0228-5f80
[AC-wlan-ap-1] ap-name a5760
Warning: The AP name cannot be the MAC address of another AP. Otherwise, the AP name may be
lost after the device restarts.
Warning: The AP name of more than 31 characters does not take effect for APs in versions earlier
than V200R009C00.
Warning: This operation may cause AP reset. Continue? [Y/N]:Y
[AC-wlan-ap-1] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power
and antenna gain configurations of the radio, Whether to continue? [Y/N]:Y
[AC-wlan-ap-1] quit
# Run the display ap all command to check the AP state. If the State field displays nor, the
AP onboards properly.
# On the WAC, set the source IP address for communicating with the RADIUS server to
192.168.2.10.
[AC] aaa
[AC-aaa] authentication-scheme HCIP-Security
[AC-aaa-authen-HCIP-Security] authentication-mode radius
[AC-aaa-authen-HCIP-Security] quit
# Create an 802.1X access profile HCIP-Security and set the authentication mode to EAP
relay.
# Create an authentication profile HCIP-Security, and bind the 802.1X access profile,
authentication scheme, and RADIUS server template to the authentication profile.
[AC-authentication-profile-HCIP-Security] quit
[AC] wlan
[AC-wlan-view] security-profile name HCIP-Security
[AC-wlan-sec-prof-HCIP-Security] security wpa-wpa2 dot1x aes
[AC-wlan-sec-prof-HCIP-Security] quit
# Create an SSID profile named HCIP-Security and set the SSID name to HCIP-Security.
# Create a VAP profile named HCIP-Security, set the data forwarding mode to tunnel
forwarding, set the service VLAN, and bind the security profile, authentication profile, and
SSID profile to the VAP profile.
# Bind the VAP profile named HCIP-Security to the AP group and apply configurations in
this VAP profile to radio 0 and radio 1 of the APs in the AP group.
# Configure the user group named group1 for the post-authentication domain to allow
only user group members to access network resources on network segment 10.23.200.0/24.
Configure the user group named group1 for the post-authentication domain to allow only
user group members to access network resources on network segment 10.10.10.0/24.
In this lab, iMaster NCE-Campus is used as the RADIUS server. Only the tenant
administrator account can be used to log in to iMaster NCE-Campus for configuration. The
user name and password for login are operator-admin and Huawei@123, respectively.
Before configuring RADIUS authentication, add the WAC to iMaster NCE-Campus.
Configure accounting and authorization passwords, which must be the same as those
configured in the RADIUS server template of the wireless controller. Add a user name and
password.
# Choose Admission > Admission Resources > Admission Advice. Create a WAC, set the
accounting and authorization keys to Huawei@123, and set other parameters as follows:
# Choose Admission > Admission Resources > User Management. Create a user named
admin, set the password to Huawei@123, and set other parameters as follows:
# Configure an authorization rule. Set the name to 802.1x, authentication mode to User
access authentication, and access mode to Wireless. Enable account information matching
and select the corresponding account. Retain default settings for other parameters. Set the
authorization result to 802.1x.
12.3 Verification
Verify the following:
1. Check whether AP onboarding is successful.
2. Check the connectivity between the WAC and RADIUS server.
3. Check whether the wireless terminal can connect to the Wi-Fi named HCIP-Security
and whether detailed information about the access user and the delivered dynamic
ACL3001 are displayed on the WAC.
# AP onboarding is successful on the WAC.
Total: 1
# On the WAC, the account admin and password Huawei@123 can be used to ensure
successful RADIUS authentication.
# The wireless terminal can connect to the Wi-Fi network named HCIP-Security.
# On the WAC, you can view detailed information about the access user and the delivered
dynamic ACL3001.
AAA:
User authentication type : 802.1x authentication
Current authentication method : RADIUS
Current authorization method :-
Current accounting method : None
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 4000 4001
#
interface GigabitEthernet0/0/12
port link-type trunk
port trunk pvid vlan 4000
port trunk allow-pass vlan 4000
#
12.5 Quiz
What is the function of dynamic ACL delivery?
Answer: The RADIUS server delivers dynamic ACLs to limit the resources that wireless
clients can access.
13 Portal Authentication
13.1 Introduction
13.1.1 About This Lab
Enterprises usually deploy WLANs to provide wireless office environments for employees.
For security purposes, the enterprises want to authenticate their employees through an AD
server deployed on the intranet.
This lab describes how to implement Portal authentication through the AD server.
13.1.2 Objectives
⚫ Learn to onboard an AP.
⚫ Learn to configure a WLAN profile.
⚫ Understand how to configure WLAN Portal authentication.
2. Layer 2 networking is used between the AP and WAC. The DHCP address pools of the
AP and terminal are obtained from the WAC.
3. Layer 2 networking is used between the WAC and AD server. Authentication for the
wireless terminal is performed by the AD server.
4. FW2 only transparently transmits packets.
5. SSID for network access: Portal authentication is required for connecting to the Wi-Fi
named HCIP-Security and the local Portal page of the WAC is used.
PVID: 1
Interface for
WAC GE0/0/2 Trunk Allow-pass VLAN: 10, 4000, connecting to SW3
4001
Interface for
AP GE0/0/0 / Retain default settings.
connecting to SW3
Network
AD Server Ethernet0 172.16.30.100/24 Server IP
adapter
Complete basic configurations for the interconnection interfaces between the WAC and
SW3, as well as those between SW3 and the AP. Complete basic configurations for the
interconnection interfaces between SW3 and FW2, as well as those between FW2 and SW2.
Configure firewall security policies to allow traffic to pass through.
# Configure GigabitEthernet0/0/2 on the WAC.
# Configure GE0/0/5 and GE0/0/6 on FW2 and add the interfaces to the security zone.
[FW2] security-policy
[FW2-policy-security] rule name pass
[FW2-policy-security-rule-pass] action permit
[FW2-policy-security-rule-pass] quit
[FW2-policy-security] quit
The WAC needs to provide a management address for the AP and a service address for
wireless users. Configure VLAN 4000 for the DHCP server on the management network
segment and VLAN 4001 for the DHCP server on the user network segment according to
13.1.4 Lab Planning.
# Enable the DHCP function on the WAC.
# Configure the gateway IP address on the management network segment of the AP and
select the global DHCP address pool.
# Configure the DHCP server on the management network segment of the AP.
# Configure the gateway IP address on the network segment of wireless services and select
the global DHCP address pool.
# Configure the authentication IP address for wireless users to communicate with the AD
server.
# Create an AP group to which APs with the same configurations are added.
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
# Create a regulatory domain profile, configure the country code of the WAC in the profile,
and bind the profile to the AP group.
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 1 ap-mac 14ab-0228-5f80
[AC-wlan-ap-1] ap-name a5760
[AC-wlan-ap-1] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power
and antenna gain configurations of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-1] quit
# Run the display ap all command to check the AP state. If the State field displays nor, the
AP onboards properly.
# Create a user named test in SupportTeam on the AD server and set the password to
Huawei@123.
# Create an AD server template on the WAC and set the parameters according to those in
step 4.
# Create a Portal access profile named Portal-AD and enable the built-in Portal server.
[AC] aaa
[AC-aaa] authentication-scheme Portal-AD
[AC-aaa-authen-Portal-AD] authentication-mode ad
[AC-aaa-authen-Portal-AD] quit
[AC-aaa] authorization-scheme AD
[AC-aaa-author-AD] authorization-mode ad
[AC-aaa-author-AD] quit
# Create an authentication profile named Portal-AD and bind the Portal access profile,
authentication scheme, authorization scheme, and AD server to the authentication profile.
[AC] wlan
[AC-wlan-view] security-profile name Portal-AD
[AC-wlan-sec-prof-Portal-AD] security open
[AC-wlan-sec-prof-Portal-AD] quit
# Create an SSID profile named Portal-AD and set the SSID name to Portal-AD.
[AC-wlan-ssid-prof-Portal-AD] quit
# Create a VAP profile named Portal-AD, set the data forwarding mode to tunnel
forwarding, set the service VLAN, and bind the security profile, authentication profile, and
SSID profile to the VAP profile.
# Bind the VAP profile named Portal-AD to the AP group and apply configurations in this
VAP profile to radio 0 and radio 1 of the APs in the AP group.
13.3 Verification
After the configuration is complete, verify the following:
1. Check whether AP onboarding is successful.
2. Check the connectivity between the WAC and the AD server and whether the user
name and password can be used for login.
3. After the wireless terminal connects to the Wi-Fi network named Portal-AD, check
whether the authentication page is displayed and whether the user name test and
password Huawei@123 can be used to ensure successful authentication.
# AP onboarding is successful on the WAC.
# On the WAC, the account test and password Huawei@123 can be used to ensure
successful AD server authentication. This operation can be used to check whether the
connectivity between the WAC and AD server is normal and whether the parameters are
successfully configured.
# The wireless terminal can connect to the Wi-Fi network named Portal-AD.
# Enter 1.1.1.1 in the address bar of the browser on the wireless terminal. The
authentication page is displayed.
# Enter the user name test and password Huawei@123, and click Login.
#
authentication-profile name Portal-AD
mac-access-profile Portal-AD
portal-access-profile Portal-AD
authentication-scheme Portal-AD
authorization-scheme AD
ad-server t1
#
dns resolve
dns proxy enable
#
dhcp enable
#
ad-server template t1
ad-server authentication 172.16.30.100 88 no-ssl
ad-server authentication base-dn dc=huawei,dc=cn
ad-server authentication manager
cn=Administrator,cn=users %^%#fBzRQc;\y6xPIlX`G#*~Kku#.Wch~-fIrN4WjNM#%^%#
ad-server authentication host-name WIN-Q2QSOCUE8QT.huawei.cn
ad-server authentication ldap-port 389
ad-server user-filter sAMAccountName
ad-server group-filter ou
ad-server cipher-suite aes256-hmac-sha1
#
portal-access-profile name Portal-AD
portal local-server enable
#
ip pool vlan4001
gateway-list 10.20.1.1
network 10.20.1.0 mask 255.255.255.0
#
ip pool vlan4000
gateway-list 10.10.1.1
network 10.10.1.0 mask 255.255.255.0
option 43 sub-option 3 ascii 10.10.1.1
#
aaa
authentication-scheme Portal-AD
authentication-mode ad
authorization-scheme AD
authorization-mode ad
#
interface vlanif10
ip address 172.16.30.10 255.255.255.0
#
interface vlanif4000
ip address 10.10.1.1 255.255.255.0
dhcp select global
#
interface vlanif4001
ip address 10.20.1.1 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/2
port link-type trunk
13.5 Quiz
How do I open the Portal authentication page of a third-party server?
Answer: Configure web-auth-server and bind it to portal-access-profile.
14 Portal Authentication
Troubleshooting
14.1 Introduction
14.1.1 About This Lab
Enterprises usually deploy WLANs to provide wireless office environments for employees.
For security purposes, the enterprises want to authenticate their employees through an AD
server deployed on the intranet.
This lab sets the common faults that may occur during configuring and using Portal
authentication and describes how to troubleshoot these faults through the AD server.
14.1.2 Objectives
⚫ Understand the process of Portal authentication.
⚫ Learn to identify Portal authentication faults.
⚫ Understand how to troubleshoot common Portal authentication faults.
1. An external power module is used to supply power to the AP based on the existing
scenario.
2. Layer 2 networking is used between the AP and WAC. The DHCP address pools of the
AP and terminal are obtained from the WAC.
3. Layer 2 networking is used between the WAC and AD server. Authentication for the
wireless terminal is performed by the AD server.
4. FW2 only transparently transmits packets.
5. SSID for network access: Portal authentication is required for connecting to the Wi-Fi
named HCIP-Security and the local Portal page of the WAC is used.
connecting to
SW3
Network
AD Server Ethernet0 172.16.30.100/24 Server IP
adapter
Construct the network according to the lab topology, disable the interfaces that are not
used in the lab, and import the pre-configuration scripts to the corresponding devices for
device pre-configuration.
# Pre-configure SW2.
#
sysname SW2
#
vlan batch 10
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/13
port link-type access
port default vlan 10
#
# Pre-configure SW3.
#
sysname SW3
#
vlan batch 10 4000 4001
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/3
# Pre-configure FW2.
#
sysname FW2
#
vlan batch 10
#
interface GigabitEthernet0/0/5
portswitch
undo shutdown
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/6
portswitch
undo shutdown
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
security-policy
rule name pass
action permit
#
#
sysname AC
#
http secure-server ssl-policy default_policy
http secure-server server-source -i all
Y
http server enable
#
portal local-server ip 10.20.1.1
portal local-server http port 8080
#
portal https-redirect tls1.1 enable
Y
#
vlan batch 10 4000 4001
#
dns resolve
dns proxy enable
Y
#
dhcp enable
#
interface vlanif10
ip address 172.16.30.10 255.255.255.0
#
interface vlanif4000
ip address 10.10.1.1 255.255.255.0
dhcp select global
#
interface vlanif4001
ip address 10.20.1.1 255.255.255.0
dhcp select global
#
ad-server template t1
ad-server authentication 172.16.30.100 88 no-ssl
Y
ad-server authentication base-dn dc=huawei,dc=cn
ad-server authentication manager cn=Administrator,cn=users Huawei@123
ad-server authentication host-name WIN-Q2QSOCUE8QT.huawei.cn
ad-server authentication ldap-port 389
ad-server user-filter sAMAccountName
ad-server group-filter ou
ad-server cipher-suite aes256-hmac-sha1
#
portal-access-profile name Portal-AD
portal http-proxy-redirect enable
#
ip pool vlan4001
gateway-list 10.20.1.1
network 10.20.1.0 mask 255.255.255.0
#
ip pool vlan4000
gateway-list 10.10.1.1
network 10.10.1.0 mask 255.255.255.0
option 43 sub-option 3 ascii 10.10.1.1
#
aaa
authentication-scheme Portal-AD
authentication-mode ad
authorization-scheme AD
authorization-mode ad
#
authentication-profile name Portal-AD
authentication-scheme Portal-AD
authorization-scheme AD
ad-server t1
#
interface GigabitEthernet0/0/2
# Configure the source interface of the CAPWAP tunnel on the WAC and configure the
corresponding password. For details, see the following configurations in bold.
Info: Deliver DTLS PSK to devices using CAPWAP connections. It may take a few minutes.
------------------------------------------------------------------------------
CAPWAP DTLS PSK deliver result
Deliver Number : 0
Success Number : 0
Failed Number : 0
------------------------------------------------------------------------------...................done.
Set the user name for FIT APs(The value is a string of 4 to 31 characters, which can contain letters,
underscores, and digits, and must start with a letter):admin
Set the password for FIT APs(plain-text password of 8-128 characters or cipher-text password of 48-
188 characters that must be a combination of at least three of the following: lowercase letters a to z,
uppercase letters A to Z, digits, and special characters): Huawei@123
Confirm password: Huawei@123
Set the global temporary-management psk(contains 8-63 plain-text characters, or 48-108 cipher-text
characters that must be a combination of at least two of the following: lowercase letters a to z,
uppercase letters A to Z, digits, and special characters): Huawei@123
Confirm PSK: Huawei@123
Warning: Ensure that the management VLAN and service VLAN are different. Otherwise, services may
be interrupted.
Warning: Before an added device goes online for the first time, enable DTLS no-auth if it runs a
version earlier than V200R021C00 or enable DTLS certificate-mandatory-match if it runs
V200R021C00 or later.
# The Wi-Fi network named Portal-AD is not recorded by the wireless network adapter of
the wireless terminal.
# Check AP onboarding on the WAC.
The AP onboarding fails, but the relevant configurations are correct. When the WAC
connects to an AP running V200R021C00 or later, AP onboarding may fail due to a lack of
DTLS certificate. In this case, perform the following operations:
# Enable the function of establishing CAPWAP DTLS sessions through the preset certificate.
Note: When adding an AP running V200R021C00 or later, you can enable this function to
allow the AP to establish a DTLS session through the preset certificate to prevent AP
onboarding failures. After AP onboarding, the AP obtains a new DTLS certificate to initiate
a DTLS session securely and onboard again. To ensure network security, disable this
function immediately after the AP onboards again to prevent unauthorized APs from
accessing the network.
# Check AP onboarding again.
------------------------------------------------------------------------------------------------------
1 14ab-0228-5f80 a5760 ap-group1 10.10.1.131 AirEngine5760-51 nor 0 24S -
------------------------------------------------------------------------------------------------------
Total: 1
# The wireless terminal can connect to the Wi-Fi network named Portal-AD.
# After the wireless terminal successfully connects to the Wi-Fi network, enter a random
IP address in the address bar of the browser on the terminal and press Enter. No Portal
page is displayed.
The preceding result indicates that the local Portal page of the WAC does not respond. The
possible causes are as follows: The wireless terminal cannot communicate with the WAC.
The Portal authentication configurations are incorrect. Configurations of the local Portal
page on the WAC are incorrect. You need to check the possible causes one by one.
# Check whether the wireless terminal can ping the IP address of the Portal server on the
WAC.
#
authentication-profile name Portal-AD
authentication-scheme Portal-AD
authorization-scheme AD
ad-server t1
#
The authentication and authorization schemes are bound to the authentication profile, but
the Portal access profile is not bound.
#
portal-access-profile name Portal-AD
portal http-proxy-redirect enable
#
The local Portal server page of the WAC is used in this lab. Therefore, the configurations
are incorrect.
# Modify the configurations in the Portal access profile and enable the built-in Portal server.
# Use the wireless terminal to perform the test again. The Portal page cannot be opened
on the browser.
According to the configuration roadmap, the Portal access profile needs to be bound to
the authentication profile, which then needs to be bound to the VAP profile view.
# Check the configurations in the VAP profile view.
[AC] wlan
The preceding configurations indicate that the authentication profile is not bound to the
VAP profile view.
# Complete the configurations in the VAP profile view.
[AC] wlan
[AC-wlan-view] vap-profile name Portal-AD
[AC-wlan-vap-prof-Portal-AD] authentication-profile Portal-AD
Warning: This action may cause service interruption. Continue?[Y/N]Y
Info: This operation may take a few seconds, please wait.done.
[AC-wlan-vap-prof-Portal-AD] quit
# Use the wireless terminal to perform the test again. The built-in Portal page of the WAC
can be opened in the browser.
# On the Portal page, enter the user name test and password Huawei@123 on the AD
server for test.
The user authentication fails. When the user enters the user name and password for
authentication, the user name and password are forwarded by the WAC and then verified
by the AD server.
# Check the configurations of authentication-scheme Portal-AD on the WAC.
[AC] aaa
[AC-aaa] authentication-scheme Portal-AD
[AC-aaa-authen-Portal-AD] display this
#
authentication-scheme Portal-AD
authentication-mode ad
#
[AC] aaa
[AC-aaa] authorization-scheme Portal-AD
[AC-aaa-author-Portal-AD] display this
#
authorization-scheme Portal-AD
authorization-mode ad
#
ad-server group-filter ou
ad-server cipher-suite aes256-hmac-sha1
#
The preceding result indicates that the interconnection parameters between the WAC and
AD server as well as the user name, and password are correct. Therefore, the fault occurs
on the wireless terminal and WAC.
# Run debugging commands on the WAC and enter the user name and password again on
the wireless terminal for login.
# On the Portal page, enter the user name test and password Huawei@123 on the AD
server. The test is successful.
14.3 Verification
After the configuration is complete, verify the following:
1. Check whether AP onboarding is successful.
2. Check the connectivity between the WAC and the AD server and whether the user
name and password can be used for login.
3. After the wireless terminal connects to the Wi-Fi network named Portal-AD, check
whether the authentication page is displayed and whether the user name test and
password Huawei@123 can be used to ensure successful authentication.
# AP onboarding is successful on the WAC.
# On the WAC, the account test and password Huawei@123 can be used to ensure
successful AD server authentication. This operation can be used to check whether the
connectivity between the WAC and AD server is normal and whether the parameters are
successfully configured.
# The wireless terminal can connect to the Wi-Fi network named Portal-AD.
# Enter 1.1.1.1 in the address bar of the browser on the wireless terminal, the
authentication page is displayed.
# Enter the user name test and password Huawei@123, and click Login.
#
interface vlanif4001
ip address 10.20.1.1 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 4000 4001
#
capwap source interface vlanif4000
#
wlan
security-profile name Portal-AD
security open
ssid-profile name Portal-AD
ssid Portal-AD
vap-profile name Portal-AD
forward-mode tunnel
service-vlan vlan-id 4001
ssid-profile Portal-AD
security-profile Portal-AD
authentication-profile Portal-AD
ap-group name ap-group1
radio 0
vap-profile Portal-AD wlan 3
radio 1
vap-profile Portal-AD wlan 3
radio 2
vap-profile Portal-AD wlan 3
ap-id 1 type-id 130 ap-mac 14ab-0228-5f80 ap-sn 2102353GES6RN5008931
ap-name a5760
ap-group ap-group1
#
14.5 Quiz
In the preceding WAC + Fit AP networking scenario, which of the following are possible
causes for AP onboarding failures?
Answer: There are many possible causes for AP onboarding failures and the major ones are
as follows:
Physical device failures: AP failures, WAC failures, intermediate network device failures,
cable failures, etc.
Power supply failures: Insufficient power supply of switches, incorrect power supply modes,
etc.
Network configuration failures: incorrect DHCP configurations, failures to obtain IP
addresses by APs, unreachable network between the AP and WAC, incorrect AP
authentication configurations, incorrect source address of the CAPWAP tunnel, incorrect
blacklist and whitelist configurations on the WAC, etc.
Software version failures: Unmatched AP and WAC software versions, software version
15.1 Introduction
15.1.1 About This Lab
As campus network services increase, service attributes become more important. To ensure
stable service running, enterprises have higher requirements on the overall planning of
enterprise network topologies and network security.
This lab covers the design of a typical campus network, including the tasks of configuring
link redundancy, device redundancy, VPN encrypted data transmission, service isolation,
important service assurance, user authentication, user behavior audit, attack defense, and
WLAN security policies. After completing these lab tasks, trainees shall understand the
design logic of typical campus network topologies, master security protection methods of
campus networks, and finally be able to build campus networks.
15.1.2 Objectives
⚫ Learn how to design a campus network.
⚫ Have a good command of key campus network technologies.
⚫ Implement secure network interworking.
4. Configure virtual systems on the egress firewall in the branch zone to strictly isolate
the R&D area (where PC4 is located) from the guest area (where PC5 is located).
5. Deploy an anti-DDoS device at the egress of the HQ zone to prevent servers in the
HQ zone from being attacked.
6. Authenticate the identity of employees in the HQ zone when they attempt to access
the intranet. In addition, user behaviors need to be controlled. For example,
employees are forbidden to disclose important information or release violation
information and are restricted to access specific websites.
7. Prevent employees from disclosing confidential information through emails, and
prevent spam from occupying too many resources or affecting employees' normal
email sending and receiving.
Interface for
G0/0/2 Access PVID: 1 connecting to
FW3
Interface for
G0/0/14 Access PVID: 200 connecting to the
legal PC
Interface for
connecting to the
G0/0/15 Access PVID: 300
SW1 FTP server or
WWW server
Interface for
Layer 3
VLANIF1 100.1.1.1/24 connecting to
interface
FW3
On the same
Layer 3 network segment
VLANIF2 4.4.4.1/30
interface as an RT1
interface
On the same
Layer 3 network segment
VLANIF40 3.3.3.1/30
interface as an RT2
interface
Layer 3
VLANIF200 20.20.1.1/30 Legal PC gateway
interface
Interface for
G0/0/1 connecting to
FW1
Interface for
G0/0/2 connecting to
FW2
Interface for
G0/0/13 connecting to the
AD server
Interface for
G0/0/14 connecting to the
SW2 Access PVID: 30
FTP server
Interface for
G0/0/15 connecting to the
WWW server
Interface for
G0/0/16 connecting to the
mail server
Interface for
connecting to
G0/0/17
iMaster NCE-
Campus
Interface for
G0/0/1 Access PVID: 40 connecting to
FW2
Interface for
G0/0/2 Access PVID: 40 connecting to
FW1
Interface for
G0/0/13 Access PVID: 40
connecting to PC1
Interface for
G0/0/14 Access PVID: 40
connecting to PC2
Address for
Layer 3
VLANIF40 172.16.20.20/24 interconnecting
interface
with FW2
On the same
Layer 3 network segment
VLANIF2000 22.22.22.2/24
interface as VLANIF 2000
on the WAC
Interface for
G0/0/1
connecting to RT1
PVID: 1 Interface for
G0/0/2 Trunk
Mirror-SW Allow-pass VLAN: 2, connecting to RT2
40
Interface for
G0/0/3 connecting to
SW1
Interface for
Layer 3
GE0/0/4 10.3.1.1/30 connecting to
interface
FW1
Interface for
Layer 3 sub-
GE0/0/1.40 3.3.3.2/30 connecting to
interface
SW1
Interface for
Layer 3
GE0/0/4 10.6.1.1/30 connecting to
interface
FW2
GE0/0/3 Layer 3
aggregation Interface for
interface 10.10.10.1/24 connecting to
GE0/0/4 FW2
Eth-Trunk0
FW1 172.16.30.2/24
Virtual IP address of Interface for
Layer 3
GE0/0/5 VRRP group 2 connecting to
interface
(master): SW2
172.16.30.1/24
172.16.20.2/24
Virtual IP address of Interface for
Layer 3
GE0/0/6 VRRP group 1 connecting to
interface
(backup): SW3
172.16.30.1/24
Interface for
Layer 3
GE0/0/1 10.2.1.2/30 connecting to
interface
Mirror-SW
Interface for
GE0/0/3 Layer 3 connecting to
aggregation FW1
interface 10.10.10.2/24
Interface for
GE0/0/4 Eth-Trunk0 connecting to
FW2
FW1
172.16.20.3/24
Virtual IP address of Interface for
Layer 3
GE0/0/5 VRRP group 1 connecting to
interface
(backup): SW3
172.16.20.1/24
172.16.30.3/24
Interface for
Layer 3 Virtual IP address of
GE0/0/6 connecting to
interface VRRP group 2 SW2
(backup):
172.16.30.1/24
On the same
Layer 3 network segment
GE0/0/1 100.1.1.8/24
interface as VLANIF 1 on
SW1
FW3
Layer 3
GE0/0/6 172.16.40.1/24 PC4 gateway
interface
Layer 3
GE0/0/7 172.16.50.1/24 PC5 gateway
interface
On the same
Layer 3 network segment
VLANIF2000 22.22.22.1/30
WAC interface as VLANIF 2000
on SW3
Layer 3 AP management
VLANIF4000 10.20.1.1/24
interface gateway
Layer 3
VLANIF4001 10.10.1.1/24 Service gateway
interface
172.16.20.100/24
PC1 Ethernet0 NIC Gateway: Terminal
172.16.20.1/24
172.16.20.101/24
PC2 Ethernet0 NIC Gateway: Terminal
172.16.20.1/24
Automatically
PC3 Ethernet0 NIC obtaining an IP Wireless terminal
address
172.16.40.10/24
PC4 Ethernet0 NIC Gateway: Terminal
172.16.40.1/24
172.16.50.10/24
PC5 Ethernet0 NIC Gateway: Terminal
172.16.50.1/24
20.20.1.10/24
Legal PC Ethernet0 NIC Gateway: Terminal
20.20.1.1/24
172.16.30.100/24
AD server Ethernet0 NIC Gateway: Terminal
172.16.30.1/24
172.16.30.101/24
FTP server Ethernet0 NIC Gateway: Terminal
172.16.30.1/24
172.16.30.102/24
WWW
Ethernet0 NIC Gateway: Terminal
server
172.16.30.1/24
172.16.30.103/24
Mail server Ethernet0 NIC Gateway: Terminal
172.16.30.1/24
iMaster
NCE- GE0/0/0 NIC 192.168.10.103/24 Terminal
Campus
Set basic network parameters according to the table in 15.1.4 Lab Planning.
# Configure VRRP group 1 on the downstream service interface GE0/0/6 of FW1 and set
the status of the VRRP group to active. Configure VRRP group 1 on the downstream service
interface GE0/0/5 of FW2 and set the status of the VRRP group to standby.
# Configure VRRP group 2 on the downstream service interface GE0/0/5 of FW1 and set
the status of the VRRP group to active. Configure VRRP group 2 on the downstream service
interface GE0/0/6 of FW2 and set the status of the VRRP group to standby.
# Configure OSPF on FW1 and enable OSPF on the interconnection interface, gateway
interface for connecting to PC1, and gateway interface for connecting to the servers.
[FW1] ospf 1
[FW1-ospf-1] area 0
[FW1-ospf-1-area-0.0.0.0] quit
[FW1-ospf-1] quit
[FW1] interface GigabitEthernet0/0/1
[FW1-GigabitEthernet0/0/1] ospf enable 1 area 0
[FW1] interface GigabitEthernet0/0/2
[FW1-GigabitEthernet0/0/2] ospf enable 1 area 0
[FW1-GigabitEthernet0/0/2] quit
[FW1] interface GigabitEthernet0/0/5
[FW1-GigabitEthernet0/0/5] ospf enable 1 area 0
[FW1-GigabitEthernet0/0/5] quit
[FW1] interface GigabitEthernet0/0/6
[FW1-GigabitEthernet0/0/6] ospf enable 1 area 0
[FW1-GigabitEthernet0/0/6] quit
# Change the OSPF cost value of GigabitEthernet0/0/1 on FW1 to 10 to prepare for the
IPsec VPN lab.
# Configure OSPF on FW1 and advertise the network segment routes of servers to OSPF.
[FW1] ospf 1
[FW1-ospf-1] area 0
[FW1-ospf-1-area-0.0.0.0] network 172.16.30.0 0.0.0.255
[FW2-ospf-1-area-0.0.0.0] network 172.16.20.0 0.0.0.255
[FW1-ospf-1-area-0.0.0.0] quit
# To prevent the security policy of the firewall from affecting OSPF packets, disable the
function of controlling protocol packets based on the security policy on FW1.
# Configure OSPF on FW2 and enable OSPF on the interconnection interface, gateway
interface for connecting to PC1, and gateway interface for connecting to the servers.
[FW2] ospf 1
[FW2-ospf-1] area 0
[FW2-ospf-1-area-0.0.0.0] quit
[FW2-ospf-1] quit
[FW2] interface GigabitEthernet0/0/1
[FW2-GigabitEthernet0/0/1] ospf enable 1 area 0
[FW2] interface GigabitEthernet0/0/2
[FW2-GigabitEthernet0/0/2] ospf enable 1 area 0
[FW2-GigabitEthernet0/0/2] quit
[FW2] interface GigabitEthernet0/0/5
[FW2-GigabitEthernet0/0/5] ospf enable 1 area 0
[FW2-GigabitEthernet0/0/5] quit
[FW2] interface GigabitEthernet0/0/6
[FW2-GigabitEthernet0/0/6] ospf enable 1 area 0
[FW2-GigabitEthernet0/0/6] quit
# Configure OSPF on FW2 and advertise the network segment routes of PC1 to OSPF.
[FW2] ospf 1
[FW2-ospf-1] area 0
[FW1-ospf-1-area-0.0.0.0] network 172.16.30.0 0.0.0.255
[FW2-ospf-1-area-0.0.0.0] network 172.16.20.0 0.0.0.255
[FW1-ospf-1-area-0.0.0.0] quit
# To prevent the security policy of the firewall from affecting OSPF packets, disable the
function of controlling protocol packets based on the security policy on FW2.
[RT1] ospf 1
[RT1-ospf-1] area 0
[RT1-ospf-1-area-0.0.0.0] quit
[RT1-ospf-1] quit
[RT1] interface GigabitEthernet0/0/2
[RT1-GigabitEthernet0/0/2] ospf enable 1 area 0
[RT1-GigabitEthernet0/0/2] quit
[RT1] interface GigabitEthernet0/0/3
[RT1-GigabitEthernet0/0/3] ospf enable 1 area 0
[RT1-GigabitEthernet0/0/3] quit
[RT1] interface GigabitEthernet0/0/4
[RT1-GigabitEthernet0/0/4] ospf enable 1 area 0
[RT1-GigabitEthernet0/0/4] quit
[RT2] ospf 1
[RT2-ospf-1] area 0
[RT2-ospf-1-area-0.0.0.0] quit
[RT2-ospf-1] quit
[RT2] interface GigabitEthernet0/0/2
[RT2-GigabitEthernet0/0/2] ospf enable 1 area 0
[RT2-GigabitEthernet0/0/2] quit
[RT2] interface GigabitEthernet0/0/3
[RT2-GigabitEthernet0/0/3] ospf enable 1 area 0
[RT2-GigabitEthernet0/0/3] quit
[RT2] interface GigabitEthernet0/0/4
[RT2-GigabitEthernet0/0/4] ospf enable 1 area 0
[RT2-GigabitEthernet0/0/4] quit
[RT1] ospf 1
[RT1-ospf-1] import-route static
[RT1-ospf-1] default-route-advertise always
[RT1-ospf-1] quit
[RT2] ospf 1
[RT2-ospf-1] import-route static
[RT2-ospf-1] default-route-advertise always
[RT2-ospf-1] quit
Configure a VGMP group on firewalls to monitor the uplink interfaces, add the downlink
interfaces to a VRRP group, and use an Eth-Trunk interface as the heartbeat interface.
# Add GigabitEthernet0/0/3 and GigabitEthernet0/0/4 to Eth-Trunk 0 on FW1.
# Configure the function of adjusting the OSPF cost based on VGMP status on the firewalls.
# In load sharing networking, configure quick session backup on the firewalls in case of
inconsistent paths for forward and return packets.
# Specify the heartbeat interface and enable hot standby on the firewalls.
# Configure a security policy on the firewalls in hot standby mode to allow interworking
between specified services.
HRP_M[FW1] security-policy
HRP_M[FW1-policy-security] rule name trust-untrust
HRP_M[FW1-policy-security-rule-trust-untrust] source-zone trust
HRP_M[FW1-policy-security-rule-trust-untrust] destination-zone untrust
HRP_M[FW1-policy-security-rule-trust-untrust] source-address 172.16.20.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust] destination-address 4.4.4.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust] action permit
HRP_M[FW1-policy-security-rule-trust-untrust] rule name untrust-trust
HRP_M[FW1-policy-security-rule-untrust-trust] source-zone untrust
HRP_M[FW1-policy-security-rule-untrust-trust] destination-zone trust
HRP_M[FW1-policy-security-rule-untrust-trust] source-address 20.20.1.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-untrust-trust] destination-address 172.16.30.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-untrust-trust] action permit
HRP_M[FW1-policy-security-rule-untrust-trust] quit
HRP_M[FW1-policy-security] quit
On FW3, enable the virtual system function, configure a resource class, create virtual
systems vsysa and vsysb, and allocate resources to them. Configure vsysa and vsysb. PC4
belongs to vsysa, and PC5 belongs to vsysb. Use the virtual systems to isolate PC4 services
from PC5 services and allow PC5 to access the Internet and PC4 to communicate only with
the servers in the HQ zone.
# Enable the virtual system function.
<FW3> system-view
[FW3] vsys enable
[FW3] resource-class r1
[FW3-resource-class-r1] resource-item-limit session reserved-number 10000 maximum 50000
[FW3-resource-class-r1] resource-item-limit policy reserved-number 300
[FW3-resource-class-r1] resource-item-limit bandwidth 20 entire
[FW3-resource-class-r1] quit
# Configure interfaces for the public system and add them to security zones.
# Configure a route from the public system to the Internet to divert traffic from PC5
attached to vsysb to the Internet. 100.1.1.1 is the next-hop address of the route from the
public system to the Internet.
# Configure a security policy in the public system to permit traffic from PC5 attached to
vsysb to the Internet.
[FW3] security-policy
[FW3-policy-security] rule name PC5-trust-to-untrust
[FW3-policy-security-rule-PC5-trust-to-untrust] source-zone trust
[FW3-policy-security-rule-PC5-trust-to-untrust] destination-zone untrust
[FW3-policy-security-rule-PC5-trust-to-untrust] source-address 172.16.50.0 mask 255.255.255.0
[FW3-policy-security-rule-PC5-trust-to-untrust] action permit
[FW3-policy-security-rule-PC5-trust-to-untrust] quit
# Configure a source NAT policy for the public system to translate the source IP addresses
of the packets from PC5 to the Internet into the IP address of the public interface GE0/0/1
in the public system.
[FW3] nat-policy
[FW3-policy-nat] rule name nat1
[FW3-policy-nat-rule-nat1] source-zone trust
[FW3-policy-nat-rule-nat1] egress-interface GigabitEthernet 0/0/1
Configure interfaces for vsysa, add them to security zones, and configure routes and
security policies for vsysa.
# Switch from the user view of the public system to the system view of vsysa.
# Configure a route from vsysa to the public system to divert the traffic from PC4 to the
public system.
# Configure a security policy in vsysa to allow hosts on the network segment of PC4 in the
R&D department to communicate with the servers in the HQ zone.
[FW3-vsysa] security-policy
[FW3-vsysa-policy-security] rule name to_HQ_allow
[FW3-vsysa-policy-security-rule-to_HQ_allow] source-zone trust
[FW3-vsysa-policy-security-rule-to_HQ_allow] destination-zone untrust
[FW3-vsysa-policy-security-rule-to_HQ_allow] source-address 172.16.40.0 mask 255.255.255.0
[FW3-vsysa-policy-security-rule-to_HQ_allow] destination-address 172.16.30.0 mask 255.255.255.0
[FW3-vsysa-policy-security-rule-to_HQ_allow] action permit
[FW3-vsysa-policy-security-rule-to_HQ_allow] quit
[FW3-vsysa-policy-security] rule name allow-HQ-in
[FW3-vsysa-policy-security-rule-allow-HQ-in] source-zone untrust
[FW3-vsysa-policy-security-rule-allow-HQ-in] destination-zone trust
[FW3-vsysa-policy-security-rule-allow-HQ-in] source-address 172.16.30.0 mask 255.255.255.0
[FW3-vsysa-policy-security-rule-allow-HQ-in] destination-address 172.16.40.0 mask 255.255.255.0
[FW3-vsysa-policy-security-rule-allow-HQ-in] action permit
[FW3-vsysa-policy-security-rule-allow-HQ-in] quit
Configure interfaces for vsysb, add them to security zones, and configure routes and
security policies for vsysb.
# Switch from the user view of vsysa to the system view of vsysb.
[FW3-vsysa] quit
<FW-vsysa> quit
[FW3] switch vsys vsysb
<FW-vsysb> system-view
# Configure a route from vsysb to the public system to divert the traffic from hosts in the
marketing department accessing the Internet to the public system.
# Configure a security policy in vsysb to allow all hosts in the marketing department to
access the Internet.
[FW3-vsysb] security-policy
[FW3-vsysb-policy-security] rule name to_internet_allow
[FW3-vsysb-policy-security-rule-to_internet_allow] source-zone trust
[FW3-vsysb-policy-security-rule-to_internet_allow] destination-zone untrust
[FW3-vsysb-policy-security-rule-to_internet_allow] action permit
[FW3-vsysb-policy-security-rule-to_internet_allow] quit
Establish an IPsec VPN tunnel between FW1 and FW3 to secure communication between
PC4 and the servers in the HQ zone.
# Configure an IPsec proposal on FW3. You do not need to set default parameters.
[FW3-ike-proposal-2] dh group14
[FW3-ike-proposal-2] authentication-algorithm sha2-256
[FW3-ike-proposal-2] authentication-method pre-share
[FW3-ike-proposal-2] integrity-algorithm hmac-sha2-256
[FW3-ike-proposal-2] prf hmac-sha2-256
[FW3-ike-proposal-2] quit
# On FW3, configure a route to the service network segment of the virtual system.
# Create a security policy in vsysa on FW3 to permit traffic between the PC4 network
segment and the server network segment in the HQ zone.
# Configure security policies on FW3 to allow IPsec VPN tunnel establishment and service
interworking.
[FW3] security-policy
[FW3-policy-security] rule name untrust-local
[FW3-policy-security-rule-untrust-local] source-zone untrust
[FW3-policy-security-rule-untrust-local] destination-zone local
[FW3-policy-security-rule-untrust-local] destination-address 100.1.1.8 mask 255.255.255.255
[FW3-policy-security-rule-untrust-local] action permit
[FW3-policy-security-rule-untrust-local] quit
[FW3-policy-security] rule name local-untrust
[FW3-policy-security-rule-local-untrust] source-zone local
[FW3-policy-security-rule-local-untrust] destination-zone untrust
[FW3-policy-security-rule-local-untrust] source-address 100.1.1.0 mask 255.255.255.0
[FW3-policy-security-rule-local-untrust] destination-address 4.4.4.0 mask 255.255.255.0
[FW3-policy-security-rule-local-untrust] action permit
[FW3-policy-security-rule-local-untrust] quit
[FW3-policy-security] rule name trust-untrust
[FW3-policy-security-rule-trust-untrust] source-zone trust
[FW3-policy-security-rule-trust-untrust] destination-zone untrust
[FW3-policy-security-rule-trust-untrust] source-address 172.16.40.0 mask 255.255.255.0
[FW3-policy-security-rule-trust-untrust] destination-address 172.16.30.0 mask 255.255.255.0
[FW3-policy-security-rule-trust-untrust] action permit
[FW3-policy-security-rule-trust-untrust] quit
[FW3-policy-security] rule name untrust-trust
[FW3-policy-security-rule-untrust-trust] source-zone untrust
[FW3-policy-security-rule-untrust-trust] destination-zone trust
[FW3-policy-security-rule-untrust-trust] source-address 172.16.30.0 mask 255.255.255.0
[FW3-policy-security-rule-untrust-trust] destination-address 172.16.40.0 mask 255.255.255.0
[FW3-policy-security-rule-untrust-trust] action permit
[FW3-policy-security-rule-untrust-trust] quit
# Configure NAT Server on RT1 so that FW3 can proactively send an IPsec VPN tunnel
establishment request to FW1.
[RT1-GigabitEthernet0/0/1.2] nat server protocol tcp global interface GigabitEthernet 0/0/1.2 500
inside 10.3.1.2 500
[RT1-GigabitEthernet0/0/1.2] quit
# Configure an IPsec proposal on FW1. You do not need to set default parameters.
# Configure security policies on FW1 to allow IPsec VPN tunnel establishment and service
interworking.
HRP_M[FW1] security-policy
HRP_M[FW1-policy-security] rule name untrust-local
HRP_M[FW1-policy-security-rule-untrust-local] source-zone untrust
HRP_M[FW1-policy-security-rule-untrust-local] destination-zone local
HRP_M[FW1-policy-security-rule-untrust-local] destination-address 10.3.1.2 mask 255.255.255.255
HRP_M[FW1-policy-security-rule-untrust-local] destination-address 172.16.30.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-untrust-local] action permit
HRP_M[FW1-policy-security-rule-untrust-local] quit
HRP_M[FW1-policy-security] rule name local-untrust
HRP_M[FW1-policy-security-rule-local-untrust] source-zone local
HRP_M[FW1-policy-security-rule-local-untrust] destination-zone untrust
HRP_M[FW1-policy-security-rule-local-untrust] source-address 172.16.30.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-local-untrust] destination-address 100.1.1.8 mask 255.255.255.255
HRP_M[FW1-policy-security-rule-local-untrust] action permit
HRP_M[FW1-policy-security-rule-local-untrust] quit
HRP_M[FW1-policy-security] rule name untrust-trust
HRP_M[FW1-policy-security-rule-untrust-trust] source-zone untrust
HRP_M[FW1-policy-security-rule-untrust-trust] destination-zone trust
HRP_M[FW1-policy-security-rule-untrust-trust] source-address 172.16.40.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-untrust-trust] destination-address 172.16.30.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-untrust-trust] action permit
HRP_M[FW1-policy-security-rule-untrust-trust] quit
HRP_M[FW1-policy-security] rule name trust-untrust
HRP_M[FW1-policy-security-rule-trust-untrust] source-zone trust
HRP_M[FW1-policy-security-rule-trust-untrust] destination-zone untrust
HRP_M[FW1-policy-security-rule-trust-untrust] source-address 172.16.30.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust] destination-address 172.16.40.0 mask 255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust] action permit
HRP_M[FW1-policy-security-rule-trust-untrust] quit
Configure SSL VPN in network extension mode on FW1 to allow the legal PC on the Internet
to access intranet servers.
# Configure local authentication for users.
HRP_M[FW1] aaa
HRP_M[FW1-aaa] authentication-scheme default
HRP_M[FW1-aaa-authen-default] authorization-scheme default
HRP_M[FW1-aaa-author-default] accounting-scheme default
HRP_M[FW1-aaa-accounting-default] domain default
HRP_M[FW1-aaa-domain-default] service-type internetaccess ssl-vpn l2tp ike dot1x
HRP_M[FW1-aaa-domain-default] internet-access mode password
HRP_M[FW1-aaa-domain-default] reference user current-domain
HRP_M[FW1-aaa-domain-default] quit
# Create a virtual gateway and configure it to use local authentication in the default
domain.
# Set virtual gateway parameters to allocate addresses to terminals, set the routing mode
to manual routing, and deliver the network segment routes of the servers in the HQ zone.
# Configure a security policy to allow SSL VPN users to access the servers in the HQ zone.
HRP_M[FW1] security-policy
HRP_M[FW1-policy-security] rule name untrust-trust
Configure URL filtering on FW1 and FW2 to prevent enterprise employees from accessing
the game portal website www.example.com. FW1 and FW2 work in hot standby mode. The
configuration on FW1 will be synchronized to FW2. Therefore, the configuration only needs
to be performed on FW1.
# Create URL filtering profile url_profile_01 and add www.example.com to the blacklist.
# Configure a security policy and reference the url_profile_01 profile to control URL access.
HRP_M[FW1] security-policy
HRP_M[FW1-policy-security] rule name trust-untrust-internet
HRP_M[FW1-policy-security-rule-trust-untrust-internet] source-zone trust
HRP_M[FW1-policy-security-rule-trust-untrust-internet] destination-zone untrust
HRP_M[FW1-policy-security-rule-trust-untrust-internet] source-address 172.16.30.0 mask
255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust-internet] source-address 172.16.20.0 mask
255.255.255.0
HRP_M[FW1-policy-security-rule-trust-untrust-internet] action permit
HRP_M[FW1-policy-security-rule-trust-untrust-internet] profile url-filter url_profile_01
HRP_M[FW1-policy-security-rule-trust-untrust-internet] quit
Configure the WLAN function for the HQ zone: Enable the AP to go online and broadcast
the Portal-AD signal. Configure tunnel forwarding and AD+Portal authentication for
wireless terminals. This configuration enables PC3 to connect to the Wi-Fi network named
Portal-AD and access the Internet after authentication.
# Configure GigabitEthernet0/0/2 on the WAC.
[SW3-G0/0/3] quit
The WAC needs to provide a management address for the AP and a service address for
wireless users. Configure VLAN 4000 as the DHCP server on the management network
segment and VLAN 4001 as the DHCP server on the user network segment according to
15.1.4 Lab Planning.
# Enable the DHCP function on the WAC.
# Create VLANs on the WAC to assign management addresses and STA addresses to the
AP.
# Configure the gateway IP address on the management network segment of the AP and
select the global DHCP address pool.
# Configure the DHCP server on the management network segment of the AP.
# Configure the gateway IP address on the network segment of wireless services and select
the global DHCP address pool.
# Create an AP group to which APs with the same configurations are added.
[AC] wlan
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] quit
# Create a regulatory domain profile, configure the country code of the WAC in the profile,
and bind the profile to the AP group.
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 1 ap-mac 14ab-0228-5f80
[AC-wlan-ap-1] ap-name a5760
[AC-wlan-ap-1] ap-group ap-group1
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power
and antenna gain configurations of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-1] quit
# Run the display ap all command to check the AP state. If the State field displays nor, the
AP goes online properly.
# Create a user named test in SupportTeam on the AD authentication server and set the
password to Huawei@123.
# Create an AD server template on the WAC and set the parameters according to those
obtained in the previous step.
# Create a Portal access profile named Portal-AD and enable the built-in Portal server.
[AC] aaa
[AC-aaa] authentication-scheme Portal-AD
[AC-aaa-authen-Portal-AD] authentication-mode ad
[AC-aaa-authen-Portal-AD] quit
[AC-aaa] authorization-scheme AD
[AC-aaa-author-AD] authorization-mode ad
[AC-aaa-author-AD] quit
# Create an authentication profile named Portal-AD and bind the Portal access profile,
authentication scheme, authorization scheme, and AD server to the authentication profile.
[AC] wlan
[AC-wlan-view] security-profile name Portal-AD
[AC-wlan-sec-prof-Portal-AD] security open
[AC-wlan-sec-prof-Portal-AD] quit
# Create an SSID profile named Portal-AD and set the SSID name to Portal-AD.
# Create a VAP profile named Portal-AD, set the data forwarding mode to tunnel
forwarding, set the service VLAN, and bind the security profile, authentication profile, and
SSID profile to the VAP profile.
# Bind the VAP profile to the AP group and apply configurations in this VAP profile to radio
0 and radio 1 of the APs in the AP group.
Configure routes to implement Layer 3 communication between the WAC and the AD
server and between the WAC and the Internet because the gateway of PC3 is deployed on
the WAC.
# Configure VLANIF 2000 on the WAC and SW3.
# Configure a default route to SW3 on the WAC so that all traffic is diverted to SW3 for
routing table searching.
[SW3] vlan 40
[SW3-vlan40] quit
[SW3] interface vlan 40
[SW3-VLANIF40] ip address 172.16.20.20 255.255.255.0
[SW3-VLANIF40] quit
# On SW3, configure a default route to the VRRP virtual gateway 172.16.20.1 of the firewall.
# Import static routes to OSPF on FW1 so that RT1 and RT2 have network segment routes
of PC3. When PC3 accesses the Internet, RT1 and RT2 can search for return routes for
returned packets.
HRP_M[FW1] ospf 1
15.3 Verification
After the configuration is complete, verify the following:
1. FW1 and FW2 form a hot standby group and work in active/standby mode, and FW1
is the active device.
2. PC1 can ping 4.4.4.1 on the Internet.
3. The legal PC on the Internet can access the website of the WWW server through the
IP address of RT1.
4. In the virtual system of FW3, PC5 can ping 100.1.1.1 on the Internet.
5. IPsec SAs exist on FW3 and FW1, and PC4 can ping the servers in the HQ zone.
6. The legal PC on the Internet can access the servers in the HQ zone through SSL VPN.
7. PC3 can access the Internet after connecting to the wireless network named Portal-
AD and completing AD authentication on the Portal page.
# Display the hot standby status of the firewalls.
Last state change information: XX HRP core state changed, old_state = abnormal(standby),
new_state = normal, local_priority = 45000, peer_priority = 45000.
# Verify that the legal PC on the Internet can access the website of the WWW server
through the IP address of RT1.
# Verify that the legal PC on the Internet can access the servers in the HQ zone through
SSL VPN.
# Verify that PC3 can access the Internet after connecting to the wireless network named
Portal-AD and completing AD authentication on the Portal page.
# Verify that the authentication page is displayed after 1.1.1.1 is entered in the address bar
of the browser on the wireless terminal.
# Enter the user name test and password Huawei@123, and click Login.
# Verify that PC3 can ping 4.4.4.1 on the Internet in the CLI.
#
interface GigabitEthernet0/0/13
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/14
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/15
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/16
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/17
port link-type access
port default vlan 30
#
return
#
interface GigabitEthernet0/0/3
undo portswitch
ip address 10.2.1.1 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/4
undo portswitch
ip address 10.3.1.1 255.255.255.252
ospf enable 1 area 0.0.0.0
#
bfd 1 bind peer-ip 10.3.1.2 source-ip 4.4.4.2
discriminator local 10
discriminator remote 20
commit
#
ospf 1
default-route-advertise alway
import-route static
area 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 4.4.4.1
#
return
set priority 85
add interface GigabitEthernet0/0/5
add interface GigabitEthernet0/0/6
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
add interface GigabitEthernet0/0/2
#
firewall zone dmz
set priority 50
add interface Eth-Trunk0
#
bfd 1 bind peer-ip 4.4.4.2 source-ip 10.3.1.2
discriminator local 20
discriminator remote 10
commit
#
ospf 1
import-route static
area 0.0.0.0
network 172.16.30.0 0.0.0.255
network 172.16.20.0 0.0.0.255
#
ip route-static 10.20.1.0 255.255.255.0 172.16.20.20
ip route-static 22.22.22.0 255.255.255.252 172.16.20.20
#
v-gateway public ssl version tlsv12
v-gateway public ssl public-key algorithm rsa
v-gateway public ssl ciphersuit custom aes256-sha aes128-sha
v-gateway public certificate-server server_local.cer enable
v-gateway ssl-renegotiation-attack defend enable
v-gateway ssl weak-encryption enable
v-gateway gateway interface GigabitEthernet0/0/2 private
v-gateway gateway authentication-domain default
v-gateway gateway alias gateway
#
profile type url-filter name url_profile_01
add blacklist url www.example.com
#
#****BEGIN***gateway**1****#
v-gateway gateway
basic
ssl version tlsv12
ssl timeout 5
ssl lifecycle 1440
ssl public-key algorithm rsa
ssl ciphersuit custom aes256-sha aes128-sha
service
network-extension enable
network-extension keep-alive enable
network-extension keep-alive interval 120
network-extension netpool 11.11.11.10 11.11.11.20 255.255.255.0
netpool 11.11.11.10 default
network-extension mode manual
authentication-method pre-share
integrity-algorithm hmac-sha2-256
prf hmac-sha2-256
#
ike peer 1
pre-shared-key %^%#-o`2Fz^3L%=eGt3HI\a%6't{HKksE:w4KZVxvN3N%^%#
ike-proposal 2
remote-id-type none
remote-address 100.1.1.8
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
ikev2 authentication sign-hash sha2-256
#
ipsec policy 1 1 isakmp
security acl 3003
ike-peer 1
proposal 1
tunnel local applied-interface
alias 1-10
sa trigger-mode auto
sa duration traffic-based 20971520
sa duration time-based 3600
#
portal-access-profile name default
#
interface vlanif10
ip address 192.168.10.111 255.255.255.0
#
interface Eth-Trunk0
ip address 10.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1
undo shutdown
ip address 10.2.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/2
undo shutdown
ip address 10.6.1.2 255.255.255.252
ospf enable 1 area 0.0.0.0
ipsec policy 1
#
interface GigabitEthernet0/0/3
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/4
undo shutdown
eth-trunk 0
#
interface GigabitEthernet0/0/5
undo shutdown
ip address 172.16.20.3 255.255.255.0
vrrp vrid 1 virtual-ip 172.16.20.1 standby
action permit
rule name trust-untrust-internet
source-zone trust
destination-zone untrust
source-address 172.16.30.0 mask 255.255.255.0
source-address 172.16.20.0 mask 255.255.255.0
profile url-filter url_profile_01
action permit
#
return
prf hmac-sha2-256
#
ike peer 1
pre-shared-key %^%#^rHq#+>;>&y~t50lvEM>\SOyJ"bn_NTHD(~4+E4:%^%#
ike-proposal 2
local-id-type ip ip-configurable
remote-id-type none
rsa encryption-padding oaep
rsa signature-padding pss
local-id-preference certificate enable
ikev2 authentication sign-hash sha2-256
#
ipsec policy-template Branch1 1
security acl 3004
ike-peer 1
proposal 1
#
ipsec policy 1 10 isakmp template Branch1
#
interface GigabitEthernet0/0/1
undo shutdown
mtu 1000
ip address 100.1.1.8 255.255.255.0
ipsec policy 1
#
interface GigabitEthernet0/0/6
undo shutdown
ip binding vpn-instance vsysa
ip address 172.16.40.1 255.255.255.0
#
interface GigabitEthernet0/0/7
undo shutdown
ip binding vpn-instance vsysb
ip address 172.16.50.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 local
set priority 100
#
firewall zone trust
set priority 85
add interface Virtual-if0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
#
certificate-check none
#
portal-access-profile name Portal-AD
portal local-server enable
#
ip pool vlan4001
gateway-list 10.20.1.1
network 10.20.1.0 mask 255.255.255.0
#
ip pool vlan4000
gateway-list 10.10.1.1
network 10.10.1.0 mask 255.255.255.0
option 43 sub-option 3 ascii 10.10.1.1
#
aaa
authentication-scheme Portal-AD
authentication-mode ad
authentication-scheme ad
authentication-mode ad
authorization-scheme Portal-AD
authorization-mode ad
domain default
authentication-scheme default
accounting-scheme default
radius-server default
domain default_admin
authentication-scheme default
accounting-scheme default
#
interface vlanif2000
ip address 22.22.22.1 255.255.255.252
#
interface vlanif4000
ip address 10.10.1.1 255.255.255.0
dhcp select global
#
interface vlanif4001
ip address 10.20.1.1 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 40 2000 4000
#
ip route-static 0.0.0.0 0.0.0.0 22.22.22.2
#
capwap source interface vlanif4000
capwap dtls control-link encrypt off
capwap dtls inter-controller control-link encrypt off
capwap dtls psk %^%#Q&*WA~9+*&]\Rs(\xoc$Uk*s~.gp(5nxAZ=}zew7%^%#
capwap dtls inter-controller psk %^%#Q&*WA~9+*&]\Rs(\xoc$Uk*s~.gp(5nxAZ=}zew7%^%#
#
wlan
temporary-management psk %^%##D&d:|*,.@,SB2*;grN"#7r9)qj}X<6hum3~%v8Z%^%#
15.5 Quiz
Why cannot Easy IP be deployed in the hot standby networking?
Answer: You cannot specify the VRID in Easy IP configuration. In normal cases, the active
firewall uses the IP address of its outbound interface as the public IP address to set up
sessions. After an active/standby switchover, the standby firewall also uses the IP address
of its outbound interface as the public IP address. In this case, the sessions synchronized
from the active firewall do not match the IP address of the outbound interface on the
standby firewall. As a result, services are interrupted.