HCNP-IENP en Lab Guide-Content
HCNP-IENP en Lab Guide-Content
HCNP-IENP en Lab Guide-Content
HCDP-IENP
Improving Enterprise Network Performance
Lab Guide
:XGJKSGXQYGTJ6KXSOYYOUTY
4UZOIK
.[G]KO)KXZOLOIGZOUT
.)*6/+46/SVXU\OTM+TZKXVXOYK4KZ]UXQ6KXLUXSGTIK
2GH-[OJK
+JOZOUT
Huawei Certification System
HCNA(HCDA)
HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA-
WLAN LTE Transmission Security UC CC VC Cloud Storage Design
Associate
HCNP-R&S
H HCNP-Carrier HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP-
(HCDP) (HCDP-Carrier) WLAN LTE Transmission Security UC CC VC Cloud Storage Design
Professional
HCIE- HCIE- HCIE-
HCIE- HCIE- HCIE- HCIE- HCIE- HCIE- HCIE- HCIE- HCIE-
R&S Carrier Transmissio
WLAN LTE Security UC CC VC Cloud Storage Design
n
Expert
HCAr
Architect
Referenced icon
9KXOGRROTK
+ZNKXTKZROTK
Lab environment specification
:NK2GHKT\OXUTSKTZOYY[MMKYZKJHKRU]
HCDP-IENP Content
CONTENTS
Lab 1-1 Security Zone Configuration and Configurations for Other Basic Functions on a Firewall .. 1
Lab 1-5 Dual-System Hot Backup Configuration for USG Firewalls ............................................... 73
Lab 2-2 Traffic Control Based on the Traffic Policy ..................................................................... 122
Learning Objectives
Topology
Scenario
Tasks
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.20.1 24
[R2-GigabitEthernet0/0/1]interface loopback 0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.30.1 24
[R3-GigabitEthernet0/0/1]interface loopback 0
[R3-LoopBack0]ip address 10.0.3.3 24
By default, four security zones are located on a firewall. They are local,
trusted, untrusted, and DMZ zones. In this lab, we need to add interfaces to
the trusted, untrusted, and DMZ zones.
[FW]firewall zone dmz
[FW-zone-dmz]add interface Ethernet 2/0/0
[FW-zone-dmz]firewall zone trust
[FW-zone-trust]add interface Vlanif 12
[FW-zone-trust]firewall zone untrust
[FW-zone-untrust]add interface Ethernet 0/0/0
packet-filter in public:
local -> trust :
inbound : default: permit; || IPv6-acl: null
outbound : default: permit; || IPv6-acl: null
local -> untrust :
inbound : default: deny; || IPv6-acl: null
outbound : default: permit; || IPv6-acl: null
local -> dmz :
inbound : default: deny; || IPv6-acl: null
outbound : default: permit; || IPv6-acl: null
trust -> untrust :
inbound : default: deny; || IPv6-acl: null
outbound : default: deny; || IPv6-acl: null
trust -> dmz :
inbound : default: deny; || IPv6-acl: null
outbound : default: deny; || IPv6-acl: null
dmz -> untrust :
inbound : default: deny; || IPv6-acl: null
outbound : default: deny; || IPv6-acl: null
[FW]ping 10.0.20.1
PING 10.0.20.1: 56 data bytes, press CTRL_C to break
Request time out
Reply from 10.0.20.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.20.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.20.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.20.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[FW]ping 10.0.30.1
PING 10.0.30.1: 56 data bytes, press CTRL_C to break
Request time out
Reply from 10.0.30.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=5 ttl=255 time=1 ms
Configure default routes for R1, R2, and R3. Configure static routes on the
FW to implement communication among network segments to which three
loopback 0 interfaces are connected.
[R1]ip route-static 0.0.0.0 0 10.0.10.254
[FW-policy-interzone-dmz-untrust-inbound-2]quit
[FW-policy-interzone-dmz-untrust-inbound]policy 3
[FW-policy-interzone-dmz-untrust-inbound-3]action deny
<R1>ping 10.0.30.1
PING 10.0.30.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
<R1>telnet 10.0.3.3
Press CTRL_] to quit telnet mode
Trying 10.0.3.3 ...
Connected to 10.0.3.3 ...
<R3>quit
Enable the defense against port scanning. The test results on port
scanning attacks are automatically imported to the blacklist.
[FW]firewall defend port-scan enable
Set the threshold of the scanning rate to 5000 pps. The threshold specifies
the rate at which a source IP address changes IP packets that are to be sent to
the destination port. If the rate is high, there is a high probability that the source
IP address is scanning all ports in the destination IP address.
[FW]firewall defend port-scan max-rate 5000
Set the timeout period of the blacklist to 30 minutes. The blacklist entries
dynamically generated are deleted after 30 minutes.
[FW]firewall defend port-scan blacklist-timeout 30
Create a blacklist statically and add 10.0.111.1 to the blacklist. The firewall
discards packets sent from this IP address before the IP address is manually
deleted from the blacklist.
[FW]firewall blacklist enable
[FW]firewall blacklist item 10.0.111.1
0 packet(s) received
100.00% packet loss
Besides FTP and TFTP services that the enterprise provides, intranet
users need to access extranet web pages. Risky java controls may exist on
these web pages. FTP is a predefined protocol. Devices in security zones can
forward FTP packets properly after the detect ftp function is applied. TFTP
packets, however, can only be forwarded after triplet ASPF is enabled.
Create ACL.
ACL 3001 defines matching rules for traffic sent to the TFTP server on the
intranet. TFTP services require user-defined port number. Create a separate
ACL.
[FW]acl 3001
[FW-acl-adv-3001]rule permit udp destination-port eq tftp
[FW-acl-adv-3001]quit
How can you plan the network for an enterprise that has a large number of
users and requires multiple services? What methods can simplify the
configuration?
Final Configurations
[R1]display current-configuration
[V200R001C00SPC200]
#
sysname R1
#
interface GigabitEthernet0/0/1
ip address 10.0.10.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
interface LoopBack1
ip address 10.0.111.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.10.254
#
return
[R2]display current-configuration
[V200R001C00SPC200]
#
sysname R2
#
interface GigabitEthernet0/0/1
ip address 10.0.20.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.20.254
#
return
[R3]display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
interface GigabitEthernet0/0/1
ip address 10.0.30.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.30.254
#
return
[FW]display current-configuration
#
sysname FW
#
firewall packet-filter default permit interzone trust untrust direction outbound
firewall packet-filter default permit interzone trust dmz direction outbound
#
vlan batch 1 12
#
firewall defend port-scan enable
set priority 50
add interface Ethernet2/0/0
#
firewall interzone trust untrust
detect java-blocking
#
firewall interzone trust dmz
detect ftp
detect user-defined 3001 outbound
#
ip route-static 10.0.1.0 255.255.255.0 10.0.10.1
ip route-static 10.0.2.0 255.255.255.0 10.0.20.1
ip route-static 10.0.3.0 255.255.255.0 10.0.30.1
ip route-static 10.0.111.0 255.255.255.0 10.0.10.1
#
firewall blacklist enable
firewall blacklist item 10.0.111.1
#
policy interzone dmz untrust inbound
policy 1
action permit
policy service service-set icmp
policy destination 10.0.3.3 0
policy 2
action permit
policy service service-set telnet
policy destination 10.0.3.3 0
policy 3
action deny
#
return
[S1]display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
vlan batch 11 to 13
#
interface GigabitEthernet0/0/1
Learning Objectives
Topology
Scenario
Tasks
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.0.20.1 24
[R2-GigabitEthernet0/0/2]interface Serial 1/0/0
[R2-Serial1/0/0]ip address 10.0.12.2 24
[R2-Serial1/0/0]interface Serial2/0/0
[R2-Serial2/0/0]ip address 10.0.23.2 24
[R2-Serial2/0/0]interface loopback 0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface Serial2/0/0
[R3-Serial2/0/0]ip address 10.0.23.3 24
[R3-Serial2/0/0]interface loopback 0
[R3-LoopBack0]ip address 10.0.3.3 24
<USG2100>system-view
Enter system view, return user view with Ctrl+Z.
[USG2100]sysname FW1
[FW1]interface Ethernet 0/0/0
[FW1-Ethernet0/0/0]ip address 10.0.100.1 24
[FW1-Ethernet0/0/0]interface Ethernet 2/0/0
[FW1-Ethernet2/0/0]ip address 10.0.10.1 24
[FW1-Ethernet2/0/0]interface vlan 1
[FW1-Vlanif1]undo ip address
<USG2100>system-view
Enter system view, return user view with Ctrl+Z.
[USG2100]sysname FW2
[FW2]interface Ethernet 0/0/0
[FW2-Ethernet0/0/0]ip address 10.0.200.1 24
[FW2-Ethernet0/0/0]interface Ethernet 2/0/0
[FW2-Ethernet2/0/0]ip address 10.0.20.2 24
[FW2-Ethernet2/0/0]interface vlan 1
[FW2-Vlanif1]undo ip address
Configure trusted zones of FW1 and FW2, and add interfaces to the
trusted zones.
[FW1]firewall zone untrust
[FW1-zone-untrust]add interface Ethernet 2/0/0
[FW1-zone-untrust]undo add interface Ethernet0/0/0
[FW1-zone-untrust]quit
[FW1]firewall zone trust
[FW1-zone-trust]add interface Ethernet 0/0/0
Configure packets to transmit only from the trusted zone to the untrusted
zone and from the untrusted zone to the local zone.
Configure single-area OSPF on R1, R3, R3, FW1, and FW2. The network
segments 10.0.10.0/24, 10.0.20.0/24, 10.0.12.0/24, and 10.0.23.0/24 are
connected.
[R1]ospf 1
[R1-ospf-1]area 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 10.0.10.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2]ospf 1
[R2-ospf-1]area 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.20.0 0.0.0.255
[R3]ospf 1
[R3-ospf-1]area 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255
[FW1]ospf 1
[FW1-ospf-1]area 0.0.0.0
[FW1-ospf-1-area-0.0.0.0]network 10.0.10.0 0.0.0.255
[FW2]ospf 1
[FW2-ospf-1]area 0.0.0.0
[FW2-ospf-1-area-0.0.0.0]network 10.0.20.0 0.0.0.255
[FW2]ping 10.0.10.1
PING 10.0.10.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.1: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 10.0.10.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 10.0.10.1: bytes=56 Sequence=3 ttl=253 time=40 ms
Reply from 10.0.10.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 10.0.10.1: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 10.0.10.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/34/40 ms
[FW2]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 10.0.23.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
headquarters network.
Create an ACL to identify IPSec VPN traffic between FW1 and FW2.
[FW1]acl 3000
[FW1-acl-adv-3000]rule permit ip source 10.0.100.0 0.0.0.255 destination
10.0.200.0 0.0.0.255
[FW2]acl 3000
[FW2-acl-adv-3000]rule permit ip source 10.0.200.0 0.0.0.255 destination
10.0.100.0 0.0.0.255
[FW2]ike proposal 10
[FW2-ike-proposal-10]authentication-algorithm sha1
[FW2-ike-proposal-10]encryption-algorithm des
Apply the IKE proposal and configure the preshared key and peer end's IP
address on FW1 and FW2.
[FW1]ike peer fw12
[FW1-ike-peer-fw12]ike-proposal 10
[FW1-ike-peer-fw12]remote-address 10.0.20.2
[FW1-ike-peer-fw12]pre-shared-key abcde
During the IPSec policy configuration, bind the ACL, IPSec proposal, and
IKE peer to the IPSec policy.
[FW1]ipsec policy map1 10 isakmp
[FW1-ipsec-policy-isakmp-map1-10]security acl 3000
[FW1-ipsec-policy-isakmp-map1-10]proposal tran1
[FW1-ipsec-policy-isakmp-map1-10]ike-peer fw12
[FW2]interface Ethernet2/0/0
[FW2-Ethernet2/0/0]ipsec policy map1
Test the connectivity between the branch intranet and the headquarters
intranet. View the established IPSec.
[FW1]ping -a 10.0.100.1 10.0.200.1
PING 10.0.200.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.200.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=3 ttl=255 time=60 ms
Reply from 10.0.200.1: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 10.0.200.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/52/60 ms
[FW1]display ike sa
current ike sa number: 2
---------------------------------------------------------------------
connection-id peer vpn flag phase vpn
--------------------------------------------------------------------
40001 10.0.20.2 0 RD|ST v2:2 public
1 10.0.20.2 0 RD|ST v2:1 public
flag meaning
RD--READY ST--STAYALIVE RL--REPLACED FD--FADING
TO--TIMEOUT TD--DELETING NEG--NEGOTIATING D—DPD
[FW1]display ipsec sa
===============================
Interface: Ethernet2/0/0
path MTU: 1500
===============================
-----------------------------
IPsec policy name: "map1"
sequence number: 10
mode: isakmp
vpn: public
-----------------------------
connection id: 40001
rule number: 5
encapsulation mode: tunnel
holding time: 0d 0h 0m 16s
Create an ACL to identify IPSec VPN traffic to be sent between the branch
office and the headquarters.
[R3]acl 3000
[R3-acl-adv-3000]rule permit ip source 10.0.3.0 0.0.0.255 destination 10.0.200.0
0.0.0.255
[FW2]acl 3001
[FW2-acl-adv-3001]rule permit ip source 10.0.200.0 0.0.0.255 destination
10.0.3.0 0.0.0.255
[R3]interface Serial2/0/0
[R3- Serial2/0/0]ipsec policy map1
Test the connectivity between the branch office intranet and the
headquarters intranet. View the established IPSec.
To view the established IKE SA, use the v2 parameter in the command.
[R3]ping -a 10.0.3.3 10.0.200.1
PING 10.0.200.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.200.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=2 ttl=255 time=48 ms
Reply from 10.0.200.1: bytes=56 Sequence=3 ttl=255 time=48 ms
Reply from 10.0.200.1: bytes=56 Sequence=4 ttl=255 time=48 ms
Reply from 10.0.200.1: bytes=56 Sequence=5 ttl=255 time=48 ms
--- 10.0.200.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 48/48/50 ms
[R3]display ike sa v2
Conn-ID Peer VPN Flag(s) Phase
---------------------------------------------------------------
2 10.0.20.2 0 RD|ST 2
1 10.0.20.2 0 RD|ST 1
Flag Description:
RD--READY ST--STAYALIVE RL--REPLACED FD--FADING TO--TIMEOUT
HRT--HEARTBEAT LKG--LAST KNOWN GOOD SEQ NO. BCK--BACKED UP
[R3]display ipsec sa
===============================
Interface: Serial2/0/0
Path MTU: 1500
===============================
-----------------------------
IPSec policy name: "map1"
Sequence number : 10
Mode : ISAKMP
-----------------------------
Connection ID : 2
Encapsulation mode: Tunnel
Tunnel local : 10.0.23.3
Tunnel remote : 10.0.20.2
[Outbound ESP SAs]
SPI: 247406703 (0xebf206f)
Proposal: ESP-ENCRYPT-DES-64 ESP-AUTH-SHA1
SA remaining key duration (bytes/sec): 1887436380/3534
Max sent sequence-number: 5
UDP encapsulation used for NAT traversal: N
[Inbound ESP SAs]
SPI: 155207494 (0x9404746)
Proposal: ESP-ENCRYPT-DES-64 ESP-AUTH-SHA1
SA remaining key duration (bytes/sec): 1887436380/3534
Max received sequence-number: 5
UDP encapsulation used for NAT traversal: N
Delete static routes configured in the preceding steps. Enable RIP (version 2)
between a branch network and the headquarters intranet.
[FW1]undo ip route-static 10.0.200.0 24 10.0.10.2
[FW1]rip
[FW1-rip-1]version 2
[FW1-rip-1]network 30.0.0.0
[FW1-rip-1]network 10.0.0.0
Bind the IPSec policy to the new ACLs on FW1 and FW2.
[FW1]acl 3001
[FW1-acl-adv-3001]rule permit gre source 10.0.10.1 0 destination 10.0.20.2 0
[FW1-acl-adv-3001]quit
[FW1]ipsec policy map1 10 isakmp
[FW1-ipsec-policy-isakmp-map1-10]security acl 3001
[FW2]acl 3002
[FW2-acl-adv-3002]rule permit gre source 10.0.20.2 0 destination 10.0.10.1 0
[FW2-acl-adv-3002]quit
[FW2]ipsec policy map1 10 isakmp
[FW2-ipsec-policy-isakmp-map1-10]security acl 3002
Test the connectivity between the branch intranet and the headquarters
intranet. View the established IPSec.
[FW1]ping -a 10.0.100.1 10.0.200.1
PING 10.0.200.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.200.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=3 ttl=255 time=60 ms
Reply from 10.0.200.1: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 10.0.200.1: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 10.0.200.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/52/60 ms
[FW1]display ipsec sa
===============================
Interface: Ethernet2/0/0
path MTU: 1500
===============================
-----------------------------
IPsec policy name: "map1"
sequence number: 10
mode: isakmp
vpn: public
-----------------------------
connection id: 40003
rule number: 5
Delete static routes configured in the preceding steps. Enable RIP (version
2) between a branch office network and the headquarters intranet.
[FW2]undo ip route-static 10.0.3.0 24 10.0.20.1
[FW2]rip
[FW2-rip-1]version 2
[FW2-rip-1]network 40.0.0.0
[FW2]acl 3003
[FW2-acl-adv-3003]rule permit gre source 10.0.20.2 0 destination 10.0.23.3 0
[FW2-acl-adv-3003]quit
[FW2]ipsec policy map1 20 isakmp
[FW2-ipsec-policy-isakmp-map1-20]security acl 3003
[FW2-ipsec-policy-isakmp-map1-20]proposal tran1
[FW2-ipsec-policy-isakmp-map1-20]ike-peer fw23
Test the connectivity between the branch office intranet and the
headquarters intranet. View the established IPSec.
[R3]ping -a 10.0.3.3 10.0.200.1
PING 10.0.200.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.200.1: bytes=56 Sequence=1 ttl=255 time=56 ms
Reply from 10.0.200.1: bytes=56 Sequence=2 ttl=255 time=53 ms
Reply from 10.0.200.1: bytes=56 Sequence=3 ttl=255 time=54 ms
Reply from 10.0.200.1: bytes=56 Sequence=4 ttl=255 time=54 ms
Reply from 10.0.200.1: bytes=56 Sequence=5 ttl=255 time=54 ms
--- 10.0.200.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 53/54/56 ms
[R3]display ipsec sa
===============================
Interface: Serial2/0/0
Path MTU: 1500
===============================
-----------------------------
IPSec policy name: "map1"
Sequence number : 10
Mode : ISAKMP
-----------------------------
Connection ID : 2
Encapsulation mode: Tunnel
Tunnel local : 10.0.23.3
Tunnel remote : 10.0.20.2
-----------------------------
IPSec policy name: "map1"
Sequence number : 20
Mode : ISAKMP
-----------------------------
Connection ID : 5
Encapsulation mode: Tunnel
Tunnel local : 10.0.23.3
Tunnel remote : 10.0.20.2
A GRE over IPSec VPN tunnel is established between FW2 and R3. Data
is transmitted between the branch office network and the headquarters
network using RIP.
For the IPSec configuration between the branch office network and the
headquarters network described in Step 5, if R3 did not use IKEv2 to negotiate
with FW2, could the IKE SA still be established?
Final Configurations
[FW1]display current-configuration
#
sysname FW1
#
acl number 3000
rule 5 permit ip source 10.0.100.0 0.0.0.255 destination 10.0.200.0 0.0.0.255
#
acl number 3001
rule 5 permit gre source 10.0.10.1 0 destination 10.0.20.2 0
#
ike proposal 10
#
ike peer fw12
pre-shared-key abcde
ike-proposal 10
remote-address 10.0.20.2
#
ipsec proposal tran1
esp authentication-algorithm sha1
#
ipsec policy map1 10 isakmp
security acl 3001
ike-peer fw12
proposal tran1
#
interface Ethernet0/0/0
ip address 10.0.100.1 255.255.255.0
#
interface Ethernet2/0/0
ip address 10.0.10.1 255.255.255.0
ipsec policy map1
#
interface Tunnel1
ip address 30.1.1.1 255.255.255.0
tunnel-protocol gre
source 10.0.10.1
destination 10.0.20.2
#
firewall zone local
[FW2]display current-configuration
#
sysname FW2
#
acl number 3000
rule 5 permit ip source 10.0.200.0 0.0.0.255 destination 10.0.100.0 0.0.0.255
#
acl number 3001
rule 5 permit ip source 10.0.200.0 0.0.0.255 destination 10.0.3.0 0.0.0.255
#
acl number 3002
rule 5 permit gre source 10.0.20.2 0 destination 10.0.10.1 0
#
acl number 3003
rule 5 permit gre source 10.0.20.2 0 destination 10.0.23.3 0
#
ike proposal 10
#
ike peer fw21
pre-shared-key abcde
ike-proposal 10
remote-address 10.0.10.1
#
ike peer fw23
pre-shared-key abcde
ike-proposal 10
remote-address 10.0.23.3
#
ipsec proposal tran1
esp authentication-algorithm sha1
#
ipsec policy map1 10 isakmp
security acl 3002
ike-peer fw21
proposal tran1
#
ipsec policy map1 11 isakmp
security acl 3001
ike-peer c
proposal tran1
#
ipsec policy map1 20 isakmp
security acl 3003
ike-peer fw23
proposal tran1
#
interface Ethernet0/0/0
ip address 10.0.200.1 255.255.255.0
#
interface Ethernet2/0/0
ip address 10.0.20.2 255.255.255.0
ipsec policy map1
#
interface Tunnel1
ip address 30.1.1.2 255.255.255.0
tunnel-protocol gre
source 10.0.20.2
destination 10.0.10.1
#
interface Tunnel2
ip address 40.1.1.1 255.255.255.0
tunnel-protocol gre
source 10.0.20.2
destination 10.0.23.3
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface Ethernet0/0/0
#
firewall zone untrust
set priority 5
add interface Ethernet2/0/0
add interface Tunnel1
add interface Tunnel2
#
firewall zone dmz
set priority 50
#
ospf 1
area 0.0.0.0
network 10.0.20.0 0.0.0.255
#
rip 1
version 2
network 30.0.0.0
network 10.0.0.0
network 40.0.0.0
#
Return
[R3]display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
acl number 3000
rule 5 permit ip source 10.0.3.0 0.0.0.255 destination 10.0.200.0 0.0.0.255
#
acl number 3001
rule 5 permit gre source 10.0.23.3 0 destination 10.0.20.2 0
#
ipsec proposal tran1
esp authentication-algorithm sha1
#
ike proposal 10
#
ike peer r32 v2
pre-shared-key abcde
ike-proposal 10
remote-address 10.0.20.2
#
ipsec policy map1 10 isakmp
security acl 3000
ike-peer r32
proposal tran1
#
ipsec policy map1 20 isakmp
security acl 3001
ike-peer r32
proposal tran1
#
interface Serial2/0/0
link-protocol ppp
ip address 10.0.23.3 255.255.255.0
ipsec policy map1
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
interface Tunnel0/0/1
ip address 40.1.1.2 255.255.255.0
tunnel-protocol gre
source 10.0.23.3
destination 10.0.20.2
#
ospf 1
area 0.0.0.0
network 10.0.23.0 0.0.0.255
#
rip 1
version 2
network 40.0.0.0
network 10.0.0.0
#
Return
Learning Objectives
Topology
Scenario
network and configure security policies on the firewall and the switch.
Tasks
addresses.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.10.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.10.3 24
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S1
<USG2100>system-view
Enter system view, return user view with Ctrl+Z.
[USG2100]sysname FW
[FW]interface Ethernet 0/0/0
[FW-Ethernet0/0/0]ip address 10.0.10.254 24
[FW-Ethernet0/0/0]interface Ethernet 2/0/0
[FW-Ethernet2/0/0]ip address 100.0.0.1 24
[FW-Ethernet2/0/0]quit
[FW]firewall packet-filter default permit all
[FW]firewall zone untrust
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S2
[S2]vlan 100
[S2-vlan100]quit
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]port link-type access
[S2-GigabitEthernet0/0/9]port default vlan 100
[S2-GigabitEthernet0/0/9]quit
[S2]interface Vlanif 100
[S2-Vlanif100]ip address 100.0.0.2 24
[S1]vlan 100
[S1-vlan100]quit
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]port link-type access
[S1-GigabitEthernet0/0/9]port default vlan 100
[S1-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/23
[S1-GigabitEthernet0/0/23]port link-type access
[S1-GigabitEthernet0/0/23]port default vlan 100
[R1]ping -c 1 10.0.10.3
PING 10.0.10.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.3: bytes=56 Sequence=1 ttl=255 time=2 ms
[R1]ping -c 1 10.0.10.254
PING 10.0.10.254: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.254: bytes=56 Sequence=1 ttl=255 time=3 ms
[FW]ping -c 1 100.0.0.2
10:47:09 2011/12/27
PING 100.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 100.0.0.2: bytes=56 Sequence=1 ttl=254 time=1 ms
[S2]ping -c 1 10.0.10.2
PING 10.0.10.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.2: bytes=56 Sequence=1 ttl=254 time=1 ms
[S2]ping -c 1 10.0.10.3
PING 10.0.10.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.3: bytes=56 Sequence=1 ttl=254 time=1 ms
attacks.
Enable defense against attacks from packets with invalid TCP flag bits on
FW.
[FW]firewall defend tcp-flag enable
[R3]dhcp enable
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]undo ip address
[R3-GigabitEthernet0/0/1]ip address dhcp-alloc
Info: The operation may take a few seconds, please wait.
Succeed.
Attackers send some seldom used valid packets to detect the network. To
prevent such attacks, enable defense against large ICMP packet attacks,
ICMP redirection packet attacks, and ICMP destination-unreachable packet
attacks.
Enable defense against attacks of IP packets with the route record option
on FW.
[FW]firewall defend route-record enable
Enable defense against attacks of IP packets with the source route option
on FW.
[FW]firewall defend source-route enable
The firewall functions are limited on actual networks. IPS devices need to
Collect information about IPS and compare the IPS to the firewall.
Final Configurations
[FW]display current-configuration
#
Return
[S1]display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
vlan batch 100
#
dhcp enable
dhcp snooping enable
user-bind static ip-address 10.0.10.1 mac-address 5489-9876-81f0
user-bind static ip-address 10.0.10.254 mac-address 0022-a109-68b2
#
interface GigabitEthernet0/0/1
dhcp snooping trusted
#
interface GigabitEthernet0/0/2
dhcp snooping enable
Learning Objectives
Topology
Scenario
and advertise Telnet and FTP services provided by a server with the IP
address of 10.0.4.4 in the DMZ zone. The public address of the server is
1.1.1.100/24.
You also need to advertise Telnet services provided by a server with the IP
address of 10.0.3.3 in the trusted zone. Users in the trusted zone can access
the Telnet services using 1.1.1.200/24, and cannot access services in other
zones.
Tasks
Configure IP addresses and masks for all routers. The mask length of each
loopback interface is 24 bits.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 1.1.1.1 24
[R1-GigabitEthernet0/0/1]interface loopback 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.20.2 24
[R2-GigabitEthernet0/0/1]interface loopback 0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.20.3 24
[R3-GigabitEthernet0/0/1]interface loopback 0
[R3-LoopBack0]ip address 10.0.3.3 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 10.0.40.4 24
[R4-GigabitEthernet0/0/1]interface loopback 0
[R4-LoopBack0]ip address 10.0.4.4 24
Configure default routes for R2, R3, and R4. Configure static routes to
implement communication across network segments to which four loopback 0
interfaces are connected. R1 requires no static route because R1 functions as
an Internet device and does not require information about the private networks
in the trusted zone and DMZ zone.
[R2]ip route-static 0.0.0.0 0 10.0.20.254
If you ping 10.0.1.1 from R2 directly, the ping fails. Use the extended ping.
After a source IP address is specified as 10.0.2.2, the ping succeeds.
This is because that the source IP address of the packet is 10.0.20.2,
which is not in the NAT address range.
[FW]display nat-policy interzone trust untrust outbound
10:46:37 2011/12/26
nat-policy interzone trust untrust outbound
policy 0 (1 times matched)
action source-nat
policy service service-set ip
policy source 10.0.2.0 0.0.0.255
policy destination any
easy-ip Ethernet0/0/0
The IP address 10.0.2.0/24 and 10.0.3.0/24 in the trusted zone can access
the untrusted zone.
Enable Telnet and FTP on R4, and test on R1. The advertised IP address
is 1.1.1.100, which is the actual destination IP address when R1 accesses
services on 10.0.4.4.
[R4]aaa
[R4-aaa]local-user huawei password simple huawei
[R4-aaa]local-user huawei service-type ftp
[R4-aaa]local-user huawei ftp-directory flash:
[R4-aaa]quit
[R4]user-interface vty 0 4
[R4-ui-vty0-4]authentication-mode none
[R4-ui-vty0-4]quit
[R4]ftp server enable
<R1>telnet 1.1.1.100
Press CTRL_] to quit telnet mode
Trying 1.1.1.100 ...
Connected to 1.1.1.100 ...
<R4>quit
<R1>ftp 1.1.1.100
Trying 1.1.1.100 ...
Press CTRL+K to abort
Connected to 1.1.1.100.
220 FTP service ready.
User(1.1.1.100:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[R1-ftp]
Users in the untrusted zone can access Telnet and FTP services provided
by 1.1.1.100/24 in the DMZ zone.
Configure NAT on the server with the IP address of 10.0.3.3 and maps the
address to 1.1.1.200.
[FW]nat server protocol tcp global 1.1.1.200 telnet inside 10.0.3.3 telnet
Configure NAT to translate the source address into a public address when
a user on the intranet accesses 1.1.1.200.
[FW]nat-policy zone trust
[FW-nat-policy-zone-trust]policy 0
[FW-nat-policy-zone-trust-0]policy source 10.0.2.0 0.0.0.255
[FW-nat-policy-zone-trust-0]policy destination 1.1.1.200 0
[FW-nat-policy-zone-trust-0]action source-nat
[FW-nat-policy-zone-trust-0]address-group 1
Enable Telnet on R3, and test connectivity of the trusted area and
1.1.1.200 on R2. The advertised IP address is 1.1.1.200, which is the actual
destination IP address when R2 accesses 10.0.3.3.
[R3]user-interface vty 0 4
[R3-ui-vty0-4]authentication-mode none
Final Configurations
[FW]display current-configuration
#
sysname FW
#
nat address-group 1 1.1.1.3 1.1.1.10
nat server 0 protocol tcp global 1.1.1.100 telnet inside 10.0.4.4 telnet
nat server 1 protocol tcp global 1.1.1.100 ftp inside 10.0.4.4 ftp
nat server 2 protocol tcp global 1.1.1.200 telnet inside 10.0.3.3 telnet
#
vlan batch 1 12
#
firewall session link-state check
#
interface Vlanif12
ip address 10.0.20.254 255.255.255.0
#
interface Ethernet0/0/0
ip address 1.1.1.254 255.255.255.0
#
interface Ethernet1/0/0
portswitch
port link-type access
port access vlan 12
#
interface Ethernet2/0/0
ip address 10.0.40.254 255.255.255.0
#
firewall zone trust
set priority 85
add interface Vlanif12
#
firewall zone untrust
set priority 5
add interface Ethernet0/0/0
#
firewall zone dmz
set priority 50
add interface Ethernet2/0/0
#
firewall interzone dmz untrust
detect ftp
#
ip route-static 0.0.0.0 0.0.0.0 1.1.1.1
ip route-static 10.0.2.0 255.255.255.0 10.0.20.2
ip route-static 10.0.3.0 255.255.255.0 10.0.20.3
ip route-static 10.0.4.0 255.255.255.0 10.0.40.4
#
policy interzone trust untrust outbound
policy 0
action permit
policy source 10.0.2.0 0.0.0.255
policy source 10.0.3.0 0.0.0.255
#
policy interzone dmz untrust inbound
policy 0
action permit
policy service service-set ftp
policy service service-set telnet
policy destination 10.0.4.4 0
#
nat-policy interzone trust untrust outbound
policy 0
action source-nat
policy source 10.0.2.0 0.0.0.255
easy-ip Ethernet0/0/0
policy 1
action source-nat
policy source 10.0.3.0 0.0.0.255
address-group 1
#
nat-policy zone trust
policy 0
action source-nat
policy source 10.0.2.0 0.0.0.255
policy destination 1.1.1.200 0
address-group 1
#
Return
<R1>display current-configuration
[V200R001C00SPC200]
#
sysname R1
#
#
interface GigabitEthernet0/0/1
ip address 1.1.1.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
Return
<R2>display current-configuration
[V200R001C00SPC200]
#
sysname R2
#
interface GigabitEthernet0/0/1
ip address 10.0.20.2 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.20.254
#
Return
[R3]display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
interface GigabitEthernet0/0/1
ip address 10.0.20.3 255.255.255.0
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.20.254
#
user-interface vty 0 4
authentication-mode none
#
Return
[R4]display current-configuration
[V200R001C00SPC500]
#
sysname R4
ftp server enable
#
#
aaa
local-user huawei password simple huawei
local-user huawei ftp-directory flash:
local-user huawei service-type ftp
#
interface GigabitEthernet0/0/1
ip address 10.0.40.4 255.255.255.0
#
interface LoopBack0
ip address 10.0.4.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.40.254
#
user-interface vty 0 4
authentication-mode none
#
Return
<S1>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
vlan batch 11 to 13
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 11
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 13
#
interface GigabitEthernet0/0/21
port link-type access
port default vlan 11
#
interface GigabitEthernet0/0/22
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/23
port link-type access
port default vlan 13
#
return
Firewalls
Learning Objectives
Topology
Scenario
Tasks
Configure IP addresses and masks for all routers. The mask length of each
loopback interface is 24 bits.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ip address 10.0.10.1 24
[R1-GigabitEthernet0/0/2]interface loopback 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.20.1 24
[R2-GigabitEthernet0/0/1]interface loopback 0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.30.1 24
[R3-GigabitEthernet0/0/2]interface loopback 0
[R3-LoopBack0]ip address 10.0.3.3 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 10.0.40.1 24
[R4-GigabitEthernet0/0/1]interface loopback 0
[R4-LoopBack0]ip address 10.0.4.4 24
Configure VLAN 11, 12, 13, and 14 and corresponding VLANIF addresses
for firewalls. Ethernet1/0/0 on the firewall is a Layer 2 switch interface and
cannot be configured with an IP address. By default, the firewall configures an
IP address for VLANIF 1. To prevent interference, delete the VLANIF 1
configuration.
<FW1>system-view
[FW1]vlan batch 11 to 14
[FW1]interface vlanif 11
[FW1-Vlanif11]ip address 10.0.10.2 24
[FW1-Vlanif11]interface vlanif 12
[FW1-Vlanif12]ip address 10.0.20.2 24
[FW1-Vlanif12]interface Vlanif 13
[FW1-Vlanif13]ip address 10.0.30.2 24
[FW1-Vlanif13]interface Vlanif 14
[FW1-Vlanif14]ip address 10.0.40.2 24
[FW1-Vlanif14]interface Ethernet0/0/0
[FW1-Ethernet0/0/0]ip address 10.0.50.2 24
[FW1-Ethernet0/0/0]quit
[FW1]interface vlanif 1
[FW1-Vlanif1]undo ip address
<FW2>system-view
[FW2]vlan batch 11 to 14
[FW2]interface vlanif 11
[FW2-Vlanif11]ip address 10.0.10.3 24
[FW2-Vlanif11]interface vlanif 12
[FW2-Vlanif12]ip address 10.0.20.3 24
[FW2-Vlanif12]interface Vlanif 13
[FW2-Vlanif13]ip address 10.0.30.3 24
[FW2-Vlanif13]interface Vlanif 14
<S2>system-view
[S2]vlan batch 11 to 14
[S2]interface GigabitEthernet 0/0/1
[S2-GigabitEthernet0/0/1]port link-type access
[S2-GigabitEthernet0/0/1]port default vlan 11
[S2-GigabitEthernet0/0/1]interface gigabitEthernet 0/0/3
[S2-GigabitEthernet0/0/3]port link-type access
[S2-GigabitEthernet0/0/3]port default vlan 13
[S2]vlan 10
[S2-vlan10]quit
[S2]interface GigabitEthernet 0/0/11
[S2-GigabitEthernet0/0/11]port link-type access
[S2-GigabitEthernet0/0/11]port default vlan 10
[S2-GigabitEthernet0/0/11]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]port link-type access
[S2-GigabitEthernet0/0/10]port default vlan 10
[S2-GigabitEthernet0/0/10]quit
[S2]stp region-configuration
[S2-mst-region]region-name FW
[S2-mst-region]instance 1 vlan 10
[S2-mst-region]active region-configuration
[FW2]interface Ethernet1/0/0
[FW2]port link-type trunk
[FW2]port trunk permit vlan 11 to 14
[FW1]ping 10.0.30.1
09:47:35 2011/12/27
PING 10.0.30.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.30.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[FW1]ping 10.0.40.1
09:48:01 2011/12/27
PING 10.0.40.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.40.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.40.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.40.1: bytes=56 Sequence=3 ttl=255 time=190 ms
[FW1]ping 10.0.10.1
09:48:34 2011/12/27
PING 10.0.10.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[FW2]ping 10.0.10.1
03:51:04 2011/12/27
PING 10.0.10.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.10.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.10.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[FW2]ping 10.0.20.1
03:51:23 2011/12/27
PING 10.0.20.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.20.1: bytes=56 Sequence=1 ttl=255 time=1 ms
[FW2]ping 10.0.30.1
03:51:47 2011/12/27
PING 10.0.30.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.30.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.30.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[FW2]ping 10.0.40.1
03:52:15 2011/12/27
PING 10.0.40.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.40.1: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.40.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.40.1: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 10.0.40.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.40.1: bytes=56 Sequence=5 ttl=255 time=10 ms
Check the VRRP configurations of FW1 and FW2. Verify that the
command outputs display VRRP group states correctly.
[FW1]display vrrp
20:56:41 2011/12/28
Vlanif13 | Virtual Router 13
VRRP Group : Slave
state : Backup
Virtual IP : 10.0.30.254
Virtual MAC : 0000-5e00-010d
Primary IP : 10.0.30.2
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
[FW2]display vrrp
14:32:32 2011/12/28
Vlanif11 | Virtual Router 11
VRRP Group : Master
state : Master
Virtual IP : 10.0.10.254
Virtual MAC : 0000-5e00-010b
Primary IP : 10.0.10.3
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
PriorityRun : 120
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
HRP_S[FW2]display vrrp
15:08:31 2011/12/28
Vlanif11 | Virtual Router 11
VRRP Group : Master
state : Master
Virtual IP : 10.0.10.254
Virtual MAC : 0000-5e00-010b
Primary IP : 10.0.10.3
PriorityRun : 120
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
Configure default routes for R1, R2, R3, and R4. Configure a specific static
route between FW1 and FW2.
[R1]ip route-static 0.0.0.0 0 10.0.10.254
By default, FW1 forwards packets from R2 and R4, and FW2 functions as
the backup firewall.
Simulate a fault on VLANIF 12 of FW1 during communication between R2
and R4. The communication functions normally.
Send 20 packets from R2 to R4. During packet sending, shut down
VLANIF 12 and check communication status.
When running the ping command, shut down VLANIF 12 on FW1 before all
packets are sent.
[R2]ping -c 20 -a 10.0.2.2 10.0.4.4
HRP_S[FW1]interface vlanif 12
HRP_S[FW1-Vlanif12]shutdown
Check the VRRP status on FW2. VLANIF 12 and VLANIF 14 on FW2 are
in Master state. If a fault occurs on VLANIF 12 on FW1, backup VLANIF
interfaces on FW2 switch to the Master status and forward packets.
HRP_M[FW2]display vrrp
03:14:23 2011/12/29
Vlanif11 | Virtual Router 11
VRRP Group : Master
state : Master
Virtual IP : 10.0.10.254
Virtual MAC : 0000-5e00-010b
Primary IP : 10.0.10.3
PriorityRun : 120
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
Virtual IP : 10.0.30.254
Virtual MAC : 0000-5e00-010d
Primary IP : 10.0.30.3
PriorityRun : 120
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
Advertisement Timer : 1
Auth Type : NONE
Check TTL : YES
If a fault occurs on the heartbeat line, what status will FW1 and FW2
have and how will packets be forwarded between the trusted zone and the
untrusted zone?
Final Configurations
<R1>display current-configuration
[V200R001C00SPC200]
#
sysname R1
#
interface GigabitEthernet0/0/2
ip address 10.0.10.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.10.254
#
return
<R2>display current-configuration
[V200R001C00SPC200]
#
sysname R2
#
interface GigabitEthernet0/0/1
ip address 10.0.20.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.20.254
#
return
<R3>display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
interface GigabitEthernet0/0/2
ip address 10.0.30.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.30.254
#
return
<R4>display current-configuration
[V200R001C00SPC500]
#
sysname R4
#
interface GigabitEthernet0/0/1
ip address 10.0.40.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.4.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.40.254
#
return
<S1>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
vlan batch 10 to 14
#
stp region-configuration
region-name FW
instance 1 vlan 10
active region-configuration
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 14
#
interface GigabitEthernet0/0/9
port link-type trunk
port trunk allow-pass vlan 11 to 14
#
interface GigabitEthernet0/0/10
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/21
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/22
port link-type trunk
port trunk allow-pass vlan 11 to 14
#
return
<S2>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S2
#
vlan batch 10 to 14
#
stp region-configuration
region-name FW
instance 1 vlan 10
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 11
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 13
#
interface GigabitEthernet0/0/9
port link-type trunk
port trunk allow-pass vlan 11 to 14
#
interface GigabitEthernet0/0/10
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/11
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/12
port link-type trunk
port trunk allow-pass vlan 11 to 14
#
return
HRP_M<FW1>display current-configuration
#
sysname FW1
#
hrp mirror session enable
hrp enable
hrp interface Ethernet0/0/0
#
firewall packet-filter default deny interzone local trust direction inbound
firewall packet-filter default deny interzone local trust direction outbound
firewall packet-filter default deny interzone local untrust direction inbound
firewall packet-filter default deny interzone local untrust direction outbound
firewall packet-filter default deny interzone local dmz direction inbound
firewall packet-filter default deny interzone local dmz direction outbound
firewall packet-filter default deny interzone local abc direction inbound
firewall packet-filter default deny interzone local abc direction outbound
firewall packet-filter default deny interzone trust untrust direction inbound
firewall packet-filter default deny interzone trust dmz direction inbound
firewall packet-filter default deny interzone trust dmz direction outbound
firewall packet-filter default deny interzone trust abc direction inbound
firewall packet-filter default deny interzone trust abc direction outbound
firewall packet-filter default deny interzone dmz untrust direction inbound
firewall packet-filter default deny interzone dmz untrust direction outbound
firewall packet-filter default deny interzone abc untrust direction inbound
firewall packet-filter default deny interzone abc untrust direction outbound
firewall packet-filter default deny interzone abc dmz direction inbound
firewall packet-filter default deny interzone abc dmz direction outbound
#
undo firewall ipv6 session link-state check
#
vlan batch 1 11 to 14
#
undo firewall session link-state check
#
#
runmode firewall
#
interface Vlanif11
ip address 10.0.10.2 255.255.255.0
vrrp vrid 11 virtual-ip 10.0.10.254 slave
#
interface Vlanif12
ip address 10.0.20.2 255.255.255.0
vrrp vrid 12 virtual-ip 10.0.20.254 master
#
interface Vlanif13
ip address 10.0.30.2 255.255.255.0
vrrp vrid 13 virtual-ip 10.0.30.254 slave
#
interface Vlanif14
ip address 10.0.40.2 255.255.255.0
vrrp vrid 14 virtual-ip 10.0.40.254 master
#
interface Ethernet0/0/0
ip address 10.0.50.2 255.255.255.0
#
interface Ethernet1/0/0
portswitch
port link-type trunk
port trunk permit vlan 1 11 to 14
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface Vlanif12
add interface Vlanif13
#
firewall zone untrust
set priority 5
add interface Vlanif11
add interface Vlanif14
#
firewall zone dmz
set priority 50
#
firewall zone name abc
set priority 80
add interface Ethernet0/0/0
#
nqa-jitter tag-version 1
#
ip route-static 10.0.1.0 255.255.255.0 10.0.10.1
HRP_S<FW2>display current-configuration
#
sysname FW2
#
hrp mirror session enable
hrp enable
hrp interface Ethernet0/0/0
#
firewall packet-filter default deny interzone local trust direction inbound
firewall packet-filter default deny interzone local trust direction outbound
firewall packet-filter default deny interzone local untrust direction inbound
firewall packet-filter default deny interzone local untrust direction outbound
firewall packet-filter default deny interzone local dmz direction inbound
firewall packet-filter default deny interzone local dmz direction outbound
firewall packet-filter default deny interzone local abc direction inbound
firewall packet-filter default deny interzone local abc direction outbound
firewall packet-filter default deny interzone trust untrust direction inbound
firewall packet-filter default deny interzone trust dmz direction inbound
firewall packet-filter default deny interzone trust dmz direction outbound
firewall packet-filter default deny interzone trust abc direction inbound
firewall packet-filter default deny interzone trust abc direction outbound
firewall packet-filter default deny interzone dmz untrust direction inbound
firewall packet-filter default deny interzone dmz untrust direction outbound
firewall packet-filter default deny interzone abc untrust direction inbound
firewall packet-filter default deny interzone abc untrust direction outbound
firewall packet-filter default deny interzone abc dmz direction inbound
firewall packet-filter default deny interzone abc dmz direction outbound
#
undo firewall ipv6 session link-state check
#
vlan batch 1 11 to 14
#
undo firewall session link-state check
#
interface Vlanif11
ip address 10.0.10.3 255.255.255.0
vrrp vrid 11 virtual-ip 10.0.10.254 master
#
interface Vlanif12
ip address 10.0.20.3 255.255.255.0
vrrp vrid 12 virtual-ip 10.0.20.254 slave
#
interface Vlanif13
ip address 10.0.30.3 255.255.255.0
vrrp vrid 13 virtual-ip 10.0.30.254 master
#
interface Vlanif14
ip address 10.0.40.3 255.255.255.0
vrrp vrid 14 virtual-ip 10.0.40.254 slave
#
interface Ethernet0/0/0
ip address 10.0.50.3 255.255.255.0
#
interface Ethernet1/0/0
portswitch
port link-type trunk
port trunk permit vlan 1 11 to 14
#
firewall zone local
set priority 100
#
firewall zone trust
set priority 85
add interface Vlanif12
add interface Vlanif13
#
firewall zone untrust
set priority 5
add interface Vlanif11
add interface Vlanif14
#
firewall zone dmz
set priority 50
#
firewall zone name abc
set priority 80
add interface Ethernet0/0/0
#
nqa-jitter tag-version 1
#
ip route-static 10.0.1.0 255.255.255.0 10.0.10.1
ip route-static 10.0.2.0 255.255.255.0 10.0.20.1
ip route-static 10.0.3.0 255.255.255.0 10.0.30.1
ip route-static 10.0.4.0 255.255.255.0 10.0.40.1
#
slb
#
cwmp
#
right-manager server-group
#
return
Learning Objectives
Topology
Scenario
Tasks
addresses.
Configure IP addresses and masks for all the routers and switches S3 and
S4.
Set the baud rate of S1/0/0 on R1 to 72000 and configure the link of S1/0/0
as the WAN link where congestion occurs because of insufficient bandwidth.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ip address 10.0.12.1 255.255.255.0
[R1-Serial1/0/0]baudrate 72000
[R1-Serial1/0/0]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.145.1 255.255.255.0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface s1/0/0
[R2-Serial1/0/0]ip address 10.0.12.2 255.255.255.0
[R2-Serial1/0/0]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.0.34.2 255.255.255.0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 10.0.145.4 255.255.255.0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 10.0.145.5 255.255.255.0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname S3
[S3]interface vlan
[S3]interface Vlanif 1
[S3-Vlanif1]ip address 10.0.145.3 255.255.255.0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname S4
[S4]interface Vlanif 1
[S4-Vlanif1]ip address 10.0.34.4 255.255.255.0
[R1]ping -c 1 10.0.145.3
PING 10.0.145.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.3: bytes=56 Sequence=1 ttl=255 time=35 ms
[R1]ping -c 1 10.0.145.4
PING 10.0.145.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.4: bytes=56 Sequence=1 ttl=255 time=6 ms
[R1]ping -c 1 10.0.145.5
PING 10.0.145.5: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.5: bytes=56 Sequence=1 ttl=255 time=6 ms
[R2]ping -c 1 10.0.34.3
PING 10.0.34.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=56 Sequence=1 ttl=255 time=5 ms
[R2]ping -c 1 10.0.34.4
PING 10.0.34.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.4: bytes=56 Sequence=1 ttl=255 time=36 ms
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 36/36/36 ms
Configure static routes for all the routers and switches S3 and S4.
[R1]ip route-static 10.0.34.0 255.255.255.0 10.0.12.2
[R4]ping -c 1 10.0.34.3
PING 10.0.145.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.4: bytes=56 Sequence=1 ttl=255 time=3 ms
[R5]ping -c 1 10.0.34.3
PING 10.0.34.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=56 Sequence=1 ttl=253 time=44 ms
The links between S3 and S4, between R4 and R3, and between R5 and
R3 are reachable, indicating that network communication is normal.
Congestion easily occurs on the 72 kbit/s serial link between the
headquarters and branch.
Use NQA to generate traffic. S4 functions as the NQA server and S3
functions as the NQA client.
Create NQA UDP and jitter test instances to simulate data traffic and voice
traffic respectively.
On S3, configure an NQA UDP test instance to simulate data traffic, and
set the ToS to 28, packet size to 5800 bytes, interval at which packets are sent
to 1 second, interval for the NQA test to 3 seconds, and timeout interval for the
NQA test to 1s, and start the NQA UDP test.
[S3]nqa test-instance admin udp
[S3-nqa-admin-udp]test-type udp
[S3-nqa-admin-udp]destination-address ipv4 10.0.34.4
[S3-nqa-admin-udp]destination-port 6000
[S3-nqa-admin-udp]tos 28
[S3-nqa-admin-udp]datasize 5000
[S3-nqa-admin-udp]interval seconds 1
[S3-nqa-admin-udp]frequency 3
[S3-nqa-admin-udp]timeout 1
[S3-nqa-admin-udp]start now
No packet is discarded and congestion does not occur. Shut down the
NQA UDP test.
[S3]nqa test-instance admin udp
[S3-nqa-admin-udp]stop
On S3, configure an NQA jitter test instance to simulate voice traffic, and
set the ToS to 46, packet size to 90 bytes, interval at which packets are sent to
20 milliseconds, the interval for the NQA test to 3 seconds, and timeout interval
for the NQA test to 1 second, and start the NQA jitter test.
[S3]nqa test-instance admin jitter
[S3-nqa-admin-jitter]test-type jitter
[S3-nqa-admin-jitter]destination-address ipv4 10.0.34.4
[S3-nqa-admin-jitter]destination-port 6000
[S3-nqa-admin-jitter]tos 46
[S3-nqa-admin-jitter]datasize 90
[S3-nqa-admin-jitter]interval milliseconds 20
[S3-nqa-admin-jitter]frequency 3
[S3-nqa-admin-jitter]timeout 1
[S3-nqa-admin-jitter]start now
No packet is discarded and congestion does not occur. Shut down the
NQA jitter test.
[S3]nqa test-instance admin jitter
[S3-nqa-admin-jitter]stop
Run the ping command to simulate traffic of less important services, and
map DSCP priorities of the traffic to BE without QoS guarantee.
Configure G0/0/1 and S1/0/0 on R1 to trust DSCP priorities of packets.
21 21
22 22
23 23
24 24
25 25
26 0
27 27
28 28
29 29
30 30
On R4, run the ping command with the packet size as 700 bytes and packet
count as 10 to simulate the traffic destined for R3.
[R4]ping -s 700 -c 10 10.0.34.3
PING 10.0.34.3: 700 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
Request time out
Request time out
Request time out
Reply from 10.0.34.3: bytes=700 Sequence=9 ttl=253 time=1944 ms
Request time out
1 packet(s) received
90.00% packet loss
round-trip min/avg/max = 1944/1944/1944 ms
On R4, run the ping command with the packet size as 700 bytes and
packet count as 10 to simulate the traffic destined for R3.
[R4]ping -s 700 -c 10 10.0.34.3
PING 10.0.34.3: 700 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=700 Sequence=1 ttl=253 time=1412 ms
Reply from 10.0.34.3: bytes=700 Sequence=2 ttl=253 time=255 ms
Reply from 10.0.34.3: bytes=700 Sequence=3 ttl=253 time=736 ms
Reply from 10.0.34.3: bytes=700 Sequence=4 ttl=253 time=1746 ms
Reply from 10.0.34.3: bytes=700 Sequence=5 ttl=253 time=246 ms
Reply from 10.0.34.3: bytes=700 Sequence=6 ttl=253 time=746 ms
Reply from 10.0.34.3: bytes=700 Sequence=7 ttl=253 time=1736 ms
Reply from 10.0.34.3: bytes=700 Sequence=8 ttl=253 time=258 ms
Reply from 10.0.34.3: bytes=700 Sequence=9 ttl=253 time=766 ms
Reply from 10.0.34.3: bytes=700 Sequence=10 ttl=253 time=1736 ms
Packets are not discarded and R4 can communicate with R3, indicating
that traffic policing takes effect.
Delete the traffic policing configuration from S1.
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]undo qos lr inbound
On R4, run the ping command with the packet size as 700 bytes and
packet count as 10 to simulate the traffic destined for R3.
[R4]ping -s 700 -c 10 10.0.34.3
PING 10.0.34.3: 700 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=700 Sequence=1 ttl=253 time=240 ms
Reply from 10.0.34.3: bytes=700 Sequence=2 ttl=253 time=284 ms
Reply from 10.0.34.3: bytes=700 Sequence=3 ttl=253 time=334 ms
Reply from 10.0.34.3: bytes=700 Sequence=4 ttl=253 time=224 ms
Reply from 10.0.34.3: bytes=700 Sequence=5 ttl=253 time=344 ms
Reply from 10.0.34.3: bytes=700 Sequence=6 ttl=253 time=275 ms
Reply from 10.0.34.3: bytes=700 Sequence=7 ttl=253 time=534 ms
Reply from 10.0.34.3: bytes=700 Sequence=8 ttl=253 time=184 ms
Reply from 10.0.34.3: bytes=700 Sequence=9 ttl=253 time=204 ms
Reply from 10.0.34.3: bytes=700 Sequence=10 ttl=253 time=314 ms
Packets are not discarded and R4 can communicate with R3, indicating
that traffic shaping takes effect.
Delete the traffic shaping configuration from S3.
[S3]interface Ethernet0/0/13
[S3-Ethernet0/0/13]undo qos lr outbound
On R4, run the ping command with the packet size as 700 bytes and
congestion avoidance.
Create a queue profile named queue-profile1 on R1, put data traffic into
WFQ queues; bind the queue profile to the WRED drop profile data, and put
Data traffic and voice traffic enter WFQ and PQ queues respectively.
View the WRED drop profile information.
[R1]display drop-profile data
Drop-profile[1]: data
DSCP Low-limit High-limit Discard-percentage
-----------------------------------------------------------------
default 30 100 10
1 30 100 10
2 30 100 10
3 30 100 10
4 30 100 10
5 30 100 10
6 30 100 10
7 30 100 10
cs1 30 100 10
9 30 100 10
af11 30 100 10
11 30 100 10
af12 30 100 10
13 30 100 10
af13 30 100 10
15 30 100 10
cs2 30 100 10
17 30 100 10
af21 30 100 10
19 30 100 10
af22 30 100 10
21 30 100 10
af23 30 100 10
23 30 100 10
cs3 30 100 10
25 30 100 10
af31 30 100 10
27 30 100 10
af32 50 90 30
29 30 100 10
af33 30 100 10
31 30 100 10
cs4 30 100 10
33 30 100 10
af41 30 100 10
Parameters in the WRED drop profile data take effect, and other
parameters use default values.
congestion avoidance.
On R4, run the ping command with the source address as 10.0.145.4,
packet size as 700 bytes, and packet count as 10 to test connectivity between
R4 and R3.
[R4]ping -a 10.0.145.4 -s 700 -c 10 10.0.34.3
Congestion has occurred on the link between the headquarters and branch.
A large number of packets are discarded, and R4 cannot communicate with
R3.
On R1, create ACL 3001 to match the traffic sent from 10.0.145.4 to
10.0.34.3.
[R1]acl number 3001
[R1-acl-adv-3001]rule 0 per ip source 10.0.145.4 0.0.0.0 destination 10.0.34.3
0.0.0.0
Create a traffic classifier class-af32 to match data traffic with the DSCP
priority as AF32, set the traffic behavior as behavior-af32, set the queue
scheduling mode to AF, set the bandwidth to 30 kbit/s, and bind the traffic
behavior to the drop profile data.
[R1]traffic classifier class-af32
Create a traffic policy policy-1, associate the traffic policy with the traffic
classifier class-ef and traffic behavior behavior-ef, and the traffic classifier
class-af32 and traffic behavior behavior-af32, and apply the traffic policy to
S1/0/0 on R1.
[R1]traffic policy policy-1
[R1-trafficpolicy-policy-1]classifier class-ef behavior behavior-ef
[R1-trafficpolicy-policy-1]classifier class-af32 behavior behavior-af32
[R1-trafficpolicy-policy-1]interface Serial 1/0/0
[R1-Serial1/0/0]traffic-policy policy-1 outbound
On R4, run the ping command with the source address as 10.0.145.4,
packet size as 700 bytes, and packet count as 10 to test connectivity between
R4 and R3.
[R4]ping -a 10.0.145.4 -s 700 -c 10 10.0.34.3
PING 10.0.34.3: 700 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=700 Sequence=1 ttl=253 time=694 ms
Reply from 10.0.34.3: bytes=700 Sequence=2 ttl=253 time=391 ms
Reply from 10.0.34.3: bytes=700 Sequence=3 ttl=253 time=361 ms
Reply from 10.0.34.3: bytes=700 Sequence=4 ttl=253 time=671 ms
Reply from 10.0.34.3: bytes=700 Sequence=5 ttl=253 time=211 ms
Reply from 10.0.34.3: bytes=700 Sequence=6 ttl=253 time=611 ms
Reply from 10.0.34.3: bytes=700 Sequence=7 ttl=253 time=688 ms
Reply from 10.0.34.3: bytes=700 Sequence=8 ttl=253 time=391 ms
Reply from 10.0.34.3: bytes=700 Sequence=9 ttl=253 time=301 ms
Reply from 10.0.34.3: bytes=700 Sequence=10 ttl=253 time=651 ms
Final Configurations
<R1>display current-configuration
[V200R001C00SPC200]
#
sysname R1
#
acl number 3001
rule 0 permit ip source 10.0.145.4 0 destination 10.0.34.3 0
#
drop-profile data
wred dscp
dscp af32 low-limit 50 high-limit 90 discard-percentage 30
#
qos queue-profile queue-profile1
queue 3 drop-profile data
schedule wfq 3 pq 5
#
qos map-table dscp-dscp
input 26 output 0
#
traffic classifier class-ef operator or
if-match acl 3001
traffic classifier class-af32 operator or
if-match dscp af32
#
traffic behavior behavior-ef
queue ef bandwidth 10 cbs 250
traffic behavior behavior-af32
queue af bandwidth 30
drop-profile data
traffic behavior behavir-af32
queue af bandwidth 30
#
traffic policy policy-1
classifier class-ef behavior behavior-ef
classifier class-af32 behavior behavior-af32
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.12.1 255.255.255.0
trust dscp
traffic-policy policy-1 outbound
baudrate 72000
#
interface GigabitEthernet0/0/1
ip address 10.0.145.1 255.255.255.0
trust dscp override
#
ip route-static 10.0.34.0 255.255.255.0 10.0.12.2
#
Return
<R2>display current-configuration
[V200R001C00SPC200]
#
sysname R2
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.12.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.0.34.2 255.255.255.0
#
ip route-static 10.0.145.0 255.255.255.0 10.0.12.1
#
return
<R3>display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
interface GigabitEthernet0/0/2
ip address 10.0.34.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.34.2
#
return
<R4>display current-configuration
[V200R001C00SPC200]
#
sysname R4
#
interface GigabitEthernet0/0/1
ip address 10.0.145.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
return
<R5>display current-configuration
[V200R001C00SPC200]
#
sysname R5
#
interface GigabitEthernet0/0/1
ip address 10.0.145.5 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
return
<S3>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S3
#
interface Vlanif1
ip address 10.0.145.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
nqa test-instance admin udp
test-type udp
destination-address ipv4 10.0.34.4
destination-port 6000
tos 28
frequency 3
interval seconds 1
timeout 1
datasize 5800
start now
nqa test-instance admin jitter
test-type jitter
destination-address ipv4 10.0.34.4
destination-port 6000
tos 46
frequency 3
interval milliseconds 20
timeout 1
datasize 90
start now
#
return
<S4>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S4
#
interface Vlanif1
ip address 10.0.34.4 255.255.255.0
#
nqa-server udpecho 10.0.34.4 6000
#
ip route-static 0.0.0.0 0.0.0.0 10.0.34.2
#
Return
Learning Objectives
Topology
Scenario
Tasks
addresses.
Configure IP addresses and masks for all the routers and switches S3 and
S4.
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ip address 10.0.12.1 255.255.255.0
[R1-Serial1/0/0]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip add 10.0.145.1 255.255.255.0
<R2>system-view
Enter system view, return user view with Ctrl+Z.
[R2]interface Serial 1/0/0
[R2-Serial1/0/0]ip address 10.0.12.2 255.255.255.0
[R2-Serial1/0/0]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.0.34.2 255.255.255.0
<R3>system-view
Enter system view, return user view with Ctrl+Z.
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.34.3 255.255.255.0
<R4> system-view
Enter system view, return user view with Ctrl+Z.
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 10.0.145.4 255.255.255.0
<R5>system-view
Enter system view, return user view with Ctrl+Z.
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 10.0.145.5 255.255.255.0
<S3>system-view
Enter system view, return user view with Ctrl+Z.
[S3]interface Vlanif 1
[S3-Vlanif1]ip address 10.0.145.3 255.255.255.0
<S4>system-view
Enter system view, return user view with Ctrl+Z.
[S4]interface Vlanif 1
[S4-Vlanif1]ip address 10.0.34.4 255.255.255.0
[R1]ping -c 1 10.0.145.3
PING 10.0.145.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.3: bytes=56 Sequence=1 ttl=255 time=35 ms
[R1]ping -c 1 10.0.145.4
PING 10.0.145.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.4: bytes=56 Sequence=1 ttl=255 time=6 ms
[R1]ping -c 1 10.0.145.5
PING 10.0.145.5: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.5: bytes=56 Sequence=1 ttl=255 time=6 ms
[R2]ping -c 1 10.0.34.3
PING 10.0.34.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=56 Sequence=1 ttl=255 time=5 ms
[R2]ping -c 1 10.0.34.4
PING 10.0.34.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.4: bytes=56 Sequence=1 ttl=255 time=36 ms
Configure static routes for all the routers and switches S3 and S4.
[R1]ip route-static 10.0.34.0 255.255.255.0 10.0.12.2
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/40/40 ms
[R4]ping -c 1 10.0.34.3
PING 10.0.145.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.145.4: bytes=56 Sequence=1 ttl=255 time=3 ms
[R5]ping -c 1 10.0.34.3
PING 10.0.34.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.34.3: bytes=56 Sequence=1 ttl=253 time=44 ms
Voice, video, and data services are transmitted on the enterprise network.
Because the bandwidth of the leased line between the enterprise headquarters
and branch does not increase, congestion occurs.
Configure end-to-end QoS to ensure that voice packets are sent first and
bandwidth for video packets is guaranteed.
Simulate voice packets between R4 and R3, video packets between R5 and
R3, and data packets between S3 and S4. Perform QoS configuration for voice
packets and video packets and configure BE for data packets.
Mark the DSCP priority of voice packets with EF, and the DSCP priority of
video packets with AF32.
On S1, create ACL 3001 and ACL 3002 to match the traffic sent from R4 to
R3 and the traffic sent from R5 to R3 respectively.
On S2, create ACL 3001 and ACL 3002 to match the traffic sent from R3 to
R4 and the traffic sent from R3 to R5 respectively.
[S2]acl number 3001
voice traffic is sent first and video traffic has sufficient bandwidth.
On R1, create a traffic classifier class-ef-r1 to match video traffic with the
DSCP priority of EF. Create a traffic behavior behavior-ef-r1, and set the
queue scheduling mode to EF and the dedicated interface bandwidth to 30%.
[R1]traffic classifier class-ef-r1
[R1-classifier-class-ef-r1]if-match dscp ef
[R1-classifier-class-ef-r1]traffic behavior behavior-ef-r1
[R1-behavior-behavior-ef-r1]queue ef bandwidth pct 30
On R1, create a traffic policy policy-r1 and associate the traffic policy with
the traffic classifier class-af32-r1 and traffic behavior behavior-af32-r1, the
traffic classifier class-ef-r1 and traffic behavior behavior-ef-r1, and apply the
traffic policy to S1/0/0 in the outbound direction.
[R1]traffic policy policy-r1
[R1-trafficpolicy-policy-r1]classifier class-af32-r1 behavior behavior-af32-r1
[R1-trafficpolicy-policy-r1]classifier class-ef-r1 behavior behavior-ef-r1
[R1-trafficpolicy-policy-r1]interface Serial 1/0/0
On R2, create a traffic classifier class-ef-r2 to match video traffic with the
DSCP priority of EF. Set the traffic behavior as behavior-ef-r2, set the queue
scheduling mode to EF and the dedicated interface bandwidth to 30%.
[R2]traffic classifier class-ef-r2
[R2-classifier-class-ef-r2]if-match dscp ef
[R2-classifier-class-ef-r2]traffic behavior behavior-ef-r2
[R2-behavior-behavior-ef-r2]queue ef bandwidth pct 30
On R2, create a traffic policy policy-r2 and associate the traffic policy with
the traffic classifier class-af32-r2 and traffic behavior behavior-af32-r2, the
traffic classifier class-ef-r2 and traffic behavior behavior-ef-r2, and apply the
traffic policy to S1/0/0 in the outbound direction.
[R2]traffic policy policy-r2
[R2-trafficpolicy-policy-r2]classifier class-af32-r2 behavior behavior-af32-r2
The headquarters wants to discard some video traffic with UDP port
numbers 4000 to 5000.
On R1, create ACL 3003 to match the traffic that is sent from R5 to R3 and
has UDP ports 4000 to 5000.
[R1]acl number 3003
[R1-acl-adv-3003]rule 0 permit udp source-port range 4000 5000 source 10.0.145.5
0 destination 10.0.34.3 0
On R1, create a traffic classifier class-drop and reference ACL 3003 in the
traffic classifier.
[R1]traffic classifier class-drop
[R1-classifier-class-drop]if-match acl 3003
On R1, create a traffic policy policy-drop and associate the traffic policy
with the traffic classifier class-drop and traffic behavior behavior-drop, and
apply the traffic policy to G0/0/5 in the inbound direction.
[R1]traffic policy policy-drop
[R1-trafficpolicy-policy-drop]classifier class-drop behavior behavior-drop
[R1-trafficpolicy-policy-drop]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]traffic-policy policy-drop inbound
Operator: OR
Behavior: behavior-drop
Deny
Final Configurations
<R1>display current-configuration
[V200R001C00SPC200]
#
sysname R1
#
acl number 3003
rule 0 permit udp source 10.0.145.5 0 source-port range 4000 5000 destination
10.0.34.3 0
#
drop-profile video-r1
wred dscp
dscp af32 low-limit 50 high-limit 90 discard-percentage 30
#
traffic classifier class-drop operator or
if-match acl 3003
traffic classifier class-ef-r1 operator or
if-match dscp ef
traffic classifier class-af32-r1 operator or
if-match dscp af32
#
traffic behavior behavior-af32-r1
queue af bandwidth pct 40
drop-profile video-r1
traffic behavior behavior-ef-r1
queue ef bandwidth pct 30
traffic behavior behavior-drop
deny
#
traffic policy policy-drop
classifier class-drop behavior behavior-drop
traffic policy policy-r1
<R2>display current-configuration
[V200R001C00SPC200]
#
sysname R2
#
drop-profile video-r2
wred dscp
dscp af32 low-limit 50 high-limit 90 discard-percentage 30
#
traffic classifier class-ef-r2 operator or
if-match dscp ef
traffic classifier class-af32-r2 operator or
if-match dscp af32
#
traffic behavior behavior-af32-r2
queue af bandwidth pct 40
drop-profile video-r2
traffic behavior behavior-ef-r2
queue ef bandwidth pct 30
#
traffic policy policy-r2
classifier class-af32-r2 behavior behavior-af32-r2
classifier class-ef-r2 behavior behavior-ef-r2
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.12.2 255.255.255.0
traffic-policy policy-r2 outbound
#
interface GigabitEthernet0/0/2
ip address 10.0.34.2 255.255.255.0
trust dscp
qos car inbound cir 72 cbs 13536 pbs 22536 green pass yellow pass red discard
#
ip route-static 10.0.145.0 255.255.255.0 10.0.12.1
#
return
<R3>display current-configuration
[V200R001C00SPC200]
#
sysname R3
#
interface GigabitEthernet0/0/2
ip address 10.0.34.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.34.2
#
return
<R4>display current-configuration
[V200R001C00SPC200]
#
sysname R4
#
interface GigabitEthernet0/0/1
ip address 10.0.145.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
return
<R5>display current-configuration
[V200R001C00SPC200]
#
sysname R5
#
interface GigabitEthernet0/0/1
ip address 10.0.145.5 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
return
<S1>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
acl number 3001
rule 0 permit ip source 10.0.145.4 0 destination 10.0.34.3 0
acl number 3002
rule 0 permit ip source 10.0.145.5 0 destination 10.0.34.3 0
#
traffic classifier class-video-s1 operator and
if-match acl 3002
traffic classifier class-voice-s1 operator and
if-match acl 3001
#
traffic behavior behavior-video-s1
remark dscp af32
traffic behavior behavior-voice-s1
remark dscp ef
#
traffic policy policy-video-s1
classifier class-video-s1 behavior behavior-video-s1
traffic policy policy-voice-s1
classifier class-voice-s1 behavior behavior-voice-s1
#
interface GigabitEthernet0/0/1
qos lr outbound cir 128 cbs 16000
#
interface GigabitEthernet0/0/4
traffic-policy policy-voice-s1 inbound
#
interface GigabitEthernet0/0/5
traffic-policy policy-video-s1 inbound
#
return
<S2>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S2
#
acl number 3001
rule 0 permit ip source 10.0.34.3 0 destination 10.0.145.4 0
acl number 3002
rule 0 permit ip source 10.0.34.3 0 destination 10.0.145.5 0
#
traffic classifier class-video-s2 operator and
if-match acl 3002
traffic classifier class-voice-s2 operator and
if-match acl 3001
#
traffic behavior behavior-video-s2
remark dscp af32
traffic behavior behavior-voice-s2
remark dscp ef
#
traffic policy policy-voice-video-s2
classifier class-voice-s2 behavior behavior-voice-s2
classifier class-video-s2 behavior behavior-video-s2
#
interface GigabitEthernet0/0/2
qos lr outbound cir 128 cbs 16000
#
interface GigabitEthernet0/0/3
traffic-policy policy-voice-video-s2 inbound
#
return
<S3>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S3
#
interface Vlanif1
ip address 10.0.145.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.145.1
#
return
<S4>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S4
#
interface Vlanif1
ip address 10.0.34.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.34.2
#
return
Learning Objectives
Topology
Scenario
Tasks
This lab provides the procedure and verification method, and does not
provide commands.
addresses.
Configure IP addresses and masks for all devices and test connectivity of
directly connected devices.
6WHS
Configure MST.
Set the link type of interfaces between the switches to trunk and configure
the interfaces to allow packets from VLAN 10, VLAN 20, VLAN 30, and VLAN
40 to pass through.
Create VLANs 10, 20, 30, 40, and 100 on all the switches and configure
two MSTIs. VLANs 10, 20, and 100 use S1 as the root and VLANs 30 and 40
use S2 as the root.
Create VLANIF interfaces for VLANs 10, 20, 30, and 40 on S1 and S2 to
implement communication between VLANs.
Configure OSPF on R1, R2, R3, R4, S1, and S2. Configure the link
between R1 and R2 in OSPF area 0. Configure OSPF area 1 on the
headquarters network and OSPF area 2 on the branch office network, and
configure area 1 and area 2 as OSPF stub areas. Configure area 3 on the
network through which R2 and R3 are connected and configure area 3 as the
NSSA area. OSPF is not required on the network through which R1 and FW1
are connected.
Configure RIP on R3 and R5. On R3, configure RIP and OSPF to import
routes from each other. On R3, configure a routing policy to import only RIP
routes from R5 in the OSPF routing domain.
On FW1, create VLAN 100 and VLANIF 100, and configure an IP address
for VLANIF 100. On R1, configure a default route with the IP address of
VLANIF 100 on FW1 as the next hop. Import the default route into OSPF so
that R5 can learn this route.
Add interfaces on FW1 to trust, untrust, and DMZ zones. Devices in the
trust zone can access resources in all the zones, devices in the untrust zone
can access only port 80 of the server at 10.0.20.1 in the DMZ zone, and
devices in the DMZ zone cannot access other zones.
S4 needs to limit the rate of data packets for some users and raise the
priority of data packets for other users. E0/0/1 belongs to VLAN 10 and
E0/0/2 belongs to VLAN 30. Set the rate limit on E0/0/1 to 128 kbit/s, change
DSCP priority for packets on E0/0/2 to 45, and configure E0/0/2 to trust DSCP.
Final Configurations
[R1]display current-configuration
[R2]display current-configuration
[R3]display current-configuration
[R4]display current-configuration
[R5]display current-configuration
[S1]display current-configuration
[S2]display current-configuration
[S3]display current-configuration
[S4]display current-configuration
[FW1]display current-configuration
Learning Objectives
Topology
Scenario
The link connected to ISP1 is the primary link and the link connected to
ISP2 is the standby link. The USG firewall is deployed between the core
switching network of the enterprise headquarters and the egress router. The
core switching network uses SEP to implement redundancy. An IPSec VPN is
established between firewalls of the headquarters and branch networks.
Tasks
addresses.
Configure IBGP and EBGP on R1, R2, R3, R4, and R5, and use physical
interfaces to establish BGP peer relationships. BGP load balancing is disabled
by default. To prevent the impact of BGP load balancing on route selection,
enable BGP load balancing and allow packets to be load balanced on a
maximum of four links.
The enterprise headquarters and branch need to use the primary link to
communicate with each other.
Create a routing policy named as_path in which two values of AS 100 are
added to the two routes 12.0.1.1/32 and 12.0.2.2/32 learned from R3. Check
the BGP routing table. R5 learns the two routes from R4.
On R1, create a routing policy local_pref, set the local priority of the route
12.0.5.5/32 to 200, and apply the routing policy to R2. Check the routing table
of R2. R2 learns the route 12.0.5.5/32 from R4.
Shut down G0/0/9 and G0/0/10 on S1 and S2, E0/0/23 on S3, and E0/0/14
on S4.
Create a SEP segment and configure VLAN 100 as the control VLAN.
Specify all instances as protected VLANs.
Set the preemption mode on S1 where the primary edge interface resides
to delayed preemption, and set the preemption delay to 30s.
On FW1, add E0/0/0 to the untrust zone, add E1/0/0 to the trust zone.
Configure filtering rules between zones to allow packets sent from the network
segment 10.0.111.0/24 in the trust zone to the untrust zone to pass through.
After the configuration is complete, FW1 allows the trust zone and untrust
zone to communicate.
Configure IPSec VPN on FW1 and FW2 on the headquarters and branch
networks.
Configure an IP address for Ethernet 2/0/0 on FW2. On FW2, add E0/0/0
to the untrust zone and add E2/0/0 to the trust zone. Configure FW1 and FW2
to allow data packets sent from the trust zone to the untrust zone to pass
through, and data packets sent from the untrust zone to the local zone.
On FW1 and FW2, configure IKE peers. IKE peers use IKEv2 negotiation
by default.
Create a traffic classifier class_r1_r2 containing ACL 3001 and ACL 3002.
Create a traffic behavior behavior_r1_r2 containing traffic shaping and set the
CIR to 10000. Create a traffic policy policy_r1_r2, associate the traffic
classifier and traffic behavior with the traffic policy, and apply the traffic policy
to G0/0/2.
Configure traffic policing on G0/0/2 and G0/0/1 of R4 and set the CIR to
8000.
Create ACL 3001 and ACL 3002 on R5 to match the traffic sent from R5 to
R1 and R2 respectively.
Create a traffic classifier class_r5 containing ACL 3001 and ACL 3002.
Create a traffic behavior behavior_r5 containing traffic shaping and set the
CIR to 10000. Create a traffic policy policy_r5, associate the traffic classifier
and traffic behavior with the traffic policy, and apply the traffic policy to G0/0/1
in the outbound direction.
Final Configurations
[R1]display current-configuration
[R2]display current-configuration
[R3]display current-configuration
[R4]display current-configuration
[R5]display current-configuration
[S1]display current-configuration
[S2]display current-configuration
[S3]display current-configuration
[S4]display current-configuration
[FW1]display current-configuration