HCIE-Datacom V1.0 Lab Guide
HCIE-Datacom V1.0 Lab Guide
HCIE-Datacom
Lab Guide
Version: V1.0
1
Copyright © Huawei Technologies Co., Ltd. 2021. 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 applicable to the candidates who are preparing for the HCIE-Datacom exam and
anyone who wants to master the following knowledge and skills: advanced routing & switching
technology, panorama of the enterprise network architecture, typical campus network architecture
and technology, CloudCampus Solution design and deployment, typical WAN architecture and
technology, SD-WAN Solution design and deployment, typical bearer WAN architecture and
technology, CloudWAN Solution design and deployment, and network automation technology and
practice.
Description
This lab guide consists of the following labs:
⚫ IPv4 routing
⚫ IPv6 routing
⚫ MPLS VPN
⚫ EVPN
⚫ VXLAN
⚫ VXLAN-based virtualized campus network deployment
⚫ WAN interconnection network deployment
⚫ SR-MPLS
⚫ SRv6
⚫ Open network programmability
Common Icons
Device Introduction
The following table lists devices recommended for HCIE-Datacom labs and the mappings between
the device name, model, and software version.
AP AirEngine 5760-51 -
Node: 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.
HCIE-Datacom Lab Guide Page 5
You can use a switch supporting Layer 3 functions as an interconnection switch, with no specific
requirement on the version.
HCIE-Datacom Lab Guide Page 6
Contents
1 IPv4 Routing
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
10.0.X.X. The specific IP addresses are listed in a table in the section "Configuration Procedure".
The interconnection interfaces of PE1, PE2, P1, and P2 belong to OSPF area 0. Loopback0 interfaces
of the four devices also belong to OSPF area 0. The interconnection interfaces of P1 and PE3 as well
as PE3's Loopback0 belong to OSPF area 1.
PE3 and PE4 belong to IS-IS area 49.0001. PE4 is an IS-IS Level-1 router and PE3 is an IS-IS Level-1-2
router.
This lab covers the following tasks:
1. Adjust the OSPF cost of interfaces so that traffic between PE2 and P1 in area 0 is preferentially
transmitted over the link with higher bandwidth, that is, transmitted through PE1.
HCIE-Datacom Lab Guide Page 10
2. Enable OSPF IP FRR on PE2 so that OSPF can generate a backup route to the loopback interface
of P1.
3. Enable BFD for OSPF in the entire OSPF area 0.
4. Configure route filtering on P1 to limit the routes that enter OSPF area 0, so as to control the
number of routing entries in area 0.
5. Create a default route on PE3 that simulates the egress of the entire network, and advertise the
route to the IS-IS.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
N/A
# Disable unnecessary interfaces in this lab.
N/A
# Set the configuration validation mode to immediate validation.
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
<P1>system-view immediately
<P2>system-view immediately
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1]ip address 10.0.0.5 30
[PE1-GigabitEthernet0/5/1] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on PE2.
HCIE-Datacom Lab Guide Page 12
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on PE3.
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ip address 10.0.0.18 30
[PE3-GigabitEthernet0/5/1] quit
# Configure IP addresses for the interconnection interface and Loopback0 interface on PE4.
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on P1.
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] ip address 10.0.0.6 30
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] ip address 10.0.0.17 30
[P1-GigabitEthernet0/5/2] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on P2.
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
HCIE-Datacom Lab Guide Page 13
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[PE1]ping -c 1 10.0.0.6
PING 10.0.0.6: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.6: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE1]ping -c 1 10.0.0.2
PING 10.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.2: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.9
PING 10.0.0.9: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.9: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.13
PING 10.0.0.13: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.13: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE3]ping -c 1 10.0.0.17
PING 10.0.0.17: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.17: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE3]ping -c 1 10.0.0.26
PING 10.0.0.26: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.26: bytes=56 Sequence=1 ttl=255 time=1 ms
# Configure OSPF on PE2, and enable OSPF on the interconnection and Loopback0 interfaces.
# Configure OSPF on PE3, and enable OSPF on the interconnection and Loopback0 interfaces.
[PE3-ospf-1-area-0.0.0.1] quit
[PE3-ospf-1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ospf enable 1 area 1
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ospf enable 1 area 1
[PE3-GigabitEthernet0/5/1] quit
# Configure OSPF on P1, and enable OSPF on the interconnection and Loopback0 interfaces.
# Configure OSPF on P2, and enable OSPF on the interconnection and Loopback0 interfaces.
Total Nets: 10
Intra Area: 8 Inter Area: 2 ASE: 0 NSSA: 0
PE2 has learned routes in the entire OSPF area 0. PE2 has two equal-cost routes to Loopback0 of
PE3.
Configure IS-IS processes on routers one by one according to the topology design. Set the process ID
to 1, the network entity title (NET) of PE3 to 3, and the NET of PE4 to 4. For example, the NET of PE3
is: 49.0001.0000.0000.0003.00.
# Configure IS-IS on PE3.
[PE3]isis 1
[PE3-isis-1] is-level level-1-2
[PE3-isis-1] network-entity 49.0001.0000.0000.0003.00
[PE3-isis-1] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] isis enable 1
[PE3-GigabitEthernet0/5/0] quit
[PE4]isis 1
[PE4-isis-1] is-level level-1
[PE4-isis-1] network-entity 49.0001.0000.0000.0004.00
[PE4-isis-1] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] isis enable 1
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface LoopBack 0
[PE4-LoopBack0] isis enable 1
[PE4-LoopBack0] quit
# Check IS-IS neighbor relationships and the IS-IS routing table on PE3.
Total Peer(s): 1
PE3 has learned the route generated by Loopback0 of PE4 through IS-IS.
Destination : 10.0.5.5/32
AdverRouter : 10.0.5.5 Area : 0.0.0.0
Cost :2 Type : Stub
NextHop : 10.0.0.10 Interface : GE0/5/1
Priority : Medium Age : 00h00m01s
Destination : 10.0.5.5/32
AdverRouter : 10.0.5.5 Area : 0.0.0.0
Cost :2 Type : Stub
NextHop : 10.0.0.1 Interface : GE0/5/0
Priority : Medium Age : 00h00m01s
According to the command output, there are two equal-cost routes to 10.0.5.5, with the next hops
being PE1 and P2 respectively.
# Adjust the OSPF cost of the interface connecting PE2 to P2.
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ospf cost 2
Destination : 10.0.5.5/32
AdverRouter : 10.0.5.5 Area : 0.0.0.0
Cost :2 Type : Stub
NextHop : 10.0.0.1 Interface : GE0/5/0
Priority : Medium Age : 00h01m28s
Only one route is available, with the next hop being PE1.
# Configure OSPF IP FRR on PE2.
[PE2]ospf 1
[PE2-ospf-1] frr
[PE2-ospf-1-frr] loop-free-alternate
[PE2-ospf-1-frr] quit
[PE2-ospf-1] quit
HCIE-Datacom Lab Guide Page 19
Destination : 10.0.5.5/32
AdverRouter : 10.0.5.5 Area : 0.0.0.0
Cost :2 Type : Stub
NextHop : 10.0.0.1 Interface : GE0/5/0
Priority : Medium Age : 00h00m54s
Backup NextHop : 10.0.0.10 Backup Interface : GE0/5/1
Backup Type : LFA LINK-NODE
PE2 has generated a backup route to P1's Loopback0 interface. The next hop address is 10.0.0.10
and the outbound interface is GE0/5/1. This means the backup route goes to P1's Loopback0
interface through P2.
[PE1] bfd
[PE1-bfd] quit
[PE1] ospf 1
[PE1-ospf-1] bfd all-interfaces enable
PE1 is used as an example. Configurations on other devices are the same and are not provided here.
# Enable BFD for interfaces. Set the minimum interval at which BFD packets are sent to and received
from a neighbor to 500 ms, and set the local detection multiple to 3.
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] ospf bfd enable
[PE1-GigabitEthernet0/5/0] ospf bfd min-tx-interval 500 min-rx-interval 500 detect-multiplier 3
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] ospf bfd enable
[PE1-GigabitEthernet0/5/1] ospf bfd min-tx-interval 500 min-rx-interval 500 detect-multiplier 3
[PE1-GigabitEthernet0/5/1] quit
PE1 is used as an example. The configurations of other devices are the same.
# Check the OSPF BFD session status on P1 and PE2.
The OSPF BFD sessions of all interfaces on P1 and PE2 are normal.
# Configure a traffic policy to filter BFD packets.
[PE2-trafficpolicy-bfd] quit
Create ACL 3000 to match BFD packets (UDP port 3784 is the destination port of BFD control packets
for single-hop detection.), and reference this ACL in the traffic policy.
# Apply the traffic policy to the inbound direction of GE0/5/0 on PE2.
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0]traffic-policy bfd inbound
The OSPF neighbor relationship between PE2 and PE1 is normal and not Down.
Configure BFD in the OSPF view and interface view. When the BFD session goes Down, OSPF is
instructed to perform convergence again (Hello packets are sent immediately and the dead interval
is changed to a small value), instead of directly setting the OSPF neighbor state to Down.
In this lab, only BFD packets on an interface are filtered. The OSPF packets received by the interface
are not filtered. Therefore, OSPF does not detect the disconnection of the neighbor relationship.
# Cancel the traffic policy on GE0/5/0 of PE2.
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0]undo traffic-policy bfd inbound
[PE2]acl 3000
[PE2-acl4-advance-3000]rule 2 permit ospf
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0]traffic-policy bfd inbound
PE2 cannot receive BFD or OSPF packets. After the BFD session goes Down, re-establishment of the
OSPF neighbor relationship is triggered. However, GE0/5/0 on PE2 can only send OSPF packets but
cannot receive OSPF packets. Therefore, the OSPF neighbor relationship fails to be established.
# Check OSPF neighbors on PE2.
The neighbor relationship between PE2 and PE1 is Exstart, instead of Full. The interval is far from the
dead interval of OSPF, but re-establishment of the OSPF neighbor relationship is triggered.
# Check the OSPF routing table on PE2.
The routing table shows that the next hop address of the OSPF route to P1 is 10.0.0.10 (IP address of
GE0/5/1 on P2). This means the OSPF route to P1 has been switched to the backup path.
This step shows how BFD accelerates OSPF convergence. After completing this step, cancel the
traffic policy on GE0/5/0 of PE2.
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0]undo traffic-policy bfd inbound
Ensure that the neighbor relationship between PE2 and PE1 has recovered.
Create a Loopback3 interface with the IP address of 10.3.3.3/24 on PE3, change the OSPF interface
type to broadcast, enable OSPF on Loopback3 interface, and filter inter-area Type-3 LSAs on ABR P1
to prevent OSPF inter-area route to 10.3.3.0/24 from being advertised to area 0.
# Create Loopback2 interfaces on PE1 and P2, and enable OSPF.
[PE1]interface LoopBack2
[PE1-LoopBack2] ip address 10.2.16.16 32
[PE1-LoopBack2] ospf enable 1 area 0
[PE1-LoopBack2] quit
[P2]interface LoopBack2
[P2-LoopBack2] ip address 10.2.16.16 32[P2-LoopBack2] ospf enable 1 area 0
[P2-LoopBack2] quit
Total Nets: 11
Intra Area: 11 Inter Area: 0 ASE: 0 NSSA: 0
P1 has two OSPF routes to 10.2.16.16/32 with the next hops being PE1 and P2 respectively. The
routes work in load balancing mode.
# Limit the number of equal-cost routes to 1 on P1.
[P1]ospf 1
[P1-ospf-1] maximum load-balancing 1
Total Nets: 11
Intra Area: 11 Inter Area: 0 ASE: 0 NSSA: 0
P1 has only one OSPF route to 10.2.16.16/32, with the next hop being PE1.
If the number of equal-cost routes exceeds the limit specified in the maximum load-balancing
command, valid routes are selected for load balancing based on the following criteria:
1. Route priority: Routes with the highest priority (lowest weight) are selected for load balancing.
2. Interface index: If routes have the same priority, the routes with the largest interface index are
selected for load balancing.
3. Next-hop IP address: If routes have the same priority and interface index, the routes with the
largest next-hop IP addresses are selected for load balancing.
The index of the interface (GE0/5/1) connecting P1 to PE1 is greater than that of the interface
(GE0/5/0) connecting P1 to P2. Therefore, the OSPF routing to 10.2.16.16/32 sent from PE1 is
selected as a valid routing.
# Create a Loopback3 interface on PE3 and enable OSPF.
[PE3]interface LoopBack3
[PE3-LoopBack3] ip address 10.3.3.3 255.255.255.0
[PE3-LoopBack3] ospf network-type broadcast
[PE3-LoopBack3] ospf enable 1 area 0.0.0.1
Total Nets: 12
Intra Area: 9 Inter Area: 3 ASE: 0 NSSA: 0
PE1 has learned the route to the network segment to which the IP address of PE3's Loopback3
belongs.
# Check the OSPF LSDB on P1.
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.1.1 10.0.1.1 653 72 80000065 1
Router 10.0.2.2 10.0.2.2 1352 60 80000066 2
Router 10.0.5.5 10.0.5.5 1712 60 8000005b 1
Router 10.0.6.6 10.0.6.6 677 72 8000005b 1
Network 10.0.0.2 10.0.2.2 1352 32 80000001 0
Network 10.0.0.6 10.0.5.5 1712 32 80000051 0
Network 10.0.0.10 10.0.6.6 1703 32 80000051 0
Network 10.0.0.13 10.0.5.5 749 32 80000056 0
Sum-Net 10.0.0.16 10.0.5.5 850 28 80000056 1
Sum-Net 10.0.3.3 10.0.5.5 791 28 80000056 1
Sum-Net 10.3.3.0 10.0.5.5 191 28 80000001 1
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.3.3 10.0.3.3 192 60 80000058 1
Router 10.0.5.5 10.0.5.5 801 36 80000057 1
Network 10.0.0.17 10.0.5.5 801 32 80000056 0
Sum-Net 10.0.0.0 10.0.5.5 1345 28 80000054 2
Sum-Net 10.0.0.4 10.0.5.5 1752 28 80000051 1
Sum-Net 10.0.0.8 10.0.5.5 1744 28 80000051 2
Sum-Net 10.0.0.12 10.0.5.5 850 28 80000056 1
Sum-Net 10.0.1.1 10.0.5.5 1703 28 80000052 1
Sum-Net 10.0.2.2 10.0.5.5 1703 28 80000051 2
Sum-Net 10.0.5.5 10.0.5.5 850 28 80000056 0
Sum-Net 10.0.6.6 10.0.5.5 749 28 80000056 1
Sum-Net 10.2.16.16 10.0.5.5 676 28 80000001 1
The LSDB of area 0 on ABR P1 contains a Type 3 LSA with the link state ID of 10.3.3.0.
# Configure Type 3 LSA filtering on ABR P1 to prevent the OSPF inter-area route to 10.3.3.0/24 from
being transmitted to area 0.
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.1.1 10.0.1.1 653 72 80000065 1
Router 10.0.2.2 10.0.2.2 1352 60 80000066 2
Router 10.0.5.5 10.0.5.5 1712 60 8000005b 1
Router 10.0.6.6 10.0.6.6 677 72 8000005b 1
Network 10.0.0.2 10.0.2.2 1352 32 80000001 0
Network 10.0.0.6 10.0.5.5 1712 32 80000051 0
Network 10.0.0.10 10.0.6.6 1703 32 80000051 0
Network 10.0.0.13 10.0.5.5 749 32 80000056 0
Sum-Net 10.0.0.16 10.0.5.5 850 28 80000056 1
Sum-Net 10.0.3.3 10.0.5.5 791 28 80000056 1
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.3.3 10.0.3.3 192 60 80000058 1
Router 10.0.5.5 10.0.5.5 801 36 80000057 1
Network 10.0.0.17 10.0.5.5 801 32 80000056 0
Sum-Net 10.0.0.0 10.0.5.5 1345 28 80000054 2
Sum-Net 10.0.0.4 10.0.5.5 1752 28 80000051 1
Sum-Net 10.0.0.8 10.0.5.5 1744 28 80000051 2
Sum-Net 10.0.0.12 10.0.5.5 850 28 80000056 1
Sum-Net 10.0.1.1 10.0.5.5 1703 28 80000052 1
Sum-Net 10.0.2.2 10.0.5.5 1703 28 80000051 2
Sum-Net 10.0.5.5 10.0.5.5 850 28 80000056 0
Sum-Net 10.0.6.6 10.0.5.5 749 28 80000056 1
Sum-Net 10.2.16.16 10.0.5.5 676 28 80000001 1
The LSDB of area 0 on P1 does not contain the Type 3 LSA with the link state ID of 10.3.3.0.
# Check the OSPF route to 10.3.3.0/24 on PE1.
[PE3]isis 1
HCIE-Datacom Lab Guide Page 28
Total LSP(s): 3
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
1.1.3 Quiz
OSPF inter-area routes can be filtered by running the filter ip-prefix ip-prefix-name export
command on an ABR but intra-area routes cannot be filtered by running the command in an OSPF
area. Why?
HCIE-Datacom Lab Guide Page 30
The figure shows the device connections, IP address planning, BGP AS numbers, and BGP peer
relationships. The interface interconnection addresses are in the format of 10.0.0.Y/30, and the
values represented by Y are shown in the figure. Loopback0 is created on all devices, and loopback
interface IP addresses are in the format of 10.0.X.X. The specific IP addresses are listed in a table in
the section "Configuration Procedure".
In this lab, P2, PE2, and PE4 are used to simulate a backbone network, P1 is used to simulate the
enterprise headquarters, and PE1 and PE3 are used to simulate enterprise branches. Different
loopback interfaces are created on PE1, PE3, and P1 to simulate users. The Community Filter,
AS_Path Filter, and ORF features are used to control transmission of the service routes.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
HCIE-Datacom Lab Guide Page 32
<PE3>system-view immediately
<PE4>system-view immediately
<P1>system-view immediately
<P2>system-view immediately
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on PE2.
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
# Configure IP addresses for the interconnection interface and Loopback0 interface on PE3.
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
HCIE-Datacom Lab Guide Page 33
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on PE4.
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 255.255.255.252
# Configure IP addresses for the interconnection interface and Loopback0 interface on P1.
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
# Configure IP addresses for the interconnection interfaces and Loopback0 interface on P2.
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 255.255.255.252
[P2-GigabitEthernet0/5/2] quit
[P2]ping -c 1 10.0.0.22
PING 10.0.0.22: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.22: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.9
PING 10.0.0.9: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.9: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.13
PING 10.0.0.13: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.13: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE1]ping -c 1 10.0.0.2
PING 10.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.2: bytes=56 Sequence=1 ttl=255 time=1 ms
# Configure OSPF on P2, and enable OSPF on the interconnection and Loopback0 interfaces.
HCIE-Datacom Lab Guide Page 35
# Configure OSPF on PE4, and enable OSPF on the interconnection and Loopback0 interfaces.
Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0
P2 has learned the routes to the Loopback0 interfaces of PE2 and PE4.
Step 3 Deploy BGP between the backbone network and the enterprise egress.
Configure BGP between the backbone network and the enterprise egress. Use the IP address of the
Loopback0 interface as the source IP address and router ID for establishing BGP peer relationships.
Configure static routes to ensure the Loopback0 interfaces are reachable to each other.
Configure GTSM and BGP authentication to ensure BGP network security. Set the authentication
password to Huawei@123 and GTSM to 255.
# Configure static routes on P1 and P2.
[P1]bgp 65003
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 10.0.6.6 as-number 65100
[P1-bgp] peer 10.0.6.6 connect-interface LoopBack0
[P1-bgp] peer 10.0.6.6 password cipher Huawei@123
[P1-bgp] peer 10.0.6.6 valid-ttl-hops 255
HCIE-Datacom Lab Guide Page 37
[PE1]bgp 65001
[PE1-bgp] router-id 10.0.1.1
[PE1-bgp] peer 10.0.2.2 as-number 65100
[PE1-bgp] peer 10.0.2.2 connect-interface LoopBack0
[PE1-bgp] peer 10.0.2.2 password cipher Huawei@123
[PE1-bgp] peer 10.0.2.2 valid-ttl-hops 255
[PE3]bgp 65002
[PE3-bgp] router-id 10.0.3.3
[PE3-bgp] peer 10.0.4.4 as-number 65100
[PE3-bgp] peer 10.0.4.4 connect-interface LoopBack0
[PE3-bgp] peer 10.0.4.4 password cipher Huawei@123
[PE3-bgp] peer 10.0.4.4 valid-ttl-hops 255
# Check the EBGP peer relationships on the devices in the backbone area.
The BGP peer relationships between PE2, PE4, and P2 and their peers are in Established state.
[P2]bgp 65100
[P2-bgp] group BB internal
[P2-bgp] peer BB connect-interface LoopBack 0
[P2-bgp] peer BB next-hop-local
[P2-bgp] peer 10.0.2.2 group BB
[P2-bgp] peer 10.0.4.4 group BB
[P2-bgp] ipv4-family unicast
[P2-bgp-af-ipv4] peer BB reflect-client
[PE2]bgp 65100
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] peer 10.0.6.6 next-hop-local
[PE4]bgp 65100
[PE4-bgp] peer 10.0.6.6 as-number 65100
[PE4-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE4-bgp] peer 10.0.6.6 next-hop-local
HCIE-Datacom Lab Guide Page 39
[P1]interface Loopback1
[P1-LoopBack1] ip address 10.1.5.5 32
[P1-LoopBack1] quit
[P1]interface Loopback2
[P1-LoopBack2] ip address 10.2.5.5 32
[P1-LoopBack2] quit
[PE1]interface Loopback1
[PE1-LoopBack1] ip address 10.1.1.1 32
[PE1-LoopBack1] quit
[PE1]interface Loopback2
[PE1-LoopBack2] ip address 10.2.1.1 32
[PE1-LoopBack2] quit
[PE3]interface Loopback1
[PE3-LoopBack1] ip address 10.1.3.3 32
[PE3-LoopBack1] quit
[PE3]interface Loopback2
[PE3-LoopBack2] ip address 10.2.3.3 32
[PE3-LoopBack2] quit
# Advertise service network segments using the network command on enterprise routers.
[P1]bgp 65003
[P1-bgp]network 10.1.5.5 32
[P1-bgp]network 10.2.5.5 32
HCIE-Datacom Lab Guide Page 40
[PE1]bgp 65001
[PE1-bgp]network 10.1.1.1 32
[PE1-bgp]network 10.2.1.1 32
[PE3]bgp 65002
[PE3-bgp]network 10.1.3.3 32
[PE3-bgp]network 10.2.3.3 32
P1 has learned the routes to service network segments of PE1 and PE3.
# Check BGP routes on PE1.
PE1 has learned the routes to service network segments of P1 and PE3.
# Check BGP routes on PE3.
HCIE-Datacom Lab Guide Page 41
PE3 has learned the routes to service network segments of P1 and PE2.
Assign community values to the routes destined for Loopback1 interfaces on P1, PE1, and PE3 by
using routing policies. Enable devices to advertise the community attribute to their peers. By default,
this function is disabled.
The community attribute is generally in the format of AS:NN, which is defined as AS:01 in this lab.
# Enable the capability of advertising the community attribute to peers on all routers.
[P1]bgp 65003
[P1-bgp] peer 10.0.6.6 advertise-community
[P2]bgp 65100
[P2-bgp] peer 10.0.5.5 advertise-community
[P2-bgp] peer BB advertise-community
[PE1]bgp 65001
[PE1-bgp] peer 10.0.2.2 advertise-community
[PE2]bgp 65100
[PE2-bgp] peer 10.0.6.6 advertise-community
[PE2-bgp] peer 10.0.1.1 advertise-community
[PE3]bgp 65002
[PE3-bgp] peer 10.0.4.4 advertise-community
HCIE-Datacom Lab Guide Page 42
[PE4]bgp 65100
[PE4-bgp] peer 10.0.6.6 advertise-community
[PE4-bgp] peer 10.0.3.3 advertise-community
# Configure routing policies on P1, PE1, and PE3 to apply community values to the routes destined
for Loopback1 interfaces.
Community: <65001:1>
AS-path 65100 65001, origin igp, pref-val 0, valid, external, best, select, pre 255
Not advertised to any peer yet
[P1]display bgp routing-table 10.1.3.3
P1 is used as an example. The check methods on PE1 and PE3 are similar.
# Configure PE4.
The command output shows that PE1 and PE3 do not learn the routes to Loopback1 interfaces of
their peers
# Create Loopback3 on PE3, set its IP address to 10.3.3.3/32, and advertise the route to this IP
address to BGP.
[PE3]interface LoopBack 3
[PE3-LoopBack3] ip address 10.3.3.3 32
[PE3-LoopBack3] quit
[PE3]bgp 65002
[PE3-bgp] network 10.3.3.3 32
[P1]bgp 65003
[P1-bgp] peer 10.0.6.6 ip-prefix Branch import
[P1-bgp] peer 10.0.6.6 capability-advertise orf ip-prefix send
[P2]bgp 65100
[P2-bgp] peer 10.0.5.5 capability-advertise orf ip-prefix receive
The command output shows that P2 has imported the route prefixes permitted by P1.
# Check the BGP route to 10.3.3.3 on P1.
The route does not exist in the BGP routing table on P1.
----End
1.2.3 Quiz
In addition to ORF, which method can also be used to filter received routes?
HCIE-Datacom Lab Guide Page 47
2 IPv6 Routing
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 2001::Y/126, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
2001::X:X/128. The specific IP addresses are listed in a table in the section "Configuration
Procedure".
In AS 65100, OSPFv3 and IS-IS are used to construct an underlying network. MP-IBGP runs among
PE1, P2, and PE3 to transmit BGP routes. MP-EBGP runs between P1 and P2, and bidirectional route
redistribution between IS-IS and BGP is performed on P2.
5. Establish IBGP peer relationships among PE1, P2, and PE3, and configure P2 as an RR.
6. Establish an EBGP peer relationship between P1 and P2 using the IP addresses of Loopback0
interfaces as the source addresses. Create Loopback1 on P1 and advertise the route destined
for this interface to BGP.
7. Perform bidirectional route redistribution between IS-IS and BGP on P2.
2.1.2.2 Configuration Procedure
Step 1 Complete basic device configuration.
Configure the configuration validation mode as immediate validation, and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 addresses must be configured as planned in
the following table.
PE1 1 2001::1:1
PE2 2 2001::2:2
PE3 3 2001::3:3
PE4 4 2001::4:4
P1 5 2001::5:5
P2 6 2001::6:6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
HCIE-Datacom Lab Guide Page 49
<P2>system-view immediately
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ipv6 enable
[PE1-GigabitEthernet0/5/0]ipv6 address 2001::1 126
[PE1]interface LoopBack 0
[PE1-LoopBack0] ipv6 enable
[PE1-LoopBack0] ipv6 address 2001::1:1 128
# Configure IPv6 addresses for the interconnection interfaces and Loopback0 interface on PE2.
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ipv6 enable
[PE2-GigabitEthernet0/5/0] ipv6 address 2001::2/126
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ipv6 enable
[PE2-GigabitEthernet0/5/1] ipv6 address 2001::9/126
[PE2-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ipv6 enable
[PE2-LoopBack0] ipv6 address 2001::2:2/128
[PE2-LoopBack0] quit
# Configure IPv6 addresses for the interconnection interface and Loopback0 interface on P1.
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ipv6 enable
[P1-GigabitEthernet0/5/0] ipv6 address 2001::d 126
[P1-GigabitEthernet0/5/0] quit
[P1] interface LoopBack 0
[P1-LoopBack0] ipv6 enable
[P1-LoopBack0] ipv6 address 2001::5:5 128
[P1-LoopBack0] quit
# Configure IPv6 addresses for the interconnection interfaces and Loopback0 interface on P2.
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ipv6 enable
[P2-GigabitEthernet0/5/0] ipv6 address 2001::e/126
[P2-GigabitEthernet0/5/0] quit
HCIE-Datacom Lab Guide Page 50
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ipv6 enable
[P2-GigabitEthernet0/5/1] ipv6 address 2001::a/126
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] ipv6 enable
[P2-GigabitEthernet0/5/2] ipv6 address 2001::15/126
[P2-GigabitEthernet0/5/2] quit
[P2]interface LoopBack0
[P2-LoopBack0] ipv6 enable
[P2-LoopBack0] ipv6 address 2001::6:6/128
[P2-LoopBack0] quit
# Configure IPv6 addresses for the interconnection interfaces and Loopback0 interface on PE4.
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ipv6 enable
[PE4-GigabitEthernet0/5/0] ipv6 address 2001::1a/126
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] ipv6 enable
[PE4-GigabitEthernet0/5/1] ipv6 address 2001::16/126
[PE4-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ipv6 enable
[PE4-LoopBack0] ipv6 address 2001::4:4/128
[PE4-LoopBack0] quit
# Configure IPv6 addresses for the interconnection interface and Loopback0 interface on PE3.
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ipv6 enable
[PE3-GigabitEthernet0/5/0] ipv6 address 2001::19/126
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ipv6 enable
[PE3-LoopBack0] ipv6 address 2001::3:3/128
[PE3-LoopBack0] quit
# Test IPv6 connectivity between interconnection interfaces on PE1, P2, and PE3.
[PE1] ospfv3 1
HCIE-Datacom Lab Guide Page 52
[PE2] ospfv3 1
[PE2-ospfv3-1] router-id 10.0.2.2
[PE2-ospfv3-1] quit
[PE2] interface LoopBack 0
[PE2-LoopBack0] ospfv3 1 area 0 instance 1
[PE2-LoopBack0] quit
[PE2] interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ospfv3 1 area 0 instance 1
[PE3] ospfv3 1
[PE3-ospfv3-1] router-id 10.0.3.3
[PE3-ospfv3-1] quit
[PE3] interface LoopBack 0
[PE3-LoopBack0] ospfv3 1 area 0 instance 1
[PE3-LoopBack0] quit
[PE3] interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ospfv3 1 area 0 instance 1
[PE4] ospfv3 1
[PE4-ospfv3-1] router-id 10.0.4.4
[PE4-ospfv3-1] quit
[PE4] interface LoopBack 0
[PE4-LoopBack0] ospfv3 1 area 0 instance 1
[PE4-LoopBack0] quit
[PE4] interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ospfv3 1 area 0 instance 1
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1] ipv6 enable topology ipv6
[PE2-isis-1] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE2-GigabitEthernet0/5/1] quit
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] ipv6 enable topology ipv6
[P2-isis-1] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis ipv6 enable 1
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis ipv6 enable 1
[P2-GigabitEthernet0/5/2] quit
[P2]interface LoopBack 0
[P2-LoopBack0] isis ipv6 enable 1
[P2-LoopBack0] quit
[PE4]isis 1
[PE4-isis-1] is-level level-2
[PE4-isis-1] cost-style wide
[PE4-isis-1] network-entity 49.0001.0004.0004.0004.00
[PE4-isis-1] is-name PE4
[PE4-isis-1] ipv6 enable topology ipv6
[PE4-isis-1] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE4-GigabitEthernet0/5/1] quit
Total Peer(s): 2
[PE2]ospfv3 1
[PE2-ospfv3-1] import-route isis 1
[PE2-ospfv3-1] quit
[PE2]isis 1
[PE2-isis-1] ipv6 import-route ospfv3 1
HCIE-Datacom Lab Guide Page 56
[PE2-isis-1] quit
[PE4]ospfv3 1
[PE4-ospfv3-1] import-route isis 1
[PE4-ospfv3-1] quit
[PE4]isis 1
[PE4-isis-1] ipv6 import-route ospfv3 1
[PE4-isis-1] quit
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max=1/1/1 ms
To ensure that Loopback0 interfaces between P1 and P2 can communicate with each other,
configure IPv6 static routes.
# On P1, test connectivity between Loopback0 interfaces of P1 and P2.
[P1]bgp 65003
[P1-bgp] router-id 10.0.5.5
HCIE-Datacom Lab Guide Page 59
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 2001::5:5 as-number 65003
[P2-bgp] peer 2001::5:5 ebgp-max-hop 255
[P2-bgp] peer 2001::5:5 connect-interface LoopBack0
[P2-bgp] ipv6-family unicast
[P2-bgp-af-ipv6] peer 2001::5:5 enable
[P1]interface LoopBack1
[P1-LoopBack1] ipv6 enable
[P1-LoopBack1] ipv6 address 2001::1:5:5/128
[P1-LoopBack1] quit
[P1]bgp 65003
[P1-bgp]ipv6-family unicast
[P1-bgp-af-ipv6]network 2001::1:5:5 128
Label :
Path/Ogn : 65003i
[P2]bgp 65100
[P2-bgp]ipv6-family unicast
[P2-bgp-af-ipv6]import-route isis 1
By now, PE1 and PE3 still cannot communicate with the Loopback1 on P1 because the transit nodes
PE2 and PE4 do not have a route to the Loopback1 on P1. To solve this problem, you need to
redistribute BGP routes to IS-IS on P2.
# Redistribute BGP routes to IS-IS on P2.
[P2-isis-1]
[P2-isis-1]ipv6 import-route bgp
# Check whether the IS-IS routing tables on PE2 and PE4 contain routes to Loopback1 of P1.
# Test the connectivity among PE1, PE3, and P1's Loopback1 interfaces.
round-trip min/avg/max=2/2/2 ms
----End
2.1.3 Quiz
What are the differences between BGP IPv4 route transmission and BGP4+ route transmission?
3 MPLS VPN
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 interfaces are created on all devices, and the IP addresses of Loopback interfaces are in
the format of 10.0.X.X. The values indicated by X are shown in the tables related to corresponding
configuration procedures.
This lab introduces how to implement route learning between the HQ and the branches by
controlling RT values.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
HCIE-Datacom Lab Guide Page 66
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
<P1>system-view immediately
<P2>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
HCIE-Datacom Lab Guide Page 67
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 255.255.255.252
[PE4-GigabitEthernet0/5/1] quit
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
HCIE-Datacom Lab Guide Page 68
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1]interface LoopBack0
[PE2-LoopBack0] isis enable 1
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE4]isis 1
[PE4-isis-1] is-level level-2
[PE4-isis-1] cost-style wide
[PE4-isis-1] network-entity 49.0001.0004.0004.0004.00
[PE4-isis-1] is-name PE4
[PE4-isis-1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] isis enable 1
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] isis enable 1
[PE4-GigabitEthernet0/5/1] isis circuit-type p2p
[PE4-GigabitEthernet0/5/1] quit
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] quit
[P2]interface LoopBack0
[P2-LoopBack0] isis enable 1
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
HCIE-Datacom Lab Guide Page 69
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
Total Peer(s): 2
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] mpls
[P2-GigabitEthernet0/5/1] mpls ldp
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] mpls
[P2-GigabitEthernet0/5/2] mpls ldp
[P2-GigabitEthernet0/5/2] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] mpls
[PE2-GigabitEthernet0/5/1] mpls ldp
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] mpls
[PE4-GigabitEthernet0/5/1] mpls ldp
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE4]bgp 65100
[PE4-bgp] router-id 10.0.4.4
[PE4-bgp] peer 10.0.6.6 as-number 65100
[PE4-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE4-bgp] ipv4-family vpnv4
[PE4-bgp-af-vpnv4] peer 10.0.6.6 enable
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 10.0.2.2 as-number 65100
[P2-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P2-bgp] peer 10.0.4.4 as-number 65100
[P2-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] undo policy vpn-target
[P2-bgp-af-vpnv4] peer 10.0.2.2 enable
[P2-bgp-af-vpnv4] peer 10.0.2.2 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.4.4 enable
[P2-bgp-af-vpnv4] peer 10.0.4.4 reflect-client
[P1]interface GigabitEthernet0/5/0.1
[P1-GigabitEthernet0/5/0.1] vlan-type dot1q 10
[P1-GigabitEthernet0/5/0.1] ip address 10.0.0.113 255.255.255.252
[P1-GigabitEthernet0/5/0.1] quit
[P2]interface GigabitEthernet0/5/0.1
[P2-GigabitEthernet0/5/0.1] vlan-type dot1q 10
[P2-GigabitEthernet0/5/0.1] ip address 10.0.0.114 255.255.255.252
[P2-GigabitEthernet0/5/0.1] quit
[P2]ping 10.0.0.113
PING 10.0.0.113: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.113: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=5 ttl=255 time=1 ms
# Configure BGP for P1, use the IP address of Loopback0 as the router ID, and establish an EBGP peer
relationship through directly connected interfaces.
[P1]bgp 65003
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 10.0.0.14 as-number 65100
[P1-bgp] peer 10.0.0.114 as-number 65100
# Create VPN instance vpna_in on P2 to receive routes and vpna_out to send routes.
In the entire network, configure VPN instances on the PE devices in MPLS VPN according to the
following planning.
# After configuring the VPN instances, add the interfaces into corresponding VPN instances.
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip binding vpn-instance vpna_out
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 255.255.255.252
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/0.1
[P2-GigabitEthernet0/5/0.1] vlan-type dot1q 10
[P2-GigabitEthernet0/5/0.1] ip binding vpn-instance vpna_in
[P2-GigabitEthernet0/5/0.1] ip address 10.0.0.114 255.255.255.252
[P2]bgp 65100
[P2-bgp] ipv4-family vpn-instance vpna_in
[P2-bgp-vpna_in] peer 10.0.0.113 as-number 65003
[P2-bgp-vpna_in] peer 10.0.0.113 substitute-as
[P2-bgp-vpna_in] ipv4-family vpn-instance vpna_out
[P2-bgp-vpna_out] peer 10.0.0.13 as-number 65003
[P2-bgp-vpna_out] peer 10.0.0.13 allow-as-loop 2
The AS_Path attribute of the BGP VPNv4 routes received in the VPN instance vpna_in carries AS
65003. P1 discards the routes due to loop prevention mechanism. Therefore, you need to configure
the substitute-as parameter to substitute the AS.
The branch routes learned in vpna_in are advertised to the vpna_out instance in the form of BGP
routes through the CE (P1) of the HQ. However, P2 does not learn the routes because they carry the
local AS ID. Therefore, the allow-as-loop parameter must be configured.
# Check the BGP peer relationship status on P1.
[P1]interface LoopBack1
[P1-LoopBack1] ip address 10.1.5.5 32
# Add the interface that connects the CEs to the VPN instance.
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip binding vpn-instance vpna
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 255.255.255.252
# Complete EBGP configuration on PE4 and establish a BGP peer relationship through directly
connected interfaces.
[PE4]bgp 65100
[PE4-bgp] ipv4-family vpn-instance vpna
[PE4-bgp-vpna] peer 10.0.0.25 as-number 65003
[PE4-bgp-vpna] peer 10.0.0.25 substitute-as
[PE3]bgp 65003
[PE3-bgp] router-id 10.0.3.3
[PE3-bgp] peer 10.0.0.26 as-number 65100
HCIE-Datacom Lab Guide Page 75
[PE3]interface LoopBack1
[PE3-LoopBack1] ip address 10.1.3.3 32
[PE3-LoopBack1] quit
[PE3]bgp 65003
[PE3-bgp] network 10.1.3.3 255.255.255.255
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip binding vpn-instance vpna
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 255.255.255.252
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ospf enable 1 area 0.0.0.0
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] ospf enable 1 area 0.0.0.0
[PE1]interface LoopBack1
[PE1-LoopBack1] ip address 10.1.1.1 32
[PE1-LoopBack1] ospf enable 1 area 0.0.0.0
[PE2]bgp 65100
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-vpna] import-route ospf 1 route-policy O2B
In VPN instance vpna_in, branch routes 10.1.1.1/32 and 10.1.3.3/32 have been learned.
In VPN instance vpna_out, routes from the HQ (10.1.1.1/32 and 10.1.3.3/32) have been learned. In
this case, the next hop is 10.0.0.13, that is P1.
# Check the BGP VPNv4 routing tables on PE2 and PE4.
PE2 has learned the service routes to the other branch and the HQ, and the next hops are the PEs of
the HQ.
PE4 has learned the service routes to the other branch and the HQ, and the next hops are the PEs of
the HQ.
# Check the IGP protocol routing tables on PE1 and PE3.
Total Nets: 4
Intra Area: 2 Inter Area: 0 ASE: 2 NSSA: 0
The OSPF routing table on PE1 has contained the routes to the HQ and the branches.
The BGP routing table on PE3 has contained the routes to the HQ and the branches.
# Test service connectivity on PE3.
The communication is normal. The source addresses must be local service network addresses.
# Check the service traffic paths.
The command output shows that the traffic is forwarded through P1 of the HQ. If the HQ wants to
restrict the communication between branches, you can perform related operations.
----End
3.1.3 Quiz
The tag value in the OSPF routing table on PE1 is 3489726028, how is the value generated?
HCIE-Datacom Lab Guide Page 81
4 EVPN
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 interfaces are created for all devices, and the IP addresses of Loopback interfaces are in
the format of 10.0.X.X. The values indicated by X are shown in the tables related to corresponding
configuration procedures.
This lab introduces how to implement route learning between the HQ and the branches by
controlling RT values. Also, it involves how to transmit routes between different branches by using
EVPN as the transport protocol.
3. Configure MPLS in AS 65100 and enable MPLS globally. Configure MPLS LSR IDs and enable
MPLS and MPLS LDP on interconnection interfaces.
4. Create VPN instances on P1 to configure the EBGP peer between P1 and P2.
5. Create a VPN instance on PE4 to configure the EBGP peer between PE4 and PE3.
6. Create a VPN instance on PE2 to configure OSPF between PE2 and PE1.
4.1.2.2 Configuration Procedure
Step 1 Complete the basic configuration of devices.
Set the command validation mode to immediate validation and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 interface addresses need to be configured
according to the following table.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
HCIE-Datacom Lab Guide Page 83
<P1>system-view immediately
<P2>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
HCIE-Datacom Lab Guide Page 84
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] undo shutdown
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 255.255.255.252
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1]interface LoopBack0
[PE2-LoopBack0] isis enable 1
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE4]isis 1
HCIE-Datacom Lab Guide Page 85
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] quit
[P2]interface LoopBack0
[P2-LoopBack0] isis enable 1
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
Total Peer(s): 2
--------------------------------
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] mpls
[P2-GigabitEthernet0/5/1] mpls ldp
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] mpls
[P2-GigabitEthernet0/5/2] mpls ldp
[P2-GigabitEthernet0/5/2] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] mpls
[PE2-GigabitEthernet0/5/1] mpls ldp
HCIE-Datacom Lab Guide Page 87
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] mpls
[PE4-GigabitEthernet0/5/1] mpls ldp
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] l2vpn-family evpn
[PE2-bgp-af-evpn] policy vpn-target
[PE2-bgp-af-evpn] peer 10.0.6.6 enable
# Configure P2.
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 10.0.2.2 as-number 65100
[P2-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P2-bgp] peer 10.0.4.4 as-number 65100
[P2-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P2-bgp] l2vpn-family evpn
[P2-bgp-af-evpn] undo policy vpn-target
[P2-bgp-af-evpn] peer 10.0.2.2 enable
[P2-bgp-af-evpn] peer 10.0.2.2 reflect-client
[P2-bgp-af-evpn] peer 10.0.4.4 enable
[P2-bgp-af-evpn] peer 10.0.4.4 reflect-client
# Configure PE4.
[PE4]bgp 65100
[PE4-bgp] router-id 10.0.4.4
HCIE-Datacom Lab Guide Page 88
Step 5 Complete the configuration between CEs and PEs in the HQ.
From this step, you need to configure the routing protocol between CEs and PEs and the following
results are reached via configuring IRT and ERT:
1. The HQ can normally learn the routes from Branch1 and Branch2.
2. The next hop of the peer routes learned between the branches is the HQ.
3. The branches implement mutual access through the HQ.
To meet the preceding requirements, you need to create two VPN instances between P1 and P2 to
receive and send routes. Therefore, create a sub-interface in addition to the physical interfaces.
# Configure the sub-interface between P1 and P2.
[P1]interface GigabitEthernet0/5/0.1
[P1-GigabitEthernet0/5/0.1] vlan-type dot1q 10
[P1-GigabitEthernet0/5/0.1] ip address 10.0.0.113 255.255.255.252
[P1-GigabitEthernet0/5/0.1] quit
[P2]interface GigabitEthernet0/5/0.1
[P2-GigabitEthernet0/5/0.1] vlan-type dot1q 10
[P2-GigabitEthernet0/5/0.1] ip address 10.0.0.114 255.255.255.252
[P2-GigabitEthernet0/5/0.1] quit
[P2]ping 10.0.0.113
PING 10.0.0.113: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.113: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.0.113: bytes=56 Sequence=5 ttl=255 time=1 ms
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms
# Configure BGP for P1, use the IP address of Loopback0 as the router ID, and establish an EBGP peer
relationship through directly connected interfaces.
[P1]bgp 65003
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 10.0.0.14 as-number 65100
[P1-bgp] peer 10.0.0.114 as-number 65100
# Create VPN instance vpna_in on P2 to receive routes and vpna_out to send routes.
In the entire network, configure VPN instances on the PE devices in MPLS VPN according to the
following planning.
Add the evpn parameter to RT values, and enable EVPN to generate and advertise IP prefix and IRB
routes.
# After configuring the VPN instances, add the interfaces into corresponding VPN instances.
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip binding vpn-instance vpna_out
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 255.255.255.252
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/0.1
HCIE-Datacom Lab Guide Page 90
[P2]bgp 65100
[P2-bgp] ipv4-family vpn-instance vpna_in
[P2-bgp-vpna_in] peer 10.0.0.113 as-number 65003
[P2-bgp-vpna_in] peer 10.0.0.113 substitute-as
[P2-bgp-vpna_in] advertise l2vpn evpn
[P2-bgp-vpna_in] ipv4-family vpn-instance vpna_out
[P2-bgp-vpna_out] peer 10.0.0.13 as-number 65003
[P2-bgp-vpna_out] peer 10.0.0.13 allow-as-loop 2
[P2-bgp-vpna_out] advertise l2vpn evpn
The AS_Path attribute of the BGP VPNv4 routes received in the VPN instance vpna_in carries AS
65003. P1 discards the routes due to loop prevention mechanism. Therefore, you need to configure
the substitute-as parameter to substitute the AS.
The branch routes learned in vpna_in are advertised to vpna_out in the form of BGP routes through
the CE (P1) of the HQ. However, P2 does not learn the routes because they carry the local AS ID.
Therefore, the allow-as-loop parameter must be configured.
The advertise l2vpn evpn command must be configured in VPN instances to configure IP prefix route
advertisement.
# Check the BGP peer relationship status on P1.
[P1]interface LoopBack1
[P1-LoopBack1] ip address 10.1.5.5 32
Configure a VPN instance on PE4 according to the planning, and add an interface to the VPN
instance. Configure EBGP between PE4 and PE3. Create Loopback1 interface on PE3 to simulate a
service network segment, and import it into BGP.
#Create a VPN instance on PE4.
# Add the interface that connects the CEs to the VPN instance.
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip binding vpn-instance vpna
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 255.255.255.252
# Complete EBGP configuration on PE4 and establish a BGP peer relationship through directly
connected interfaces.
[PE4]bgp 65100
[PE4-bgp] ipv4-family vpn-instance vpna
[PE4-bgp-vpna] peer 10.0.0.25 as-number 65003
[PE4-bgp-vpna] peer 10.0.0.25 substitute-as
[PE4-bgp-vpna] advertise l2vpn evpn
[PE3]bgp 65003
[PE3-bgp] router-id 10.0.3.3
[PE3-bgp] peer 10.0.0.26 as-number 65100
[PE3]interface LoopBack1
[PE3-LoopBack1] ip address 10.1.3.3 32
[PE3-LoopBack1] quit
[PE3]bgp 65003
[PE3-bgp] network 10.1.3.3 255.255.255.255
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip binding vpn-instance vpna
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 255.255.255.252
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ospf enable 1 area 0.0.0.0
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] ospf enable 1 area 0.0.0.0
[PE1]interface LoopBack1
[PE1-LoopBack1] ip address 10.1.1.1 32
[PE1-LoopBack1] ospf enable 1 area 0.0.0.0
[PE2]bgp 65100
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-vpna] import-route ospf 1 route-policy O2B
[PE2-bgp-vpna] advertise l2vpn evpn
The service routes learned by VPN instance vpna_in are created by different PEs.
# Check the BGP routing table of VPN instance vpna_out on P2.
All the service routes from P1 are learned by VPN instance vpna_in and the next hop is P1.
# Check the EVPN routing table on PE2.
The next hop of all EVPN Type 5 routes is P2, indicating that the routes go to the other branch
through the HQ.
# Check the BGP routing table of VPN instance vpna on PE2.
Routing Tables
Total Nets: 4
Intra Area: 2 Inter Area: 0 ASE: 2 NSSA: 0
The OSPF routing table on PE1 has contained the routes to the HQ and the branches.
# Check the EVPN routing table on PE4.
The next hop of all EVPN Type 5 routes is P2, indicating that the routes go to the other branch
through the HQ.
# Check the BGP routing table of VPN instance vpna on PE4.
The routes to the HQ and the other branch have been normally learned.
# Perform a connectivity test.
Packets are forwarded from P2 to P1 and finally forwarded to PE1 through PE2.
HCIE-Datacom Lab Guide Page 98
By now, the configuration procedure of using EVPN as the control plane MPLS VPN is complete.
----End
4.1.3 Quiz
If EVPN is used to implement L2VPN like VPLS, which type of route is used to transmit routing
information?
HCIE-Datacom Lab Guide Page 99
5 VXLAN Lab
The preceding figure shows the device interconnection. Loopback0 interfaces are created on Border,
Edge_1, and Edge_2, and their IP addresses are in the format of 10.0.x.x. In the format, x indicates
the device ID and is marked in tables in the corresponding configuration procedures.
Configure the interfaces connecting Edge_1 and Border as trunk interfaces and allow packets from
VLAN 12 to pass through. VLANIF 12 is created on Edge_1 and Border for Layer 3 interconnection,
and the IP address is 10.0.12.x/24.
HCIE-Datacom Lab Guide Page 100
Configure the interfaces connecting Border and Edge_2 as trunk interfaces and allow packets from
VLAN 23 to pass through. VLANIF 23 is created on Border and Edge_2 for Layer 3 interconnection,
and the IP address is 10.0.23.x/24.
OSPF runs between Edge_1, Border, and Edge_2, the IP address of Loopback0 is used as the router
ID, and OSPF is enabled on loopback and interconnection interfaces (the process ID is 1).
Edge_1 and Edge_2 use the address of Loopback0 as the source address of the VXLAN NVE interface
to establish a static VXLAN tunnel.
ACC_1 and ACC_2 function as access switches and interconnect with PC1 and PC2, respectively,
through access interfaces. Edge_1 and Edge_2 interconnect with ACC_1 and ACC_2, respectively,
through Layer 2 sub-interfaces, and allow packets from VLAN 100 to pass through. Layer 3 sub-
interfaces are bound to BD 10. This allows packets from terminals to be transmitted to a VXLAN
network through Layer 2 sub-interfaces.
Edge_1 1
Border 2
Edge_2 3
[Edge_1] vlan 12
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_1]
[Edge_1] interface GigabitEthernet0/0/1
[Edge_1-GigabitEthernet0/0/1] port link-type trunk
[Edge_1-GigabitEthernet0/0/1] port trunk allow-pass vlan 12
[Edge_1-GigabitEthernet0/0/1] quit
[Edge_1]
[Edge_1] interface Vlanif12
[Edge_1-Vlanif12] ip address 10.0.12.1 255.255.255.0
HCIE-Datacom Lab Guide Page 101
[Edge_1-Vlanif12] quit
[Edge_1]
[Edge_1] interface LoopBack 0
[Edge_1-LoopBack0] ip address 10.0.1.1 32
[Edge_1-LoopBack0] quit
[Edge_2] vlan 23
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2]
[Edge_2] interface GigabitEthernet0/0/1
[Edge_2-GigabitEthernet0/0/1] port link-type trunk
[Edge_2-GigabitEthernet0/0/1] port trunk allow-pass vlan 23
[Edge_2-GigabitEthernet0/0/1] quit
[Edge_2]
[Edge_2] interface Vlanif 23
[Edge_2-Vlanif23] ip address 10.0.23.3 255.255.255.0
[Edge_2-Vlanif23] quit
[Edge_2]
[Edge_2] interface LoopBack 0
[Edge_2-LoopBack0] ip address 10.0.3.3 32
[Edge_2-LoopBack0] quit
[Border]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=254 time=1 ms
HCIE-Datacom Lab Guide Page 102
[Border]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Request time out
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=1 ms
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0 and VLANIF 12.
# Configure OSPF on Border.
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0, VLANIF 12, and
VLANIF 23.
# Configure OSPF on Edge_2.
# Check the OSPF neighbor relationship and OSPF routing table on Border.
Neighbors
Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0
Border has learned the routes generated by Loopback0 interfaces on Edge_1 and Edge_2.
# Test the connectivity of Loopback0 interfaces between Edge_1 and Edge_2.
Edge_1 and Edge_2 can communicate with each other through their Loopback0 interfaces.
[Edge_1] bridge-domain 10
[Edge_1-bd10] vxlan vni 1000
[Edge_1-bd10] quit
[Edge_1] vcmp role silent
[Edge_1] interface GigabitEthernet0/0/24
[Edge_1-GigabitEthernet0/0/24] port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24] quit
[Edge_1] interface GigabitEthernet0/0/24.100 mode l2
[Edge_1-GigabitEthernet0/0/24.100] encapsulation dot1q vid 100
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24.100] bridge-domain 10
[Edge_1-GigabitEthernet0/0/24.100] quit
By default, after VCMP is configured, the encapsulation mode of packets allowed to pass a Layer 2
sub-interface cannot be set to Dot1q. In this case, you need to run the vcmp role silent command.
# Configure Edge_2.
[Edge_2] bridge-domain 10
[Edge_2-bd10] vxlan vni 1000
[Edge_2-bd10] quit
[Edge_2] vcmp role silent
[Edge_2] interface GigabitEthernet0/0/24
[Edge_2-GigabitEthernet0/0/24] port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24] quit
[Edge_2] interface GigabitEthernet0/0/24.100 mode l2
[Edge_2-GigabitEthernet0/0/24.100] encapsulation dot1q vid 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24.100] bridge-domain 10
[Edge_2-GigabitEthernet0/0/24.100] quit
# Configure ACC_1.
HCIE-Datacom Lab Guide Page 105
# Configure ACC_2.
[Edge_1]interface Nve1
[Edge_1-Nve1] source 10.0.1.1
[Edge_1-Nve1] vni 1000 head-end peer-list 10.0.3.3
[Edge_1-Nve1] quit
[Edge_2]interface Nve1
[Edge_2-Nve1] source 10.0.3.3
[Edge_2-Nve1] vni 1000 head-end peer-list 10.0.1.1
[Edge_2-Nve1] quit
Static VXLAN tunnels in Up state have been created on Edge_1 and Edge_2.
C:\Users\PC1>ping 192.168.100.2
The command output shows that PC1 can communicate with PC2.
# Check the MAC address entries on Edge_1 and Edge_2.
[Edge_1]display mac-address
-------------------------------------------------------------------------------
MAC Address VLAN/VSI/BD Learned-From Type
-------------------------------------------------------------------------------
000c-292e-b4a3 -/-/10 10.0.3.3 dynamic
000c-29b3-efea -/-/10 GE0/0/24.100 dynamic
9400-b049-9efd 12/-/- GE0/0/1 dynamic
-------------------------------------------------------------------------------
Total items displayed = 3
On Edge_1, you can find that the MAC addresses of PC1 and PC2 have been learned from the sub-
interface GE0/0/24.100 and the remote VTEP (10.0.3.3), respectively.
[Edge_2]display mac-address
-------------------------------------------------------------------------------
MAC Address VLAN/VSI/BD Learned-From Type
-------------------------------------------------------------------------------
000c-292e-b4a3 -/-/10 GE0/0/24.100 dynamic
000c-29b3-efea -/-/10 10.0.1.1 dynamic
9400-b049-9ef9 23/-/- GE0/0/1 dynamic
-------------------------------------------------------------------------------
Total items displayed = 3
HCIE-Datacom Lab Guide Page 107
Similarly, on Edge_2, you can find the MAC addresses learned from the local sub-interface and
remote VTEP (10.0.1.1).
# Create ACL 3000 on Border for matching VXLAN-encapsulated packets for communication between
PC1 and PC2.
The ACL matches packets with the source IP address being 10.0.1.1, destination IP addresses being
10.0.3.3, protocol being UDP, and destination port number being 4789.
# Run the capture-packet command on Border to obtain the packets on GE0/0/24.
[Border]capture-packet acl 3000 interface GigabitEthernet 0/0/24 destination file vxlan.cap outbound packet-num
10
Info: Packet getting is configured. Saved to flash:/vxlan.cap.
C:\Users\PC1>ping 192.168.100.2
# After the packets have been obtained, the command output similar to the following is displayed:
Information about the path of the obtained packets is displayed in the command output. You can
download the file through FTP or SFTP. For details about how to enable FTP or SFTP on the device,
see the related product documentation.
# Check the obtained packets on Border.
Obtain the packets on Border. You can find that, in the outer IP header, the source and destination
IP addresses are respectively 10.0.1.1 and 10.0.3.3, which are the NVE interface IP addresses of
Edge_1 and Edge_2, respectively.
The outer IP header is followed by the UDP header, in which the destination port number is 4789.
This indicates that the subsequent packet is encapsulated using VXLAN.
In the VXLAN header, the VNI is 1000.
The VXLAN header is followed by the original data frame and IP header for communication between
PC1 and PC2.
----End
5.1.3 Quiz
How will a VTEP process the broadcast packets in the local BD from hosts?
The figure shows the device interconnection. Loopback0 interfaces are created on Border, Edge_1,
and Edge_2, and their IP addresses are in the format of 10.0.x.x. In the format, x indicates the device
ID and is marked in tables in the corresponding configuration procedures.
Configure the interfaces connecting Edge_1 and Border as trunk interfaces and allow packets from
VLAN 12 to pass through. VLANIF 12 is created on Edge_1 and Border for Layer 3 interconnection,
and the IP address is 10.0.12.x/24.
Configure the interfaces connecting Border and Edge_2 as trunk interfaces and allow packets from
VLAN 23 to pass through. VLANIF 23 is created on Border and Edge_2 for Layer 3 interconnection,
and the IP address is 10.0.23.x/24.
OSPF runs between Edge_1, Border, and Edge_2, the IP address of Loopback0 is used as the router
ID, and OSPF is enabled on loopback and interconnection interfaces.
Edge_1, Border, and Edge_2 use the address of Loopback0 as the source address of the VXLAN NVE
interface. A VXLAN tunnel is established between Edge_1 and Border to transmit traffic of BD 10,
and a VXLAN tunnel is established between Border and Edge_2 to transmit traffic of BD 20.
ACC_1 and ACC_2 function as access switches and interconnect with PC1 and PC2, respectively,
through access interfaces. PC1 and PC2 are added to VLAN 100 and VLAN 200, respectively. Edge_1
and Border interconnect with ACC_1 and ACC_2 through Layer 2 sub-interfaces to terminate packets
from VLAN 100 and VLAN 200 respectively. The sub-interfaces are associated with BD 10 and BD 20,
respectively.
On Border, create VBDIF 10 and VBDIF 20 as gateways for terminals in BD 10 and BD 20 to
implement Layer 3 interconnection between terminals in BD 10 and BD 20.
HCIE-Datacom Lab Guide Page 110
Edge_1 1
Border 2
Edge_2 3
[Edge_1]vlan 12
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_1]
[Edge_1]interface GigabitEthernet0/0/1
[Edge_1-GigabitEthernet0/0/1] port link-type trunk
[Edge_1-GigabitEthernet0/0/1] port trunk allow-pass vlan 12
[Edge_1-GigabitEthernet0/0/1] quit
[Edge_1]
[Edge_1]interface Vlanif12
[Edge_1-Vlanif12] ip address 10.0.12.1 255.255.255.0
[Edge_1-Vlanif12] quit
[Edge_1]
[Edge_1]interface LoopBack 0
[Edge_1-LoopBack0] ip address 10.0.1.1 32
[Edge_1-LoopBack0] quit
[Border]vlan batch 12 23
Info: This operation may take a few seconds. Please wait for a moment...done.
[Border]
[Border]interface GigabitEthernet0/0/23
[Border-GigabitEthernet0/0/23] port link-type trunk
HCIE-Datacom Lab Guide Page 111
[Edge_2]vlan 23
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2]
[Edge_2]interface GigabitEthernet0/0/1
[Edge_2-GigabitEthernet0/0/1] port link-type trunk
[Edge_2-GigabitEthernet0/0/1] port trunk allow-pass vlan 23
[Edge_2-GigabitEthernet0/0/1] quit
[Edge_2]
[Edge_2]interface Vlanif 23
[Edge_2-Vlanif23] ip address 10.0.23.3 255.255.255.0
[Edge_2-Vlanif23] quit
[Edge_2]
[Edge_2]interface LoopBack 0
[Edge_2-LoopBack0] ip address 10.0.3.3 32
[Edge_2-LoopBack0] quit
[Border]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=254 time=1 ms
[Border]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Request time out
HCIE-Datacom Lab Guide Page 112
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0 and VLANIF 12.
# Configure OSPF on Border.
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0, VLANIF 12, and
VLANIF 23.
# Configure OSPF on Edge_2.
# Check the OSPF neighbor relationship and OSPF routing table on Border.
Neighbors
Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0
Border has learned the routes generated by Loopback0 interfaces on Edge_1 and Edge_2.
# Test the connectivity of Loopback0 interfaces between Edge_1 and Edge_2.
Edge_1 and Edge_2 can communicate with each other through their Loopback0 interfaces.
Configure a service access point on Edge_1 and Edge_2, create sub-interfaces to interconnect with
ACC_1 and ACC_2 and terminate packets from VLAN 100 and VLAN 200, and bind the sub-interfaces
to BD 10 and BD 20.
Configure the interfaces connecting ACC_1 and ACC_2 to PCs as access interfaces and set PVIDs to
100 and 200. Configure the interfaces connecting ACC_1 and ACC_2 to Edge_1 and Edge_2 as trunk
interfaces, and allow packets from VLAN 100 and VLAN 200 to pass through.
# Configure Edge_1.
[Edge_1]bridge-domain 10
[Edge_1-bd10] vxlan vni 1000
[Edge_1-bd10] quit
[Edge_1]vcmp role silent
[Edge_1]interface GigabitEthernet0/0/24
[Edge_1-GigabitEthernet0/0/24]port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24]quit
[Edge_1]interface GigabitEthernet0/0/24.100 mode l2
[Edge_1-GigabitEthernet0/0/24.100] encapsulation dot1q vid 100
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24.100] bridge-domain 10
[Edge_1-GigabitEthernet0/0/24.100] quit
By default, after VCMP is configured, the encapsulation mode of packets allowed to pass a Layer 2
sub-interface cannot be set to Dot1q. In this case, you need to run the vcmp role silent command.
# Configure Edge_2.
[Edge_2]bridge-domain 20
[Edge_2-bd20] vxlan vni 2000
[Edge_2-bd20] quit
[Edge_2]vcmp role silent
[Edge_2]interface GigabitEthernet0/0/24
[Edge_2-GigabitEthernet0/0/24]port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24]quit
[Edge_2]interface GigabitEthernet0/0/24.200 mode l2
[Edge_2-GigabitEthernet0/0/24.200] encapsulation dot1q vid 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24.200] bridge-domain 20
[Edge_2-GigabitEthernet0/0/24.200] quit
# Configure ACC_1.
[ACC_1]vlan 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[ACC_1-vlan100]interface GigabitEthernet0/0/24
[ACC_1-GigabitEthernet0/0/24] port link-type access
[ACC_1-GigabitEthernet0/0/24] port default vlan 100
[ACC_1-GigabitEthernet0/0/24] quit
[ACC_1]interface GigabitEthernet0/0/1
[ACC_1-GigabitEthernet0/0/1] port link-type trunk
[ACC_1-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[ACC_1-GigabitEthernet0/0/1] quit
HCIE-Datacom Lab Guide Page 115
# Configure ACC_2.
[ACC_2]vlan 200
Info: This operation may take a few seconds. Please wait for a moment...d
[ACC_2]interface GigabitEthernet0/0/23
[ACC_2-GigabitEthernet0/0/23] port link-type access
[ACC_2-GigabitEthernet0/0/23] port default vlan 200
[ACC_2-GigabitEthernet0/0/23] quit
[ACC_2]interface GigabitEthernet0/0/1
[ACC_2-GigabitEthernet0/0/1] port link-type trunk
[ACC_2-GigabitEthernet0/0/1] port trunk allow-pass vlan 200
[ACC_2-GigabitEthernet0/0/1] quit
Create BD 10 on Border.
[Border]bridge-domain 10
[Border-bd10] vxlan vni 1000
[Border-bd10] quit
[Border]interface Nve1
[Border-Nve1] source 10.0.2.2
[Border-Nve1] vni 1000 head-end peer-list 10.0.1.1
[Border-Nve1] quit
# Configure NVE interfaces on Edge_2 and Border to establish a static VXLAN tunnel.
[Edge_2]interface Nve1
[Edge_2-Nve1] source 10.0.3.3
[Edge_2-Nve1] vni 2000 head-end peer-list 10.0.2.2
[Edge_2-Nve1] quit
Create BD 20 on Border.
[Border] bridge-domain 20
[Border-bd20] vxlan vni 2000
[Border-bd20] quit
[Border] interface Nve 1
[Border-Nve1] vni 2000 head-end peer-list 10.0.3.3
[Border-Nve1] quit
HCIE-Datacom Lab Guide Page 116
[Border]interface Vbdif10
[Border-Vbdif10] ip address 192.168.100.254 255.255.255.0
[Border-Vbdif10] quit
[Border]interface Vbdif20
[Border-Vbdif20] ip address 192.168.200.254 255.255.255.0
[Border-Vbdif20] quit
C:\Users\PC1>ping 192.168.100.254
C:\Users\PC2>ping 192.168.200.254
Similar to VLANIF interfaces, VBDIF 10 and VBDIF 20 have the same MAC address, which is 9400-
b049-9ef6.
# Check the MAC address entries in BD 10 on Edge_1.
There are two MAC address entries in BD 10 on Edge_1, which are learned respectively from the
sub-interface GE0/0/24.100 and the remote VTEP (10.0.2.2). The learned two MAC addresses are the
MAC address of the NIC on PC1 and the MAC address of VBDIF 10 on Border.
# Obtain the VXLAN packets received by Border from GE0/0/23.
In this case, Border is not the intermediate device for forwarding VXLAN packets but the termination
device for VXLAN packets. Therefore, if you use filter conditions to obtain packets, no packet will be
matched.
# Ping PC2 from PC1.
C:\Users\PC1>ping 192.168.200.2
Information about the path of the obtained packets is displayed in the command output. You can
download the file through FTP or SFTP. For details about how to enable FTP or SFTP on the device,
see the related product documentation.
# Check the obtained packets on Border.
the VNI in the VXLAN header and determines that the inner data frame needs to be searched and
forwarded in BD 10 based on VNI 1000.
Subsequently, Border checks the destination MAC address (94:00:b0:49:9e:fb) of the inner data
frame in BD 10. The destination MAC address is the MAC address of VBDIF 10. Therefore, Border
determines that the data frame needs to be processed by VBDIF 10. Border then further
decapsulates the data frame to check the upper-layer data and finds that the destination IP address
of the inner data frame at the network layer is 192.168.200.2, which is not the IP address of the local
interface. In this case, Border checks the local IP routing table before Layer 3 forwarding.
# Check the IP routing table on Border.
Run the display ip routing-table 192.168.200.2 command to check the result of searching the
routing table for the packets destined for 192.168.200.2 by Border. The command output shows that
a direct route generated by VBDIF 20 is matched. In this case, Border determines the forwarding
interface based on the ARP and MAC address entries.
# Check the ARP and MAC address entries on Border.
-------------------------------------------------------------------------------
Total items displayed = 1
According to the ARP and MAC address entries, Border needs to re-encapsulate the data frame and
forward it to the remote VTEP (10.0.3.3).
In this case, Border re-encapsulates the inner data frame (by replacing the source and destination
MAC addresses), and then sends the data frame to Edge_2 through the static VXLAN tunnel.
----End
HCIE-Datacom Lab Guide Page 120
5.2.3 Quiz
After Edge_2 receives VXLAN packets (in which the original data frame for PC1 to ping PC2 is
encapsulated) from Border, how will Edge_2 process the packets?
HCIE-Datacom Lab Guide Page 121
The figure shows the device interconnection. Loopback0 interfaces are created on Border, Edge_1,
and Edge_2, and their IP addresses are in the format of 10.0.x.x. In the format, x indicates the device
ID and is marked in tables in the corresponding configuration procedures.
Configure the interfaces connecting Edge_1 and Border as trunk interfaces and allow packets from
VLAN12 to pass through. VLANIF12 is created on Edge_1 and Border for Layer 3 interconnection, and
the IP address is 10.0.12.x/24.
Configure the interfaces connecting Border and Edge_2 as trunk interfaces and allow packets from
VLAN23 to pass through. VLANIF23 is created on Border and Edge_2 for Layer 3 interconnection, and
the IP address is 10.0.23.x/24.
OSPF runs between Edge_1, Border, and Edge_2, the IP address of Loopback0 is used as the router
ID, and OSPF is enabled on loopback and interconnection interfaces.
Edge_1 and Edge_2 use the address of Loopback0 as the source address of the VXLAN NVE interface
to transmit the traffic of BD 10 and BD 20.
ACC_1 and ACC_2 function as access switches and interconnect with PC1 and PC2, respectively,
through access interfaces. PC1 and PC2 are added to VLAN 100 and VLAN 200, respectively. Create
VLANIF 100 on ACC_2 to simulate a terminal in VLAN 100. Edge_1 and Edge_2 interconnect with
ACC_1 and ACC_2 through Layer 2 sub-interfaces. Edge_1 terminates the packets from VLAN 100
and Edge_2 terminates the packets from VLAN 100 and VLAN 200, respectively. The sub-interfaces
are associated with BD10 and BD20, respectively.
HCIE-Datacom Lab Guide Page 122
VBDIF 10 and VBDIF 20 are created on Edge_1 and Edge_2 to function as the gateways (distributed
gateways) for terminals in BD 10 and BD 20. A BGP EVPN peer relationship is established between
Edge_1 and Edge_2 to transmit Type 2 routes, thereby transmitting host routes and MAC addresses.
Edge_1 1
Border 2
Edge_2 3
[Edge_1]vlan 12
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_1]interface GigabitEthernet0/0/1
[Edge_1-GigabitEthernet0/0/1] port link-type trunk
[Edge_1-GigabitEthernet0/0/1] port trunk allow-pass vlan 12
[Edge_1-GigabitEthernet0/0/1] quit
[Edge_1]interface Vlanif12
[Edge_1-Vlanif12] ip address 10.0.12.1 255.255.255.0
[Edge_1-Vlanif12] quit
[Edge_1]interface LoopBack 0
[Edge_1-LoopBack0] ip address 10.0.1.1 32
[Edge_1-LoopBack0] quit
[Border]vlan batch 12 23
Info: This operation may take a few seconds. Please wait for a moment...done.
HCIE-Datacom Lab Guide Page 123
[Border]interface GigabitEthernet0/0/23
[Border-GigabitEthernet0/0/23] port link-type trunk
[Border-GigabitEthernet0/0/23] port trunk allow-pass vlan 12
[Border-GigabitEthernet0/0/23] quit
[Border]interface GigabitEthernet0/0/24
[Border-GigabitEthernet0/0/24] port link-type trunk
[Border-GigabitEthernet0/0/24] port trunk allow-pass vlan 23
[Border-GigabitEthernet0/0/24] quit
[Border]interface Vlanif12
[Border-Vlanif12] ip address 10.0.12.2 255.255.255.0
[Border-Vlanif12] quit
[Border]interface Vlanif23
[Border-Vlanif23] ip address 10.0.23.2 255.255.255.0
[Border-Vlanif23] quit
[Border]interface LoopBack 0
[Border-LoopBack0] ip address 10.0.2.2 32
[Border-LoopBack0] quit
[Edge_2]vlan 23
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2]
[Edge_2]interface GigabitEthernet0/0/1
[Edge_2-GigabitEthernet0/0/1] port link-type trunk
[Edge_2-GigabitEthernet0/0/1] port trunk allow-pass vlan 23
[Edge_2-GigabitEthernet0/0/1] quit
[Edge_2]
[Edge_2]interface Vlanif 23
[Edge_2-Vlanif23] ip address 10.0.23.3 255.255.255.0
[Edge_2-Vlanif23] quit
[Edge_2]
[Edge_2]interface LoopBack 0
[Edge_2-LoopBack0] ip address 10.0.3.3 32
[Edge_2-LoopBack0] quit
[Border]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=254 time=1 ms
[Border]ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Request time out
HCIE-Datacom Lab Guide Page 124
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0 and VLANIF 12.
# Configure OSPF on Border.
Use the IP address of Loopback0 as the router ID, and enable OSPF on Loopback0, VLANIF 12, and
VLANIF 23.
# Configure OSPF on Edge_2.
# Check the OSPF neighbor relationship and OSPF routing table on Border.
Neighbors
Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0
Border has learned the routes generated by Loopback0 interfaces on Edge_1 and Edge_2.
# Test the connectivity of Loopback0 interfaces between Edge_1 and Edge_2.
Edge_1 and Edge_2 can communicate with each other through their Loopback0 interfaces.
Configure a service access point on Edge_1 and Edge_2, create sub-interfaces to interconnect with
ACC_1 and ACC_2 and terminate packets from VLAN 100 and VLAN 200, and bind the sub-interfaces
to BD 10 and BD 20.
Configure the interfaces connecting ACC_1 and ACC_2 to PCs as access interfaces and set PVIDs to
100 and 200. Configure the interfaces connecting ACC_1 and ACC_2 to Edge_1 and Edge_2 as trunk
interfaces, and allow packets from VLAN 100 and VLAN 200 to pass through.
Create VLANIF 100 on ACC_2 and assign IP address 192.168.100.2/24 to it to simulate a terminal
user.
# Configure Edge_1.
[Edge_1]bridge-domain 10
[Edge_1-bd10] vxlan vni 1000
[Edge_1-bd10] quit
[Edge_1]bridge-domain 20
[Edge_1-bd20] vxlan vni 2000
[Edge_1-bd20] quit
[Edge_1]vcmp role silent
[Edge_1]interface GigabitEthernet0/0/24
[Edge_1-GigabitEthernet0/0/24]port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24]quit
[Edge_1]interface GigabitEthernet0/0/24.100 mode l2
[Edge_1-GigabitEthernet0/0/24.100] encapsulation dot1q vid 100
Info: This operation may take a few seconds. Please wait for a moment...
[Edge_1-GigabitEthernet0/0/24.100] bridge-domain 10
[Edge_1-GigabitEthernet0/0/24.100] quit
By default, after VCMP is configured, the encapsulation mode of packets allowed to pass a Layer 2
sub-interface cannot be set to Dot1q. In this case, you need to run the vcmp role silent command.
# Configure Edge_2.
[Edge_2]bridge-domain 10
[Edge_2-bd10] vxlan vni 1000
[Edge_2-bd10] quit
[Edge_2]bridge-domain 20
[Edge_2-bd20] vxlan vni 2000
[Edge_2-bd20] quit
[Edge_2]vcmp role silent
[Edge_2]interface GigabitEthernet0/0/24
[Edge_2-GigabitEthernet0/0/24]port link-type trunk
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24]quit
[Edge_2]interface GigabitEthernet0/0/24.200 mode l2
[Edge_2-GigabitEthernet0/0/24.200] encapsulation dot1q vid 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24.200] bridge-domain 20
[Edge_2-GigabitEthernet0/0/24.200] quit
[Edge_2]interface GigabitEthernet0/0/24.100 mode l2
[Edge_2-GigabitEthernet0/0/24.100] encapsulation dot1q vid 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-GigabitEthernet0/0/24.100] bridge-domain 10
[Edge_2-GigabitEthernet0/0/24.100] quit
HCIE-Datacom Lab Guide Page 127
Create BD 10 and BD 20. Create sub-interfaces to terminate packets from VLAN 100 and VLAN 200.
# Configure ACC_1.
# Configure ACC_2.
Create VLANIF 100, and configure a static route destined to 192.168.200.0/24 with the next hop
being 192.168.100.254.
[Edge_2]interface Nve1
[Edge_2-Nve1] source 10.0.3.3
Info: This operation may take a few seconds. Please wait for a moment...done.
[Edge_2-Nve1] vni 1000 head-end peer-list protocol bgp
[Edge_2-Nve1] vni 2000 head-end peer-list protocol bgp
[Edge_2-Nve1] quit
HCIE-Datacom Lab Guide Page 128
[Edge_1]interface Vbdif10
[Edge_1-Vbdif10] ip address 192.168.100.254 255.255.255.0
[Edge_1-Vbdif10] mac-address 0000-5e00-0110
[Edge_1-Vbdif10] arp collect host enable
[Edge_1-Vbdif10] quit
[Edge_1]interface Vbdif20
[Edge_1-Vbdif20] ip address 192.168.200.254 255.255.255.0
[Edge_1-Vbdif20] mac-address 0000-5e00-0120
[Edge_1-Vbdif20] arp collect host enable
[Edge_1-Vbdif20] quit
[Edge_2]interface Vbdif10
[Edge_2-Vbdif10] ip address 192.168.100.254 255.255.255.0
[Edge_2-Vbdif10] mac-address 0000-5e00-0110
[Edge_2-Vbdif10] arp collect host enable
[Edge_2-Vbdif10] quit
[Edge_2]interface Vbdif20
[Edge_2-Vbdif20] ip address 192.168.200.254 255.255.255.0
[Edge_2-Vbdif20] mac-address 0000-5e00-0120
[Edge_2-Vbdif20] arp collect host enable
[Edge_2-Vbdif20] quit
Create VBDIF 10 and VBDIF 20 on both Edge_1 and Edge_2. Then, change the MAC addresses of the
interfaces to 0000-5e00-0110 and 0000-5e00-0120 respectively, and run the arp collect host enable
command on the VBDIF interfaces to transmit Type 2 routes generated based on ARP information of
hosts through BGP EVPN. By doing so, the MAC addresses of the gateways remain unchanged and
the hosts do not need to re-learn the ARP entries when the hosts are migrated between different
aggregation switches.
Step 4 Configure EVPN and IP VPN instances and bind them to the BD and VBDIF interfaces,
respectively.
Create an EVPN instance and an IP VPN instance on Edge_1 and Edge_2, and bind the instances to
BD and VBDIF interfaces, respectively. To ensure that EVPN routes and IP routes can be learned
mutually, plan EVPN and IP VPN instances as follows.
10
Edge_1_VPN_10_20 1020 31:12 313:12 313:12
20
10
Edge_2_VPN_10_20 1020 33:12 313:12 313:12
20
EVPN instance planning (In the following planning, the IDs of Edge_1, Border, and Edge_2 are 1, 2
and 3, respectively.):
1. RD: 2Y:Z, where 2 indicates an EVPN instance, Y indicates the device ID, and Z indicates the BD.
Take BD 10 on Edge_1 as an example. The RD for the corresponding EVPN instance is 21:10.
2. Import RT:213:Z, where 2 indicates an EVPN instance, 13 indicates that the RT is used to
transmit EVPN routes between Edge_1 and Edge_2, and Z indicates the BD. Take BD 10 on
Edge_1 as an example. The import RT for the corresponding EVPN instance is 213:10.
3. Export RT: Except for the one that is the same as the import RT 213:Z, the other export RT is
313:12, which is used to import IP routes into the IP VPN instance routing table.
IP VPN instance planning:
1. RD: 3X:12, where 3 indicates an IP VPN instance, X indicates the device ID, and 12 indicates that
the IP VPN instance is used by VBDIF 10 and VBDIF 20.
2. Export RT and import RT: 313:12, where 3 indicates an IP VPN instance, 13 indicates that the IP
VPN instance is used between Edge_1 and Edge_2, and 12 indicates VBDIF 10 and VBDIF 20.
3. L3VNI: 1020, which indicates the L3VNI used for communication between BD 10 and BD 20.
# On Edge_1, create EVPN instances and bind them to a BD.
[Edge_1]bridge-domain 10
[Edge_1-bd10]evpn binding vpn-instance Edge_1_BD_10
[Edge_1-bd10]quit
[Edge_1]bridge-domain 20
[Edge_1-bd20]evpn binding vpn-instance Edge_1_BD_20
[Edge_1-bd20]quit
[Edge_1-Vbdif20] quit
Note: After an IP VPN instance is bound to an interface, the IP address configuration of the interface
will be cleared. In this case, you need to reconfigure an IP address for the interface.
# On Edge_2, create an IP VPN instance and bind it to a VBDIF.
Note: After an IP VPN instance is bound to an interface, the IP address configuration of the interface
will be cleared. In this case, you need to reconfigure an IP address for the interface.
# Check the BGP EVPN peer relationship status on Edge_1 and Edge_2.
The BGP EVPN peer relationship between Edge_1 and Edge_2 is normally established.
On PC1, ping 192.168.100.2 (VLANIF 100 on Edge_2) on the same network segment and ping PC2 on
a different network segment. Check VXLAN tunnels established by using BGP EVPN, and check the
ingress replication list. Analyze the intra-subnet and the inter-subnet data forwarding processes.
# Use PC1, PC2, and VLANIF 100 to ping their respective gateways.
C:\Users\PC1>ping 192.168.100.254
C:\Users\PC2>ping 192.168.200.254
<ACC_2>ping 192.168.100.254
PING 192.168.100.254: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.254: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 192.168.100.254: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 192.168.100.254: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 192.168.100.254: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 192.168.100.254: bytes=56 Sequence=5 ttl=254 time=1 ms
The command outputs show that the communication with corresponding VBDIF gateways is normal.
# Check VXLAN tunnel information on Edge_1.
Layer 2 and Layer 3 VXLAN tunnels have been established between Edge_1 and Edge_2.
# Check Type 3 BGP EVPN routes on Edge_1.
The command output shows that there are two Type 3 routes from 10.0.3.3. After receiving these
Type 3 routes, the device creates a Layer 2 ingress replication list.
# Check the VXLAN peer relationship on Edge_1.
C:\Users\PC1>ping 192.168.100.2
HCIE-Datacom Lab Guide Page 135
C:\Users\PC1>arp -a
-------------------------------------------------------------------------------
Total items displayed = 2
The MAC address entry b008-750e-fbdb on Edge_1 is learned from the remote VTEP (10.0.3.3).
In this case, if PC1 sends a unicast frame to 192.168.100.2, Edge_1 will check the destination MAC
address and search for the MAC address in corresponding BD (BD 10) after Edge_1 has received the
frame. It is found that the matched MAC address entry is the one learned from the remote VTEP and
that the entry is generated based on the route learned through BGP EVPN.
# Check BGP EVPN Type 2 routes on Edge_1.
The command output shows that there is a Type 2 route from 10.0.3.3, which contains the MAC
address corresponding to 192.168.100.2.
# Check detailed information about the route.
In the label information, it is found that the first VNI is the L2VNI (1000) and the second VNI is the
L3VNI (1020). The RT values are 213:10 and 313:12.
This route is generated by Edge_2 based on the host ARP information in BD 10. (After the arp collect
host enable command is run on the VBDIF interface, Edge_2 converts the learned ARP information
of a downstream terminal into an EVPN Type 2 route and externally sends the route out.) The route
contains the information about the host IP address, host MAC address, L2VNI, and L3VNI.
In this case, Edge_1 performs Layer 2 forwarding. That is, Edge_1 encapsulates the data frame into a
VXLAN header based on the result of searching the MAC address table, and then forwards the
VXLAN packet to Edge_2. The VNI carried in the VXLAN packet is the L2VNI, which is the VNI (1000)
bound to BD 10.
# Check the communication process between PC1 and PC2.
HCIE-Datacom Lab Guide Page 137
C:\Users\PC1>ping 192.168.200.2
PC1 and PC2 communicate with each other across subnets. The packet from PC1 to PC2 is first sent
to the gateway of PC1 (VBDIF 10 on Edge_1). In this case, the destination MAC address of the data
frame is 0000-5e00-0110, which is the MAC address of a local interface on Edge_1. Then, Edge_1
checks the destination IP address of the packet, finding that the IP address is not the address of a
local interface. Therefore, Edge_1 determines that the packet needs to be further forwarded.
Because the Layer 3 interface (VBDIF 10) that receives the packet is bound to the IP VPN instance
Edge_1_VPN_10_20, Edge_1 searches for a route in the IP VPN instance. An IBGP route with the
next hop being 10.0.3.3 is matched, whose outbound interface is the VXLAN logical interface. In this
case, Edge_1 encapsulates the data frame in the VXLAN header and sends it to 10.0.3.3. The VNI in
the VXLAN header is determined by checking the BGP EVPN routing entry.
# Check BGP VPNv4 routes on Edge_1.
In the BGP VPNv4 routing entry, it is found that the label (L3VNI) of routing entry 192.168.200.2 is
1020, and the router's MAC address is 80e1-bf0e-5650. In this case, the VNI and the MAC address
are respectively the VNI after the re-encapsulation of the data frame and the destination MAC
address of the inner data frame.
Next, check BGP EVPN Type 2 routes.
# Check BGP EVPN Type 2 routes on Edge_1.
The command output shows a Type 2 route from 10.0.3.3, which contains the host MAC address
(000c-292e-b4a3) and host IP address (192.168.200.2), with the RD value being 23:20.
# Check detailed information about the Type 2 route 0:48:000c-292e-b4a3:32:192.168.200.2.
The command output shows that the route carries the L2VNI and L3VNI, as well as the export RT
bound to the EVPN instances on Edge_2. After receiving the route, Edge_1 compares the RT with the
import RT values of the local EVPN instance and IP VPN instance. The RT of the EVPN instance and IP
VPN instance (Edge_1_VPN_10_20) bound to BD 20 is matched. Because the route carries the host
IP address and host MAC address, Edge_1 adds the host MAC address to the MAC address table of
BD 20 and adds the host IP address to the routing table of the corresponding IP VPN instance.
By controlling the RT value, Edge_1 learns the MAC address entries and IP routes through Type 2 IRB
routes.
In this case, the data frame for communication between PC1 and PC2 is encapsulated by Edge_1.
The VNI carried in the VXLAN header is 1020, which is used to inform Edge_2 of the IP VPN instance
of packets. The destination MAC address of the inner data frame is the router MAC address carried
by BGP EVPN routes. Similar to the bridge MAC address of the device, the MAC address is used to
identify the device itself.
# Check the corresponding routing table of IP VPN instance Edge_2_VPN_10_20 on Edge_2.
After receiving the packet from Edge_1, Edge_2 checks the VNI in the VXLAN header and the
destination MAC address in the inner data frame, and finds that it needs to search the local routing
HCIE-Datacom Lab Guide Page 140
table before Layer 3 forwarding. Then, Edge_2 searches the routing table in the IP VPN instance
corresponding to VNI 1020 and finds a direct route.
# Check the ARP and MAC address tables on Edge_2.
-------------------------------------------------------------------------------
Total items displayed = 1
According to the search result, the data frame is re-encapsulated and sent out from the sub-
interface GE0/0/24.200 to ACC_2 for processing.
In this case, the destination MAC address of the data frame is the MAC address of PC2.
By now, the packet forwarding process from PC1 to PC2 is complete. During the entire process, both
the ingress VTEP (Edge_1) and egress VTEP (Edge_2) search the Layer 3 routing table and forward
the packets based on the search result. When packets are forwarded between VTEPs, the VNI
carried in the inner data frame is the L3VNI.
----End
5.3.3 Quiz
In distributed gateways, whether Layer 3 forwarding between VTEPs can be implemented during
communication in the same network segment?
HCIE-Datacom Lab Guide Page 141
As shown in the figure, the network consists of two parts: HQ and cloud.
HQ: ACC_1 and ACC_2 function as access devices that connect to wired terminals and provide
network services for wired users. AP1 is connected to ACC_2 to provide network services for wireless
users. Edge_1 and Edge_2 serve as aggregation devices, and Border functions as the core device.
HCIE-Datacom Lab Guide Page 142
AR3 works as both the campus egress and the DHCP server, which allocates IP addresses to other
devices and user terminals at the HQ.
Cloud: AR_Server_SW is used to simulate the cloud. It connects the HQ and iMaster NCE, and also
functions as the gateway of iMaster NCE.
VXLAN network: The network topology for this lab uses a distributed gateway model, in which
VXLAN is deployed across core and aggregation layers. Edge_1 and Edge_2 function as the edge
nodes of the VXLAN network, whereas Border functions as the border node of the VXLAN network.
After completing this lab, you can use the controller to centrally manage networks and services and
deliver configurations to devices.
This lab is relevant to the WAN deployment lab. Restore the environment after completing both this
lab and the WAN deployment lab.
6.1.1.3 Lab Plan
This section provides the plan for all the data required in subsequent steps. It is recommended that
you get familiar with the data plan.
6.1.1.3.1 AR3 Configuration Plan
Set an IP address for GE0/0/9 and configure a static route destined to iMaster NCE on AR3. AR3
works as the DHCP server, which allocates IP addresses to downstream devices and user terminals,
and notifies downstream devices of iMaster NCE's IP address and port number through DHCP Option
148.
PVID: VLAN 10
AR3 GE0/0/1 Hybrid Tagged VLAN: 130, 140, 150
Untagged VLAN: 10
VLAN 10 is used as the PVID to respond to the DHCP requests from the switches. VLANIF 130, VLANIF
140, and VLANIF 150 are the interconnection interfaces for connecting to external networks and
network service resources for VNs on Border.
GE0/0/9 65.0.0.3/24
AR3
VLANIF 10 172.16.10.254/24
Aggreg
Edge_1 W02140014081 S5731-H24T4XC LSW
ation
Aggreg
Edge_2 W02130010540 S5731-H24T4XC LSW
ation
Table 6-4 Plan for the global resource pool on the fabric network
Network Resource Value Description
Table 6-5 Plan for the automation resource pool on the underlay network
Resource Value Description
The policy template plan is as follows (including authentication templates and servers). The plan is
used to perform access authentication for users.
Table 6-8 Plan for the 802.1X and MAC address authentication profile
Parameter Value
Name Portal
A fabric network based on the campus network will be built in this lab. VXLAN is deployed across
core and aggregation switches on the fabric network, and the distributed VXLAN gateway
networking is used.
The plan for a fabric network is as follows.
Name HQ (customizable)
RR cluster ID 1
Border Border
Edge_1 Edge
Edge_2 Edge
ACC_1 Extended
ACC_2 Extended
In this lab, create two VNs based on the campus network: the OA network (for non-R&D office) and
RD network (for R&D office). Then create two external networks for users on the preceding VNs to
access external networks.
HCIE-Datacom Lab Guide Page 146
Moreover, configure DHCP network service resources for users on the preceding VNs to obtain IP
addresses.
Finally, configure an external server whose type is other and use the server to simulate an E-mail
server.
The external networks and network service resource plans are as follows.
Name OA (customizable)
VLAN 130
Name RD (customizable)
VLAN 140
Table 6-14 Plan for the network service resource (the DHCP server and other server)
Parameter Value
Mask 30
In this lab, the 802.1X or MAC address authentication will be performed on wired users, and the
Portal authentication will be performed on the wireless users. Only wired users are connected to
ACC_1 and both wired and wireless users are connected to ACC_2.
The plan for access management is as follows.
Parameter Value
Connected Device Type Terminal (PC, phone, dumb terminal, non-fabric extended
switch/AP)
Connected Device Type Terminal (PC, phone, dumb terminal, non-fabric extended
switch/AP)
Parameter Value
Creating a VN
Name OA (customizable)
HCIE-Datacom Lab Guide Page 149
Parameter Value
Network service resources DHCP_E-mail (use the created network service resources)
Manually Specified
User gateway 1
VLAN 100
Subnet 172.17.10.0/24
User gateway 2
VLAN 200
Subnet 172.17.20.0/24
User gateway 3
VLAN 110
Subnet 172.17.11.0/24
User gateway 4
VLAN 210
Subnet 172.17.21.0/24
Parameter Value
Wired access
Name OA (customizable)
Wireless access
Site HQ
Creating a VN
Name RD (customizable)
Network service resources DHCP_E-mail (use the created network service resources)
Name RD (customizable)
VLAN 300
Subnet 172.17.30.0/24
Wired access
Name RD (customizable)
Source VN OA
Destination VN RD
Parameter Value
RD user group
RD user group
VLAN 100
Parameter Value
VLAN 110
VLAN 200
VLAN 210
RD (802.1X authentication)
VLAN 300
Portal-HACA Disabled
Portal-HACA Disabled
HCIE-Datacom Lab Guide Page 154
Parameter Value
Portal-HACA Disabled
Portal-HACA Disabled
RD (802.1X authentication)
Portal-HACA Disabled
Mode in which an AP obtains the Negotiating the address of the controller automatically
address of the controller
Name: Sales
SSID Sales
Device Border
Name: Market
SSID Market
HCIE-Datacom Lab Guide Page 156
Parameter Value
Device Border
[AR3]vlan 10
# Configure the interface connecting AR3 to Border as a hybrid interface, add it to VLAN 10 in
untagged mode, and set PVID to 10.
[AR3]dhcp enable
[AR3]interface Vlanif10
[AR3-Vlanif10] ip address 172.16.10.254 255.255.255.0
[AR3-Vlanif10] dhcp select interface
[AR3-Vlanif10] dhcp server static-bind ip-address 172.16.10.1 mac-address 9400-b049-9ef2
[AR3-Vlanif10] dhcp server static-bind ip-address 172.16.10.2 mac-address d446-4982-348d
[AR3-Vlanif10] dhcp server static-bind ip-address 172.16.10.3 mac-address 80e1-bf0e-5652
[AR3-Vlanif10] dhcp server static-bind ip-address 172.16.10.4 mac-address 9400-b049-9d82
[AR3-Vlanif10] dhcp server static-bind ip-address 172.16.10.5 mac-address b008-750e-fbd0
[AR3-Vlanif10] dhcp server option 148 ascii agilemode=agile-cloud;agilemanage-mo
de=ip;agilemanage-domain=172.99.0.99;agilemanage-port=10020;
Configure the device to allocate IP addresses to downstream devices from the interface address pool
and notify the devices of the controller's IP address through Option 148.
HCIE-Datacom Lab Guide Page 159
Binding static IP addresses to downstream devices is optional. You can view the MAC address of the
VLANIF interface on a downstream device and use the address as a binding MAC address.
6.1.2.3.2 Pre-configuration for the DHCP Server (Used for Allocating IP Addresses to Hosts)
AR3 functions as a DHCP server to allocate IP addresses to hosts at the HQ site.
[AR3]ip pool RD
[AR3-ip-pool-RD] gateway-list 172.17.30.254
[AR3-ip-pool-RD] network 172.17.30.0 mask 255.255.255.0
[AR3-ip-pool-RD] quit
[AR3]vlan 150
HCIE-Datacom Lab Guide Page 160
[AR3]interface Vlanif150
[AR3-Vlanif150] ip address 192.168.150.1 255.255.255.252
[AR3-Vlanif150] dhcp select global
[AR3-Vlanif150] quit
[AR3]interface GigabitEthernet0/0/1
[AR3-GigabitEthernet0/0/1] port hybrid tagged vlan 150
[AR3]interface LoopBack1
[AR3-LoopBack1] ip address 172.17.3.3 32
[AR3]vlan 130
[AR3]interface Vlanif130
[AR3-Vlanif130] ip address 13.1.1.1 255.255.255.252
[AR3-Vlanif130] quit
[AR3]interface GigabitEthernet0/0/1
[AR3-GigabitEthernet0/0/1] port hybrid tagged vlan 130
Create a VLANIF interface for interconnection with the OA VN and allow the corresponding VLAN on
the physical interface.
# Complete RD VN-related configurations.
[AR3]vlan 140
[AR3]interface Vlanif140
[AR3-Vlanif140] ip address 14.1.1.1 255.255.255.252
[AR3-Vlanif140] quit
[AR3]interface GigabitEthernet0/0/1
[AR3-GigabitEthernet0/0/1] port hybrid tagged 140
Multiple VLANs have been used in the pre-configuration of AR3. For details about their functions,
see the following figure.
HCIE-Datacom Lab Guide Page 161
[AR3]interface GigabitEthernet0/0/9
[AR3-GigabitEthernet0/0/9] ip address 65.0.0.3 255.255.255.0
[AR3-GigabitEthernet0/0/9] quit
[AR3]acl 3000
[AR3-acl-adv-3000]rule permit ip
[AR3-acl-adv-3000]quit
[AR3]interface GigabitEthernet0/0/9
[AR3-GigabitEthernet0/0/9]nat outbound 3000
# Configure return routes destined to the host's network segment on the OA network.
# Configure a return route destined to the host's network segment on the RD network.
# Choose Deployment Scenario > Fabric Network on the home page to access the fabric network
configuration page, as shown in the following figure.
Choose Network Planning > Site Design to access the site design page. Click Create on this page to
create a site and add devices.
To ensure that iMaster NCE can manage the devices on the campus network successfully, create a
site and add devices at first. The devices added here should correspond to physical devices on the
campus network. You can add devices one by one manually, or import devices in batches.
# Select device types.
HCIE-Datacom Lab Guide Page 164
Note that WAC and LSW are mandatory in Device type. You are advised to select AR for the SD-WAN
lab in future.
Devices can be added by setting ESNs or device models.
S5731-H24P4XC and S5731-H24T4XC in this lab should be added by setting device models.
# Add S5731-H24P4XC and S5731-H24T4XC respectively by setting device models.
Choose Deployment Scenario > Fabric Network > Network Planning > Device Management to
access the device management page. The device status is normal (or an alarm exists). Because the
devices have been initialized, they can successfully register with iMaster NCE after a site is created
and devices are added to iMaster NCE.
Node: An AP cannot be onboarded because the access management configuration is not completed.
Therefore, how to onboard an AP is skipped in this section.
6.1.2.5 Campus Fabric and Underlay Network Automation
6.1.2.5.1 Configuration for Network Resources and Policy Templates
In this section, we will complete configurations of Policy Template and Resource Pool Configuration
in Network Planning. For details about parameters, see corresponding templates in the lab plan.
On the home page of iMaster NCE, choose Deployment Scenario > Fabric Network > Network
Planning > Fabric Global Resource Pool to access the configuration page of a fabric global resource
pool.
After adding a parameter setting, click + next to it.
Click Underlay Automation Resource Pool in the navigation on the top, set corresponding
parameters in the configuration page of the underlay automation resource pool, and click +.
Click RADIUS Server and Create in the navigation bar on the top. Complete the configuration of the
RADIUS server in the displayed window and click OK.
# Configure a Portal server.
Click Portal Server and Create on the current page. Complete the configuration of the Portal server
in the displayed window and click OK.
# Create an authentication template named MAC_802.1X.
HCIE-Datacom Lab Guide Page 168
Click Authentication Template and Create on the current page to create the 802.1X and MAC
address authentication template.
# Create an authentication template named Portal.
Click Authentication Template and Create on the current page to create a Portal authentication
template.
6.1.2.5.2 Configuration for a Fabric Network
Step 1 Create a fabric network and complete automatic deployment of an underlay network.
Create a fabric network according to the plan.
# Create a fabric network.
Click Fabric Network on the top of the page to access the fabric management page, and click Create
Fabric.
If there is no fabric network on the controller, a message will be displayed, indicating that a fabric
network should be created.
HCIE-Datacom Lab Guide Page 169
Click Apply.
# Add devices.
Click the icon numbered 1 to switch the view. Click Add Device to add switches to the fabric
network.
# Configure device roles.
On the displayed page, add the devices on the left to the right (select a device and click the button
numbered 1), and set the roles of switches according to the plan.
In this lab, Edge_1 and Edge_2 need to be specified as edge nodes (edge nodes on the VXLAN),
ACC_1 and ACC_2 need to be specified as extended nodes, and the core switch Border needs to be
specified as the border node which connects the fabric network with external networks.
# Complete automatic physical network deployment.
HCIE-Datacom Lab Guide Page 170
On the following page, enable Config Switch next to HQ and disable the authentication between
OSPF neighbors, then click Apply.
# Verify the configuration.
Click Configuration Status on the current page, and ensure that Configuration Status of all
configuration items is Success.
Choose Deployment Scenario > Fabric Network to access the configuration page of the fabric
network, and click the edit icon next to External Network and then click Create.
Configure the name of the external network, and enable Internet connection.
Set Core device to Border and click Add to configure the interconnection port.
Set Border device to Border on this page, indicating that Border is used as the border device to
connect to the external network.
Then click Add next to Interconnection port to configure the port used by the border device to
communicate with the external network, and then configure the connection information based on
the data plan.
HCIE-Datacom Lab Guide Page 173
Parameter descriptions:
1. Name: customizable, OA is used as an example here.
2. Border Port: port used by Border to connect to the external device (AR3 in this example) on the
external network.
3. VLAN: VLAN used by Border to connect to the external device on the external network.
4. IP address type: IPv4 is used as an example here, and you can select IPv4 or IPv6 as needed.
5. Local IPv4 address: IP address of the local interface used by Border to connect to the external
device on the external network. That is, the IP address of the VLANIF interface for the VLAN
used by Border to connect to the external network.
6. Remote IPv4 address: the peer device's IP address on the external network.
7. IPv4 address mask: mask of the IPv4 address.
Configure the interconnection port based on the plan, and click OK then Next.
HCIE-Datacom Lab Guide Page 174
The procedure for creating the external network RD is the same as that for the external network OA,
and is not described here. Configure it according to the plan.
Choose Deployment Scenario > Fabric Network to access the configuration page of the fabric
network, and click the edit icon next to Network Service Resources and then click Create.
Configure the DHCP server and E-mail server as planned, and click Next.
HCIE-Datacom Lab Guide Page 176
Complete the interconnection configuration as planned. Set Scenario to Directly connect to a switch
and click Complete to complete the creation of network service resources.
# Check the deployment status of network service resources.
To configure policy association between Edge_1/Edge_2 and ACC_1/ACC_2, you need to switch the
working mode of ACC_1/ACC_2 to the AS mode. By default, the working mode of S5731-H series
switches is parent, so you need to run the undo as-mode disable command to switch the working
mode.
# Access the Access Management page.
Choose Deployment Scenario > Fabric Network to access the fabric configuration page. Click Access
Management to access the access management configuration page. By default, an authentication
control point has been selected.
# Configure Edge_1 as an authentication control point.
Select GE0/0/24 (the interface connecting ACC_1 to terminals) in the Authentication enforcement
point device area and set Connected Device Type to Terminal (PC, phone, dumb terminal, non-
fabric extended switch/AP). Enable Inherit Authentication Template on Authentication Control
Point Port. GE0/0/24 on ACC_1 will use the authentication template of Edge_1 and work with
Edge_1 to complete the access authentication on terminals.
Click Apply in the lower right corner of the page to complete the access management configuration
of Edge_1.
# Configure Edge_2 as an authentication control point.
Select Edge_2 from the Authentication Control Point drop-down list box to access the configuration
page of Edge_2. Ensure that you have applied the configuration of Edge_1.
Select GE0/0/23 (the interface connecting ACC_2 to terminals) in the Authentication enforcement
point device area and set Connected Device Type to Terminal (PC, phone, dumb terminal, non-
fabric extended switch/AP). Enable Inherit Authentication Template on Authentication Control
Point Port. For an interface connected to an AP, configure only the connected device type.
# Check the fabric configuration delivery result.
Click Configuration Status in the upper right corner of the page to check the configuration delivery
result.
6.1.2.6 Overlay Network Automation
6.1.2.6.1 VN
In this part, create two VNs named OA and RD, associate them with corresponding external
networks and network service resources, and create gateways for users.
Switch the page to Logical Network, and click Create. On the Create VN page, set Name to OA, User-
defined VRF name to OA, Network service resources to DHCP_Email, and External network to OA.
Click Next under User gateway, click Manually Specified to configure the user gateway on the OA
VN.
HCIE-Datacom Lab Guide Page 181
The user gateway configuration of Sales_Wired is shown in the preceding figure. Repeat the
procedure to configure the other three user gateways.
Select ACC_1 and ACC_2. Add them to the Selected area and click OK.
HCIE-Datacom Lab Guide Page 183
Set the service VLAN for GE0/0/23 on ACC_2 to Dynamic VLAN. Click Apply.
# Configure wireless access.
HCIE-Datacom Lab Guide Page 184
On the home page of iMaster NCE, choose Deployment Scenario > Fabric Network, click Service
Deployment to access the service deployment page, and click Security Group/Resource Group on
the page.
# Create security groups.
Click Create to access the Create Security Group page, and set Name to Sales_Wired. Click OK.
Repeat the steps to create the other four security groups.
Click Policy Control to access the Policy Control Configuration page. Click Create to create a policy
matrix.
# Configure a policy matrix.
HCIE-Datacom Lab Guide Page 189
Choose Border, Edge_1, and Edge_2 from Device name. The communication between wired users is
applied through the policy matrix of Edge_1 and Edge_2. In this lab, Border functions as the AC, and
WLAN services are forwarded through a tunnel. Therefore, the policy matrix should also be
implemented on Border.
# Configure a policy matrix.
Set Default rights to Deny. Select Policy reversion and click OK.
On the home page of iMaster NCE, choose Deployment Scenario > Fabric Network. Click Service
Deployment. Click User Management to access the user management page.
# Create user groups.
Note: After creating a user group, click ROOT so that the newly created user group belongs to ROOT.
Otherwise, the user group is nested and created in the previous group.
# Create user accounts.
Take user kris (in the RD user group) as an example. Deselect Change password upon next login. For
users on the RD VN, Portal authentication is unnecessary, so deselect Portal in Available login mode.
Repeat the steps to create another two accounts in the corresponding user groups.
In this lab, you do not need to manually create authentication rules. The Default authentication rules
of the controller can be used as the authentication rules for all users directly.
However, the authentication rules should be modified in this example. Click Modify in the Operation
column next to the rule Default, and edit the default rules. Select the three authentication protocols
shown in the preceding figure.
Choose HQ, and add it to the Selected area. Then click OK.
The Sales_Wired_Result configuration is complete.
Repeat the same steps to create the other four authorization results and bind them to site HQ. Note
that the authorized VLANs and security groups in the four authorization results are different. You
must enter information according to the data plan of authorization results.
Set User access authorization to Wired. Enable Match user groups. Set Authorization result to
Sales_Wired_Result. After the configuration is complete, click OK.
Configure the other authorization rules based on the plan.
HCIE-Datacom Lab Guide Page 197
Choose Design > Device Management to add devices to the HQ site (select the NETCONF protocol).
Add an AP by setting ESN. It is normal that the AP cannot be onboarded and its status is unregistered
because related configurations are incomplete.
# Allocate an AP.
HCIE-Datacom Lab Guide Page 198
Choose Provision > Site Configuration > Switch > Fit AP Management. Click Border, and click Add to
allocate AP1 to Border.
# Create a subnet.
On the current page, click subnet. Then click Create to create a subnet for AP onboarding.
HCIE-Datacom Lab Guide Page 199
Set the subnet parameters according to the preceding figure. Through the subnet, the AP will obtain
IP addresses of the AC and the controller.
# Set the wireless PnP VLAN of Border.
HCIE-Datacom Lab Guide Page 200
On the current page, choose Site > Management VLAN, select Border, and click Modify.
Set Management VLAN auto-negotiation for wireless devices to 2. Border will deliver the
configuration to downstream devices through the LLDP protocol. After ACC_2 recognizes that
GE0/0/24 is connected to the AP, it automatically adds the AP to VLAN 2, and devices between
ACC_2 and Border will allow packets from VLAN 2 to pass through.
# Set the source address of the CAPWAP tunnel on the web page of Border.
HCIE-Datacom Lab Guide Page 201
[Border]display ap all
Total AP information:
nor : normal [1]
ExtraInfo : Extra information
P : insufficient power supply
---------------------------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime ExtraInfo
---------------------------------------------------------------------------------------------------------
0 f4de-af36-b580 AP1 default 172.16.20.183 AirEngine5760-10 nor 0 5H:13M:30S -
---------------------------------------------------------------------------------------------------------
AP1 is recognized and added to VLAN 2. After AP1 obtains the IP address and AC address from the
address pool on VLANIF 2, it registers with Border.
[AR3]interface GigabitEthernet0/0/9
[AR3-GigabitEthernet0/0/9] nat static protocol udp global current-interface 2000 inside 172.16.10.1 2000 netmask
255.255.255.255
HCIE-Datacom Lab Guide Page 202
172.16.10.1 is the VLANIF interface address of Border (obtained through DHCP). Static address
binding is configured on AR3 to use a fixed private IP address during mapping.
Choose Site Configuration > Switch > Authentication, and click Wireless Authentication. Configure
wireless authentication.
HCIE-Datacom Lab Guide Page 203
Complete Sales wireless authentication configurations as planned. Configurations for Market are the
same as that for Sales and are not described here.
# Check the configuration of wireless authentication.
HCIE-Datacom Lab Guide Page 204
To check the configuration of wireless authentication, pay attention to the authentication profile ID.
Associate the following-up configurations of wireless services on Border with corresponding profiles,
and remember the corresponding profile ID generated for different service SSIDs.
Choose Design > Device Management, select HQ, and click Border to access the device management
page.
Click Device Configuration in the upper right corner. The device management page is displayed.
(Some browsers may block the pop-up pages, pay attention to the prompt).
Then enter the user name and password to access the device management page.
Click Create.
On the page that is displayed, set SSID name to Sales, and click Apply.
The SSID profile Sales is created. Use the same method to create an SSID profile Market.
Click Create.
On the page that is displayed, set VAP profile parameters based on the plan (set the service VLAN ID
to 110 and set the forwarding mode to tunnel forwarding), and then click Apply.
# Bind the SSID profile to the VAP profile.
HCIE-Datacom Lab Guide Page 207
On the Profile Management tab page, select the created VAP profile, expand the profile, and click
SSID Profile. On SSID Profile displayed on the right, select SSID profile Sales and click Apply.
# Configure a security profile.
On VAP Profile, click Security Profile. Set Security Profile to default and Security policy to Open.
# Bind the authentication profile to the VAP profile.
On Profile Management, select the created VAP profile, expand the profile, and click Authentication
Profile. On the page displayed on the right, click ... next to Authentication Profile. In the displayed
dialog box, select the wireless authentication profile created for SSID: Sales on the controller.
The VAP profile of Sales is created. Use the same method to configure the VAP profile of Market.
Add the VAP profile Sales, then add the VAP profile Market.
HCIE-Datacom Lab Guide Page 209
Take PC1 as an example. Choose Control Panel > Network and Internet > Network and Sharing
Center > Change adapter settings in the operating system. Find the network adapter that connects
the terminal to the access switch. Right-click the network adapter and select Properties.
# Configure authenticate identity.
HCIE-Datacom Lab Guide Page 210
HCIE-Datacom Lab Guide Page 211
Click the Authentication tab page, and click Additional Settings. In the dialog box that is displayed,
select User authentication and click Replace credentials.
In the dialog box that is displayed, enter the user name and password created on iMaster NCE. The
following uses sales as an example.
# Log in to kris on PC1.
HCIE-Datacom Lab Guide Page 212
PS C:\Users\PC1\Desktop> ipconfig
Windows IP Configuration
The IP address obtained by PC1 belongs to the 172.17.30.0/24 network segment, which meets the
expectation.
# Log in to sales on PC2.
C:\Users\PC2>ipconfig
Windows IP Configuration
The IP address obtained by PC2 belongs to the 172.17.10.0/24 network segment, which meets the
expectation.
# Log in to market on PC2.
C:\Users\PC2>ipconfig
Windows IP Configuration
The IP address obtained by PC2 belongs to the 172.17.20.0/24 network segment, which meets the
expectation.
# View online users on Edge_1.
<Edge_1>display access-user
------------------------------------------------------------------------------------------------------
UserID Username IP address MAC Status
------------------------------------------------------------------------------------------------------
HCIE-Datacom Lab Guide Page 213
Basic:
User ID : 49170
User name : kris
Domain-name : default
User MAC : 000c-29b3-efea
User IP address : 172.17.30.225
User vpn-instance : RD
User IPv6 address : FE80::A46B:62F8:A696:B974
User IPv6 link local address : FE80::A46B:62F8:A696:B974
User access Interface : GigabitEthernet0/0/24
User vlan event : Success
QinQVlan/UserVlan : 0/300
User vlan source : server vlan
User access time : ****/**/** **:**:**
User accounting session ID : Edge_10002400000030019****0300012
User access type : 802.1x
AS ID :0
AS name : ACC_1
AS IP : 172.16.17.133
AS MAC : 9400-b049-9d80
AS Interface : GigabitEthernet0/0/24
Terminal Device Type : Data Terminal
Dynamic VLAN ID : 300
Dynamic group index(Effective): 5
Dynamic group name(Effective) : RD
Service Scheme Priority :0
AAA:
User authentication type : 802.1x authentication
Current authentication method : RADIUS
Current authorization method :-
Current accounting method : RADIUS
------------------------------------------------------------------------------
Total: 1, printed: 1
In the authorization information, check the authorized VLAN ID and security groups.
# Expand the Wi-Fi list, find the previously defined SSID Sales, and connect to the SSID.
# Check the IP address.
C:\Users\PC3>ipconfig
Windows IP Configuration
The obtained IP address belongs to network segment 172.17.11.0/24, which meets the expectation.
# Verify Portal authentication.
HCIE-Datacom Lab Guide Page 215
Users can open a browser and access any IP address (No DNS is deployed in this lab, so only an IP
address can be entered). The authentication point (switch Border) redirects the user access to the
Portal authentication page, because the user has not been authenticated.
HCIE-Datacom Lab Guide Page 216
Enter the user name sales and the password. The login is successful.
# Use the account market for authentication.
HCIE-Datacom Lab Guide Page 217
After connecting to the SSID Sales, use the account market for authentication. The authentication
will fail, because the authorization rules on the controller cannot be matched. By matching SSID with
user group information through authorization rules, the SSID can only be used for authentication for
the accounts in the user group Sales.
# Check the authenticated user on Border.
<Border>display access-user
------------------------------------------------------------------------------------------------------
UserID Username IP address MAC Status
------------------------------------------------------------------------------------------------------
32790 sales 172.17.11.70 200d-b04b-a0c0 Success
------------------------------------------------------------------------------------------------------
Total: 1, printed: 1
Use account sales for login again on PC3, and then check the access user on Border.
# Check detailed information of the user sales on Border.
AP name : AP1
Radio ID :1
AP MAC : f4de-af36-b580
SSID : Sales
Online time : 132(s)
Web-server IP address : 172.99.0.99
Dynamic group index(Effective): 2
Dynamic group name(Effective): Sales_Wireless
User inbound data flow(Packet): 365
User inbound data flow(Byte) : 33,637
User outbound data flow(Packet): 40
User outbound data flow(Byte) : 33,768
Service Scheme Priority :0
AAA:
User authentication type : WEB authentication
Current authentication method : RADIUS
Current authorization method :-
Current accounting method : RADIUS
------------------------------------------------------------------------------
Total: 1, printed: 1
Choose Monitoring > Terminal Authentication Logs on iMaster NCE. The Terminal Authentication
Logs page is displayed.
# Check Portal logs.
Filter RADIUS authentication logs by site and time. In the filtering result, you can check the failure
logs of PC3 using account market for login when connected to the SSID Sales, as well as the failure
reason.
6.1.2.9.2 Network Connectivity Verification
Verify whether free mobility takes effect through tests in the following scenarios.
1. Check whether PC1 can pass 802.1X authentication using the account kris. Check whether PC2
can pass 802.1X authentication using the account sales. Connect PC3 to the SSID Sales and use
the account sales for authentication.
2. Check whether PC1 can pass 802.1X authentication using the account kris. Check whether PC2
can pass 802.1X authentication using the account market. Connect PC3 to the SSID Market and
use the account market for authentication.
C:\Users\PC1>ping 172.17.3.3
C:\Users\PC2>ping 172.17.3.3
C:\Users\PC3>ping 172.17.3.3
Only PC1 cannot access the resource group E_mail in the test.
# Test the communication between wired and wireless sales users.
C:\Users\PC3>ipconfig
Windows IP Configuration
C:\Users\PC3>ping 172.17.10.138 -n 1
C:\Users\PC2>ipconfig
Windows IP Configuration
C:\Users\PC2>ping 172.17.11.70 -n 1
Login accounts on PC2 and PC3 both belong to the security group Sales and the VN OA. The policy
matrix has no limitation for mutual access.
# Test whether wired and wireless sales users can access VN RD.
C:\Users\PC2>ping 172.17.30.225 -n 1
C:\Users\PC3>ping 172.17.30.225 -n 1
HCIE-Datacom Lab Guide Page 222
C:\Users\PC2>ping 172.17.3.3 -n 1
C:\Users\PC3>ping 172.17.3.3 -n 1
C:\Users\PC2>ping 172.17.30.225 -n 1
C:\Users\PC3>ping 172.17.30.225 -n 1
As expected, PC2 can access the VN RD but PC3 cannot, which means the Market wired network can
be accessed but the Market wireless network cannot.
Except the default authentication rule Default, if other customized authentication rules exist, select
all the created rules and click Delete.
Step 1 Choose Admission > Admission Policy > Online User Control on iMaster NCE to access the
online user view. Select all users and choose More > Force Offline.
Step 2 Choose Admission > Admission Resources > User Management on iMaster NCE to access the
user management page.
HCIE-Datacom Lab Guide Page 224
Step 3 Choose Admission > Security Group on iMaster NCE to access the security group configuration
page. Select all created security groups and click Delete.
Step 2 Click to delete VNs one by one in the Operation column of every created VN.
Step 2 By default, choose Edge_1 from Authentication control point, scroll to the bottom of the
page, and click the Reset button to reset the access management configuration of Edge_1.
Step 3 Choose Edge_2 from Authentication control point, scroll to the bottom of the page, and click
the Reset button to reset the access management configuration of Edge_2.
Step 2 Click in the column of External Network. On the configuration page of external
networks, click next to the created external networks to delete all the external
networks.
Step 3 Click in the column of Network Service Resources on the fabric management page. On
the configuration page of network service resources, click next to the created network
service resources to delete them.
6.1.3.7 Deleting Devices on the Fabric Page and the Fabric Network
Step 1 Choose Provision > Fabric Management to access the fabric management page.
Step 2 On the current page, click on the right side and select all the nodes. Then click Delete
Device.
Step 3 Delete the current fabric network, as shown in the following figure.
HCIE-Datacom Lab Guide Page 225
6.1.3.8 Deleting the Fabric Global Resource Pool and Underlay Automation Resource
Pool
Step 1 Choose Design > Network Settings to access the network settings page. Select all the created
VLANs and click to delete them. Select all the created BDs and click to delete them.
Select all the created VNIs and click to delete them.
Step 2 Click Underlay Automation Resource Pool on the current page to access the configuration
page of underlay automation resource pool. Select all the created interconnection VLANs and
click to delete them. Select all the created interconnection IP addresses and click to
delete them. Select all the created loopback interface IP addresses and click to delete
them.
<Border>system-view
Enter system view, return user view with Ctrl+Z.
HCIE-Datacom Lab Guide Page 226
----End
6.1.4 Quiz
After a VN invokes network service resources configured on iMaster NCE, how do the underlying
configurations implement route reachability between the VN and network service resources?
HCIE-Datacom Lab Guide Page 227
AS number 65001
IP pool 100.0.0.0/24
Note that AR3 is the egress router of the HQ network and functions as an RR in the SD-WAN
scenario.
7.1.1.3.3 ZTP
After the ARs obtain the controller's IP address through DHCP and register with the controller,
configure ZTP on the controller by referring to the detailed parameter plan in the following table.
Role Active
Device AR1
Interface GE0/0/9
VN instance underlay_1
Role Active
Device AR1
Interface GE0/0/8
VN instance underlay_2
Parameter Value
Subnet mask 30
Role Active
Device AR2
Interface GE0/0/9
VN instance underlay_1
Role Active
Device AR1
Interface GE0/0/8
VN instance underlay_2
Parameter Value
Subnet mask 30
Role Active
Device AR3
Interface GE0/0/9
VN instance underlay_1
Subnet mask 24
Role Active
Device AR3
HCIE-Datacom Lab Guide Page 232
Parameter Value
Interface GE0/0/8
VN instance underlay_2
Subnet mask 30
Note that the AR at the HQ site functions as an RR and its interface IP addresses must be static IP
addresses.
7.1.1.3.4 LAN-WAN Interconnection
The following tables describe the LAN-WAN interconnection parameter plan for the HQ site:
Table 7-6 LAN-WAN interconnection parameter plan for the virtual network public
Parameter Value
VN: public
Interconnection interface 1
Gateway AR3
Gateway interface L2
VLAN ID 10
IP address 172.16.10.254/24
DHCP Enabled
Static Configured
Interconnection interface 2
Gateway AR3
HCIE-Datacom Lab Guide Page 233
Parameter Value
Gateway interface L2
VLAN ID 150
IP address 192.168.150.1/24
Table 7-7 LAN-WAN interconnection parameter plan for the virtual network OA
Parameter Value
VN: OA
Interconnection interface 1
Gateway AR3
Gateway interface L2
VLAN ID 130
IP address 13.1.1.1/30
Table 7-8 LAN-WAN interconnection parameter plan for the virtual network RD
Parameter Value
VN: RD
HCIE-Datacom Lab Guide Page 234
Parameter Value
Interconnection interface 1
Gateway AR3
Gateway interface L2
VLAN ID 140
IP address 14.1.1.1/30
The following table describes the LAN-WAN interconnection parameter plan for Branch2.
Table 7-9 LAN-WAN interconnection parameter plan for the virtual network OA
Parameter Value
VN: OA
Interconnection interface 1
Gateway AR2
Gateway interface L2
VLAN ID 200
IP address 172.19.20.254/24
DHCP Enabled
The following table describes the LAN-WAN interconnection parameter plan for Branch1.
Table 7-10 LAN-WAN interconnection parameter plan for the virtual network RD
Parameter Value
VN: RD
Interconnection interface 1
Gateway AR1
Gateway interface L2
HCIE-Datacom Lab Guide Page 235
Parameter Value
VLAN ID 300
IP address 172.18.30.254/24
DHCP Enabled
<AR3>factory-configuration reset
Warning: It will clean the configuration which you have saved. If you have set the factory-configuration by hand, it
will start from the modified factory-configuration, else it will start from the original one, when you restart the
device. Continue? [y/n]:y
Info: Successfully set factory config!
<AR3>reset saved-configuration
Warning: This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n):y
Info: Clear the configuration in the device successfully.
<AR3>reboot fast
System will reboot! Continue? [y/n]:y
[AR_Server_SW]vlan 650
[AR_Server_SW-vlan650] quit
[AR_Server_SW]interface GigabitEthernet0/0/1
[AR_Server_SW-GigabitEthernet0/0/1] description TO_AR
[AR_Server_SW-GigabitEthernet0/0/1] port default vlan 650
[AR_Server_SW-GigabitEthernet0/0/1] quit
[AR_Server_SW]interface GigabitEthernet0/0/2
[AR_Server_SW-GigabitEthernet0/0/2] description TO_AR
[AR_Server_SW-GigabitEthernet0/0/2] port default vlan 650
[AR_Server_SW-GigabitEthernet0/0/2] quit
[AR_Server_SW]interface GigabitEthernet0/0/3
[AR_Server_SW-GigabitEthernet0/0/3] description TO_AR
[AR_Server_SW-GigabitEthernet0/0/3] port default vlan 650
[AR_Server_SW-GigabitEthernet0/0/3] quit
# Enable DHCP globally, create VLANIF 650, enable DHCP on the interface, and configure static IP
address binding and Option 148.
[AR_Server_SW]dhcp enable
[AR_Server_SW]interface Vlanif650
[AR_Server_SW-Vlanif650] ip address 65.0.0.254 255.255.255.0
[AR_Server_SW-Vlanif650] dhcp select interface
[AR_Server_SW-Vlanif650] dhcp server static-bind ip-address 65.0.0.1 mac-address c8a7-7600-3e51
[AR_Server_SW-Vlanif650] dhcp server static-bind ip-address 65.0.0.2 mac-address c8a7-7600-3f64
[AR_Server_SW-Vlanif650] dhcp server static-bind ip-address 65.0.0.3 mac-address cc64-a651-7f1c
[AR_Server_SW-Vlanif650] dhcp server option 148 ascii agilemode=agile-cloud;agilemanage-
mode=ip;agilemanage-domain=172.99.0.99;agilemanage-port=10020;
# Create a VLAN and assign the interface connected to the controller to the VLAN.
[AR_Server_SW]vlan 99
[AR_Server_SW-vlan99] quit
[AR_Server_SW]interface Vlanif99
[AR_Server_SW-Vlanif99] ip address 172.99.0.254 255.255.255.0
PE1 10.0.1.1
PE2 10.0.2.2
PE3 10.0.3.3
PE4 10.0.4.4
P1 10.0.5.5
P2 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
HCIE-Datacom Lab Guide Page 238
<PE4>system-view immediately
<P1>system-view immediately
<P2>system-view immediately
Here, PE1 is used as an example. Repeat this operation for other devices.
By default, DCN is enabled on NE router interfaces. To facilitate the lab, disable DCN globally on all
devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1]ip address 10.0.0.5 30
[PE1-GigabitEthernet0/5/1] quit
[PE1]interface GigabitEthernet0/5/2
[PE1-GigabitEthernet0/5/2] ip address 10.0.0.30 30
[PE1-GigabitEthernet0/5/2] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE2]interface GigabitEthernet0/5/2
[PE2-GigabitEthernet0/5/2] ip address 10.0.0.34 255.255.255.252
[PE2-GigabitEthernet0/5/2] quit
[PE3]interface LoopBack0
HCIE-Datacom Lab Guide Page 239
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 30
[PE4-GigabitEthernet0/5/1] quit
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] ip address 10.0.0.6 30
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] ip address 10.0.0.17 30
[P1-GigabitEthernet0/5/2] quit
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 30
[P2-GigabitEthernet0/5/2] quit
HCIE-Datacom Lab Guide Page 240
# Test the connectivity between the interconnection interfaces on PE1, P2, and PE3.
[PE1]ping -c 1 10.0.0.6
PING 10.0.0.6: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.6: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE1]ping -c 1 10.0.0.2
PING 10.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.2: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.9
PING 10.0.0.9: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.9: bytes=56 Sequence=1 ttl=255 time=1 ms
[P2]ping -c 1 10.0.0.13
PING 10.0.0.13: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.13: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE3]ping -c 1 10.0.0.17
PING 10.0.0.17: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.17: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE3]ping -c 1 10.0.0.26
PING 10.0.0.26: 56 data bytes, press CTRL_C to break
HCIE-Datacom Lab Guide Page 241
The interface connectivity test succeeds. (The interconnection interfaces connected to the ARs are
not tested.)
# Configure PE2.
# Configure PE3.
HCIE-Datacom Lab Guide Page 242
# Configure PE4.
# Configure P1.
# Configure P2.
HCIE-Datacom Lab Guide Page 243
Total Nets: 15
Intra Area: 15 Inter Area: 0 ASE: 0 NSSA: 0
Total Nets: 15
Intra Area: 15 Inter Area: 0 ASE: 0 NSSA: 0
Total Nets: 15
Intra Area: 15 Inter Area: 0 ASE: 0 NSSA: 0
Add devices to the sites as planned. The ARs will obtain the controller's IP address from
AR_Server_SW upon startup and register with the controller.
Note: Ensure that AR1, AR2, and AR3 start with factory defaults. For details about how to restore
factory settings, refer to the previous lab. The devices need to register with the controller without
any input on the console port.
Choose Design > Network Settings from the main menu, click the Tunnel Mode tab, and switch the
tunnel mode to EVPN.
# View the home page.
After the tunnel mode is switched, Multi-Branch Interconnection is displayed in the Deployment
Scenario area on the controller's home page. This lab is performed using this wizard mode.
Click Create and create a site Branch1 (select AP, AR and LSW as device types).
Then repeat the preceding steps to create Branch2.
Click Device Management on the current navigation page and add the devices to the corresponding
sites.
HCIE-Datacom Lab Guide Page 249
Add devices by ESN. Note that the roles of AR1 and AR2 are gateways, and the role of AR3 is
Gateway+RR.
Add the three routers to the corresponding sites one by one.
Click ZTP on the navigation page, select Branch1 from the site list, and click Click to deploy.
Select DHCP Option for the ZTP mode and click Create.
HCIE-Datacom Lab Guide Page 250
In the displayed dialog box, configure the Internet link and MPLS link for Branch1 as planned and
then click OK in the lower right corner.
The configurations of other branches are similar and are not described here. Complete the
configurations as planned.
# Check the ZTP configuration result.
HCIE-Datacom Lab Guide Page 251
<AR_Server_SW>ping -c 1 65.0.0.1
PING 65.0.0.1: 56 data bytes, press CTRL_C to break
Reply from 65.0.0.1: bytes=56 Sequence=1 ttl=255 time=1 ms
<AR_Server_SW>ping -c 1 65.0.0.2
PING 65.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 65.0.0.2: bytes=56 Sequence=1 ttl=255 time=32 ms
<AR_Server_SW>ping -c 1 65.0.0.3
PING 65.0.0.3: 56 data bytes, press CTRL_C to break
Reply from 65.0.0.3: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE1]ping -c 1 10.0.0.29
PING 10.0.0.29: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.29: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE2]ping -c 1 10.0.0.33
PING 10.0.0.33: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.33: bytes=56 Sequence=1 ttl=255 time=1 ms
[PE3]ping -c 1 10.0.0.37
PING 10.0.0.37: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.37: bytes=56 Sequence=1 ttl=255 time=1 ms
Check whether IP addresses of ARs are successfully configured on AR_Server_SW, PE1, PE2, and PE3,
respectively.
# Check whether the ARs are online.
After ZTP is configured, the Internet and MPLS interfaces are bound to the corresponding VPN
instances and ARs can be onboarded again.
# Verify configurations.
HCIE-Datacom Lab Guide Page 253
If the device configuration status is Failure, click Re-deliver if Failed in the Operation column to re-
deliver the configuration.
If the deployment fails, you can restore the factory settings of the corresponding AR router. Log in to
the CLI of the AR router and run the following commands in sequence. After each command is
executed, the system prompts you to confirm the operation. Enter y to confirm the operation.
After the commands are executed, the AR router will restart and restore to factory defaults. Then
configure ZTP for the AR router again.
Click WAN Underlay on the navigation page, select Branch2 from the site list, and add underlay
routes.
HCIE-Datacom Lab Guide Page 254
The WAN-side underlay routes of Branch2 have been configured. Configure WAN-side underlay
routes for Branch1 and HQ in the same manner.
Click Inter-Site Networking on the navigation page to complete the configuration for connecting
branch sites to the RR.
7.1.2.7 Creating Virtual Network public
Create a virtual network named public. This virtual network is used to implement some functions of
AR3 described in 6 "VXLAN-based Virtualized Campus Network Deployment", including:
1. DHCP address pool and interface for device onboarding
2. DHCP address pool for terminal users
3. Source NAT for device onboarding
4. Destination NAT for Portal authentication
5. DHCP and E-mail services
Click Interconnection Configuration on the top navigation bar. On the page that is displayed, click
Create and create a VPN.
HCIE-Datacom Lab Guide Page 258
The VPN provides services only for the HQ site. Therefore, you only need to add the HQ site to
virtual network public. Then click OK.
# Configure virtual network public.
Click the virtual network name to access the virtual network configuration page.
Click WAN Service on the virtual network configuration page and complete WAN service
configurations.
Click LAN-WAN Interconnection on the virtual network configuration page and configure the
interconnection with Border on the fabric network. For details, see the AR3 pre-configuration and
external network configuration in 6 "VXLAN-based Virtualized Campus Network Deployment."
Configure LAN-WAN interconnection for virtual network public of the HQ as planned.
HCIE-Datacom Lab Guide Page 260
Enable DHCP, create Option 148, and click Value to configure the controller IP address.
HCIE-Datacom Lab Guide Page 261
agilemode=agile-cloud;agilemanage-mode=ip;agilemanage-domain=172.99.0.99;agilemanage-port=10020;
Configure MAC addresses for static binding. For details, see Pre-configuration for AR3 > Pre-
configuration for the DHCP Server (Used for Device Plug and Play) in 6 "VXLAN-based Virtualized
Campus Network Deployment."
The command output shows that the name of the VPN instance corresponding to virtual network
public on the controller GUI is vpn1.
# Create a DHCP address pool.
Click Interconnection Configuration on the top navigation bar. On the page that is displayed, click
Create and create a VPN.
HCIE-Datacom Lab Guide Page 265
The VPN provides services for the HQ site and Branch2. Add the HQ site and Branch2 to virtual
network OA. Then click OK. The VPN configuration is complete.
# Configure virtual network OA.
Click the virtual network name to access the virtual network configuration page.
Specify the HQ as the hub site, and click Add in the lower right corner to specify Branch2 as a branch
site.
HCIE-Datacom Lab Guide Page 266
Click WAN Service on the virtual network configuration page. On the displayed page, click the WAN
Route tab, and configure WAN routing policies as shown in the preceding figure.
Configure an IP prefix list to match the network segment 172.17.20.0/24 so that Branch2 can learn
only routes from wired marketing users at the HQ.
Configure return routes to the virtual network OA on the fabric of the HQ as planned. Then click
Apply.
# Configure LAN-WAN interconnection for Branch2.
HCIE-Datacom Lab Guide Page 269
Configure the LAN-WAN interconnection interface as planned and enable DHCP in the Advanced
Settings area.
Click Interconnection Configuration on the top navigation bar. On the page that is displayed, click
Create and create a VPN.
HCIE-Datacom Lab Guide Page 270
The VPN provides services for the HQ site and Branch1. Add the HQ site and Branch1 to virtual
network RD. Then click OK.
Click WAN Service, and specify the HQ as the hub site and Branch1 as the branch site.
Configure LAN-WAN interconnection as planned for the HQ to connect to virtual network RD on the
fabric network. Then click Apply.
Configure return routes to the virtual network RD on the fabric of the HQ as planned. Then click
Apply.
# Configure LAN-WAN interconnection for Branch1.
Configure the LAN-WAN interconnection interface as planned and enable DHCP in the Advanced
Settings area.
Allocate an IP address to PC4 through DHCP on the interface. Then click Apply.
7.1.2.10 Configuring Site-to-Internet Access and Fabric-related Functions
After local Internet access is configured, users can access the Internet through the local site, and
switches at the HQ site can register with iMaster NCE for onboarding.
The loopback interface simulating an E-mail server has been created in the AR3 pre-configuration in
6 "VXLAN-based Virtualized Campus Network Deployment". In the SD-WAN scenario, you need to
configure the loopback interface in virtual network public.
To implement Portal authentication for the fabric of the HQ site, configure NAT mapping for the
underlay network.
Choose Multi-Branch Interconnection > Traffic Policy > Overlay from the main menu, select virtual
network public, click the Site-to-Internet tab, and click Create in the Local Internet access area.
Select HQ.
Configure local Internet access through the Internet link and enable NAT.
HCIE-Datacom Lab Guide Page 274
Choose Design > Site Agile Deployment > Device Management from the main menu and view the
online status of devices at the HQ site.
In this case, all devices at the HQ site can access the Internet locally through virtual network public,
and communicate with iMaster NCE through source NAT, implementing device registration and
onboarding.
Choose Multi-Branch Interconnection > Traffic Policy > Underlay from the main menu, click the NAT
tab, select HQ, and configure static NAT.
HCIE-Datacom Lab Guide Page 278
Map UDP port 2000 of Border to the IP address of GE0/0/9 on AR3. In LAN-WAN interconnection,
static DHCP binding is configured for subsequent management and address mapping.
[AR3]interface LoopBack1
[AR3-LoopBack1] ip binding vpn-instance vpn1
[AR3-LoopBack1] ip address 172.17.3.3 32
[AR3-LoopBack1] quit
C:\Users\PC4>ipconfig
Windows IP Configuration
C:\Users\PC5>ipconfig
Windows IP Configuration
# Log in to PC1 using the account of the RD department and check the IP address of PC1.
C:\Users\PC1>ipconfig
Windows IP Configuration
C:\Users\PC4>ping 172.17.30.225
The command output shows that PC4 can properly communicate with PC1.
# Log in to PC2 using the account of the marketing department and check the IP address of PC2.
C:\Users\PC2>ipconfig
Windows IP Configuration
C:\Users\PC5>ping 172.17.20.167
The command output shows that PC5 can properly communicate with PC2.
# Connect PC3 to SSID Market and check the IP address of PC3 after authentication.
C:\Users\PC3>ipconfig
Windows IP Configuration
C:\Users\PC5>ping 172.17.21.81
The command output shows that PC5 cannot communicate with PC1.
# Log in to PC2 using the account of the sales department and check the IP address of PC2.
HCIE-Datacom Lab Guide Page 281
C:\Users\PC2>ipconfig
Windows IP Configuration
C:\Users\PC5>ping 172.17.10.198
The command output shows that PC5 cannot communicate with PC2.
7.1.2.11 Configuring Application Identification and Intelligent Traffic Steering
Step 1 Enable application identification and data reporting.
Enable application identification on the controller and enable the data reporting function on AR
routers.
# Enable application identification.
HCIE-Datacom Lab Guide Page 282
Choose Policy > Application Management > SAC Configuration from the main menu, and enable
application identification and FPI.
# Configure AR routers to report monitoring data.
HCIE-Datacom Lab Guide Page 283
The HQ site is used as an example. Choose Monitoring > Monitoring Settings > Monitoring Settings
from the main menu, select the HQ site and then Router. Enable the functions of reporting all
information, and select Station login and logout, Login and logout of cloud managed device, Device
operation, and Hardware fault.
Perform the same operations for Branch1 and Branch2.
Choose Policy > Application Management > Customized Application from the main menu, click
Create, and create customized applications FTP_definition and HTTP_definition.
HCIE-Datacom Lab Guide Page 284
In the preceding figure, the customized application HTTP_definition matches destination TCP port
8080.
# Create application groups.
Choose Policy > Application Management > Application Group from the main menu, and create an
application group.
Create application group FTP.
HCIE-Datacom Lab Guide Page 285
You can add pre-defined and customized applications to the application groups to ensure that both
the test traffic and actual service traffic can be identified.
Choose Policy > WAN Policy > Policy Template Management from the main menu and create a
traffic classifier template named HTTP.
Invoke application group HTTP. Use the same method to create traffic classifier template FTP and
invoke application group FTP.
HCIE-Datacom Lab Guide Page 287
Choose Policy > WAN Policy > Traffic Policy from the main menu and create an intelligent traffic
steering policy.
Set the policy name to RD_FTP, traffic classifier template to FTP, policy priority to 1, switchover
indicator to Custom, Packet loss rate to > 5%, Primary transport network list to Internet, and
Secondary transport network list to MPLS, and keep other parameters unchanged.
Then click OK.
# Associate the intelligent traffic steering policy with sites.
HCIE-Datacom Lab Guide Page 288
Set the policy name to OA_HTTP, traffic classifier template to HTTP, policy priority to 1, Primary
transport network list to MPLS, and Secondary transport network list to Internet, retain the default
value of the switchover indicators, and keep other parameters unchanged.
Then click OK.
# Associate the intelligent traffic steering policy with sites.
C:\Users\PC1>ipconfig
Windows IP Configuration
C:\Users\PC4>ipconfig
Windows IP Configuration
# Start the iPerf3 server process on PC1 and set the listening port number to 20.
Start iPerf3 in server mode, set the listening port number to 20, and bind the IP address of the port
to simulate the FTP server.
HCIE-Datacom Lab Guide Page 291
# Start the iPerf3 client process on PC4 to connect to the server process on PC1.
C:\Users\PC4>iperf3 -c 172.17.30.225 -t 20 -p 20 -i 2
Connecting to host 172.17.30.225, port 20
[ 4] local 172.18.30.27 port 53078 connected to 172.17.30.225 port 20
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-2.00 sec 180 MBytes 754 Mbits/sec
[ 4] 2.00-4.00 sec 188 MBytes 787 Mbits/sec
[ 4] 4.00-6.00 sec 188 MBytes 791 Mbits/sec
[ 4] 6.00-8.00 sec 189 MBytes 793 Mbits/sec
[ 4] 8.00-10.00 sec 189 MBytes 792 Mbits/sec
[ 4] 10.00-12.00 sec 189 MBytes 794 Mbits/sec
[ 4] 12.00-14.00 sec 189 MBytes 791 Mbits/sec
[ 4] 14.00-16.00 sec 189 MBytes 794 Mbits/sec
[ 4] 16.00-18.00 sec 188 MBytes 787 Mbits/sec
[ 4] 18.00-20.00 sec 188 MBytes 788 Mbits/sec
-------------------------
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-20.00 sec 1.83 GBytes 787 Mbits/sec sender
[ 4] 0.00-20.00 sec 1.83 GBytes 787 Mbits/sec receiver
iperf Done.
C:\Users\PC2>ipconfig
Windows IP Configuration
C:\Users\PC5>ipconfig
Windows IP Configuration
# Start the iPerf3 server process on PC2 and set the listening port number to 8080.
Start iPerf3 in server mode, set the listening port number to 8080, and bind the IP address of the
port.
# Start the iPerf3 client process on PC5 to connect to the server process on PC2.
iperf Done.
Choose Monitoring > Health > Inter-Site from the main menu and view the inter-site traffic.
HCIE-Datacom Lab Guide Page 293
Click the Site Interconnection tab and click Top 10 Links by Uplink Traffic. The page for viewing
inter-site traffic is displayed.
Click the icon in the upper left corner to switch to Branch2-HQ and view the HTTP traffic of OA users.
Click the Application tab, select a time range, click a specific application (such as HTTP_definition),
and view Throughput Trend on the right of the page.
It shows that traffic from Branch2 to the HQ is forwarded through the MPLS link as expected.
# Check the FTP traffic direction on virtual network RD.
HCIE-Datacom Lab Guide Page 294
Perform the same operations to view the throughput trend of FTP traffic from Branch1 to the HQ. It
shows that the traffic is forwarded through the Internet link as expected.
Limit the inbound traffic rate on the interface connecting AR_Server_SW to AR1 to the minimum
value.
# Perform a traffic test again on PC4.
C:\Users\PC4>iperf3 -c 172.17.30.225 -t 20 -p 20 -i 2
Connecting to host 172.17.30.225, port 20
[ 4] local 172.18.30.27 port 64173 connected to 172.17.30.225 port 20
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-2.01 sec 256 KBytes 1.04 Mbits/sec
[ 4] 2.01-4.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 4.01-6.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 6.01-8.02 sec 0.00 Bytes 0.00 bits/sec
[ 4] 8.02-10.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 10.01-12.00 sec 0.00 Bytes 0.00 bits/sec
[ 4] 12.00-14.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 14.01-16.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 16.01-18.01 sec 0.00 Bytes 0.00 bits/sec
[ 4] 18.01-20.01 sec 0.00 Bytes 0.00 bits/sec
-------------------------
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-20.01 sec 256 KBytes 105 Kbits/sec sender
[ 4] 0.00-20.01 sec 74.0 KBytes 30.3 Kbits/sec receiver
iperf Done.
HCIE-Datacom Lab Guide Page 295
Simulate traffic for multiple times. After a period of time, check the packet loss rate of the link.
Choose Monitoring > Health > Inter-Site from the main menu, click the Link tab, and view the link
quality of Branch1-HQ. It shows that the packet loss ratio of the Internet link is 41%.
# Perform a traffic test on PC4 again.
Simulate traffic transmission for a long time. It shows that the traffic rate becomes normal after
packets are lost for a period of time, indicating that traffic has been switched to the MPLS link.
# Check the link traffic distribution.
It shows that traffic between Branch1 and HQ is transmitted through both Internet and MPLS links.
# Check the throughput trend of an application.
It shows that traffic is switched from the Internet link to the MPLS link after packet loss.
Step 2 Set VN to RD, click Intelligent Traffic Steering, select policy RD_FTP, and click . The
policy is in the Delete Uncommitted state.
Step 3 Select policy RD_FTP and click Commit. On the page that is displayed, click OK. The policy is
deleted.
Step 4 Set VN to OA and perform the same operations to delete intelligent traffic steering policy
OA_HTTP.
HCIE-Datacom Lab Guide Page 297
Step 2 Select all traffic classifier templates and click Delete in the upper right corner.
Step 3 Choose Policy > Application Group from the main menu. The application group page is
displayed.
Step 4 Select all application groups and click Delete in the upper right corner.
Step 5 Choose Policy > Customized Application from the main menu. The customized application
page is displayed.
Step 6 Select all customized applications and click Delete in the upper right corner.
Step 2 Select virtual network public and click Site-to-Internet. In the Local Internet access area,
select site HQ and click to delete the Internet access configuration of the site.
Step 3 Perform the same operations to delete the Internet access configurations of virtual networks
OA and RD.
Step 4 Choose Multi-Branch Interconnection > Traffic Policy from the main menu and click the
Underlay tab.
Step 5 Click the NAT tab, select site HQ, click Static NAT, select the NAT policy, and click . The
NAT policy is deleted.
Step 2 Select virtual network OA, and click WAN Service. On the displayed page, delete Branch sites
and Hub sites.
Step 3 In the Branch sites area, select sites and click . The branch sites are deleted.
Step 4 In the Hub sites area, select sites and click . The HQ sites are deleted.
Step 5 Click OK at the bottom of the page. The WAN services of virtual network OA are deleted.
Step 6 Click LAN-WAN Interconnection. On the displayed page, select Branch2. On the
Interconnection Interface Configuration tab page, click Advanced Mode, and then click
Interconnection Route Configuration area, select and delete all routes, and then click
next to static. The interconnection routing protocol is deleted. On the Interconnection
Interface Configuration tab page, click Advanced Mode, and click . The interconnection
interface is deleted. Then click Apply at the bottom of the page.
Step 7 Click Back in the upper left corner of the page to go to the interconnection configuration page.
Click next to virtual network OA, select all sites under Selected Sites, click
to disassociate the sites from the virtual network, and click OK at the bottom of the page.
Step 8 Click next to virtual network OA. The virtual network is then deleted.
Step 9 Perform the same operations to delete virtual networks RD and public.
Step 2 Select Branch1 and Branch2 one by one and click . The branch sites are disconnected
from the RR site.
Step 2 Select site HQ, click the WAN Route tab, select all static routes, and click Delete to delete all
static routes. Then click next to IPv4 Static The WAN route of this type is deleted.
Step 3 Perform the same operations to delete WAN routes of Branch1 and Branch2.
Step 2 Select site HQ on the left of the page and click Clear WAN Configurations on the right of the
page. The ZTP configuration is deleted.
Step 3 Perform the same operations to delete ZTP configurations of Branch1 and Branch2.
Step 2 Select all ARs (AR1, AR2, and AR3) and click Delete Device. The devices are then deleted.
HCIE-Datacom Lab Guide Page 299
Step 2 Select the site to be deleted and click Delete. This lab is associated with VXLAN-based
virtualized campus network deployment. Therefore, delete the HQ site as required.
Step 2 In the IP pool area, click . In the displayed area, select an address pool and click
next to it. The address pool is deleted.
AR3 is used as an example. Restore other ARs to factory defaults in the same way.
7.1.3.12 Deleting Configurations of NE Routers
<P1>reset saved-configuration
Warning: The action will delete the saved configuration on the device.
The configuration will be erased to reconfigure.Continue? [Y/N]:y
Warning: Now clearing the configuration on the device.
Info: Succeeded in clearing the configuration on the device.
<P1>reboot
MPU 7:
Next startup system software: cfcard:/NetEngine8000-M6-V800R012C10SPC300.cc
Next startup saved-configuration file: NULL
HCIE-Datacom Lab Guide Page 300
P1 is used as an example. Restore other NEs to factory defaults in the same way.
----End
7.1.4 Quiz
In this lab, we can control traffic transmission between sites by controlling BGP EVPN route
transmission. In addition to this method, how can we control branch site access to a network
segment at the HQ?
HCIE-Datacom Lab Guide Page 301
8 SR-MPLS
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
10.0.X.X. The values indicated by X are listed in the table of the corresponding step.
Loopback1 is created on PE1 and PE4, with addresses being 10.1.1.1/32 and 10.1.4.4/32,
respectively, to simulate CE user access.
3. Configure MPLS. Specifically, enable MPLS and set MPLS LSR IDs on devices.
4. Configure SR. Specifically, enable SR globally, enable IS-IS extensions for SR, and configure node
SIDs.
5. Establish an MP-IBGP peer relationship between PE1 and P1, between PE1 and P2, between PE4
and P1, and between PE4 and P2. P1 and P2 function as RRs to reflect VPNv4 routes from PE1
and PE4.
6. Create a VPN instance named vpna, add Loopback1 to the VPN instance on PE1 and PE4, and
import direct routes to the BGP instance.
8.1.2.2 Configuration Procedure
Step 1 Complete basic device configuration.
Configure the command validation mode as immediate validation and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 interface addresses need to be configured
according to the following table.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
HCIE-Datacom Lab Guide Page 303
<P1>system-view immediately
<P2>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1]ip address 10.0.0.5 30
[PE1-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ip address 10.0.0.18 30
[PE3-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] undo shutdown
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 255.255.255.252
[PE4-GigabitEthernet0/5/1] quit
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] ip address 10.0.0.6 30
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] ip address 10.0.0.17 30
[P1-GigabitEthernet0/5/2] quit
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] undo shutdown
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 255.255.255.252
[PE1]isis 1
[PE1-isis-1] is-level level-2
[PE1-isis-1] cost-style wide
[PE1-isis-1] network-entity 49.0001.0001.0001.0001.00
[PE1-isis-1] is-name PE1
HCIE-Datacom Lab Guide Page 305
[PE1]interface LoopBack0
[PE1-LoopBack0] isis enable 1
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] isis enable 1
[PE1-GigabitEthernet0/5/0] isis circuit-type p2p
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] isis enable 1
[PE1-GigabitEthernet0/5/1] isis circuit-type p2p
[PE1-GigabitEthernet0/5/1] quit
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1]interface LoopBack0
[PE2-LoopBack0] isis enable 1
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] isis enable 1
[PE2-GigabitEthernet0/5/0] isis circuit-type p2p
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE3]isis 1
[PE3-isis-1] is-level level-2
[PE3-isis-1] cost-style wide
[PE3-isis-1] network-entity 49.0001.0003.0003.0003.00
[PE3-isis-1] is-name PE3
[PE3-isis-1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] isis enable 1
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] isis enable 1
[PE3-GigabitEthernet0/5/0] isis circuit-type p2p
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] isis enable 1
[PE3-GigabitEthernet0/5/1] isis circuit-type p2p
[PE3-GigabitEthernet0/5/1] quit
[PE4]isis 1
[PE4-isis-1] is-level level-2
HCIE-Datacom Lab Guide Page 306
[P1]isis 1
[P1-isis-1] is-level level-2
[P1-isis-1] cost-style wide
[P1-isis-1] network-entity 49.0001.0005.0005.0005.00
[P1-isis-1] is-name P1
[P1-isis-1] quit
[P1]interface LoopBack0
[P1-LoopBack0] isis enable 1
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] isis enable 1
[P1-GigabitEthernet0/5/0] isis circuit-type p2p
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] isis enable 1
[P1-GigabitEthernet0/5/1] isis circuit-type p2p
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] isis enable 1
[P1-GigabitEthernet0/5/2] isis circuit-type p2p
[P1-GigabitEthernet0/5/2] quit
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] quit
[P2]interface LoopBack0
[P2-LoopBack0] isis enable 1
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] isis enable 1
[P2-GigabitEthernet0/5/0] isis circuit-type p2p
[P2-GigabitEthernet0/5/0] quit
HCIE-Datacom Lab Guide Page 307
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
Total Peer(s): 3
Total Peer(s): 2
Total Peer(s): 2
-----------------------------
[P1]mpls
[PE1] segment-routing
[PE1-segment-routing] quit
[PE1] isis 1
[PE1-isis-1] segment-routing mpls
[PE1-isis-1] segment-routing global-block 16000 17000
[PE1-isis-1] quit
[PE1] interface LoopBack 0
[PE1-LoopBack0] isis prefix-sid index 1
[PE1-LoopBack0] quit
# Configure PE2.
[PE2] segment-routing
[PE2-segment-routing] quit
[PE2] isis 1
[PE2-isis-1] segment-routing mpls
[PE2-isis-1] segment-routing global-block 16000 17000
[PE2-isis-1] quit
[PE2] interface LoopBack 0
[PE2-LoopBack0] isis prefix-sid index 2
[PE2-LoopBack0] quit
# Configure PE3.
[PE3] segment-routing
[PE3-segment-routing] quit
[PE3] isis 1
[PE3-isis-1] segment-routing mpls
[PE3-isis-1] segment-routing global-block 16000 17000
[PE3-isis-1] quit
[PE3] interface LoopBack 0
[PE3-LoopBack0] isis prefix-sid index 3
[PE3-LoopBack0] quit
# Configure PE4.
[PE4] segment-routing
[PE4-segment-routing] quit
HCIE-Datacom Lab Guide Page 310
[PE4] isis 1
[PE4-isis-1] segment-routing mpls
[PE4-isis-1] segment-routing global-block 16000 17000
[PE4-isis-1] quit
[PE4] interface LoopBack 0
[PE4-LoopBack0] isis prefix-sid index 4
[PE4-LoopBack0] quit
# Configure P1.
[P1] segment-routing
[P1-segment-routing] quit
[P1] isis 1
[P1-isis-1] segment-routing mpls
[P1-isis-1] segment-routing global-block 16000 17000
[P1-isis-1] quit
[P1] interface LoopBack 0
[P1-LoopBack0] isis prefix-sid index 5
[P1-LoopBack0] quit
# Configure P2.
[P2] segment-routing
[P2-segment-routing] quit
[P2] isis 1
[P2-isis-1] segment-routing mpls
[P2-isis-1] segment-routing global-block 16000 17000
[P2-isis-1] quit
[P2] interface LoopBack 0
[P2-LoopBack0] isis prefix-sid index 6
[P2-LoopBack0] quit
# Run the display tunnel-info all command on PE1 to check SR LSP establishment.
Total information(s): 8
--- FEC: SEGMENT ROUTING IPV4 PREFIX 10.0.4.4/32 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/4/12 ms
# Create Loopback1, associate it with the VPN instance, and configure an IP address for the
interface.
[PE1]interface LoopBack 1
HCIE-Datacom Lab Guide Page 312
[PE4]interface LoopBack 1
[PE4-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack1]ip address 10.1.4.4 32
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
# Configure the MP-BGP VPNv4 peer relationships through Loopback0 and use the Loopback0
address as the router ID.
[PE1]bgp 65100
[PE1-bgp] router-id 10.0.1.1
[PE1-bgp] peer 10.0.5.5 as-number 65100
[PE1-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE1-bgp] peer 10.0.6.6 as-number 65100
[PE1-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE1-bgp] #
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE1-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 10.0.5.5 as-number 65100
[PE2-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] #
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE2-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE4]bgp 65100
[PE4-bgp] router-id 10.0.4.4
[PE4-bgp] peer 10.0.5.5 as-number 65100
[PE4-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE4-bgp] peer 10.0.6.6 as-number 65100
[PE4-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE4-bgp] #
[PE4-bgp] ipv4-family vpnv4
[PE4-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE4-bgp-af-vpnv4] peer 10.0.6.6 enable
[P1]bgp 65100
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 10.0.1.1 as-number 65100
[P1-bgp] peer 10.0.1.1 connect-interface LoopBack0
[P1-bgp] peer 10.0.2.2 as-number 65100
[P1-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P1-bgp] peer 10.0.3.3 as-number 65100
[P1-bgp] peer 10.0.3.3 connect-interface LoopBack0
[P1-bgp] peer 10.0.4.4 as-number 65100
[P1-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P1-bgp] #
[P1-bgp] ipv4-family vpnv4
[P1-bgp-af-vpnv4] undo policy vpn-target
[P1-bgp-af-vpnv4] peer 10.0.1.1 enable
[P1-bgp-af-vpnv4] peer 10.0.1.1 reflect-client
[P1-bgp-af-vpnv4] peer 10.0.2.2 enable
[P1-bgp-af-vpnv4] peer 10.0.2.2 reflect-client
[P1-bgp-af-vpnv4] peer 10.0.3.3 enable
[P1-bgp-af-vpnv4] peer 10.0.3.3 reflect-client
[P1-bgp-af-vpnv4] peer 10.0.4.4 enable
[P1-bgp-af-vpnv4] peer 10.0.4.4 reflect-client
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 10.0.1.1 as-number 65100
[P2-bgp] peer 10.0.1.1 connect-interface LoopBack0
[P2-bgp] peer 10.0.2.2 as-number 65100
[P2-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P2-bgp] peer 10.0.3.3 as-number 65100
[P2-bgp] peer 10.0.3.3 connect-interface LoopBack0
[P2-bgp] peer 10.0.4.4 as-number 65100
[P2-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P2-bgp] #
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] undo policy vpn-target
[P2-bgp-af-vpnv4] peer 10.0.1.1 enable
[P2-bgp-af-vpnv4] peer 10.0.1.1 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.2.2 enable
[P2-bgp-af-vpnv4] peer 10.0.2.2 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.3.3 enable
HCIE-Datacom Lab Guide Page 314
# Import the direct route of Loopback1 to BGP so that PE2 and PE4 can both learn the route of
Loopback1 from the peer PE.
PE1 has learned the VPNv4 route from PE4 through MP-BGP.
# Check the IP routing table on PE1.
The equal-cost routes to the network segment of the peer CE have been loaded to the VPN instance
routing table on PE1.
# Check route details.
Destination: 10.1.4.4/32
Protocol: IBGP Process ID : 0
Preference: 255 Cost : 0
NextHop: 10.0.4.4 Neighbour : 10.0.5.5
State: Active Adv Relied Age : 00h04m31s
Tag: 0 Priority : low
Label: 2141 QoSInfo : 0x0
IndirectID: 0x10000BA Instance :
RelayNextHop: 10.0.0.2 Interface : GigabitEthernet0/5/0
TunnelID: 0x000000002900000006 Flags : RD
RelayNextHop: 10.0.0.6 Interface : GigabitEthernet0/5/1
TunnelID: 0x000000002900000006 Flags : RD
HCIE-Datacom Lab Guide Page 316
The tunnel ID can be found. Based on previous tunnel information, you can determine that the
tunnel is an SR-MPLS BE tunnel.
# Check the connectivity between Loopback1 on PE1 and Loopback1 on PE4.
8.1.3 Quiz
In an L3VPNv4 over SR-MPLS BE scenario, will the outer label change during packet forwarding?
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
10.0.X.X. The values indicated by X are listed in the table of the corresponding step.
Loopback1 is created on PE1 and PE4, with addresses being 10.1.1.1/32 and 10.1.4.4/32,
respectively, to simulate CE user access.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
<P1>system-view immediately
<P2>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
HCIE-Datacom Lab Guide Page 319
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1]ip address 10.0.0.5 30
[PE1-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ip address 10.0.0.18 30
[PE3-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] undo shutdown
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 255.255.255.252
[PE4-GigabitEthernet0/5/1] quit
[P1]interface LoopBack0
HCIE-Datacom Lab Guide Page 320
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] undo shutdown
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 255.255.255.252
[PE1]isis 1
[PE1-isis-1] is-level level-2
[PE1-isis-1] cost-style wide
[PE1-isis-1] network-entity 49.0001.0001.0001.0001.00
[PE1-isis-1] is-name PE1
[PE1]interface LoopBack0
[PE1-LoopBack0] isis enable 1
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] isis enable 1
[PE1-GigabitEthernet0/5/0] isis circuit-type p2p
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] isis enable 1
[PE1-GigabitEthernet0/5/1] isis circuit-type p2p
[PE1-GigabitEthernet0/5/1] quit
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1]interface LoopBack0
[PE2-LoopBack0] isis enable 1
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] isis enable 1
[PE2-GigabitEthernet0/5/0] isis circuit-type p2p
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE3]isis 1
[PE3-isis-1] is-level level-2
[PE3-isis-1] cost-style wide
[PE3-isis-1] network-entity 49.0001.0003.0003.0003.00
[PE3-isis-1] is-name PE3
[PE3-isis-1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] isis enable 1
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] isis enable 1
[PE3-GigabitEthernet0/5/0] isis circuit-type p2p
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] isis enable 1
[PE3-GigabitEthernet0/5/1] isis circuit-type p2p
[PE3-GigabitEthernet0/5/1] quit
[PE4]isis 1
[PE4-isis-1] is-level level-2
[PE4-isis-1] cost-style wide
[PE4-isis-1] network-entity 49.0001.0004.0004.0004.00
[PE4-isis-1] is-name PE4
[PE4-isis-1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] isis enable 1
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] isis enable 1
[PE4-GigabitEthernet0/5/0] isis circuit-type p2p
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] isis enable 1
[PE4-GigabitEthernet0/5/1] isis circuit-type p2p
HCIE-Datacom Lab Guide Page 322
[PE4-GigabitEthernet0/5/1] quit
[P1]isis 1
[P1-isis-1] is-level level-2
[P1-isis-1] cost-style wide
[P1-isis-1] network-entity 49.0001.0005.0005.0005.00
[P1-isis-1] is-name P1
[P1-isis-1] quit
[P1]interface LoopBack0
[P1-LoopBack0] isis enable 1
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] isis enable 1
[P1-GigabitEthernet0/5/0] isis circuit-type p2p
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] isis enable 1
[P1-GigabitEthernet0/5/1] isis circuit-type p2p
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] isis enable 1
[P1-GigabitEthernet0/5/2] isis circuit-type p2p
[P1-GigabitEthernet0/5/2] quit
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] quit
[P2]interface LoopBack0
[P2-LoopBack0] isis enable 1
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] isis enable 1
[P2-GigabitEthernet0/5/0] isis circuit-type p2p
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
Total Peer(s): 3
Total Peer(s): 2
Total Peer(s): 2
[PE1] segment-routing
[PE1-segment-routing] quit
[PE1] isis 1
[PE1-isis-1] segment-routing mpls
[PE1-isis-1] segment-routing global-block 16000 17000
[PE1-isis-1] quit
[PE1] interface LoopBack 0
[PE1-LoopBack0] isis prefix-sid index 1
[PE1-LoopBack0] quit
# Configure PE2.
[PE2] segment-routing
[PE2-segment-routing] quit
[PE2] isis 1
[PE2-isis-1] segment-routing mpls
[PE2-isis-1] segment-routing global-block 16000 17000
[PE2-isis-1] quit
[PE2] interface LoopBack 0
[PE2-LoopBack0] isis prefix-sid index 2
[PE2-LoopBack0] quit
# Configure PE3.
[PE3] segment-routing
[PE3-segment-routing] quit
[PE3] isis 1
[PE3-isis-1] segment-routing mpls
[PE3-isis-1] segment-routing global-block 16000 17000
[PE3-isis-1] quit
[PE3] interface LoopBack 0
[PE3-LoopBack0] isis prefix-sid index 3
[PE3-LoopBack0] quit
# Configure PE4.
[PE4] segment-routing
[PE4-segment-routing] quit
[PE4] isis 1
[PE4-isis-1] segment-routing mpls
[PE4-isis-1] segment-routing global-block 16000 17000
[PE4-isis-1] quit
[PE4] interface LoopBack 0
[PE4-LoopBack0] isis prefix-sid index 4
[PE4-LoopBack0] quit
# Configure P1.
[P1] segment-routing
[P1-segment-routing] quit
[P1] isis 1
[P1-isis-1] segment-routing mpls
[P1-isis-1] segment-routing global-block 16000 17000
[P1-isis-1] quit
HCIE-Datacom Lab Guide Page 326
# Configure P2.
[P2] segment-routing
[P2-segment-routing] quit
[P2] isis 1
[P2-isis-1] segment-routing mpls
[P2-isis-1] segment-routing global-block 16000 17000
[P2-isis-1] quit
[P2] interface LoopBack 0
[P2-LoopBack0] isis prefix-sid index 6
[P2-LoopBack0] quit
[P1] segment-routing
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.6 remote-ip-addr 10.0.0.5 sid 142336
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.13 remote-ip-addr 10.0.0.14 sid 142337
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.17 remote-ip-addr 10.0.0.18 sid 142338
[P2] segment-routing
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.10 remote-ip-addr 10.0.0.9 sid 142336
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.14 remote-ip-addr 10.0.0.13 sid 142337
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.21 remote-ip-addr 10.0.0.22 sid 142338
Configure explicit paths on PE1 and PE4, specify the nodes that the paths must pass through by
specifying node and adjacency SIDs, create TE tunnel interfaces on PE1 and PE4, and associate the
interfaces with the configured explicit paths.
This experiment is implemented through CLIs and does not involve any controller. In scenarios
where a controller is used, the paths are typically computed by the controller.
# Create explicit paths and specify forcible forwarding paths.
Configure the explicit path PE1_PE4_Manual on PE1 and forcibly enable the path to pass through P1,
GE0/5/0 on P1, and GE0/5/2 on P2.
Configure the explicit path PE4_PE1_Manual on PE4 and forcibly enable the path to pass through
PE3, P1, GE0/5/0 on P1, GE0/5/1 on P2, and PE2.
# Enable MPLS TE globally.
[PE1]mpls
[PE1-mpls]mpls te
[PE4]mpls
[PE4-mpls]mpls te
Create tunnel interface 10 on PE1, configure the interface to borrow the Loopback0 IP address, set
the destination address to 10.0.4.4 (Loopback0 IP address of PE4), and associate the tunnel interface
with the explicit path PE1_PE4_Manual.
Create tunnel interface 10 on PE4, configure the interface to borrow the Loopback0 IP address, set
the destination address to 10.0.1.1 (Loopback0 IP address of PE4), and associate the tunnel interface
with the explicit path PE4_PE1_Manual.
# Check SR-MPLS TE tunnel status.
--- FEC: SEGMENT ROUTING TE TUNNEL IPV4 SESSION QUERY Tunnel10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/3/8 ms
LSP PING FEC: SEGMENT ROUTING TE TUNNEL IPV4 SESSION QUERY Tunnel10 : 100 data bytes, press CTRL_C
to break
Reply from 10.0.1.1: bytes=100 Sequence=1 time=8 ms
Reply from 10.0.1.1: bytes=100 Sequence=2 time=3 ms
Reply from 10.0.1.1: bytes=100 Sequence=3 time=3 ms
Reply from 10.0.1.1: bytes=100 Sequence=4 time=3 ms
Reply from 10.0.1.1: bytes=100 Sequence=5 time=3 ms
--- FEC: SEGMENT ROUTING TE TUNNEL IPV4 SESSION QUERY Tunnel10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/4/8 ms
# Create Loopback1, associate it with the VPN instance, and configure an IP address for the
interface.
[PE1]interface LoopBack 1
[PE1-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE1-LoopBack1]ip address 10.1.1.1 32
[PE4]interface LoopBack 1
[PE4-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack1]ip address 10.1.4.4 32
HCIE-Datacom Lab Guide Page 330
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
# Configure the MP-BGP VPNv4 peer relationships through Loopback0 and use the Loopback0
address as the router ID.
[PE1]bgp 65100
[PE1-bgp] router-id 10.0.1.1
[PE1-bgp] peer 10.0.5.5 as-number 65100
[PE1-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE1-bgp] peer 10.0.6.6 as-number 65100
[PE1-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE1-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 10.0.5.5 as-number 65100
[PE2-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE2-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE4]bgp 65100
[PE4-bgp] router-id 10.0.4.4
[PE4-bgp] peer 10.0.5.5 as-number 65100
[PE4-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE4-bgp] peer 10.0.6.6 as-number 65100
[PE4-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE4-bgp] ipv4-family vpnv4
[PE4-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE4-bgp-af-vpnv4] peer 10.0.6.6 enable
[P1]bgp 65100
HCIE-Datacom Lab Guide Page 331
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 10.0.1.1 as-number 65100
[P2-bgp] peer 10.0.1.1 connect-interface LoopBack0
[P2-bgp] peer 10.0.2.2 as-number 65100
[P2-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P2-bgp] peer 10.0.3.3 as-number 65100
[P2-bgp] peer 10.0.3.3 connect-interface LoopBack0
[P2-bgp] peer 10.0.4.4 as-number 65100
[P2-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] undo policy vpn-target
[P2-bgp-af-vpnv4] peer 10.0.1.1 enable
[P2-bgp-af-vpnv4] peer 10.0.1.1 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.2.2 enable
[P2-bgp-af-vpnv4] peer 10.0.2.2 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.3.3 enable
[P2-bgp-af-vpnv4] peer 10.0.3.3 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.4.4 enable
[P2-bgp-af-vpnv4] peer 10.0.4.4 reflect-client
# Import the direct route of Loopback1 to BGP so that PE2 and PE4 can both learn the route of
Loopback1 from the peer PE.
PE1 has learned the VPNv4 route from PE4 through MP-BGP.
# Check the VPN instance routing tables on PE1 and PE4.
------------------------------------------------------------------------------
Routing Table : vpna
Destinations : 4 Routes : 4
[PE1] tunnel-policy p1
[PE1-tunnel-policy-p1] tunnel select-seq sr-te load-balance-number 1
[PE1-tunnel-policy-p1] quit
[PE4] tunnel-policy p1
[PE4-tunnel-policy-p1] tunnel select-seq sr-te load-balance-number 1
[PE4-tunnel-policy-p1] quit
The routes from PE1 and PE4 to the network segment of the remote CE have recursed to SR-MPLS TE
tunnels.
# Verify the connectivity.
----End
HCIE-Datacom Lab Guide Page 335
8.2.3 Quiz
In an SR-MPLS TE scenario, how can we forcibly forward packets through a specific interface on a
specific device?
HCIE-Datacom Lab Guide Page 336
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 10.0.0.Y/30, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
10.0.X.X. The values indicated by X are listed in the table of the corresponding step.
Loopback1 is created on PE1 and PE4, with addresses being 10.1.1.1/32 and 10.1.4.4/32,
respectively, to simulate CE user access.
L3VPNv4 traffic between PE1 and PE4 enters the WAN bearer network through SR-MPLS Policies.
Multiple candidate paths are configured to ensure high service reliability. In addition, multiple
segment lists are configured for candidate path 1 to ensure high path reliability.
5. Configure candidate paths on PE2 and PE4 and reference these candidate paths in SR-MPLS
Policies.
6. Configure a VPN instance, add Loopback1 on PE1 and PE4 to the instance, and establish a
VPNv4 peer relationship between PE1 and P1, between PE1 and P2, between PE4 and P1, and
between PE4 and P2.
7. Configure a tunnel selection policy to recurse L3VPN traffic to specified SR-MPLS Policies.
8.3.2.2 Configuration Procedure
Step 1 Complete basic device configuration.
Configure the command validation mode as immediate validation and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 interface addresses need to be configured
according to the following table.
PE1 1 10.0.1.1
PE2 2 10.0.2.2
PE3 3 10.0.3.3
PE4 4 10.0.4.4
P1 5 10.0.5.5
P2 6 10.0.6.6
<PE1>system-view immediately
<PE2>system-view immediately
<PE3>system-view immediately
<PE4>system-view immediately
<P1>system-view immediately
HCIE-Datacom Lab Guide Page 338
<P2>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IP addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ip address 10.0.1.1 32
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0]ip address 10.0.0.1 30
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1]ip address 10.0.0.5 30
[PE1-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ip address 10.0.2.2 32
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ip address 10.0.0.2 30
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ip address 10.0.0.9 30
[PE2-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] ip address 10.0.3.3 32
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ip address 10.0.0.25 30
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ip address 10.0.0.18 30
[PE3-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ip address 10.0.4.4 32
[PE4-LoopBack0] quit
HCIE-Datacom Lab Guide Page 339
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] ip address 10.0.0.26 30
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] undo shutdown
[PE4-GigabitEthernet0/5/1] ip address 10.0.0.22 255.255.255.252
[PE4-GigabitEthernet0/5/1] quit
[P1]interface LoopBack0
[P1-LoopBack0] ip address 10.0.5.5 32
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ip address 10.0.0.13 30
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] ip address 10.0.0.6 30
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] ip address 10.0.0.17 30
[P1-GigabitEthernet0/5/2] quit
[P2]interface LoopBack0
[P2-LoopBack0] ip address 10.0.6.6 32
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ip address 10.0.0.14 30
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ip address 10.0.0.10 30
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] undo shutdown
[P2-GigabitEthernet0/5/2] ip address 10.0.0.21 255.255.255.252
[PE1]isis 1
[PE1-isis-1] is-level level-2
[PE1-isis-1] cost-style wide
[PE1-isis-1] network-entity 49.0001.0001.0001.0001.00
[PE1-isis-1] is-name PE1
[PE1]interface LoopBack0
[PE1-LoopBack0] isis enable 1
[PE1-LoopBack0] quit
HCIE-Datacom Lab Guide Page 340
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] isis enable 1
[PE1-GigabitEthernet0/5/0] isis circuit-type p2p
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] isis enable 1
[PE1-GigabitEthernet0/5/1] isis circuit-type p2p
[PE1-GigabitEthernet0/5/1] quit
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1]interface LoopBack0
[PE2-LoopBack0] isis enable 1
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] isis enable 1
[PE2-GigabitEthernet0/5/0] isis circuit-type p2p
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE3]isis 1
[PE3-isis-1] is-level level-2
[PE3-isis-1] cost-style wide
[PE3-isis-1] network-entity 49.0001.0003.0003.0003.00
[PE3-isis-1] is-name PE3
[PE3-isis-1] quit
[PE3]interface LoopBack0
[PE3-LoopBack0] isis enable 1
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] isis enable 1
[PE3-GigabitEthernet0/5/0] isis circuit-type p2p
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] isis enable 1
[PE3-GigabitEthernet0/5/1] isis circuit-type p2p
[PE3-GigabitEthernet0/5/1] quit
[PE4]isis 1
[PE4-isis-1] is-level level-2
[PE4-isis-1] cost-style wide
[PE4-isis-1] network-entity 49.0001.0004.0004.0004.00
[PE4-isis-1] is-name PE4
HCIE-Datacom Lab Guide Page 341
[PE4-isis-1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] isis enable 1
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] isis enable 1
[PE4-GigabitEthernet0/5/0] isis circuit-type p2p
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] isis enable 1
[PE4-GigabitEthernet0/5/1] isis circuit-type p2p
[PE4-GigabitEthernet0/5/1] quit
[P1]isis 1
[P1-isis-1] is-level level-2
[P1-isis-1] cost-style wide
[P1-isis-1] network-entity 49.0001.0005.0005.0005.00
[P1-isis-1] is-name P1
[P1-isis-1] quit
[P1]interface LoopBack0
[P1-LoopBack0] isis enable 1
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] isis enable 1
[P1-GigabitEthernet0/5/0] isis circuit-type p2p
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] isis enable 1
[P1-GigabitEthernet0/5/1] isis circuit-type p2p
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] isis enable 1
[P1-GigabitEthernet0/5/2] isis circuit-type p2p
[P1-GigabitEthernet0/5/2] quit
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] quit
[P2]interface LoopBack0
[P2-LoopBack0] isis enable 1
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] isis enable 1
[P2-GigabitEthernet0/5/0] isis circuit-type p2p
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
HCIE-Datacom Lab Guide Page 342
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
Total Peer(s): 3
Total Peer(s): 2
Total Peer(s): 2
--------------------------------
[PE1] segment-routing
[PE1-segment-routing] quit
[PE1] isis 1
[PE1-isis-1] segment-routing mpls
[PE1-isis-1] segment-routing global-block 16000 17000
[PE1-isis-1] quit
[PE1] interface LoopBack 0
[PE1-LoopBack0] isis prefix-sid index 1
[PE1-LoopBack0] quit
# Configure PE2.
[PE2] segment-routing
[PE2-segment-routing] quit
[PE2] isis 1
[PE2-isis-1] segment-routing mpls
[PE2-isis-1] segment-routing global-block 16000 17000
[PE2-isis-1] quit
[PE2] interface LoopBack 0
[PE2-LoopBack0] isis prefix-sid index 2
[PE2-LoopBack0] quit
# Configure PE3.
[PE3] segment-routing
[PE3-segment-routing] quit
[PE3] isis 1
[PE3-isis-1] segment-routing mpls
[PE3-isis-1] segment-routing global-block 16000 17000
[PE3-isis-1] quit
[PE3] interface LoopBack 0
[PE3-LoopBack0] isis prefix-sid index 3
[PE3-LoopBack0] quit
# Configure PE4.
[PE4] segment-routing
[PE4-segment-routing] quit
[PE4] isis 1
[PE4-isis-1] segment-routing mpls
[PE4-isis-1] segment-routing global-block 16000 17000
[PE4-isis-1] quit
[PE4] interface LoopBack 0
[PE4-LoopBack0] isis prefix-sid index 4
[PE4-LoopBack0] quit
HCIE-Datacom Lab Guide Page 345
# Configure P1.
[P1] segment-routing
[P1-segment-routing] quit
[P1] isis 1
[P1-isis-1] segment-routing mpls
[P1-isis-1] segment-routing global-block 16000 17000
[P1-isis-1] quit
[P1] interface LoopBack 0
[P1-LoopBack0] isis prefix-sid index 5
[P1-LoopBack0] quit
# Configure P2.
[P2] segment-routing
[P2-segment-routing] quit
[P2] isis 1
[P2-isis-1] segment-routing mpls
[P2-isis-1] segment-routing global-block 16000 17000
[P2-isis-1] quit
[P2] interface LoopBack 0
[P2-LoopBack0] isis prefix-sid index 6
[P2-LoopBack0] quit
[P1] segment-routing
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.6 remote-ip-addr 10.0.0.5 sid 142336
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.13 remote-ip-addr 10.0.0.14 sid 142337
[P1-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.17 remote-ip-addr 10.0.0.18 sid 142338
HCIE-Datacom Lab Guide Page 346
[P2] segment-routing
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.10 remote-ip-addr 10.0.0.9 sid 142336
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.14 remote-ip-addr 10.0.0.13 sid 142337
[P2-segment-routing] ipv4 adjacency local-ip-addr 10.0.0.21 remote-ip-addr 10.0.0.22 sid 142338
To reach PE4, segment lists 1, 2, and 3 need to pass through P1 and PE3, P1 and P2, and PE2 and P2,
respectively. Segment lists 1 and 2 form candidate path 1, and segment list 3 forms candidate path
2.
# Configure segment lists and candidate paths on PE4.
[PE4]segment-routing
[PE4-segment-routing] segment-list PE4_PE1_1
[PE4-segment-routing-segment-list-PE4_PE1_1] index 10 sid label 16003
[PE4-segment-routing-segment-list-PE4_PE1_1] index 20 sid label 16005
[PE4-segment-routing-segment-list-PE4_PE1_1] index 30 sid label 142336
[PE4-segment-routing-segment-list-PE4_PE1_1] quit
[PE4-segment-routing] segment-list PE4_PE1_2
[PE4-segment-routing-segment-list-PE4_PE1_2] index 10 sid label 16006
[PE4-segment-routing-segment-list-PE4_PE1_2] index 20 sid label 142337
[PE4-segment-routing-segment-list-PE4_PE1_2] index 30 sid label 142336
[PE4-segment-routing-segment-list-PE4_PE1_2] quit
[PE4-segment-routing] segment-list PE4_PE1_3
[PE4-segment-routing-segment-list-PE4_PE1_3] index 10 sid label 16006
[PE4-segment-routing-segment-list-PE4_PE1_3] index 20 sid label 142336
[PE4-segment-routing-segment-list-PE4_PE1_3] index 30 sid label 16001
HCIE-Datacom Lab Guide Page 347
[PE4-segment-routing-segment-list-PE4_PE1_3] quit
[PE4-segment-routing] sr-te policy p1 endpoint 10.0.1.1 color 100
[PE4-segment-routing-te-policy-p1] candidate-path preference 100
[PE4-segment-routing-te-policy-p1-path] segment-list PE4_PE1_1
[PE4-segment-routing-te-policy-p1-path] segment-list PE4_PE1_2
[PE4-segment-routing-te-policy-p1-path] quit
[PE4-segment-routing-te-policy-p1] candidate-path preference 50
[PE4-segment-routing-te-policy-p1-path] segment-list PE4_PE1_3
To reach PE1, segment lists 1, 2, and 3 need to pass through PE3 and P1, P2 and P1, and P2 and PE2,
respectively. Segment lists 1 and 2 form candidate path 1, and segment list 3 forms candidate path
2.
# Create Loopback1, associate it with the VPN instance, and configure an IP address for the
interface.
[PE1]interface LoopBack 1
[PE1-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE1-LoopBack1]ip address 10.1.1.1 32
[PE4]interface LoopBack 1
[PE4-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack1]ip address 10.1.4.4 32
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
HCIE-Datacom Lab Guide Page 348
# Configure the MP-BGP VPNv4 peer relationships through Loopback0 and use the Loopback0
address as the router ID.
[PE1]bgp 65100
[PE1-bgp] router-id 10.0.1.1
[PE1-bgp] peer 10.0.5.5 as-number 65100
[PE1-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE1-bgp] peer 10.0.6.6 as-number 65100
[PE1-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE1-bgp] #
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE1-bgp-af-vpnv4] peer 10.0.6.6 enable
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 10.0.5.5 as-number 65100
[PE2-bgp] peer 10.0.5.5 connect-interface LoopBack0
[PE2-bgp] peer 10.0.6.6 as-number 65100
[PE2-bgp] peer 10.0.6.6 connect-interface LoopBack0
[PE2-bgp] #
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.0.5.5 enable
[PE2-bgp-af-vpnv4] peer 10.0.6.6 enable
[P1]bgp 65100
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 10.0.1.1 as-number 65100
HCIE-Datacom Lab Guide Page 349
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 10.0.1.1 as-number 65100
[P2-bgp] peer 10.0.1.1 connect-interface LoopBack0
[P2-bgp] peer 10.0.2.2 as-number 65100
[P2-bgp] peer 10.0.2.2 connect-interface LoopBack0
[P2-bgp] peer 10.0.3.3 as-number 65100
[P2-bgp] peer 10.0.3.3 connect-interface LoopBack0
[P2-bgp] peer 10.0.4.4 as-number 65100
[P2-bgp] peer 10.0.4.4 connect-interface LoopBack0
[P2-bgp] #
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] undo policy vpn-target
[P2-bgp-af-vpnv4] peer 10.0.1.1 enable
[P2-bgp-af-vpnv4] peer 10.0.1.1 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.2.2 enable
[P2-bgp-af-vpnv4] peer 10.0.2.2 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.3.3 enable
[P2-bgp-af-vpnv4] peer 10.0.3.3 reflect-client
[P2-bgp-af-vpnv4] peer 10.0.4.4 enable
[P2-bgp-af-vpnv4] peer 10.0.4.4 reflect-client
# Import the direct route of Loopback1 to BGP so that PE2 and PE4 can both learn the route of
Loopback1 from the peer PE.
PE1 has learned the VPNv4 route from PE4 through MP-BGP.
# Check the VPN instance routing tables on PE1 and PE4.
HCIE-Datacom Lab Guide Page 351
[PE1]tunnel-policy p1
[PE1-tunnel-policy-p1] tunnel select-seq sr-te-policy load-balance-number 1 unmix
[PE4] tunnel-policy p1
[PE4-tunnel-policy-p1] tunnel select-seq sr-te-policy load-balance-number 1 unmix
# Set the default color for the route in the VPN instance.
To enable the route in the VPN instance to recurse to the corresponding SR-MPLS Policy, you can use
a route-policy to set a color value for the route or set the default color value for the route in the
local VPN instance. The second method is used in this example.
# Check the VPN instance IP routing tables on PE1 and PE4.
[PE1]bfd
[PE1-bfd]quit
[PE1]sbfd
[PE1-sbfd]reflector discriminator 10.0.1.1
[PE1-sbfd]quit
[PE1]segment-routing
[PE1-segment-routing]sr-te-policy seamless-bfd enable
[PE1-segment-routing]quit
[PE4]bfd
[PE4-bfd]quit
[PE4]sbfd
[PE4-sbfd]reflector discriminator 10.0.4.4
[PE4-sbfd]quit
[PE4]segment-routing
HCIE-Datacom Lab Guide Page 354
Set the reflection address of SBFD to the local MPLS LSR ID.
# Configure hot standby.
[PE1]segment-routing
[PE1-segment-routing]sr-te-policy backup hot-standby enable
[PE4]segment-routing
[PE4-segment-routing]sr-te-policy backup hot-standby enable
Candidate-path Preference: 50
Path State : Active Path Type : Backup
Protocol-Origin : Configuration(30) Originator : 0, 0.0.0.0
Discriminator : 50 Binding SID :-
GroupId : 8194 Policy Name : p1
Template ID :-
Segment-List Count :1
HCIE-Datacom Lab Guide Page 355
Segment-List : PE1_PE4_3
Segment-List ID : 16387 XcIndex : 2016387
List State : Up BFD State : UP
EXP :- TTL :-
DeleteTimerRemain : -
Label : 16002, 16006, 142338
In this case, all candidate paths and segment lists are up, and candidate path 1 is the primary one.
# Shut down GE0/5/2 on P1.
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2]shutdown
[P1-GigabitEthernet0/5/2]quit
Candidate-path Preference: 50
Path State : Active Path Type : Backup
Protocol-Origin : Configuration(30) Originator : 0, 0.0.0.0
Discriminator : 50 Binding SID :-
GroupId : 8194 Policy Name : p1
Template ID :-
Segment-List Count :1
HCIE-Datacom Lab Guide Page 356
Segment-List : PE1_PE4_3
Segment-List ID : 16387 XcIndex : 2016387
List State : Up BFD State : UP
EXP :- TTL :-
DeleteTimerRemain : -
Label : 16002, 16006, 142338
Candidate path 1 is still the primary one, but the first segment list has gone down.
# Test the service connectivity.
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] shutdown
DeleteTimerRemain : -
Label : 16005, 142338, 16004
Segment-List : PE1_PE4_2
Segment-List ID : 16386 XcIndex : 2016386
List State : Down (BFD Down) BFD State : DOWN
EXP :- TTL :-
DeleteTimerRemain : -
Label : 16005, 142337, 142338
Candidate-path Preference: 50
Path State : Active Path Type : Primary
Protocol-Origin : Configuration(30) Originator : 0, 0.0.0.0
Discriminator : 50 Binding SID :-
GroupId : 8194 Policy Name : p1
Template ID :-
Segment-List Count :1
Segment-List : PE1_PE4_3
Segment-List ID : 16387 XcIndex : 2016387
List State : Up BFD State : UP
EXP :- TTL :-
DeleteTimerRemain : -
Label : 16002, 16006, 142338
All the segment lists of candidate path 1 are faulty, and candidate path 2 becomes the primary one.
# Test the service connectivity.
8.3.3 Quiz
What is the 3-tuple used to uniquely identify an SR-MPLS Policy?
HCIE-Datacom Lab Guide Page 358
9 SRv6
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 2001::Y/126, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
2001::X:X/128. The values indicated by X are listed in the table of the corresponding step.
Loopback1 is created on PE2 and PE4, with IP addresses being 10.1.X.X/32 to simulate CE user
access.
3. Create a VPN instance named vpna, add Loopback1 to the VPN instance on PE2 and PE4, and
import direct routes to the BGP instance.
4. Establish an MP-IBGP peer relationship between PE2 and P2 and another one between PE4 and
P2. P2 functions as an RR to reflect VPNv4 routes from PE2 and PE4.
5. Configure SRv6. Specifically, enable SRv6 globally, enable IS-IS extensions for SR, configure the
source addresses for SRv6 encapsulation and locators, and enable SID allocation to VPN
instance routes as well as the function to add SIDs to routes to be advertised to BGP peers.
9.1.2.2 Configuration Procedure
Step 1 Complete basic connectivity configuration.
Configure the command validation mode as immediate validation and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 interface addresses need to be configured
according to the following table.
PE2 2 2001::2:2
PE4 4 2001::4:4
P2 6 2001::6:6
<PE2>system-view immediately
<PE4>system-view immediately
<P2>system-view immediately
Here, PE2 is used as an example. Repeat this operation for other devices.
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE2.
HCIE-Datacom Lab Guide Page 360
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ipv6 enable
[PE2-GigabitEthernet0/5/1] ipv6 address 2001::9/126
[PE2-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack0
[PE2-LoopBack0] ipv6 enable
[PE2-LoopBack0] ipv6 address 2001::2:2/128
[PE2-LoopBack0] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on P2.
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ipv6 enable
[P2-GigabitEthernet0/5/1] ipv6 address 2001::a/126
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] ipv6 enable
[P2-GigabitEthernet0/5/2] ipv6 address 2001::15/126
[P2-GigabitEthernet0/5/2] quit
[P2]interface LoopBack0
[P2-LoopBack0] ipv6 enable
[P2-LoopBack0] ipv6 address 2001::6:6/128
[P2-LoopBack0] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE4.
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] ipv6 enable
[PE4-GigabitEthernet0/5/1] ipv6 address 2001::16/126
[PE4-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack0
[PE4-LoopBack0] ipv6 enable
[PE4-LoopBack0] ipv6 address 2001::4:4/128
[PE4-LoopBack0] quit
# Test the connectivity of the IPv6 addresses of the interconnection interfaces on P2.
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max=1/1/1 ms
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
[PE2-isis-1] is-name PE2
[PE2-isis-1] ipv6 enable topology ipv6
[PE2-isis-1] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE2-GigabitEthernet0/5/1] isis circuit-type p2p
[PE2-GigabitEthernet0/5/1] quit
[PE2]interface LoopBack 0
[PE2-LoopBack0] isis ipv6 enable 1
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] ipv6 enable topology ipv6
[P2-isis-1] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis ipv6 enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis ipv6 enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
[P2]interface LoopBack 0
[P2-LoopBack0] isis ipv6 enable 1
[P2-LoopBack0] quit
[PE4]isis 1
HCIE-Datacom Lab Guide Page 362
Total Peer(s): 2
The routes to the Loopback0 interface on PE2 and PE4 have been properly learned.
one between PE4 and P2 (the AS number is 65100). P2 functions as an RR. PE2 and PE4 function as
RR clients, which advertise VPNv4 routes through P2.
# Create a VPN instance named vpna.
# Create Loopback1, associate it with the VPN instance, and configure an IP address for it according
to the table in Step 1.
[PE2]interface LoopBack 1
[PE2-LoopBack1] ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE2-LoopBack1] ip address 10.1.2.2 32
[PE4]interface LoopBack 1
[PE4-LoopBack1] ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack1] ip address 10.1.4.4 32
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
# Establish MP-BGP VPNv4 peer relationships through Loopback0 and set the router ID to 10.0.X.X.
The values indicated by X are listed in the table of Step 1.
[PE2]bgp 65100
[PE2-bgp] router-id 10.0.2.2
[PE2-bgp] peer 2001::6:6 as-number 65100
[PE2-bgp] peer 2001::6:6 connect-interface LoopBack 0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 2001::6:6 enable
[PE4]bgp 65100
[PE4-bgp]router-id 10.0.4.4
[PE4-bgp]peer 2001::6:6 as-number 65100
[PE4-bgp]peer 2001::6:6 connect-interface LoopBack 0
[PE4-bgp]ipv4-family vpnv4
[PE4-bgp-af-vpnv4]peer 2001::6:6 enable
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
HCIE-Datacom Lab Guide Page 364
PE2 has learned the VPNv4 route from PE4 through MP-BGP.
PE2 2001:2:: 96 16
PE4 2001:4:: 96 16
# Enable SR globally, and configure the source addresses for SR encapsulation and locators.
[PE2]segment-routing ipv6
[PE2-segment-routing-ipv6] encapsulation source-address 2001::2:2
[PE2-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:2:: 96 static 16
[PE4]segment-routing ipv6
[PE4-segment-routing-ipv6] encapsulation source-address 2001::4:4
[PE4-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:4:: 96 static 16
# Enable the function to add SIDs to VPN routes to be advertised to BGP peers.
[PE2]bgp 65100
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 2001::6:6 prefix-sid
HCIE-Datacom Lab Guide Page 366
[PE4]bgp 65100
[PE4-bgp] ipv4-family vpnv4
[PE4-bgp-af-vpnv4] peer 2001::6:6 prefix-sid
[P2]bgp 65100
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] peer 2001::2:2 prefix-sid
[P2-bgp-af-vpnv4] peer 2001::4:4 prefix-sid
# Enable the function to add SIDs to VPN routes in the BGP VPN instance and specify the previously
created SRv6 locator as the locator for allocated SIDs.
[PE2]bgp 65100
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-vpna] segment-routing ipv6 best-effort
[PE2-bgp-vpna] segment-routing ipv6 locator SRv6
[PE4]bgp 65100
[PE4-bgp] ipv4-family vpn-instance vpna
[PE4-bgp-vpna] segment-routing ipv6 best-effort
[PE4-bgp-vpna] segment-routing ipv6 locator SRv6
[PE2]isis 1
[PE2-isis-1]segment-routing ipv6 locator SRv6
[PE4]isis 1
[PE4-isis-1]segment-routing ipv6 locator SRv6
In the IS-IS IPv6 routing table, you can find routes generated based on locators on PE2 and PE4.
Reachability to SIDs generated based on these locators is ensured through these routes.
# Check the SIDs (VPN labels) generated by SRv6 for VPN routes.
Total SID(s): 1
PE2 generates the SID 2001:2::1:0 for VPN routes in the VPN instance named vpna and sends the SID
to PE4 through a BGP Update message.
# On PE4, check detailed information about the VPNv4 route (10.1.2.2) from PE2.
The command output shows that the BGP VPNv4 route carries the SID.
# Check the VPN instance IP routing table on PE4.
The command output shows that the next hop of the route from PE4 to 10.1.2.2 is 2001:2::1:0,
which is the SID allocated by PE2 to VPN routes in the VPN instance.
When the CE (10.1.4.4) connected to PE4 accesses the CE (10.1.2.2) connected to PE2, the
destination IPv6 address carried in the outer packet header is this address. After receiving the
packet, PE2 can determine to which CE the inner packet should be sent according to the destination
IPv6 address.
# Test the Loopback1 interface connectivity between PE2 and PE4.
9.1.3 Quiz
In an L3VPNv6 over SRv6 BE scenario, which type of SID do BGP routes in a VPN instance carry?
HCIE-Datacom Lab Guide Page 370
The figure shows the device connection and IP address planning. The interface interconnection
addresses are in the format of 2001::Y/126, and the values represented by Y are shown in the figure.
Loopback0 is created on all devices, and loopback interface IP addresses are in the format of
2001::X:X/128. The values indicated by X are listed in the table of the corresponding step.
Loopback1 is created on PE1 and PE4, with IP addresses being 10.1.X.X/32 to simulate CE user
access. The values indicated by X are listed in the table of the corresponding step.
Loopback2 is created on PE1 and PE4, with IPv6 addresses being 2002::X:X/128 to simulate CE user
access. The values indicated by X are listed in the table of the corresponding step.
L3VPN traffic between PE1 and PE4 enters the WAN bearer network through SRv6 Policies. Multiple
candidate paths are configured to ensure high service reliability. In addition, multiple segment lists
are configured for candidate path 1 to ensure high path reliability.
4. Establish an IBGP peer relationship between PE1 and P1, between PE1 and P2, between PE4
and P1, and between PE4 and P2. P1 and P2 function as RRs to reflect VPNv4 routes from PE1
and PE4.
5. Configure a route-policy to allow PE1 and PE4 to add a color value to VPNv4 routes to be
advertised to each other.
6. Configure SRv6. Specifically, enable SRv6 globally, enable IS-IS extensions for SR, configure the
source addresses for SRv6 encapsulation and locators, manually allocate SIDs to VPN instance
routes and SIDs used for device identification to devices, and enable the function to add SIDs to
routes to be advertised to BGP peers.
7. Configure a tunnel policy to recurse VPN routes to SRv6 Policies.
9.2.2.2 Configuration Procedure
Step 1 Complete basic connectivity configuration.
Configure the command validation mode as immediate validation and configure IP addresses for
interconnection and Loopback0 interfaces. Loopback0 interface addresses need to be configured
according to the following table.
PE1 1 2001::1:1
PE2 2 2001::2:2
PE3 3 2001::3:3
PE4 4 2001::4:4
P1 5 2001::5:5
P2 6 2001::6:6
<PE1>system-view immediately
Here, PE1 is used as an example. Repeat the same operations for other devices.
# Disable the DCN function globally on all devices.
Here, PE1 is used as an example. Repeat the same operations for other devices.
HCIE-Datacom Lab Guide Page 372
By default, the DCN function is enabled on NE router interfaces. To facilitate this lab, disable the
DCN function globally on all devices.
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE1.
[PE1]interface LoopBack0
[PE1-LoopBack0] ipv6 enable
[PE1-LoopBack0] ipv6 address 2001::1:1/128
[PE1-LoopBack0] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] ipv6 enable
[PE1-GigabitEthernet0/5/0] ipv6 address 2001::1/126
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] ipv6 enable
[PE1-GigabitEthernet0/5/1] ipv6 address 2001::5/126
[PE1-GigabitEthernet0/5/1] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE2.
[PE2]interface LoopBack0
[PE2-LoopBack0] ipv6 enable
[PE2-LoopBack0] ipv6 address 2001::2:2/128
[PE2-LoopBack0] quit
[PE2]interface GigabitEthernet0/5/0
[PE2-GigabitEthernet0/5/0] ipv6 enable
[PE2-GigabitEthernet0/5/0] ipv6 address 2001::2/126
[PE2-GigabitEthernet0/5/0] quit
[PE2]interface GigabitEthernet0/5/1
[PE2-GigabitEthernet0/5/1] ipv6 enable
[PE2-GigabitEthernet0/5/1] ipv6 address 2001::9/126
[PE2-GigabitEthernet0/5/1] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE3.
[PE3]interface LoopBack0
[PE3-LoopBack0] ipv6 enable
[PE3-LoopBack0] ipv6 address 2001::3:3/128
[PE3-LoopBack0] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] ipv6 enable
[PE3-GigabitEthernet0/5/0] ipv6 address 2001::19/126
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] ipv6 enable
[PE3-GigabitEthernet0/5/1] ipv6 address 2001::12/126
[PE3-GigabitEthernet0/5/1] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on PE4.
[PE4]interface LoopBack0
[PE4-LoopBack0] ipv6 enable
[PE4-LoopBack0] ipv6 address 2001::4:4/128
[PE4-LoopBack0] quit
[PE4]interface GigabitEthernet0/5/0
HCIE-Datacom Lab Guide Page 373
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on P1.
[P1]interface LoopBack0
[P1-LoopBack0] ipv6 enable
[P1-LoopBack0] ipv6 address 2001::5:5/128
[P1-LoopBack0] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] ipv6 enable
[P1-GigabitEthernet0/5/0] ipv6 address 2001::d/126
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] ipv6 enable
[P1-GigabitEthernet0/5/1] ipv6 address 2001::6/126
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] ipv6 enable
[P1-GigabitEthernet0/5/2] ipv6 address 2001::11/126
[P1-GigabitEthernet0/5/2] quit
# Configure IPv6 addresses for the interconnection and Loopback0 interfaces on P2.
[P2]interface LoopBack0
[P2-LoopBack0] ipv6 enable
[P2-LoopBack0] ipv6 address 2001::6:6/128
[P2-LoopBack0] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] ipv6 enable
[P2-GigabitEthernet0/5/0] ipv6 address 2001::e/126
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] ipv6 enable
[P2-GigabitEthernet0/5/1] ipv6 address 2001::a/126
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] ipv6 enable
[P2-GigabitEthernet0/5/2] ipv6 address 2001::15/126
[P2-GigabitEthernet0/5/2] quit
1 packet(s) received
0.00% packet loss
round-trip min/avg/max=1/1/1 ms
[PE1]isis 1
[PE1-isis-1] is-level level-2
[PE1-isis-1] cost-style wide
[PE1-isis-1] network-entity 49.0001.0001.0001.0001.00
[PE1-isis-1] is-name PE1
[PE1-isis-1] ipv6 enable topology ipv6
[PE1-isis-1] quit
[PE1]interface GigabitEthernet0/5/0
[PE1-GigabitEthernet0/5/0] isis ipv6 enable 1
[PE1-GigabitEthernet0/5/0] isis circuit-type p2p
[PE1-GigabitEthernet0/5/0] quit
[PE1]interface GigabitEthernet0/5/1
[PE1-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE1-GigabitEthernet0/5/1] isis circuit-type p2p
[PE1-GigabitEthernet0/5/1] quit
[PE1]interface LoopBack 0
[PE1-LoopBack0] isis ipv6 enable 1
[PE2]isis 1
[PE2-isis-1] is-level level-2
[PE2-isis-1] cost-style wide
[PE2-isis-1] network-entity 49.0001.0002.0002.0002.00
HCIE-Datacom Lab Guide Page 376
[PE3]isis 1
[PE3-isis-1] is-level level-2
[PE3-isis-1] cost-style wide
[PE3-isis-1] network-entity 49.0001.0003.0003.0003.00
[PE3-isis-1] is-name PE3
[PE3-isis-1] ipv6 enable topology ipv6
[PE3-isis-1] quit
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] isis ipv6 enable 1
[PE3-GigabitEthernet0/5/0] isis circuit-type p2p
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE3-GigabitEthernet0/5/1] isis circuit-type p2p
[PE3-GigabitEthernet0/5/1] quit
[PE3]interface LoopBack 0
[PE3-LoopBack0] isis ipv6 enable 1
[PE4]isis 1
[PE4-isis-1] is-level level-2
[PE4-isis-1] cost-style wide
[PE4-isis-1] network-entity 49.0001.0004.0004.0004.00
[PE4-isis-1] is-name PE4
[PE4-isis-1] ipv6 enable topology ipv6
[PE4-isis-1] quit
[PE4]interface GigabitEthernet0/5/0
[PE4-GigabitEthernet0/5/0] isis ipv6 enable 1
[PE4-GigabitEthernet0/5/0] isis circuit-type p2p
[PE4-GigabitEthernet0/5/0] quit
[PE4]interface GigabitEthernet0/5/1
[PE4-GigabitEthernet0/5/1] isis ipv6 enable 1
[PE4-GigabitEthernet0/5/1] isis circuit-type p2p
[PE4-GigabitEthernet0/5/1] quit
[PE4]interface LoopBack 0
[PE4-LoopBack0] isis ipv6 enable 1
[P1]isis 1
[P1-isis-1] is-level level-2
[P1-isis-1] cost-style wide
[P1-isis-1] network-entity 49.0001.0005.0005.0005.00
[P1-isis-1] is-name P1
[P1-isis-1] ipv6 enable topology ipv6
[P1-isis-1] quit
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] isis ipv6 enable 1
[P1-GigabitEthernet0/5/0] isis circuit-type p2p
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] isis ipv6 enable 1
[P1-GigabitEthernet0/5/1] isis circuit-type p2p
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] isis ipv6 enable 1
[P1-GigabitEthernet0/5/2] isis circuit-type p2p
[P1-GigabitEthernet0/5/2] quit
[P1]interface LoopBack 0
[P1-LoopBack0] isis ipv6 enable 1
[P2]isis 1
[P2-isis-1] is-level level-2
[P2-isis-1] cost-style wide
[P2-isis-1] network-entity 49.0001.0006.0006.0006.00
[P2-isis-1] is-name P2
[P2-isis-1] ipv6 enable topology ipv6
[P2-isis-1] quit
[P2]interface GigabitEthernet0/5/0
[P2-GigabitEthernet0/5/0] isis ipv6 enable 1
[P2-GigabitEthernet0/5/0] isis circuit-type p2p
[P2-GigabitEthernet0/5/0] quit
[P2]interface GigabitEthernet0/5/1
[P2-GigabitEthernet0/5/1] isis ipv6 enable 1
[P2-GigabitEthernet0/5/1] isis circuit-type p2p
[P2-GigabitEthernet0/5/1] quit
[P2]interface GigabitEthernet0/5/2
[P2-GigabitEthernet0/5/2] isis ipv6 enable 1
[P2-GigabitEthernet0/5/2] isis circuit-type p2p
[P2-GigabitEthernet0/5/2] quit
[P2]interface LoopBack 0
[P2-LoopBack0] isis ipv6 enable 1
[P2-LoopBack0] quit
Total Peer(s): 3
Total Peer(s): 2
Total Peer(s): 2
GE0/5/0 FE80::F29B:B8FF:FECC:740A
2001::5:5/128 Loop0 Direct 0 D/-/L/-
2001::6:6/128 GE0/5/0 FE80::F29B:B8FF:FECC:740A 10 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set, LP-LocalPrefix-Sid
Protect Type: L-Link Protect, N-Node Protect
You only need to configure EVPN RTs. In addition, enable EVPN to generate and advertise IP prefix
routes and IRB routes.
# Create Loopback1, associate it with the VPN instance, and configure an IP address for it according
to the table in Step 1.
[PE1]interface LoopBack 1
[PE1-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE1-LoopBack1]ip address 10.1.1.1 32
[PE4]interface LoopBack 1
[PE4-LoopBack1]ip binding vpn-instance vpna
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack1]ip address 10.1.4.4 32
HCIE-Datacom Lab Guide Page 380
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
# Create a VPN instance named vpna6.
You only need to configure EVPN RTs. In addition, enable EVPN to generate and advertise IP prefix
routes and IRB routes.
# Create Loopback2, associate it with the VPN instance, and configure an IP address for it according
to the table in Step 1.
[PE1]interface LoopBack 2
[PE1-LoopBack2]ip binding vpn-instance vpna6
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE1-LoopBack2]ipv6 enable
[PE1-LoopBack2]ipv6 address 2002::1:1 128
[PE4]interface LoopBack 2
[PE4-LoopBack2]ip binding vpn-instance vpna6
Info: All IPv4 and IPv6 related configurations on this interface are removed.
[PE4-LoopBack2]ipv6 enable
[PE4-LoopBack2]ipv6 address 2002::4:4 128
Note that you need to associate the interface with the VPN instance before configuring an IP address
for the interface.
# Establish MP-BGP EVPN peer relationships through Loopback0 and set the router ID to 10.0.X.X.
The values indicated by X are listed in the table of Step 1.
[PE1]bgp 65100
[PE1-bgp] router-id 10.0.1.1
[PE1-bgp] peer 2001::5:5 as-number 65100
[PE1-bgp] peer 2001::5:5 connect-interface LoopBack 0
[PE1-bgp] peer 2001::6:6 as-number 65100
[PE1-bgp] peer 2001::6:6 connect-interface LoopBack 0
[PE1-bgp] l2vpn-family evpn
[PE1-bgp-af-evpn] peer 2001::5:5 enable
[PE1-bgp-af-evpn] peer 2001::5:5 advertise encap-type srv6
[PE1-bgp-af-evpn] peer 2001::6:6 enable
HCIE-Datacom Lab Guide Page 381
By default, EVPN routes advertised by a local device to its peers carry the MPLS encapsulation
attribute, which cannot be used for SRv6 forwarding. To enable EVPN routes to recurse to SRv6
tunnels, run the advertise encap-type srv6 command.
[PE4]bgp 65100
[PE4-bgp] router-id 10.0.4.4
[PE4-bgp] peer 2001::5:5 as-number 65100
[PE4-bgp] peer 2001::5:5 connect-interface LoopBack0
[PE4-bgp] peer 2001::6:6 as-number 65100
[PE4-bgp] peer 2001::6:6 connect-interface LoopBack0
[PE4-bgp] l2vpn-family evpn
[PE4-bgp-af-evpn] peer 2001::5:5 enable
[PE4-bgp-af-evpn] peer 2001::5:5 advertise encap-type srv6
[PE4-bgp-af-evpn] peer 2001::6:6 enable
[PE4-bgp-af-evpn] peer 2001::6:6 advertise encap-type srv6
[P1]bgp 65100
[P1-bgp] router-id 10.0.5.5
[P1-bgp] peer 2001::1:1 as-number 65100
[P1-bgp] peer 2001::1:1 connect-interface LoopBack0
[P1-bgp] peer 2001::4:4 as-number 65100
[P1-bgp] peer 2001::4:4 connect-interface LoopBack0
[P1-bgp] l2vpn-family evpn
[P1-bgp-af-evpn] undo policy vpn-target
[P1-bgp-af-evpn] peer 2001::1:1 enable
[P1-bgp-af-evpn] peer 2001::1:1 advertise encap-type srv6
[P1-bgp-af-evpn] peer 2001::1:1 reflect-client
[P1-bgp-af-evpn] peer 2001::4:4 enable
[P1-bgp-af-evpn] peer 2001::4:4 advertise encap-type srv6
[P1-bgp-af-evpn] peer 2001::4:4 reflect-client
[P2]bgp 65100
[P2-bgp] router-id 10.0.6.6
[P2-bgp] peer 2001::1:1 as-number 65100
[P2-bgp] peer 2001::1:1 connect-interface LoopBack0
[P2-bgp] peer 2001::4:4 as-number 65100
[P2-bgp] peer 2001::4:4 connect-interface LoopBack0
[P2-bgp] l2vpn-family evpn
[P2-bgp-af-evpn] undo policy vpn-target
[P2-bgp-af-evpn] peer 2001::1:1 enable
[P2-bgp-af-evpn] peer 2001::1:1 advertise encap-type srv6
[P2-bgp-af-evpn] peer 2001::1:1 reflect-client
[P2-bgp-af-evpn] peer 2001::4:4 enable
[P2-bgp-af-evpn] peer 2001::4:4 advertise encap-type srv6
[P2-bgp-af-evpn] peer 2001::4:4 reflect-client
[PE1]bgp 65100
[PE1-bgp]ipv4-family vpn-instance vpna
[PE1-bgp-vpna] import-route direct
[PE1-bgp-vpna] advertise l2vpn evpn
[PE4]bgp 65100
[PE4-bgp]ipv4-family vpn-instance vpna
[PE4-bgp-vpna] import-route direct
[PE4-bgp-vpna] advertise l2vpn evpn
Note that you need to enable the VPN instance to advertise IP routes to the EVPN instance.
Because SRv6 has not been configured, EVPN routes do not carry any SRv6 parameter. As such,
information about the advertised EVPN routes cannot be displayed at present.
# Import the direct routes of Loopback2 to BGP.
PE1 2001:1:: 96 16
PE2 2001:2:: 96 16
PE3 2001:3:: 96 16
PE4 2001:4:: 96 16
P1 2001:5:: 96 16
P2 2001:6:: 96 16
# Enable SR globally, and configure the source addresses for SR encapsulation and locators.
[PE1]segment-routing ipv6
[PE1-segment-routing-ipv6] encapsulation source-address 2001::1:1
[PE1-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:1:: 96 static 16
[PE1-segment-routing-ipv6-locator] opcode ::1 end
[PE1-segment-routing-ipv6-locator] opcode ::11 end-dt4 vpn-instance vpna evpn
[PE1-segment-routing-ipv6-locator] opcode ::61 end-dt6 vpn-instance vpna6 evpn
Opcodes of the End type are configured, and End-DT4 and End-DT6 SIDs are manually allocated to
VPN instances on PE1 and PE4.
[PE2]segment-routing ipv6
[PE2-segment-routing-ipv6] encapsulation source-address 2001::2:2
[PE2-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:2:: 96 static 16
[PE2-segment-routing-ipv6-locator] opcode ::1 end
[PE3]segment-routing ipv6
[PE3-segment-routing-ipv6] encapsulation source-address 2001::3:3
[PE3-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:3:: 96 static 16
[PE3-segment-routing-ipv6-locator] opcode ::1 end
[PE4]segment-routing ipv6
[PE4-segment-routing-ipv6] encapsulation source-address 2001::4:4
[PE4-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:4:: 96 static 16
HCIE-Datacom Lab Guide Page 384
[P1]segment-routing ipv6
[P1-segment-routing-ipv6] encapsulation source-address 2001::5:5
[P1-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:5:: 96 static 16
[P1-segment-routing-ipv6-locator] opcode ::1 end
[P2]segment-routing ipv6
[P2-segment-routing-ipv6] encapsulation source-address 2001::6:6
[P2-segment-routing-ipv6] locator SRv6 ipv6-prefix 2001:6:: 96 static 16
[P2-segment-routing-ipv6-locator] opcode ::1 end
# In the BGP VPN instance, enable the function to recurse services to an SRv6 Policy.
[PE1]bgp 65100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-vpna] segment-routing ipv6 locator SRv6 evpn
[PE1-bgp-vpna] segment-routing ipv6 traffic-engineer best-effort evpn
[PE1-bgp-vpna] quit
[PE1-bgp] ipv6-family vpn-instance vpna6
[PE1-bgp-6-vpna6] segment-routing ipv6 locator SRv6 evpn
[PE1-bgp-6-vpna6] segment-routing ipv6 traffic-engineer best-effort evpn
Run the segment-routing ipv6 traffic-engineer best-effort evpn command to enable the function to
recurse EVPN routes in a VPN instance to an SRv6 Policy and use an SRv6 BE tunnel as a backup best-
effort path.
# Enable IS-IS to advertise SRv6 locators.
[PE1]isis 1
[PE1-isis-1] segment-routing ipv6 locator SRv6 auto-sid-disable
PE1 is used as an example. The operations on other devices are similar to those on PE1. Because End
SIDs are manually allocated, the automatic allocation function is disabled here.
# Check the End SID. P1 is used as an example.
Total SID(s): 1
Total SID(s): 1
The prefix SID carried in the EVPN route received by PE4 is the same as the End.DT4 SID allocated by
PE1, which meets the expectation.
# Check the End.DT6 SID on PE1.
Total SID(s): 1
Prefix-sid: 2001:1::61
Route Type: 5 (Ip Prefix Route)
Ethernet Tag ID: 0, IPv6 Prefix/Len: 2002::1:1/128, ESI: 0000.0000.0000.0000.0000, GW IPv6 Address: ::
Prefix-sid: 2001:1::61
Route Type: 5 (Ip Prefix Route)
Ethernet Tag ID: 0, IPv6 Prefix/Len: 2002::1:1/128, ESI: 0000.0000.0000.0000.0000, GW IPv6 Address: ::
The prefix SID carried in the EVPN route received by PE4 is the same as the End.DT6 SID allocated by
PE1, which meets the expectation.
[PE1]segment-routing ipv6
[PE1-segment-routing-ipv6] segment-list PE1_PE4_VPNA_1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_1] index 5 sid ipv6 2001:5::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_1] index 10 sid ipv6 2001:3::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_1] index 15 sid ipv6 2001:4::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_1] quit
[PE1-segment-routing-ipv6] segment-list PE1_PE4_VPNA_2
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_2] index 5 sid ipv6 2001:5::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_2] index 10 sid ipv6 2001:6::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_2] index 15 sid ipv6 2001:4::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_2] quit
[PE1-segment-routing-ipv6] segment-list PE1_PE4_VPNA_3
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_3] index 5 sid ipv6 2001:2::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_3] index 10 sid ipv6 2001:6::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_3] index 15 sid ipv6 2001:4::1
[PE1-segment-routing-ipv6-segment-list-PE1_PE4_VPNA_3] quit
[PE1-segment-routing-ipv6] srv6-te policy p1 endpoint 2001::4:4 color 100
[PE1-segment-routing-ipv6-policy-p1] candidate-path preference 100
[PE1-segment-routing-ipv6-policy-p1-path] segment-list PE1_PE4_VPNA_1 weight 2
[PE1-segment-routing-ipv6-policy-p1-path] segment-list PE1_PE4_VPNA_2 weight 1
[PE1-segment-routing-ipv6-policy-p1-path] quit
[PE1-segment-routing-ipv6-policy-p1] candidate-path preference 50
[PE1-segment-routing-ipv6-policy-p1-path] segment-list PE1_PE4_VPNA_3
[PE1-segment-routing-ipv6-policy-p1-path] quit
To reach PE4, segment lists 1, 2, and 3 need to pass through P1 and PE3, P1 and P2, and PE2 and P2,
respectively. Segment lists 1 and 2 form candidate path 1, and segment list 3 forms candidate path
2.
# Configure candidate paths on PE4.
[PE4]segment-routing ipv6
[PE4-segment-routing-ipv6] segment-list PE4_PE1_VPNA_1
[PE4-segment-routing-ipv6-segment-list-PE4_PE1_VPNA_1] index 5 sid ipv6 2001:3::1
[PE4-segment-routing-ipv6-segment-list-PE4_PE1_VPNA_1] index 10 sid ipv6 2001:5::1
[PE4-segment-routing-ipv6-segment-list-PE4_PE1_VPNA_1] index 15 sid ipv6 2001:1::1
[PE4-segment-routing-ipv6-segment-list-PE4_PE1_VPNA_1] quit
[PE4-segment-routing-ipv6] segment-list PE4_PE1_VPNA_2
[PE4-segment-routing-ipv6-segment-list-PE4_PE1_VPNA_2] index 5 sid ipv6 2001:6::1
HCIE-Datacom Lab Guide Page 387
To reach PE1, segment lists 1, 2, and 3 need to pass through PE3 and P1, P2 and P1, and P2 and PE2,
respectively. Segment lists 1 and 2 form candidate path 1, and segment list 3 forms candidate path
2.
# Configure a tunnel selection policy.
[PE1]tunnel-policy p1
[PE1-tunnel-policy-p1] tunnel select-seq ipv6 srv6-te-policy load-balance-number 1
[PE4]tunnel-policy p1
[PE4-tunnel-policy-p1] tunnel select-seq ipv6 srv6-te-policy load-balance-number 1
# Set the default color for the route in the VPN instance.
HCIE-Datacom Lab Guide Page 388
To enable the route in the VPN instance to recurse to the corresponding SRv6 Policy, you can use a
route-policy to set a color value for the route or set the default color value for the route in the local
VPN instance. The second method is used in this example.
The route has recursed to a logical interface (based on the tunnel policy).
# Check detailed information about the VPN instance IPv6 routes on PE1 and PE4.
The IPv6 route has recursed to a logical interface (based on the tunnel policy).
# Check detailed information about the route 10.1.1.1 on PE4.
Destination: 10.1.1.1/32
Protocol : IBGP Process ID :0
Preference : 255 Cost :0
NextHop : 2001::1:1 Neighbour : 2001::5:5
State : Active Adv Relied Age : 00h07m40s
HCIE-Datacom Lab Guide Page 390
[PE1]segment-routing ipv6
[PE1-segment-routing-ipv6] locator SRv6
[PE1-segment-routing-ipv6-locator] opcode ::2 end-op
[PE4]segment-routing ipv6
[PE4-segment-routing-ipv6] locator SRv6
[PE4-segment-routing-ipv6-locator] opcode ::2 end-op
# Run the tracert command on PE1 to test the SRv6 Policy connectivity.
[PE1]segment-routing ipv6
[PE1-segment-routing-ipv6] srv6-te-policy path verification enable
[PE1-segment-routing-ipv6] srv6-te policy p1
[PE1-segment-routing-ipv6-policy-p1] path verification enable
[PE4]segment-routing ipv6
[PE4-segment-routing-ipv6] srv6-te-policy path verification enable
[PE4-segment-routing-ipv6] srv6-te policy p1
HCIE-Datacom Lab Guide Page 392
[PE3]interface GigabitEthernet0/5/0
[PE3-GigabitEthernet0/5/0] shutdown
[PE3-GigabitEthernet0/5/0] quit
[PE3]interface GigabitEthernet0/5/1
[PE3-GigabitEthernet0/5/1] shutdown
[PE3-GigabitEthernet0/5/1] quit
Preference:100; Path Type: primary; Protocol-Origin: local; Originator: 0, 0.0.0.0; Discriminator: 100; Segment-List
ID: 1; Xcindex: 0; end-op: 2001:4::2
TTL Replier Time Type SRH
0 Ingress [SRH: 2001:5::1, 2001:3::1, 2001:4::1, 2001:4::2, SL=3]
1 :: * Transit
2 :: * Transit
3 :: * Transit
4 :: * Transit
srv6-te policy'ssegment list:
Preference:100; Path Type: primary; Protocol-Origin: local; Originator: 0, 0.0.0.0; Discriminator: 100; Segment-List
ID: 4; Xcindex: 3; end-op: 2001:4::2
TTL Replier Time Type SRH
0 Ingress [SRH: 2001:5::1, 2001:6::1, 2001:4::1, 2001:4::2, SL=3]
1 2001::6 8 ms Transit [SRH: 2001:5::1, 2001:6::1, 2001:4::1, 2001:4::2, SL=3]
2 2001::E 3 ms Transit [SRH: 2001:5::1, 2001:6::1, 2001:4::1, 2001:4::2, SL=2]
3 2001:4::2 2 ms Egress [SRH: 2001:5::1, 2001:6::1, 2001:4::1, 2001:4::2, SL=1]
Use the -m parameter to specify the maximum hop limit supported by tracert.
The command output shows that segment list 1 cannot work properly.
# Shut down all interfaces on P1 to simulate a node fault.
[P1]interface GigabitEthernet0/5/0
[P1-GigabitEthernet0/5/0] shutdown
[P1-GigabitEthernet0/5/0] quit
[P1]interface GigabitEthernet0/5/1
[P1-GigabitEthernet0/5/1] shutdown
[P1-GigabitEthernet0/5/1] quit
[P1]interface GigabitEthernet0/5/2
[P1-GigabitEthernet0/5/2] shutdown
[P1-GigabitEthernet0/5/2] quit
The command output shows that the traffic has been switched to the segment list in the second
candidate path for forwarding.
----End
9.2.3 Quiz
In addition to headend-based fault detection, what methods can be used to check whether a
segment list works properly?
HCIE-Datacom Lab Guide Page 395
ACC_1 and PC1 are used in this lab. The IP address of VLANIF1 on ACC_1 is 192.168.100.254/24, and
the IP address of PC1 is 192.168.100.1/24. Install the Anaconda compilation environment. Write a
script to obtain some output of the device and upload and download files.
For details about how to install the Anaconda lab environment, see HCIP-Datacom-Python
Programming Basics Lab Guide.
[ACC_1]interface Vlanif1
[ACC_1-Vlanif1] ip address 192.168.100.254 255.255.255.0
[ACC_1-Vlanif1] quit
[ACC_1]ping 192.168.100.1
PING 192.168.100.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=128 time=1 ms
# Create a local user python and set the user service type to SSH.
[ACC_1] aaa
[ACC_1-aaa] local-user python password irreversible-cipher Huawei@123
[ACC_1-aaa] local-user python privilege level 15
[ACC_1-aaa] local-user python service-type ssh
[ACC_1-aaa] quit
HCIE-Datacom Lab Guide Page 397
# Create an SSH user, set the authentication mode to RSA key, and set the service mode to STelnet.
Generate an RSA key pair using OpenSSH, with the key length being 2048 bits.
The methods for downloading and using OpenSSH are not provided here. OpenSSH has been
integrated in mainstream Windows and Linux versions and can be directly used. For example,
OpenSSH built in Windows 10 is used in this lab.
Alternatively, you can use the key pair provided in this lab. Note that the key pair can be used only in
labs and cannot be used in actual environments.
Private key:
PEQYmGAK2lSB93RVyfMZUeat7pqHV3ZiXj8ar4bk0SPBWiNcUweZXPu2d0buKDRu
xxX1dLbDPHHyoIJBe05NpaHK060JapekKCPVu77Avdyiuh4mXtAvZX0CgYEA0HwV
7NgMJa0dsHAL43C8nOjlCRYaw07W3m56Cs+LQlzoY4kVgUs7V5rmYHj65NYJ3OPB
UH89u+F63iOVgXnw3i5wxGcHCzbxqLdJeBU0FyWqFmkGkN3C+QgxqxqavoskaxfA
vpsaljLRZnO7lvx8SM86/mFE8yG6V+fkdhRPtHUCgYEAo9WYjC63JAPmSbh1cC1R
l+G2MXR5e6y2n+n+M5jgOd2x4Xmxb7JyPjXwz3Yt8FJPjPy2ws4RJde2Ik0cnHcM
/FbrS2UgAbvvzBbwjW1RFiZNdWfYXXHjV72RcdRtrHnGh8xJ+lqad6arN0t2cEiW
lwhYZXzc0JnyHBcS8vPiXcECgYEAiAILQ6GF+yY+khXmi4/GXA7LK+xRtUw/fIhR
8a+Hx9lYeWa6sshjhDk3RYRnGNZRRNsIB/2aRnFIeJZ6OCdW7XsaceZMgBJuAITh
1wbuHpOhrFEDyYoCYffofxkyDlAzh/HM+guxgn7QgKfLnypD4jPe5oiKNJqyOBq9
vhJuFOkCgYEAzN1iwCJs5p9+Y+/12rjv3NyCgM6DL1+Ldz6AnQ3r8ioJ1q4erBXE
JwapPq9f+zAglyo0DGeY2bGAnjnOrCcvoED7eU8qFmuq+EA/0EhiBsXJwwotp9BI
JTOQQJUmgU62mtpp+l1lyJ9KtnZPEtSpCgujSrAqHk5rjrP1TskgiMc=
-----END RSA PRIVATE KEY-----
Public key:
Copy the contents of the public key and private key to the TXT file, and name the public key
id_rsa.pub and the private key id_rsa.pem to obtain the public key and private key.
Note that you need to change the filename extension of the .txt file.
S5731-H24T4XC supports only hexadecimal public keys. Therefore, you need to convert the base64-
encoded public key file using the third-party software.
You can convert the base64 code to the hexadecimal format using a conversion tool and typeset the
conversion result in the following format.
The following is an example of the converted public key:
Convert the public key. If the Linux environment is available, convert the original id_rsa.pub file
based on the format of the preceding information. Note that the public key is not the one provided
above because the public key provided above has been converted using the ssh-keygen -e -m pem -f
command.
# Add a public key to the SSH server and assign the public key to the user.
import paramiko
import time
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname='192.168.100.254',port=22,username='python',key_filename=r'C:\Users\PC1\Documents\
Key\SSH\id_rsa')
cli = ssh.invoke_shell()
cli.send('screen-length 0 temporary\n')
cli.send('display version\n')
time.sleep(1)
dis_ver = cli.recv(999999).decode()
cli.send('display memory-usage\n')
time.sleep(1)
dis_mem = cli.recv(999999).decode()
time.sleep(1)
dis_cpu_usage = cli.recv(999999).decode()
print(dis_ver)
print("-----------------------------------------------")
print(dis_mem)
print("-----------------------------------------------")
print(dis_cpu_usage)
print("-----------------------------------------------")
ssh.close()
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
The current login time is 2021-09-01 10:17:02+08:00.
Info: Smart-upgrade is currently disabled. Enable Smart-upgrade to get recommended version information.
<ACC_1>screen-length 0 temporary
Info: The configuration takes effect on the current user terminal interface only.
<ACC_1>display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.170 (S5731 V200R020C10SPC500)
Copyright (C) 2000-2020 HUAWEI TECH Co., Ltd.
HUAWEI S5731-H24T4XC Routing Switch uptime is 0 week, 1 day, 0 hour, 38 minutes
100%|
95%|
90%|
85%|
80%|
75%|
70%|
65%|
60%|
55%|
50%|
45%|
40%|
35%|
30%|
25%|
20%|
15%|
10%|
5%|
---------+---------+---------+---------+---------+---------+>
10 20 30 40 50 60
System cpu-usage last 60 minutes(Per Min)
<ACC_1>
import paramiko
import time
HCIE-Datacom Lab Guide Page 402
Import the paramiko and time modules. If a module is not installed, you can install it by running the
pip install paramiko command.
This section describes common classes and methods used by Paramiko as a client, for example, the
SSHClient class and its AutoAddPolicy, connect, invoke_shell, and close methods. For more Paramiko
methods, visit http://docs.paramiko.org/.
By default, Python executes all code in sequence without intervals. When you use Paramiko to send
configuration commands to a switch, SSH may not respond in a timely manner or the command
output may be incomplete. In this case, you can use the sleep method in the time module to
manually pause the program.
# Instantiate an SSH object.
ssh = paramiko.SSHClient()
Instantiate the SSH object using Paramiko SSHClient() and assign a value to SSH.
# Allow unknown hosts to be connected.
ssh.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
ssh.connect(hostname='192.168.100.254',port=22,username='python',key_filename=r'C:\Users\PC1\Documents\
Key\SSH\id_rsa')
Set up an SSH session. The destination SSH server is 192.168.100.254, the user name is python, and
key_filename specifies the local private key file (id_rsa) of the client. The user is authenticated using
a key.
# Open an interactive session.
cli = ssh.invoke_shell()
Set cli to invoke_shell(). invoke_shell() is used to open an interactive shell session. The session is a
logical channel and is established over the SSH session connection.
# Run the following commands:
cli.send('screen-length 0 temporary\n')
cli.send('display version\n')
Run the Screen-length 0 temporary command to cancel the screen splitting, and then check the
device version number.
# Set the sleep time.
time.sleep(1)
Configure the sleep time to 1 second and wait for the display version command output.
# Obtain the command output of the channel.
dis_ver = cli.recv(999999).decode()
HCIE-Datacom Lab Guide Page 403
invoke_shell() has created a channel. All previous input and output process information is stored in
this channel. You can get all the information in this channel and display it to the Python compiler.
Invoke cli.recv(), decode it using decode(), and assign a value to dis_ver.
recv(999999) is used to receive data from a channel. The maximum data size is 999999 bytes.
The decode() method is used to decode the bytes object in the specified encoding format. The
default encoding format is utf-8.
During decoding, the result is presented to the interface in a new line, facilitating your reading.
# Display the memory and CPU usage of the device.
cli.send('display memory-usage\n')
time.sleep(1)
dis_mem = cli.recv(999999).decode()
print(dis_ver)
print("-----------------------------------------------")
print(dis_mem)
print("-----------------------------------------------")
print(dis_cpu_usage)
print("-----------------------------------------------")
ssh.close()
The session is closed by invoking close(). The number of VTY connections on the device is limited.
Therefore, you need to close the SSH session after running the script.
Step 6 Log in to the device using Paramiko and perform file operations.
The Python script invokes the paramiko module to log in to ACC_1, downloads the device file
vrpcfg.cfg configuration file, and uploads the test.cfg configuration file.
HCIE-Datacom Lab Guide Page 404
# Complete script.
import paramiko
key = paramiko.RSAKey.from_private_key_file(r'C:\Users\PC1\Documents\Key\SSH\id_rsa')
tran = paramiko.Transport(('192.168.100.254', 22))
tran.connect(username='python',pkey=key)
sftp = paramiko.SFTPClient.from_transport(tran)
put_local_path = r'C:\Users\PC1\Documents\Key\SSH\demo.txt'
put_remote_path = r'/demo.txt'
get_local_path = r'C:\Users\PC1\Documents\Key\SSH\vrpcfg.zip.bak'
get_remote_path = r'/vrpcfg.zip'
sftp.get(get_remote_path,get_local_path)
sftp.put(put_local_path,put_remote_path)
tran.close()
Create a file named demo.txt in the C:\Users\PC1\Documents\Key\SSH\ directory on your local PC.
# Execute the code in a compiler.
<ACC_1>dir
Directory of flash:/
import paramiko
key=paramiko.RSAKey.from_private_key_file(r'C:\Users\PC1\Documents\Key\SSH\id_rsa')
Read the local RSA private key file on the client and copy it to the key.
HCIE-Datacom Lab Guide Page 406
# Instantiate the session channel. The destination SSH server is 192.168.100.254, and the port is 22.
tran.connect(username='python', pkey=key)
python is the user name, and pkey is the key object. The user is authenticated using a key.
# Establish an SFTP channel.
sftp = paramiko.SFTPClient.from_transport(tran)
Create an SFTP channel from an open session connection and assign a value to sftp.
# Set the local and remote paths for uploading and downloading.
put_local_path = r'C:\Users\PC1\Documents\Key\SSH\demo.txt'
put_remote_path = r'/demo.txt'
get_local_path = r'C:\Users\PC1\Documents\Key\SSH\vrpcfg.zip.bak'
get_remote_path = r'/vrpcfg.zip'
Upload the local demo.txt file to the device and download the vrpcfg.zip file to the local PC and
change the file name to vrpcfg.zip.bak.
# Transfer the file.
sftp.get(get_remote_path,get_local_path)
sftp.put(put_local_path,put_remote_path)
tran.close()
----End
10.1.3 Quiz
How can we automatically run a series of commands after logging in to a device without manually
running them one by one?
HCIE-Datacom Lab Guide Page 407
In this lab, ACC_1 and PC1 are used. The IP address of VLANIF 1 on ACC_1 is 192.168.100.254/24,
and the IP address of PC1 is 192.168.100.1/24. Write a script on PC1 to deliver configurations
through NETCONF.
[ACC_1]interface Vlanif1
[ACC_1-Vlanif1] ip address 192.168.100.254 255.255.255.0
[ACC_1-Vlanif1] quit
[ACC_1]ping 192.168.100.1
HCIE-Datacom Lab Guide Page 408
# Create a local user python and set the user service type to SSH.
[ACC_1] aaa
[ACC_1-aaa] local-user python password irreversible-cipher Huawei@123
[ACC_1-aaa] local-user python privilege level 15
[ACC_1-aaa] local-user python service-type ssh
[ACC_1-aaa] local-aaa-user password policy administrator
[ACC_1-aaa-lupp-admin] undo password alert original
[ACC_1-aaa] quit
Disable the function of prompting you to change the password upon the first login.
# Create an SSH user, set the authentication mode to password-based authentication, and set the
service mode to STelnet.
system-view
aaa
local-user netconf password irreversible-cipher Huawei@123
local-user netconf privilege level 15
local-user netconf service-type api
quit
netconf
source ip interface Vlanif 1 port 830
quit
def ssh_config(file,ip,username,password):
a = ssh.ssh_connect(ip,username,password)
cli = a.invoke_shell()
cli.send('screen-length 0 temporary\n')
time.sleep(0.5)
f = open(file,'r')
config_list = f.readlines()
for i in config_list:
cli.send(i)
time.sleep(0.5)
HCIE-Datacom Lab Guide Page 410
dis_this = cli.recv(999999).decode()
print (dis_this)
a.close()
# Send XML data using NETCONF to configure IP addresses for the interfaces.
CREATE_INTERFACE = '''<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>GigabitEthernet0/0/2</if:name>
<if:description>Config by NETCONF</if:description>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-
type:ethernetCsmacd</if:type>
<if:enabled>true</if:enabled>
<if:link-up-down-trap-enable>disabled</if:link-up-down-trap-enable>
</if:interface>
</if:interfaces>
</config>'''
#Execute the main function, in which the statements are executed in sequence.
if __name__ == '__main__':
ssh.ssh_config(filename,ip,ssh_user,ssh_password)
m = huawei_connect(ip,netconf_port,netconf_user,netconf_password)
m.edit_config(target='running',config=CREATE_INTERFACE)
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 2.
The current login time is 2021-09-01 16:16:45+08:00.
Info: Lastest accessed IP: 192.168.100.1 Time: 2021-09-01 16:16:05+08:00 Failed: 0 Password will expire in: -
Info: Smart-upgrade is currently disabled. Enable Smart-upgrade to get recommended version information.
<ACC_1>screen-length 0 temporary
Info: The configuration takes effect on the current user terminal interface only.
<ACC_1>system-view
Enter system view, return user view with Ctrl+Z.
[ACC_1] aaa
[ACC_1-aaa] local-user netconf password irreversible-cipher Huawei@123
Info: Add a new user.
[ACC_1-aaa] local-user netconf privilege level 15
HCIE-Datacom Lab Guide Page 412
Info: After changing the rights (including the password, access type, FTP directory, HTTP directory, and level) of a
local user, the rights of users already online do not change. The change takes effect to users who are onboarded
after the change.
[ACC_1-aaa] local-user netconf service-type api
[ACC_1-aaa] quit
[ACC_1] netconf
[ACC_1-netconf] source ip interface Vlanif 1 port 830
[ACC_1-netconf] quit
By default, Anaconda does not contain ncclient. You need to manually install ncclient. When
Anaconda is installed, pip3 is automatically installed. Then ncclient can be installed through the CLI
on Windows.
ip = '192.168.100.254'
ssh_user = 'python'
ssh_password = 'Huawei@123'
netconf_port = '830'
netconf_user = 'netconf'
netconf_password = 'Huawei@123'
filename=r'C:\Users\PC1\Documents\Key\NETCONF\NETCONF.txt'
Define variables to set parameters for the device. Set the host IP address, SSH user name, SSH
password, NETCONF port, NETCONF user name, NETCONF password, and local file name.
# Declare a class named ssh.
class ssh():
The class contains ssh_connect() and ssh_config(). ssh_connect() is used to establish an SSH
connection and ssh_config() is used to deliver the SSH configuration.
# Define ssh_connect.
def ssh_connect(ip,username,password):
ssh = paramiko.client.SSHClient()
ssh.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
ssh.connect(hostname=ip,port=22,username=username,password=password)
print(ip+' login succesfully')
return ssh
Define ssh_connect(ip,username,password) in the SSH class. Enter the SSH IP address, user name,
and password. This function encapsulates the paramiko method to create an SSH session. For
details, see the preceding sections.
# Define ssh_config.
def ssh_config(file,ip,username,password):
a = ssh.ssh_connect(ip,username,password)
cli = a.invoke_shell()
cli.send('screen-length 0 temporary\n')
time.sleep(0.5)
f = open(file,'r')
HCIE-Datacom Lab Guide Page 414
config_list = f.readlines()
for i in config_list:
cli.send(i)
time.sleep(0.5)
dis_this = cli.recv(999999).decode()
print (dis_this)
close()
Define ssh_config(file,ip,username,password) in the SSH class. Define the configuration file path,
SSH IP address, user name, and password.
ssh_config() connects to the device by invoking ssh_connect() and then sends configuration
commands. Use the open function to open the local NETCONF.txt file and write the file to the SSH
channel line by line. Check the interaction with the device and close the session.
# Define huawei_connect.
Define the huawei_connect(host, port, user, password) function. Set the IP address of the NETCONF
host, port, NETCONF user name, and NETCONF password for the function. The return result of the
function is the manager.connect method of ncclient.
manager.connect is used to establish a NETCONF connection. The parameter is defined in RFC 4741.
Two options are available to device_params on Huawei devices: huawei and huaweiyang, which
indicate the IETF YANG model and Huawei YANG model, respectively.
# Build an XML file.
CREATE_INTERFACE = '''<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>GigabitEthernet0/0/2</if:name>
<if:description>Config by NETCONF</if:description>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-
type:ethernetCsmacd</if:type>
<if:enabled>true</if:enabled>
<if:link-up-down-trap-enable>disabled</if:link-up-down-trap-enable>
</if:interface>
</if:interfaces>
</config>'''
NETCONF transfers configuration information through XML files. XML is a commonly used text
format that allows you to nest and expand data. A complete NETCONF session includes a transport
layer, a message layer, an operation layer, and a content layer. Only the information at the
operation and content layers is included in the current XML configuration file.
HCIE-Datacom Lab Guide Page 415
Basic NETCONF operations include get-config, get, edit-config, copy-config, delete-config, lock,
unlock, close-session, and kill session. For example, edit-config is used for the information at the
operation layer in this example, and the corresponding operation attribute is merge, which modifies
existing data (if the target data exists) or creates data (if the target data does not exist).
The NETCONF content layer is used to edit specific parameters. In this example, configure
description of GE0/0/2. For details about the XML format, see NETCONF YANG API Reference in the
product documentation.
# Run the main function.
if __name__ == '__main__':
ssh.ssh_config(filename,ip,ssh_user,ssh_password)
m = huawei_connect(ip,netconf_port,netconf_user,netconf_password)
m.edit_config(target='running',config=CREATE_INTERFACE)
10.2.3 Quiz
What are the differences between NETCONF- and SNMP-based device information query?
HCIE-Datacom Lab Guide Page 416
In this lab, ACC_1 and PC1 are used. The IP address of VLANIF 1 on ACC_1 is 192.168.100.254/24,
and the IP address of PC1 is 192.168.100.1/24. Upload the script to ACC_1 through FTP. Configure
the OPS function of ACC_1 to run the Python script.
The script in this lab can detect the status of GE0/0/23 on ACC_1. When GE0/0/23 is Up, VLAN 10
can be automatically created. Add GE0/0/23 to VLAN 10, create VLANIF 10, configure an IP address,
and configure a static route. When detecting that the interface is Down, the system automatically
deletes the corresponding configuration.
[ACC_1]interface Vlanif1
HCIE-Datacom Lab Guide Page 417
[ACC_1]ping 192.168.100.1
PING 192.168.100.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=128 time=1 ms
[ACC_1]aaa
[ACC_1-aaa] local-user admin password irreversible-cipher Huawei@123
[ACC_1-aaa] local-user admin privilege level 15
[ACC_1-aaa] local-user admin ftp-directory flash:
[ACC_1-aaa] local-user admin service-type telnet terminal ssh ftp http
return 0
# Add a route.
handle, descri_str = ops.cli.open()
result, n11, n21 = ops.cli.execute(handle,"system-view")
result, n11, n21 = ops.cli.execute(handle,"vlan 10")
result, n11, n21 = ops.cli.execute(handle,"port GigabitEthernet 0/0/23")
result, n11, n21 = ops.cli.execute(handle,"interface vlanif 10")
result, n11, n21 = ops.cli.execute(handle,"ip address 10.0.0.1 24")
result, n11, n21 = ops.cli.execute(handle,"quit")
result, n11, n21 = ops.cli.execute(handle,"ip route-static 1.1.1.1 32 10.0.0.2 ")
result = ops.cli.close(handle)
return 0
return 0
return 0
# Log in to ACC_1 using the FTP function of the CMD and upload the script.
PS C:\Users\PC1\Documents\Key\OPS> ftp
ftp> open 192.168.100.254
Connected to 192.168.100.254.
220 FTP service ready.
530 Please login with USER and PASS.
User (192.168.100.254:(none)): admin
331 Password required for admin.
Password:
230 User logged in.
ftp> put linkdown.py
200 Port command okay.
150 Opening ASCII mode data connection for directory list.
226 Transfer complete.
ftp: 1328 byte(s) received in 0.13 second(s) 10.62 Kbyte(s)/sec.
ftp> put linkup.py
200 Port command okay.
150 Opening ASCII mode data connection for directory list.
226 Transfer complete.
ftp: 1316 byte(s) received in 0.20 second(s) 6.48 Kbyte(s)/sec.
ftp>
Here, uploading files through FTP of the terminal on Windows is used as an example. The FTP
operations vary depending on the FTP software used.
<ACC_1>system-view
Enter system view, return user view with Ctrl+Z.
[ACC_1]ops
[ACC_1-ops]script-assistant python linkup.py
[ACC_1-ops]script-assistant python linkdown.py
The scripts are in Ready state, and the conditions of all the OPS subscription are Trap.
The log information indicates that the script has been successfully executed.
# Display the route configuration.
[ACC_1]display vlan 10
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
Import modules. The ops module is mandatory. Other modules are imported based on the modules
to be used in the script.
# Subscription processing function.
return 0
On the S5731, the OPS needs to execute the subscription processing function and then the execution
processing function.
Here, you can use the trap.subscribe interface of OPS to monitor the trap logs of the device.
HCIE-Datacom Lab Guide Page 422
For details about OPS APIs, see the configuration document of the device. Take the S5731 as an
example. You can choose Configuration > Device Management Configuration > OPS Configuration >
OPS API List to query the information.
# Work processing function.
# Add a route.
handle, descri_str = ops.cli.open()
result, n11, n21 = ops.cli.execute(handle,"system-view")
result, n11, n21 = ops.cli.execute(handle,"vlan 10")
result, n11, n21 = ops.cli.execute(handle,"port GigabitEthernet 0/0/23")
result, n11, n21 = ops.cli.execute(handle,"interface vlanif 10")
result, n11, n21 = ops.cli.execute(handle,"ip address 10.0.0.1 24")
result, n11, n21 = ops.cli.execute(handle,"quit")
result, n11, n21 = ops.cli.execute(handle,"ip route-static 1.1.1.1 32 10.0.0.2 ")
result = ops.cli.close(handle)
return 0
10.3.3 Quiz
How to notify users when they enter high-risk commands using OPS?
HCIE-Datacom Lab Guide Page 423