Sunteți pe pagina 1din 175

The privilege of HCNA/HCNP/HCIE:

With any Huawei Career Certification, you have the privilege on http://learning.huawei.com/en to enjoy:
n
 1、e-Learning Courses: Logon http://learning.huawei.com/en and enter Huawei Training/e-Learning
/e

o m
If you have the HCNA/HCNP certificate:You can access Huawei Career Certification and Basic Technology e-Learning
courses.
e i .c
If you have the HCIE certificate: You can access all the e-Learning courses which marked for HCIE Certification Users.

aw

Methods to get the HCIE e-Learning privilege : Please associate HCIE certificate information with your Huawei account, and

hu

email the account to Learning@huawei.com to apply for HCIE e-Learning privilege.


g .
 2、 Training Material Download
i n

arn
Content: Huawei product training material and Huawei career certification training material.

//le
Method:Logon http://learning.huawei.com/en and enter Huawei Training/Classroom Training ,then you can download
training material in the specific training introduction page.
p :
 3、 Priority to participate in Huawei Online Open Class (LVC)
t t

s :h
The Huawei career certification training and product training covering all ICT technical domains like R&S, UC&C, Security,

4、Learning Tools: rc e
Storage and so on, which are conducted by Huawei professional instructors.

u

s o
eNSP :Simulate single Router&Switch device and large network.

R e
WLAN Planner :Network planning tools for WLAN AP products.

n g
In addition, Huawei has built up Huawei Technical Forum which allows candidates to discuss technical issues with Huawei experts ,

ni
share exam experiences with others or be acquainted with Huawei Products.

a r
 Statement:
L e
r e
This material is for personal use only, and can not be used by any individual or organization for any commercial purposes.
o
M
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential 1
Huawei Certification

HCNA-HNTD
e n
INTERMEDIATE /
o m
i.c
e
aw
Huawei Networking Technology and Device
hu
Lab Guide g .
ni n
ar
l e
: //
t tp
: h
e s
r c
o u
es
R
i n g
a rn
L e
e
or
M

Huawei Technologies Co.,Ltd


Copyright © Huawei Technologies Co., Ltd. 2016.

All rights reserved.


Huawei owns all copyrights, except for references to other parties. 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.

Trademarks and Permissions


e n
/
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
o m
i.c
All other trademarks and trade names mentioned in this document are the property of
e
their respective holders.

aw
u
Notice
g .h
ni n
r
lea
The information in this manual is subject to change without notice. Every effort has

//
been made in the preparation of this manual to ensure accuracy of the contents, but all
:
warranty of any kind, express or implied.
t t p
statements, information, and recommendations in this manual do not constitute the

s :h
r c e
s ou
Re
i n g
n
e ar
e L Huawei Certification

or HCNA-HNTD Huawei Networking Technology and Device


M
Intermediate Lab Guide

Version 2.2
Huawei Certification System

Relying on its strong technical and professional training and certification system
and in accordance with customers of different ICT technology levels, Huawei
certification is committed to providing customers with authentic, professional
certification, and addresses the need for the development of quality engineers that
are capable of supporting enterprise networks in the face of an ever changing ICT
industry. The Huawei certification portfolio for routing and switching (R&S) is
e n
comprised of three levels to support and validate the growth and value of customer /
skills and knowledge in routing and switching technologies.
o m
e
The Huawei Certified Network Associate (HCNA) certification validates the skills
i.c
a
and knowledge of IP network engineers to implement and support small tow
u
.h
medium-sized enterprise networks. The HCNA certification provides a rich

g
ni n
foundation of skills and knowledge for the establishment of such enterprise
networks, along with the capability to implement services and features within
r
lea
existing enterprise networks, to effectively support true industry operations.

: //
t t p
HCNA certification covers fundamental skills for TCP/IP, routing, switching and
related IP network technologies, together with Huawei data communications

:h
products, and skills for versatile routing platform (VRP) operation and
s
management.
r c e
s ou
The Huawei Certified Network Professional (HCNP-R&S) certification is aimed at

Re
enterprise network engineers involved in design and maintenance, as well as

i n g
professionals who wish to develop an in depth knowledge of routing, switching,
network efficiency and optimization technologies. HCNP-R&S consists of three
n
ar
units including Implementing Enterprise Routing and Switching Network (IERS),

e
e LImproving Enterprise Network Performance (IENP), and Implementing Enterprise

or
Network Engineering Project (IEEP), which includes advanced IPv4 routing and
switching technology principles, network security, high availability and QoS, as well
M as application of the covered technologies in Huawei products.

The Huawei Certified Internet Expert (HCIE-R&S) certification is designed to imbue


engineers with a variety of IP network technologies and proficiency in maintenance,
for the diagnosis and troubleshooting of Huawei products, to equip engineers with
in-depth competency in the planning, design and optimization of large-scale IP
networks.
e n
/
o m
ei.c
aw
u
g.h
ni n
r
//lea
p :
t t
s:h
r c e
sou
Re
i n g
n
e ar
e L
or
M
Reference Icons

Router L3 Switch L2 Switch Cloud

e n
/
o m
Ethernet link Serial link e i.c
aw
u
g .h
Lab Environment Specification
n i n
In order to ensure that the configuration given a inrthis lab is supported on
/ l e device models and VRP
/
all devices, it is recommended that the following
:
tp
versions be used:

ht
Identifier Device Model
s : VRP version

R1 AR 2220E
r c e Version 5.160 (AR2200 V200R007C00SPC600)

o u
R2
es
AR 2220E Version 5.160 (AR2200 V200R007C00SPC600)

R
R3
i n g AR 2220E Version 5.160 (AR2200 V200R007C00SPC600)

a
S1rn S5720-36C-EI-AC Version 5.160 (S5700 V200R008C00SPC500)

L e
e S2 S5720-36C-EI-AC Version 5.160 (S5700 V200R008C00SPC500)

or
M S3 S3700-28TP-EI-AC Version 5.70 (S3700 V100R006C05)

S4 S3700-28TP-EI-AC Version 5.70 (S3700 V100R006C05)


CONTENTS

MODULE 1 ETHERNET AND VLAN ....................................................................................................... 1

LAB 1-1 ETHERNET INTERFACE AND LINK CONFIGURATION ................................................................................ 1

LAB 1-2 VLAN CONFIGURATION................................................................................................................ 11

LAB 1-3 GVRP CONFIGURATION ............................................................................................................... 21


e n
/
m
LAB 1-4 VLAN ROUTING.......................................................................................................................... 33

o
i.c
LAB 1-5 CONFIGURING LAYER 3 SWITCHING................................................................................................. 41

MODULE 2 ENTERPRISE WAN CONFIGURATION ............................................................................... 55


w e
u a
.h
LAB 2-1 HDLC AND PPP CONFIGURATION .................................................................................................. 55

g
i n
LAB 2-2 CONFIGURING FRAME RELAY AT THE CUSTOMER EDGE ....................................................................... 72

n
r
lea
LAB 2-3 PPPOE CLIENT SESSION ESTABLISHMENT ......................................................................................... 93

: //
MODULE 3 IMPLEMENTING IP SECURITY ........................................................................................ 102

t t p
:h
LAB 3-1 FILTERING ENTERPRISE DATA WITH ACCESS CONTROL LISTS. .............................................................. 102

s
LAB 3-2 NETWORK ADDRESS TRANSLATION ............................................................................................... 113
e
r c
LAB 3-3 ESTABLISHING LOCAL AAA SOLUTIONS .......................................................................................... 124

s ou
LAB 3-4 SECURING TRAFFIC WITH IPSEC VPN ............................................................................................ 133

Re
LAB 3-5 SUPPORTING DYNAMIC ROUTING WITH GRE .................................................................................. 146

i n g
n
MODULE 4 ESTABLISHING IPV6 NETWORKS ................................................................................... 157

e ar
LAB 4-1 IMPLEMENTING IPV6 NETWORKS AND SOLUTIONS........................................................................... 157

e L
or
M
Module 1 Ethernet and VLAN

Lab 1-1 Ethernet Interface and Link Configuration

Learning Objectives
e n
/
As a result of this lab section, you should achieve the following tasks:
o m
 Manually set the line rate on an interface.
e i.c
 Configuration of manual mode link aggregation. aw
hu
 Configuration of link aggregation using static LACP mode.
g .
i n
nLACP mode.
 Management of the priority of interfaces in static
ar
l e
: //
tp
Topology

ht
s :
r c e
o u
e s
R
i n g
a rn
L e Figure 1.1 Ethernet link aggregation topology

r e
o
M
Scenario

As a network administrator of an existing enterprise network, it has been requested


that the connections between the switches be used more effectively by preparing
the switches to support link aggregation before establishing manual link
aggregation, for which the media between the switches are to be configured as
member links.

HUAWEI TECHNOLOGIES Page1


Tasks

Step 1 Perform basic configuration on the Ethernet switches

Auto-negotiation is enabled on Huawei switch interfaces by default. The rate of


G0/0/9 and G0/0/10 on S1 and S2 are to be set manually.
Change the system name and view detailed information for G0/0/9 and G0/0/10 on
e n
/
S1.
o m
i.c
<Quidway>system-view
[Quidway]sysname S1
[S1]display interface GigabitEthernet 0/0/9
w e
GigabitEthernet0/0/9 current state : UP
u a
Line protocol current state : UP

g.h
n
Description:
Switch Port, Link-type : trunk(negotiated),
ni
r
lea
PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216

//
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is d0d0-4ba6-aab0
Current system time: 2016-11-23 14:18:37

p :
Port Mode: COMMON COPPER
t t
:h
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE

e s
Mdi : AUTO,
r
Flow-control: DISABLE
c
ou
Last 300 seconds input rate 256 bits/sec, 0 packets/sec

s
Last 300 seconds output rate 912 bits/sec, 0 packets/sec

e
R
Input peak rate 13976 bits/sec, Record time: 2016-11-22 14:59:12

g
Output peak rate 13976 bits/sec, Record time: 2016-11-22 14:59:12

n i n
ar
Input: 8802 packets, 1242101 bytes

e
Unicast: 854, Multicast: 7017

e L
Broadcast: 931, Jumbo: 0

or
Discard: 0, Pause: 0
Frames: 0

MTotal Error: 0
CRC: 0, Giants: 0
Jabbers: 0, Fragments: 0
Runts: 0, DropEvents: 0
Alignments: 0, Symbols: 0
Ignoreds: 0

HUAWEI TECHNOLOGIES Page2


Output: 53495 packets, 7626413 bytes
Unicast: 231, Multicast: 49564
Broadcast: 3700, Jumbo: 0
Discard: 0, Pause: 0

Total Error: 0
Collisions: 0, ExcessiveCollisions: 0
Late Collisions: 0, Deferreds: 0
Buffers Purged: 0
e n
/
Input bandwidth utilization threshold : 80.00%
o m
Output bandwidth utilization threshold: 80.00%
Input bandwidth utilization : 0%
e i.c
Output bandwidth utilization : 0%
aw
u
[S1]display interface GigabitEthernet 0/0/10
g.h
GigabitEthernet0/0/10 current state : UP

ni n
Line protocol current state : UP
r
lea
Description:

//
Switch Port, Link-type : trunk(negotiated),
PVID :
p :
1, TPID : 8100(Hex), The Maximum Frame Length is 9216

t t
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is d0d0-4ba6-aab0
Current system time: 2016-11-23 14:22:22

s :h
Port Mode: COMMON COPPER
Speed : 1000, Loopback: NONE
r c e
ou
Duplex: FULL, Negotiation: ENABLE
Mdi : AUTO,
es
Flow-control: DISABLE

R
Last 300 seconds input rate 72 bits/sec, 0 packets/sec

i n g
Last 300 seconds output rate 1024 bits/sec, 0 packets/sec

n
Input peak rate 14032 bits/sec, Record time: 2016-11-22 14:59:12

ar
Output peak rate 14032 bits/sec, Record time: 2016-11-22 14:59:12

L e
e
Input: 7025 packets, 786010 bytes

or
Unicast: 0, Multicast: 7025

M
Broadcast: 0, Jumbo: 0
Discard: 0, Pause: 0
Frames: 0

Total Error: 0
CRC: 0, Giants: 0
Jabbers: 0, Fragments: 0
Runts: 0, DropEvents: 0

HUAWEI TECHNOLOGIES Page3


Alignments: 0, Symbols: 0
Ignoreds: 0

Output: 54507 packets, 7979793 bytes


Unicast: 150, Multicast: 49709
Broadcast: 4648, Jumbo: 0
Discard: 0, Pause: 0

Total Error: 0
e n
/
m
Collisions: 0, ExcessiveCollisions: 0
Late Collisions: 0, Deferreds: 0
o
Buffers Purged: 0

ei.c
Input bandwidth utilization threshold : 80.00%
aw
u
.h
Output bandwidth utilization threshold: 80.00%

g
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%

ni n
Set the rate of G0/0/9 and G0/0/10 on S1 to 100arMbit/s. Before changing the
/ l e
interface rate, disable auto-negotiation.
: /
[S1]interface GigabitEthernet 0/0/9
t tp
h
[S1-GigabitEthernet0/0/9]undo negotiation auto

:
[S1-GigabitEthernet0/0/9]speed 100

e s
[S1-GigabitEthernet0/0/9]quit

r c
u
[S1]interface GigabitEthernet 0/0/10

o
s
[S1-GigabitEthernet0/0/10]undo negotiation auto

e
[S1-GigabitEthernet0/0/10]speed 100
R
i n
Set the rate of G0/0/9g and G0/0/10 on S2 to 100 Mbit/s.
a rn
<Quidway>system-view

L e
[Quidway]sysname S2

e
[S2]interface GigabitEthernet 0/0/9

o r
[S2-GigabitEthernet0/0/9]undo negotiation auto

M
[S2-GigabitEthernet0/0/9]speed 100
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]undo negotiation auto
[S2-GigabitEthernet0/0/10]speed 100

Confirm that the rate of G0/0/9 and G0/0/10 have been set on S1.
[S1]display interface GigabitEthernet 0/0/9

HUAWEI TECHNOLOGIES Page4


GigabitEthernet0/0/9 current state : UP
Line protocol current state : UP
Description:
Switch Port, Link-type : trunk(negotiated),
PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is d0d0-4ba6-aab0
Current system time: 2016-11-23 14:29:45
Port Mode: COMMON COPPER
Speed : 100, Loopback: NONE
e n
/
m
Duplex: FULL, Negotiation: DISABLE
Mdi : AUTO, Flow-control: DISABLE
o
……output omit……

e i.c
[S1]display interface GigabitEthernet 0/0/10
aw
u
.h
GigabitEthernet0/0/10 current state : UP

g
Line protocol current state : UP
Description:

ni n
Switch Port, Link-type : trunk(negotiated),
r
lea
PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216

//
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is d0d0-4ba6-aab0
Current system time: 2016-11-23 14:32:53
p :
Port Mode: COMMON COPPER
t t
Speed : 100, Loopback: NONE

s:h
Duplex: FULL,
Mdi : AUTO,
Negotiation: DISABLE
Flow-control: DISABLE
r c e
ou
……output omit……

e s
R link aggregation
Step 2 Configure manual
i n g
rn 1 on S1 and S2. Delete the default configuration from G0/0/9 and
Create Eth-Trunk
G0/0/10 ona
L e S1 and S2, and then add G0/0/9 and G0/0/10 to Eth-Trunk 1.

e
or
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]quit

M[S1]interface GigabitEthernet 0/0/9


[S1-GigabitEthernet0/0/9]eth-trunk 1
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]eth-trunk 1

[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]quit

HUAWEI TECHNOLOGIES Page5


[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]eth-trunk 1
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]eth-trunk 1

Verify the Eth-Trunk configuration.


[S1]display eth-trunk 1

e n
Eth-Trunk1's state information is:
/
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP

o m
i.c
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2

w
---------------------------------------------------------------------------- e
PortName Status Weight
u a
GigabitEthernet0/0/9 Up 1

g.h
n
GigabitEthernet0/0/10 Up 1

ni
r
lea
[S2]display eth-trunk 1

//
Eth-Trunk1's state information is:
WorkingMode: NORMAL
:
Hash arithmetic: According to SIP-XOR-DIP

p
t t
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8

:h
Operate status: up Number Of Up Port In Trunk: 2

s
----------------------------------------------------------------------------

e
PortName Status

r c Weight

ou
GigabitEthernet0/0/9 Up 1

s
GigabitEthernet0/0/10 Up 1

R e
The greyed lines ingthe preceding information indicate that the Eth-Trunk works
properly.
n i n
a r
L e
Step 3 Configuring Link Aggregation in Static LACP Mode
e
or the configurations from G0/0/9 and G0/0/10 on S1 and S2.
Delete
M[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]undo eth-trunk
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]undo eth-trunk

[S2]interface GigabitEthernet 0/0/9

HUAWEI TECHNOLOGIES Page6


[S2-GigabitEthernet0/0/9]undo eth-trunk
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]undo eth-trunk

Create Eth-Trunk 1 and set the load balancing mode of the Eth-Trunk to static LACP
mode.
[S1]interface Eth-Trunk 1

e n
[S1-Eth-Trunk1]mode lacp
/
[S1-Eth-Trunk1]quit

o m
i.c
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]eth-trunk 1
[S1-GigabitEthernet0/0/9]quit
w e
[S1]interface GigabitEthernet 0/0/10
u a
[S1-GigabitEthernet0/0/10]eth-trunk 1

g .h
[S2]interface Eth-Trunk 1
ni n
r
lea
[S2-Eth-Trunk1]mode lacp

//
[S2-Eth-Trunk1]quit
[S2]interface GigabitEthernet 0/0/9

p :
[S2-GigabitEthernet0/0/9]eth-trunk 1
t t
:h
[S2-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]eth-trunk 1

e s
r c
o u has been enabled on the two links.
Verify that the LACP-static mode

e s
R
[S1]display eth-trunk

g
Eth-Trunk1's state information is:
Local:
i n
LAG ID: 1

a rn WorkingMode: LACP

e
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP

e L
System Priority: 32768 System ID: d0d0-4ba6-aab0

o r
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2

M--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/9 Selected 100M 32768 1 289 10111100 1
GigabitEthernet0/0/10 Selected 100M 32768 2 289 10111100 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState

HUAWEI TECHNOLOGIES Page7


GigabitEthernet0/0/9 32768 d0d0-4ba6-ac20 32768 1 289 10111100
GigabitEthernet0/0/10 32768 d0d0-4ba6-ac20 32768 2 289 10111100

Set the system priority on S1 to 100 to ensure S1 remains the Actor.


[S1]lacp priority 100

Set the priority of the interface and determine active links on S1.

e n
/
[S1]interface GigabitEthernet 0/0/9

m
[S1-GigabitEthernet0/0/9]lacp priority 100
[S1-GigabitEthernet0/0/9]quit
o
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]lacp priority 100
e i.c
aw
u
Verify the Eth-Trunk configuration. g .h
ni n
[S1]display eth-trunk 1
r
lea
Eth-Trunk1's state information is:
Local:
: //
LAG ID: 1
Preempt Delay: Disabled
WorkingMode: LACP

t t p
Hash arithmetic: According to SIP-XOR-DIP
System Priority: 100
:h
System ID: d0d0-4ba6-aab0

s
Operate status: up
r e
Least Active-linknumber: 1 Max Active-linknumber: 8

c
Number Of Up Port In Trunk: 2

ou
--------------------------------------------------------------------------------
ActorPortName
es
Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/9
R
Selected 100M 100 1 289 10111100 1

ing
GigabitEthernet0/0/10 Selected 100M 100 2 289 10111100 1

Partner:
a rn
e
eL
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState

or
GigabitEthernet0/0/9 32768 d0d0-4ba6-ac20 32768 1 289 10111100

M
GigabitEthernet0/0/10 32768 d0d0-4ba6-ac20 32768 2 289 10111100

[S2]display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: LACP
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: d0d0-4ba6-ac20

HUAWEI TECHNOLOGIES Page8


Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/9 Selected 100M 32768 1 289 10111100 1
GigabitEthernet0/0/10 Selected 100M 32768 2 289 10111100 1

Partner:
--------------------------------------------------------------------------------
e n
/
m
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/9 100 d0d0-4ba6-aab0 100 1 289 10111100
o
GigabitEthernet0/0/10 100 d0d0-4ba6-aab0 100 2 289 10111100

e i.c
Final Configuration aw
u
g .h
n
[S1]display current-configuration
#
ni
r
lea
!Software Version V200R008C00SPC500

//
sysname S1
#

p :
lacp priority 100
t t
:h
#
interface Eth-Trunk1

e s
mode lacp

r c
ou
#

s
interface GigabitEthernet0/0/9
eth-trunk 1
Re
g
lacp priority 100

i
undo negotiation auto

n n
ar
speed 100

e
#

L
interface GigabitEthernet0/0/10

e
or
eth-trunk 1
lacp priority 100

M
undo negotiation auto
speed 100
#
return

[S2]display current-configuration
#
!Software Version V200R008C00SPC500

HUAWEI TECHNOLOGIES Page9


sysname S2
#
interface Eth-Trunk1
mode lacp
#
interface GigabitEthernet0/0/9
eth-trunk 1
undo negotiation auto
speed 100
e n
/
m
#
interface GigabitEthernet0/0/10
o
eth-trunk 1
undo negotiation auto
ei.c
speed 100
aw
u
.h
#

g
return

ni n
r
//lea
p :
t t
s:h
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page10


Lab 1-2 VLAN Configuration

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Assign port interfaces to become access and trunk ports.


e n
/
 Create VLANs.
o m
 Configure VLAN tagging over ports using the hybrid port link type.i.
c
e
w ID.
a
hu
 Configure the default VLAN for an interface using the Port VLAN

g .
ni n
Topology
ar
l e
: //
t tp
: h
e s
r c
o u
es
R
i n g
a rn
L e
r e Figure 1.2 VLAN topology

o
MScenario
The enterprise network currently operates in a single broadcast domain resulting in
a large amount of traffic being flooded to all network nodes. It is required that the
administrator attempt to control the flow of traffic at the link layer by implementing
VLAN solutions. The VLAN solutions are to be applied to switches S1 and S2.

HUAWEI TECHNOLOGIES Page11


Tasks

Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then
move to step 2. For those continuing from previous labs, begin at step 2.
Establish an Eth-trunk link between S1 and S2.
e n
/
<Quidway>system-view
o m
i.c
[Quidway]sysname S1
[S1]interface Eth-trunk 1
[S1-Eth-Trunk1]mode lacp
w e
[S1-Eth-Trunk1]quit
u a
[S1]interface GigabitEthernet0/0/9

g.h
n
[S1-Gigabitethernet0/0/9]eth-trunk 1
[S1-Gigabitethernet0/0/9]interface GigabitEthernet0/0/10
ni
r
lea
[S1-Gigabitethernet0/0/10]eth-trunk 1

: //
On S2, add interfaces to an Eth-Trunk using the Eth-Trunk view.

t t p
:h
<Quidway>system-view
[Quidway]sysname S2
[S2]interface eth-trunk 1
e s
[S2-Eth-Trunk1]mode lacp
r c
ou
[S2-Eth-Trunk1]trunkport GigabitEthernet 0/0/9

s
e
[S2-Eth-Trunk1]trunkport GigabitEthernet 0/0/10

R interfaces and establish a VLAN trunk


i n g
Step 2 Disable unused

a rn must be disabled to ensure test result accuracy. In this lab,


Unused interfaces
interfacese Ethernet 0/0/1 and Ethernet 0/0/7 on S3, Ethernet0/0/1 and
e L on S4 need to be shut down.
or
Ethernet0/0/14

M
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S3
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]shutdown
[S3-Ethernet0/0/1]quit
[S3]interface Ethernet 0/0/7
[S3-Ethernet0/0/7]shutdown

HUAWEI TECHNOLOGIES Page12


[Quidway]sysname S4
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]shutdown
[S4-Ethernet0/0/1]quit
[S4]interface Ethernet 0/0/14
[S4-Ethernet0/0/14]shutdown

e n
The link type of a switch port interface is hybrid by default. Configure the port /
link-type for Eth-Trunk 1 to become a trunk port. Additionally, allow all VLANS to
o mbe
permitted over the trunk port.
i . c
[S1]interface Eth-Trunk 1
w e
a
hu
[S1-Eth-Trunk1]port link-type trunk
[S1-Eth-Trunk1]port trunk allow-pass vlan all

g .
[S2]interface Eth-Trunk 1
ni n
[S2-Eth-Trunk1]port link-type trunk
ar
l e
//
[S2-Eth-Trunk1]port trunk allow-pass vlan all

:
Step 3 Configure VLANs t tp
: h
Use S3, R1, R3, and S4 as non-VLAN e saware hosts. There are two methods to create
r c interfaces to the created VLANs, S1 and S2 are
VLANs, and two methods to bind
u All interfaces associated with hosts should be
used to demonstrate the twoomethods.
e
configured as access ports. s
R
i
Ethernet 0/0/1 with n gVLAN 4.
On S1, associate interface Gigabit Ethernet 0/0/13 with VLAN 3, and interface Gigabit

a rn interface Gigabit Ethernet 0/0/3 with VLAN4, and Gigabit Ethernet


On S2, associate
L
0/0/6 with eVLAN 2.
r e
o
[S1]interface GigabitEthernet0/0/13

M
[S1-GigabitEthernet0/0/13]port link-type access
[S1-GigabitEthernet0/0/13]quit
[S1]interface GigabitEthernet0/0/1
[S1-GigabitEthernet0/0/1]port link-type access
[S1-GigabitEthernet0/0/1]quit
[S1]vlan 2
[S1-vlan2]vlan 3
[S1-vlan3]port GigabitEthernet0/0/13

HUAWEI TECHNOLOGIES Page13


[S1-vlan3]vlan 4
[S1-vlan4]port GigabitEthernet0/0/1
[S2]vlan batch 2 to 4
[S2]interface GigabitEthernet 0/0/3
[S2-GigabitEthernet0/0/3]port link-type access
[S2-GigabitEthernet0/0/3]port default vlan 4
[S2-GigabitEthernet0/0/3]quit
[S2]interface GigabitEthernet 0/0/6
[S2-GigabitEthernet0/0/6]port link-type access
e n
/
m
[S2-GigabitEthernet0/0/6]port default vlan 2

. co
Verify that the VLAN configuration has been correctly applied to S1 and S2.
e i
aw
hu
<S1>display vlan
The total number of vlans is : 4
g .
i n
----------------------------------------------------------------------------

n
U: Up; D: Down; TG: Tagged;
r
UT: Untagged;

a
e
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan;
// l
*: Management-vlan;

:
tp
----------------------------------------------------------------------------

ht
VID Type Ports

s :
1 common
r c e
----------------------------------------------------------------------------
UT:GE0/0/2(U) GE0/0/3(U) GE0/0/4(U) GE0/0/5(U)
GE0/0/6(D)
o u GE0/0/7(D) GE0/0/8(D) GE0/0/11(D)

es
GE0/0/12(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)

R
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)

i n g
GE0/0/21(U) GE0/0/22(U) GE0/0/23(U) GE0/0/24(D)

rn
Eth-Trunk1(U)

a
2 common TG:Eth-Trunk1(U)
3
e
common UT:GE0/0/13(U)
L
e
TG:Eth-Trunk1(U)

o
4
rcommon UT:GE0/0/1(U)

M
TG:Eth-Trunk1(U)
…output omitted…

HUAWEI TECHNOLOGIES Page14


<S2>display vlan
The total number of vlans is : 4
----------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
----------------------------------------------------------------------------

VID Type Ports


e n
/
m
----------------------------------------------------------------------------
1 common UT:GE0/0/1(U) GE0/0/2(U) GE0/0/4(U) GE0/0/5(U)
o
GE0/0/7(D)
GE0/0/13(U)
GE0/0/8(D)
GE0/0/14(D)
GE0/0/11(U)
GE0/0/15(D)
GE0/0/12(U)
GE0/0/16(D)
e i.c
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D)
aw
GE0/0/20(D)

u
.h
GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D)

g
Eth-Trunk1(U)
2 common UT:GE0/0/6(U)

ni n
TG:Eth-Trunk1(U)
r
lea
3 common TG:Eth-Trunk1(U)

//
4 common UT:GE0/0/3(U)
TG:Eth-Trunk1(U)
p :
…output omitted…
t t
s :h
r c e
The highlighted entries confirm the binding of the interfaces to each created VLAN.
All VLANs are permitted over the trunk (TG) port Eth-Trunk 1.

s ou
e
Step 4 Configure IPRaddressing for each VLAN
i n g
rn on hosts, R1, S3, R3, and S4 as part of the respective VLANs.
Configure IP addresses
a
econfigure the native management interface Vlanif1 with the IP address for
Physical port interfaces on switches cannot be configured with IP addresses,
L
therefore
e
r
the switch.
o
M<Huawei>system-view
[Huawei]sysname R1
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.4.1 24

[S3]interface vlanif 1
[S3-vlanif1]ip address 10.0.4.2 24

HUAWEI TECHNOLOGIES Page15


<Huawei>system-view
[Huawei]sysname R3
[R3]interface GigabitEthernet0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.4.3 24

[S4]interface vlanif 1
[S4-vlanif1]ip address 10.0.4.4 24

e n
Step 5 Verify the configuration, by checking the connectivity /
o m
Use the ping command. R1 and R3 in VLAN 4 should be able to communicate
one another. Devices in other VLANs should be unable to communicate.e i . c with

aw
hu
[R1]ping 10.0.4.3

.
PING 10.0.4.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.4.3: bytes=56 Sequence=1 ttl=255 time=6 ms

i n g
n
Reply from 10.0.4.3: bytes=56 Sequence=2 ttl=255 time=2 ms

ar
Reply from 10.0.4.3: bytes=56 Sequence=3 ttl=255 time=2 ms

l e
Reply from 10.0.4.3: bytes=56 Sequence=4 ttl=255 time=2 ms

: //
Reply from 10.0.4.3: bytes=56 Sequence=5 ttl=255 time=2 ms

t tp
--- 10.0.4.3 ping statistics ---

: h
s
5 packet(s) transmitted
5 packet(s) received

r c e
u
0.00% packet loss

s o
round-trip min/avg/max = 2/2/6 ms

[R1]ping 10.0.4.4 R e
i n g
PING 10.0.4.4: 56 data bytes, press CTRL_C to break

rn
Request time out

a
Request time out

e
L
Request time out

e
r
Request time out

o Request time out

M --- 10.0.4.4 ping statistics ---


5 packet(s) transmitted
0 packet(s) received
100.00% packet loss

You may wish to also try between R1 and S3, and between R3 and S4.

HUAWEI TECHNOLOGIES Page16


Step 6 Configure a hybrid interface

Use the hybrid port link type to allow VLAN tagging to be closely managed at a port
interface level. We shall use hybrid ports to allow tagged frames from VLAN 4 to be
received by VLAN 2 and vice versa.
Set the port link type of port interface Gigabit Ethernet 0/0/1 of port S1 and the

n
interfaces Gigabit Ethernet 0/0/3 and 0/0/6 of S2 as hybrid ports. Additionally set the
e
hybrid ports to untag all frames associated with VLAN 2 and 4.
/
[S1]interface GigabitEthernet 0/0/1
o m
[S1-GigabitEthernet0/0/1]undo port default vlan
[S1-GigabitEthernet0/0/1]port link-type hybrid
e i.c
[S1-GigabitEthernet0/0/1]port hybrid untagged vlan 2 4
aw
u
.h
[S1-GigabitEthernet0/0/1]port hybrid pvid vlan 4

[S2]interface GigabitEthernet 0/0/3


i n g
[S2-GigabitEthernet0/0/3]undo port default vlan
r n
lea
[S2-GigabitEthernet0/0/3]port link-type hybrid

//
[S2-GigabitEthernet0/0/3]port hybrid untagged vlan 2 4
[S2-GigabitEthernet0/0/3]port hybrid pvid vlan 4
p :
[S2-GigabitEthernet0/0/3]quit
t t
[S2]interface GigabitEthernet 0/0/6

s:h
r c e
[S2-GigabitEthernet0/0/6]undo port default vlan
[S2-GigabitEthernet0/0/6]port link-type hybrid

ou
[S2-GigabitEthernet0/0/6]port hybrid untagged vlan 2 4

es
[S2-GigabitEthernet0/0/6]port hybrid pvid vlan 2

R
n g
The port hybrid pvid vlan command will ensure frames received from the host are
i
n
ar
tagged with the appropriate VLAN tag. Frames received from VLAN 2 or 4 will be
untagged at the interface before being forwarded to the host.
L e
e
Use the ping command to verify that R3 in VLAN 4 is still reachable.

or
M
<R1>ping 10.0.4.3
PING 10.0.4.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.4.3: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 10.0.4.3: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.4.3: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.4.3: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 10.0.4.3: bytes=56 Sequence=5 ttl=255 time=1 ms

HUAWEI TECHNOLOGIES Page17


--- 10.0.4.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/2/10 ms

Use the ping command to test whether S4 in VLAN 2 is now reachable from R1 in
VLAN 4.

e n
/
<R1>ping 10.0.4.4

o m
i.c
PING 10.0.4.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.4.4: bytes=56 Sequence=1 ttl=255 time=41 ms
Reply from 10.0.4.4: bytes=56 Sequence=2 ttl=254 time=2 ms
w e
Reply from 10.0.4.4: bytes=56 Sequence=3 ttl=254 time=3 ms
u a
Reply from 10.0.4.4: bytes=56 Sequence=4 ttl=254 time=2 ms

g.h
n
Reply from 10.0.4.4: bytes=56 Sequence=5 ttl=254 time=2 ms

ni
r
lea
--- 10.0.4.4 ping statistics ---

//
5 packet(s) transmitted
5 packet(s) received

p :
0.00% packet loss
t t
:h
round-trip min/avg/max = 2/10/41 ms

e s
c
In using the hybrid port link type, frames originating from VLAN 4 are now able to be
r
ou
received by VLAN 2 and vice versa, whilst still being unable to reach the host address
of 10.0.4.2 in VLAN 3.
es
R
i n g
rn
Final Configuration
a
L e
[R1]display current-configuration

r e
[V200R007C00SPC600]
#
o
Msysname R1
#
interface GigabitEthernet0/0/1
ip address 10.0.4.1 255.255.255.0
#
return

[S3]display current-configuration

HUAWEI TECHNOLOGIES Page18


#
!Software Version V100R006C05
sysname S3
#
interface Vlanif1
ip address 10.0.4.2 255.255.255.0
#
interface Ethernet0/0/1
shutdown
e n
/
m
#
interface Ethernet0/0/7
o
shutdown
#
ei.c
return
aw
u
[S1]display current-configuration
g.h
#

ni n
!Software Version V200R008C00SPC500
r
lea
sysname S1

//
#
vlan batch 2 to 4
p :
#
t t
lacp priority 100

s:h
#
interface Eth-Trunk1
r c e
ou
port link-type trunk

es
port trunk allow-pass vlan 2 to 4094
mode lacp
R
#

i n g
n
interface GigabitEthernet0/0/1

ar
port link-type hybrid

e
port hybrid pvid vlan 4
L
e
port hybrid untagged vlan 2 4

or
#

M
interface GigabitEthernet0/0/9
undo negotiation auto
speed 100
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/10
undo negotiation auto

HUAWEI TECHNOLOGIES Page19


speed 100
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/13
port link-type access
port default vlan 3
#
return
e n
/
[S2]display current-configuration
o m
#
!Software Version V200R008C00SPC500
ei.c
sysname S2
aw
u
.h
#

g
vlan batch 2 to 4
#

ni n
interface Eth-Trunk1
r
lea
port link-type trunk

//
port trunk allow-pass vlan 2 to 4094
mode lacp
p :
#
t t
interface GigabitEthernet0/0/3

s :h
port link-type hybrid
port hybrid pvid vlan 4
r c e
ou
port hybrid untagged vlan 2 4
#
es
R
interface GigabitEthernet0/0/9
undo negotiation auto

i n g
n
speed 100

ar
eth-trunk 1
#
L e
e
interface GigabitEthernet0/0/10

or
undo negotiation auto

M
speed 100
eth-trunk 1
#
interface GigabitEthernet0/0/6
port link-type hybrid
port hybrid pvid vlan 2
port hybrid untagged vlan 2 4
#

HUAWEI TECHNOLOGIES Page20


return

[R3]display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/2
ip address 10.0.4.3 255.255.255.0
e n
/
m
#
return
o
[S4]display current-configuration
e i.c
#
aw
u
.h
!Software Version V100R006C05

g
sysname S4
#

ni n
interface Vlanif1
r
lea
ip address 10.0.4.4 255.255.255.0

//
#
interface Ethernet0/0/1
p :
shutdown
t t
#

s:h
interface Ethernet0/0/14
shutdown
r c e
ou
#
return
e s
R
i n g
Lab 1-3 GVRP Configuration

r n
a
LearningeObjectives
e L
As arresult of this lab section, you should achieve the following tasks:
o
M  Configuration of GVRP.
 Setting of the GVRP registration mode.

HUAWEI TECHNOLOGIES Page21


Topology

e n
/
o m
e i.c
aw
u
.h
Figure 1.3 GVRP topology

i n g
Scenario
r n
//lea
:
The enterprise network contains multiple switches which are expected to be
p
t
regularly managed. VLANs are required to be applied and removed as necessary on
t
:h
all switches however this tends to be a laborious task for the administrator and often

e s
configuration mistakes occur due to human error. The administrator wishes to
simplify the VLAN management process and has requested that GVRP be enabled on
r c
ou
all switchs and the registration mode on the interfaces be set.

es
R
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page22


Tasks

Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then
move to step 3. For those continuing from previous labs, begin at step 2.

e n
/
<Quidway>system-view

m
[Quidway]sysname S1

o
i.c
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]shutdown
[S1-GigabitEthernet0/0/9]quit
w e
[S1]interface GigabitEthernet 0/0/10

u a
.h
[S1-GigabitEthernet0/0/10]shutdown

<Quidway>system-view
i n g
[Quidway]sysname S2
r n
lea
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]shutdown
: //
[S2-GigabitEthernet0/0/9]quit

t t p
:h
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]shutdown

e s
<Quidway>system-view
r c
[Quidway]sysname S3

s ou
[S3-Ethernet0/0/7]shutdown

Re
n
<Quidway>system-view

i g
n
[Quidway]sysname S4

ar
[S4-Ethernet0/0/14]shutdown

e
L
Step 2e Clean up the previous configuration
or
MRemove the unsed VLANs and disable the Eth-Trunk interface on S1 and S2. Remove
Vlanif1 on S3 and S4 and bring up interface Ethernet 0/0/1 on S3.
[S1]undo vlan batch 2 to 4
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]shutdown

HUAWEI TECHNOLOGIES Page23


[S2]undo vlan batch 2 to 4
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]shutdown
[S2-Eth-Trunk1]quit
[S2]interface GigabitEthernet 0/0/6
[S2-GigabitEthernet0/0/6]undo port hybrid vlan 2 4

e n
/
m
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]undo shutdown
o
[S3-Ethernet0/0/1]quit
[S3]undo interface Vlanif 1
e i.c
aw
Info: This operation may take a few seconds. Please wait for a moment...succeeded.

u
[S4]interface Ethernet 0/0/1
g.h
[S4-Ethernet0/0/1]undo shutdown

ni n
[S4-Ethernet0/0/1]quit
r
lea
[S4]undo interface Vlanif 1

//
Info: This operation may take a few seconds. Please wait for a moment...succeeded.

p :
t t
:h
Step 3 Configure trunk links between the switches

e s
c
[S1]interface GigabitEthernet 0/0/13

r
ou
[S1-Gigabitethernet0/0/13]port link-type trunk

s
[S1-Gigabitethernet0/0/13]port trunk allow-pass vlan all

Re
[S3]interface Ethernet 0/0/13

i n g
[S3-Ethernet0/0/13]port link-type trunk

n
ar
[S3-Ethernet0/0/13]port trunk allow-pass vlan all
[S3-Ethernet0/0/13]quit

L e
[S3]interface Ethernet 0/0/1

e
or
[S3-Ethernet0/0/1]port link-type trunk
[S3-Ethernet0/0/1]port trunk allow-pass vlan all

M
[S2]interface GigabitEthernet 0/0/6
[S2-Gigabitethernet0/0/6]port link-type trunk
Warning: This command will delete VLANs on this port. Continue?[Y/N]:y
[S2-Gigabitethernet0/0/6]port trunk allow-pass vlan all

[S4]interface Ethernet 0/0/6


[S4-Ethernet0/0/6]port link-type trunk

HUAWEI TECHNOLOGIES Page24


[S4-Ethernet0/0/6]port trunk allow-pass vlan all
[S4-Ethernet0/0/6]quit
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]port link-type trunk
[S4-Ethernet0/0/1]port trunk allow-pass vlan all

Step 4 Enable GVRP globally, and on all relevant interfaces


[S1]vcmp role silent

e n
[S1]gvrp
/
[S1]interface GigabitEthernet 0/0/13

o m
i.c
[S1-GigabitEthernet0/0/13]gvrp

[S3]gvrp
w e
[S3]interface Ethernet 0/0/13
u a
.h
[S3-Ethernet0/0/13]gvrp
[S3-Ethernet0/0/13]quit

i n g
n
[S3]interface Ethernet 0/0/1

r
lea
[S3-Ethernet0/0/1]gvrp

[S2]vcmp role silent


: //
[S2]gvrp

t t p
:h
[S2]interface GigabitEthernet 0/0/6

s
[S2-Gigabitethernet0/0/6]gvrp

r c e
ou
[S4]gvrp

s
[S4]interface Ethernet0/0/6
[S4-Ethernet0/0/6]gvrp
[S4-Ethernet0/0/6]quit Re
i n g
[S4]interface Ethernet 0/0/1

n
ar
[S4-Ethernet0/0/1]gvrp

L e
Create VLAN 100 on S1, VLAN 200 on S2 and VLAN 2 on S1, S2, S3 and S4.
e
or
[S1]vlan batch 2 100
[S2]vlan batch 2 200
M
[S3]vlan 2
[S4]vlan 2

Run the display gvrp statistics command on S3 and S4 to view the GVRP statistics.
[S3]display gvrp statistics
GVRP statistics on port Ethernet0/0/1
GVRP status : Enabled

HUAWEI TECHNOLOGIES Page25


GVRP registrations failed : 0
GVRP last PDU origin : e028-6120-36f0
GVRP registration type : Normal
GVRP statistics on port Ethernet0/0/13
GVRP status : Enabled
GVRP registrations failed : 0
GVRP last PDU origin : d0d0-4ba6-aab0
GVRP registration type : Normal

e n
/
m
[S4]display gvrp statistics
GVRP statistics on port Ethernet0/0/1
o
GVRP status
GVRP registrations failed
: Enabled
: 0
e i.c
GVRP last PDU origin : e028-6120-3660
aw
u
.h
GVRP registration type : Normal

g
GVRP statistics on port Ethernet0/0/6
GVRP status : Enabled

ni n
GVRP registrations failed : 0
r
lea
GVRP last PDU origin : d0d0-4ba6-ac20

//
GVRP registration type : Normal

p :
t t
The registration type is set as normal by default. Use the display vlan command to
verify the VLAN configuration on S3 and S4.
s :h
[S3]display vlan

r c e
ou
The total number of vlans is : 4

s
----------------------------------------------------------------------------
U: Up; D: Down;
Re TG: Tagged; UT: Untagged;

g
MP: Vlan-mapping; ST: Vlan-stacking;

i n
#: ProtocolTransparent-vlan;

n
*: Management-vlan;

ar
----------------------------------------------------------------------------

VID Type
L e Ports

e
or
----------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)

M Eth0/0/5(D)
Eth0/0/9(D)
Eth0/0/6(D)
Eth0/0/10(D)
Eth0/0/7(D)
Eth0/0/11(D)
Eth0/0/8(D)
Eth0/0/12(D)
Eth0/0/13(U) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) Eth0/0/23(D) Eth0/0/24(D)
GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
2 common TG:Eth0/0/1(U) Eth0/0/13(U)
100 dynamic TG:Eth0/0/13(U)

HUAWEI TECHNOLOGIES Page26


200 dynamic TG:Eth0/0/1(U)
…output omitted…

[S4]display vlan
The total number of vlans is : 4
----------------------------------------------------------------------------U: Up;
D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
e n
/
m
#: ProtocolTransparent-vlan; *: Management-vlan;
----------------------------------------------------------------------------
o
VID Type Ports
----------------------------------------------------------------------------
e i.c
1 common UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
aw
u
.h
Eth0/0/5(D) Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D)

g
Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D)
Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
i n
Eth0/0/17(D)

n
Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
r Eth0/0/21(D)

lea
Eth0/0/22(D) Eth0/0/23(D) Eth0/0/24(D) GE0/0/1(D)

//
GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
2 common TG:Eth0/0/1(U) Eth0/0/6(U)
p :
100 dynamic TG:Eth0/0/1(U)
t t
200 dynamic TG:Eth0/0/6(U)

s :h
…output omitted…

S3 and S4 are learning VLAN 100


r e
c and VLAN 200 dynamically, but only in one
o u defined. Create VLAN 200 on S1 and VLAN 100
direction. VLAN 2 has been statically

es
on S2 to enable 2-way propagation.
R
[S1]vlan 200
[S2]vlan 100
i n g
rnvlan command to verify the configuration.
Run the display
a
L e
[S3]display vlan

r e
…output omitted…

o
VID Type Ports

M----------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(U) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) Eth0/0/23(D) Eth0/0/24(D)
GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)

HUAWEI TECHNOLOGIES Page27


2 common TG:Eth0/0/1(U) Eth0/0/13(U)
100 dynamic TG:Eth0/0/1(U) Eth0/0/13(U)
200 dynamic TG:Eth0/0/1(U) Eth0/0/13(U)
…output omitted…

[S4]display vlan
…output omitted…
VID Type Ports
----------------------------------------------------------------------------
e n
/
m
1 common UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D)
o
Eth0/0/11(D)
Eth0/0/14(D)
Eth0/0/12(D)
Eth0/0/15(D)
Eth0/0/10(D)
Eth0/0/16(D)
Eth0/0/13(D)
Eth0/0/17(D)
e i.c
Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
a
Eth0/0/21(D)w
u
.h
Eth0/0/22(D) Eth0/0/23(D) Eth0/0/24(U) GE0/0/1(D)

g
GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
2 common TG:Eth0/0/1(U) Eth0/0/6(U)

ni n
100 dynamic TG:Eth0/0/1(U) Eth0/0/6(U)
r
lea
200 dynamic TG:Eth0/0/1(U) Eth0/0/6(U)

//
…output omitted…

p :
t t
The highlighted entries indicate the interfaces that have been added to VLAN100
and VLAN200 on both S3 and S4.
s :h
Step 5 Change the registration
r e
c type for the interfaces
o uEthernet 0/0/1 on S3 to fixed. The same steps can be
e s of S4.
Change the registration type of

R
performed on Ethernet 0/0/1

i n g
[S3]interface Ethernet 0/0/1

rn
[S3-Ethernet0/0/1]gvrp registration fixed

a
e gvrp statistics command on S3 and S4 to view the changes.
L
Run the display
e
o r
[S3]display gvrp statistics interface Ethernet 0/0/1

M
GVRP statistics on port Ethernet0/0/1
GVRP status : Enabled
GVRP registrations failed : 11
GVRP last PDU origin : e028-6120-36f0
GVRP registration type : Fixed

The GVRP registration type is verified as fixed on Ethernet 0/0/1 interface. Dynamic
VLANs are not allowed to register on this interface.

HUAWEI TECHNOLOGIES Page28


Run the display vlan command to view the effect of the fixed registration type.
[S3]display vlan
…output omitted…
VID Type Ports
----------------------------------------------------------------------------1 common
UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)

e n
/
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)

m
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(U) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
o
Eth0/0/17(D)
Eth0/0/21(D)
Eth0/0/18(D)
Eth0/0/22(D)
Eth0/0/19(D)
Eth0/0/23(D)
Eth0/0/20(D)
Eth0/0/24(D)
e i.c
GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
aw
u
.h
2 common TG:Eth0/0/1(U) Eth0/0/13(U)

g
100 dynamic TG:Eth0/0/13(U)
200 dynamic TG:Eth0/0/13(U)

ni n
…output omit…
r
a 0/0/1 is not in registering
l e
//
The highlighted entries show that interface Ethernet
:
dynamic VLANs 100 and 200.
t p
tuse
h
Configure interface Ethernet 0/0/1 of S3 to the forbidden registration type. The
: 0/0/1 of S4.
same steps can be performed on Ethernet
e s
[S3]interface Ethernet 0/0/1
r c
o u
[S3-Ethernet0/0/1]gvrp registration forbidden

s
Re
[S4]interface Ethernet 0/0/1

n g
[S4-Ethernet0/0/1]gvrp registration forbidden

i
rn
e a
Run the display gvrp statistics command to view the changes to GVRP.

e L
or
[S3]display gvrp statistics interface Ethernet 0/0/1
GVRP statistics on port Ethernet0/0/1

M GVRP status
GVRP registrations failed
: Enabled
: 18
GVRP last PDU origin : 5489-98ec-f012
GVRP registration type : Forbidden

The GVRP registration type is set to forbidden on the Ethernet 0/0/1 interface.

HUAWEI TECHNOLOGIES Page29


Run the display vlan command to view the effect of the forbidden registration.
[S3]display vlan
The total number of vlans is : 4
…output omitted…
VID Type Ports
----------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)

e n
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
/
Eth0/0/13(U) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)

o m
i.c
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D)
GE0/0/1(D)
Eth0/0/22(D)
GE0/0/2(D)
Eth0/0/23(D)
GE0/0/3(D)
Eth0/0/24(D)
GE0/0/4(D)
w e
2 common TG:Eth0/0/13(U)
u a
100 dynamic TG:Eth0/0/13(U)

g .h
n
200 dynamic TG:Eth0/0/13(U)

i
n Ethernet 0/0/1, all other
Forbidden mode only allows VLAN1 pass over interface
ar
VLANS are restricted.
l e
: //
Final Configuration
t tp
: h
[S1]display current-configuration
e s
#
r c
o u
!Software Version V200R008C00SPC500
sysname S1
es
#
R
vcmp role silent

i n g
rn
#

a
vlan batch 2 100 200
#
L e
e
gvrp
#
o r
M
interface GigabitEthernet0/0/9
shutdown
#
interface GigabitEthernet0/0/10
shutdown
#
interface GigabitEthernet0/0/13
port link-type trunk

HUAWEI TECHNOLOGIES Page30


port trunk allow-pass vlan 2 to 4094
gvrp
#
return

[S2]display current-configuration
#
!Software Version V200R008C00SPC500
sysname S2
e n
/
m
#
vcmp role silent
o
vlan batch 2 100 200
#
ei.c
gvrp
aw
u
.h
#

g
interface GigabitEthernet0/0/6
port link-type trunk

ni n
port trunk allow-pass vlan 2 to 4094
r
lea
gvrp

//
#
interface GigabitEthernet0/0/9
p :
shutdown
t t
#

s:h
interface GigabitEthernet0/0/10
shutdown
r c e
ou
#
return
es
R
i n g
[S3]display current-configuration

n
#

ar
!Software Version V100R006C05
sysname S3
L e
e
#

or
vlan batch 2

M
#
gvrp
#interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
gvrp registration forbidden
#

HUAWEI TECHNOLOGIES Page31


interface Ethernet0/0/7
shutdown
#
interface Ethernet0/0/13
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
return
e n
/
[S4]display current-configuration
o m
#
!Software Version V100R006C05
ei.c
sysname S4
aw
u
.h
#

g
vlan batch 2
#

ni n
gvrp
r
lea
#

//
interface Ethernet0/0/1
port link-type trunk
p :
port trunk allow-pass vlan 2 to 4094
t t
gvrp

s:h
gvrp registration forbidden
#
r c e
ou
interface Ethernet0/0/6
port link-type trunk
es
R
port trunk allow-pass vlan 2 to 4094
gvrp

i n g
n
#

ar
interface Ethernet0/0/14
shutdown
L e
e
#

or
return

HUAWEI TECHNOLOGIES Page32


Lab 1-4 VLAN Routing

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Establishment of a trunk inteface for VLAN routing.


e n
/
 Configuration of sub-interfaces on a single physical interface.
o m
 Enabling of ARP messages to be broadcast between VLANS.
e i.c
aw
u
Topology
g .h
ni n
r
//lea
p :
t t
s :h
r c e
s ou
Re
i n g
n
e ar
e L
or
M Figure 1.4 VLAN routing topology using a layer 2 switch.

Scenario

The implementation of VLANs in the enterprise network has resulted in groups of

HUAWEI TECHNOLOGIES Page33


users being isolated from other users that are part of different subnets. As the
network administrator you have been given the task to ensure that the broadcast
domains are maintained whilst allowing communication between the disparate
users.

Tasks

Step 1 Preparing the environment


e n
/
o mto
.
If you are starting this section with a non-configured device, begin here and then move
i c
step 3. For those continuing from previous labs, begin at step 2.
e
w10.0.4.1/24 on
a
hu
Configure the system name for R1, R3 and S1. Configure the IP address
interface Gigabit Ethernet 0/0/1.
g .
<Huawei>system-view
ni n
Enter system view, return user view with Ctrl+Z.
ar
[Huawei]sysname R1
l e
[R1]interface GigabitEthernet 0/0/1
: //
[R1-GigabitEthernet0/0/1]ip address 10.0.4.1 24
t tp
: h
<Huawei>system-view

e s
c
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
u r
s o
<Quidway>system-view
[Quidway]sysname S1 R e
i n g
Step 2 Cleanrn up the previous configuration
e a
Remove L
r e S2 and S4 respectively.
the IP address 10.0.4.3 from R3, and disable the swich interfaces between S1 and

o
S3 and

M[R3]interface GigabitEthernet 0/0/2


[R3-GigabitEthernet0/0/2]undo ip address

[S1]undo gvrp
Warning: All information about the GVRP will be deleted . Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.

HUAWEI TECHNOLOGIES Page34


[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]undo port trunk allow-pass vlan 2 to 4094
[S1-GigabitEthernet0/0/13]shutdown
[S1-GigabitEthernet0/0/13]quit
[S1]interface GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]undo port hybrid vlan 2 4
[S1-GigabitEthernet0/0/1]quit
[S1]undo vlan batch 2 100 200
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
e n
/
m
Info: This operation may take a few seconds. Please wait for a moment...done.

o
[S2]undo gvrp
Warning: All information about the GVRP will be deleted . Continue?[Y/N]:y
e i.c
aw
Info: This operation may take a few seconds. Please wait for a moment...done.

u
.h
[S2]interface GigabitEthernet 0/0/6

g
[S2-GigabitEthernet0/0/6]undo port trunk allow-pass vlan 2 to 4094
[S2-GigabitEthernet0/0/6]shutdown

ni n
[S2-GigabitEthernet0/0/6]quit
r
lea
[S2]interface GigabitEthernet 0/0/3

//
[S2-GigabitEthernet0/0/3]undo port hybrid vlan 2 4
[S2-GigabitEthernet0/0/3]quit
p :
[S2]undo vlan batch 2 100 200
t t
:h
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y

s
r c e
Info: This operation may take a few seconds. Please wait for a moment...done.

ou
[S3]undo gvrp

es
Warning: All information about the GVRP will be deleted . Continue?[Y/N]:y

R
Info: This operation may take a few seconds. Please wait for a moment...done.

i n g
[S3]interface Ethernet 0/0/13

n
[S3-Ethernet0/0/13]undo port trunk allow-pass vlan 2 to 4094

ar
[S3-Ethernet0/0/13]port link-type hybrid

e
[S3-Ethernet0/0/13]quit
L
e
[S3]interface Ethernet 0/0/1

or
[S3-Ethernet0/0/1]undo port trunk allow-pass vlan 2 to 4094

M
[S3-Ethernet0/0/1]quit
[S3]undo vlan 2

[S4]undo gvrp
Warning: All information about the GVRP will be deleted . Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
[S4]interface Ethernet 0/0/6
[S4-Ethernet0/0/6]undo port trunk allow-pass vlan 2 to 4094

HUAWEI TECHNOLOGIES Page35


[S4-Ethernet0/0/6]port link-type hybrid
[S4-Ethernet0/0/6]quit
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]undo port trunk allow-pass vlan 2 to 4094
[S4-Ethernet0/0/1]quit
[S4]undo vlan 2

Step 3 Configure an IP address for R3

e n
/
Configure an IP address in the 10.0.8.0/24 network range on R1 interface Gigabit Ethetnet
0/0/1
o m
[R3]interface GigabitEthernet 0/0/1
e i.c
[R3-GigabitEthernet0/0/1]ip address 10.0.8.1 24

aw
u
Step 4 Establish two VLANs
g.h
ni n
r
Create VLANs 4 and 8 on S1, configure interface Gigabit Ethernet 0/0/1 to belong to VLAN

lea
4, and interface Gigabit Ethernet 0/0/3 to belong to VLAN 8.

: //
p
[S1]vlan batch 4 8

t t
Info: This operation may take a few seconds. Please wait for a moment...done.

:h
[S1]interface GigabitEthernet 0/0/1

e s
[S1-GigabitEthernet0/0/1]port link-type access

r c
[S1-GigabitEthernet0/0/1]port default vlan 4

ou
[S1-GigabitEthernet0/0/1]quit

s
[S1]interface GigabitEthernet0/0/3

e
R
[S1-GigabitEthernet0/0/3]port link-type access

i n g
[S1-GigabitEthernet0/0/3]port default vlan 8
[S1-GigabitEthernet0/0/3]quit

rn
Set interfaceaGigabit Ethernet 0/0/2 as a trunk link for VLANs 4 and 8.
L e
r e
[S1]interface GigabitEthernet0/0/2

o
[S1-GigabitEthernet0/0/2]port link-type trunk

M[S1-GigabitEthernet0/0/2]port trunk allow-pass vlan 4 8

Step 5 Configure VLAN routing through the sub-interface of R2

Configure sub-interfaces GigabitEthernet0/0/1.1 and GigabitEthernet0/0/1.3, to act as the


gateway of VLAN 4, and act as the gateway of VLAN 8.

HUAWEI TECHNOLOGIES Page36


<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet0/0/1.1
[R2-GigabitEthernet0/0/1.1]ip address 10.0.4.254 24
[R2-GigabitEthernet0/0/1.1]dot1q termination vid 4
[R2-GigabitEthernet0/0/1.1]arp broadcast enable
[R2-GigabitEthernet0/0/1.1]quit
[R2]interface GigabitEthernet0/0/1.3
e n
/
m
[R2-GigabitEthernet0/0/1.3]ip address 10.0.8.254 24
[R2-GigabitEthernet0/0/1.3]dot1q termination vid 8
o
[R2-GigabitEthernet0/0/1.3]arp broadcast enable

ei.c
Test connectivity between R1 and R3.
aw
u
<R1>ping 10.0.8.1
g.h
PING 10.0.8.1: 56 data bytes, press CTRL_C to break

ni n
Request time out
r
lea
Request time out

//
Request time out
Request time out
p :
Request time out
t t
s :h
--- 10.0.8.1 ping statistics ---
5 packet(s) transmitted
r c e
ou
0 packet(s) received
100.00% packet loss
e s
R
i n g
Configure a default route on R1 and R3.

a rn
[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.4.254

e
[R3]ip route-static 0.0.0.0 0.0.0.0 10.0.8.254
L
e
Testrconnectivity
o
between R1 and R3 again.

M<R1>ping 10.0.8.1
PING 10.0.8.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.8.1: bytes=56 Sequence=1 ttl=254 time=10 ms
Reply from 10.0.8.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 10.0.8.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 10.0.8.1: bytes=56 Sequence=4 ttl=254 time=10 ms
Reply from 10.0.8.1: bytes=56 Sequence=5 ttl=254 time=1 ms

HUAWEI TECHNOLOGIES Page37


--- 10.0.8.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/4/10 ms
[R2]display ip routing-table
Route Flags: R - relay, D - download to fib
-------------------------------------------------------------------------
e n
/
m
Routing Tables: Public
Destinations : 10 Routes : 10
o
Destination/Mask Proto Pre Cost Flags NextHop Interface
e i.c
aw
u
.h
10.0.4.0/24 Direct 0 0 D 10.0.4.254 GigabitEthernet0/0/1.1

g
10.0.4.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1.1
10.0.4.255/32 Direct 0 0 D 127.0.0.1
i n
GigabitEthernet0/0/1.1

n
10.0.8.0/24 Direct 0 0 D 10.0.8.254
r
GigabitEthernet0/0/1.3

lea
10.0.8.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1.3

://
10.0.8.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1.3

tp
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D
t
127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0

s
D
:h
127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0

r c e D 127.0.0.1 InLoopBack0

Final Configuration
s ou
Re
g
[R1]display current-configuration

i n
[V200R007C00SPC600]

n
ar
#

e
sysname R1
#

e L
or
interface GigabitEthernet0/0/1
ip address 10.0.4.1 255.255.255.0

M #
ip route-static 0.0.0.0 0.0.0.0 10.0.4.254
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+
L,%$%$
user-interface vty 0 4

HUAWEI TECHNOLOGIES Page38


#
return

[R2]display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
interface GigabitEthernet0/0/1
e n
/
m
#
interface GigabitEthernet0/0/1.1
o
dot1q termination vid 4
ip address 10.0.4.254 255.255.255.0
e i.c
arp broadcast enable
aw
u
.h
#

g
interface GigabitEthernet0/0/1.3
dot1q termination vid 8

ni n
ip address 10.0.8.254 255.255.255.0
r
lea
arp broadcast enable

//
#
user-interface con 0
p :
authentication-mode password
t t
:h
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*

s
(,%$%$
user-interface vty 0 4
r c e
ou
#
return
es
R
[R3]dis current-configuration
[V200R007C00SPC600]

i n g
n
#

ar
sysname R3
#
L e
e
interface GigabitEthernet0/0/1

or
ip address 10.0.8.1 255.255.255.0

M
#
ip route-static 0.0.0.0 0.0.0.0 10.0.8.254
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*
g,%$%$
user-interface vty 0 4

HUAWEI TECHNOLOGIES Page39


#
return
[S1]display current-configuration
#
!Software Version V200R008C00SPC500
sysname S1
#
vlan batch 4 8
#
e n
/
m
interface GigabitEthernet0/0/1
port link-type access
o
port default vlan 4
#
ei.c
interface GigabitEthernet0/0/2
aw
u
.h
port link-type trunk

g
port trunk allow-pass vlan 4 8
#

ni n
interface GigabitEthernet0/0/3
r
lea
port link-type access

//
port default vlan 8
#
p :
user-interface con 0
t t
user-interface vty 0 4

s :h
#
return
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page40


Lab 1-5 Configuring Layer 3 Switching

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Configuration of VLAN interfaces.


e n
/
 Establishment of VLAN routing on a single switch
o m
 Perform VLAN routing over an Ethernet Trunk link.
e i.c
aw
hu
 Perform dynamic routing between VLAN interfaces using OSPF.

g .
Topology
ni n
ar
l e
: //
t tp
: h
e s
r c
o u
es
R
i n g
a rn
L e
r e Figure 1.5 Layer 3 switching topology

o
MScenario
The introduction of layer three switches into the enterprise network opened up
opportunities for streamlining the current VLAN routing configuration. The network
administrator has been given the task to implement VLAN routing using only the
layer three switches to support communication between the VLANs in the network
as displayed in the topology. VLANs should be capable of inter VLAN

HUAWEI TECHNOLOGIES Page41


communication. Additionally S1 and S2 are expected to communicate over a Layer 3
for which routing protocol support is required.

Tasks

Step 1 Preparing the environment

e n
If you are starting this section with a non-configured device, begin here and then
/
move to step 3. For those continuing from previous labs, begin at step 2.
o m
Configure R1 with the address 10.0.4.1/24 on interface Gigabit Ethernet
i . c 0/0/1.
w e
Establish an Eth-Trunk beween S1 an S2. Disable any unnecessary interfaces on S1
and S2 to S3 and S4.
a
<Huawei>system-view
. hu
Enter system view, return user view with Ctrl+Z.

i n g
n
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
ar
l e
//
[R1-GigabitEthernet0/0/1]ip address 10.0.4.1 24

:
<Huawei>system-view
t tp
h
Enter system view, return user view with Ctrl+Z.

:
[Huawei]sysname R3

e s
r c
<Quidway>system-view

o u
s
[Quidway]sysname S1

e
[S1]interface Eth-Trunk 1
R
g
[S1-Eth-Trunk1]mode lacp

i n
[S1-Eth-Trunk1]port link-type trunk

rn
[S1-Eth-Trunk1]port trunk allow-pass vlan all

e a
[S1-Eth-Trunk1]quit

L
[S1]interface GigabitEthernet 0/0/9

e
o r
[S1-GigabitEthernet0/0/9]eth-trunk 1
[S1-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/10

M[S1-GigabitEthernet0/0/10]eth-trunk 1

<Quidway>system-view
[Quidway]sysname S2
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]mode lacp
[S2-Eth-Trunk1]port link-type trunk
[S2-Eth-Trunk1]port trunk allow-pass vlan all

HUAWEI TECHNOLOGIES Page42


[S2-Eth-Trunk1]quit
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]eth-trunk 1
[S2-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]eth-trunk 1

<Quidway>system-view
[Quidway]sysname S3
[S3]interface Ethernet 0/0/7
e n
/
m
[S3-Ethernet0/0/7]shutdown

o
<Quidway>system-view
[Quidway]sysname S4
e i.c
[S4]interface Ethernet 0/0/14
aw
u
.h
[S4-Ethernet0/0/14]shutdown

Step 2 Clean up the previous configuration i n g


r n
//lea
:
Remove the VLAN routing configuration and sub-interfaces on the devices.
p
t t
:h
[R1]undo ip route-static 0.0.0.0 0

e s
r c
[R2]undo interface GigabitEthernet 0/0/1.1

ou
[R2]undo interface GigabitEthernet 0/0/1.3

es
R
[R3]interface GigabitEthernet 0/0/1

i n g
[R3-GigabitEthernet0/0/1]undo ip address
[R3-GigabitEthernet0/0/1]quit

n
ar
[R3]undo ip route-static 0.0.0.0 0

L e
[S1]undo vlan batch 4 8

e
or
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.

M
[S1]interface GigabitEthernet 0/0/2
[S1-GigabitEthernet0/0/2]undo port trunk allow-pass vlan 4 8
[S1-GigabitEthernet0/0/2]quit
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]undo shutdown

[S2]interface GigabitEthernet0/0/6
[S2-GigabitEthernet0/0/6]undo shutdown

HUAWEI TECHNOLOGIES Page43


Re-enable the Eth-Trunk interface between S1 and S2

[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]undo shutdown

[S2]interface Eth-Trunk 1
e n
/
m
[S2-Eth-Trunk1]undo shutdown

o
Step 3 Configure VLAN 3 through to VLAN 7 for S1 and S2
e i.c
aw
[S1]vlan batch 3 to 7
u
.h
Info: This operation may take a few seconds. Please wait for a moment...done.

g
ni n
r
[S2]vlan batch 3 to 7

lea
Info: This operation may take a few seconds. Please wait for a moment...done.

Verify that the VLANs have been created. : //


t t p
:h
[S1]display vlan

s
The total number of vlans is : 6
…output omitted…

r c e
ou
VID Type Ports
----------------------------------------------------------------------------
1 common UT:GE0/0/1(U)
es GE0/0/2(D) GE0/0/3(U) GE0/0/4(U)
GE0/0/5(U)
R GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)

i n g
GE0/0/11(D) GE0/0/12(D) GE0/0/13(D) GE0/0/14(D)

n
GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)

e ar
GE0/0/19(D) GE0/0/20(D) GE0/0/21(U) GE0/0/22(U)

e L GE0/0/23(U) GE0/0/24(D) Eth-Trunk1(U)

or
3 common TG:Eth-Trunk1(U)
4 common TG:Eth-Trunk1(U)

M
5
6
common TG:Eth-Trunk1(U)
common TG:Eth-Trunk1(U)
7 common TG:Eth-Trunk1(U)
…output omitted…

[S2]display vlan
The total number of vlans is : 6
…output omitted…

HUAWEI TECHNOLOGIES Page44


VID Type Ports
----------------------------------------------------------------------------
1 common UT:GE0/0/1(U) GE0/0/2(D) GE0/0/3(U) GE0/0/4(U)
GE0/0/5(U) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/11(U) GE0/0/12(U) GE0/0/13(U) GE0/0/14(D)
GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)
GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D)
GE0/0/23(D) GE0/0/24(D) Eth-Trunk1(U)
3 common TG:Eth-Trunk1(U)
e n
/
m
4 common TG:Eth-Trunk1(U)
5 common TG:Eth-Trunk1(U)
o
6
7
common TG:Eth-Trunk1(U)
common TG:Eth-Trunk1(U)
e i.c
…output omitted…
aw
u 5
hPVID
Step 4 Set the Eth-Trunk link between S1 and S2 with
g .
Add interfaces Gigabit Ethernet 0/0/1 and 0/0/13 of S1in to VLAN 4 and VLAN 3
respectively. For S2, add interfaces Gigabit Ethernet 0/0/3 r n and G0/0/6 to VLAN 6 and
VLAN 7 respectively.
l e a
: //
tp
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]port trunk pvid vlan 5

ht
:
[S1-Eth-Trunk1]quit
[S1]interface GigabitEthernet 0/0/1
e s
r c
[S1-GigabitEthernet0/0/1]port link-type access

o u
[S1-GigabitEthernet0/0/1]port default vlan 4

e s
[S1-GigabitEthernet0/0/1]quit

R
[S1]interface GigabitEthernet 0/0/13

i n g
[S1-GigabitEthernet0/0/13]port link-type access
[S1-GigabitEthernet0/0/13]port default vlan 3

a rn
e
[S2]interface Eth-Trunk 1

L
e
[S2-Eth-Trunk1]port trunk pvid vlan 5

o r
[S2-Eth-Trunk1]quit

M
[S2]interface GigabitEthernet 0/0/3
[S2-GigabitEthernet0/0/3]port link-type access
[S2-GigabitEthernet0/0/3]port default vlan 6
[S2-GigabitEthernet0/0/3]quit
[S2]interface GigabitEthernet 0/0/6
[S2-GigabitEthernet0/0/6]port link-type access
[S2-GigabitEthernet0/0/6]port default vlan 7

HUAWEI TECHNOLOGIES Page45


Run the display vlan command to view the configuration.
<S1>display vlan
The total number of vlans is : 6
…output omit…
VID Type Ports
----------------------------------------------------------------------------
1 common UT:GE0/0/2(D) GE0/0/3(U) GE0/0/4(U) GE0/0/5(U)

e n
GE0/0/6(D) GE0/0/7(D) GE0/0/8(D) GE0/0/11(D)
/
GE0/0/12(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)

o m
i.c
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)
GE0/0/21(U)
TG:Eth-Trunk1(U)
GE0/0/22(U) GE0/0/23(U) GE0/0/24(D)

w e
3 common UT:GE0/0/13(U)
u a
TG:Eth-Trunk1(U)

g.h
n
4 common UT:GE0/0/1(U)
TG:Eth-Trunk1(U)
ni
r
lea
5 common UT:Eth-Trunk1(U)

//
6 common TG:Eth-Trunk1(U)
7 common TG:Eth-Trunk1(U)

p :
…output omit…
t t
<S2>display vlan
s :h
The total number of vlans is : 6

r c e
ou
…output omit…

s
VID Type Ports

e
----------------------------------------------------------------------------
R
g
1 common UT:GE0/0/1(U) GE0/0/2(D) GE0/0/4(U) GE0/0/5(U)

n i n
GE0/0/6(D) GE0/0/7(D) GE0/0/8(D) GE0/0/11(U)

ar
GE0/0/12(U) GE0/0/13(U) GE0/0/14(D) GE0/0/15(D)

e
GE0/0/16(D) GE0/0/17(D) GE0/0/18(D) GE0/0/19(D)

e L GE0/0/20(D) GE0/0/21(D) GE0/0/22(D) GE0/0/23(D)

or
TG:Eth-Trunk1(U)
3 common TG:Eth-Trunk1(U)

M
4
5
common TG:Eth-Trunk1(U)
common TG:Eth-Trunk1(U)
6 common UT:GE0/0/3(U)
TG:Eth-Trunk1(U)
7 common UT:GE0/0/6(U)
TG:Eth-Trunk1(U)
…output omit…

HUAWEI TECHNOLOGIES Page46


Step 5 Configure gateway addresses for VLANs on S1 and S2

Configure IP addresses for Vlanif3, Vlanif4, and Vlanif5 on S1, and for Vlanif5, Vlanif6,
and Vlanif7 on S2.
[S1]interface Vlanif 3
[S1-Vlanif3]ip address 10.0.3.254 24
[S1-Vlanif3]interface Vlanif 4

e n
[S1-Vlanif4]ip address 10.0.4.254 24
/
[S1-Vlanif4]interface Vlanif 5

o m
i.c
[S1-Vlanif5]ip address 10.0.5.1 24

[S2]interface Vlanif 5
w e
[S2-Vlanif5]ip address 10.0.5.2 24
u a
.h
[S2-Vlanif5]interface Vlanif 6
[S2-Vlanif6]ip address 10.0.6.254 24

i n g
n
[S2-Vlanif6]interface Vlanif 7

r
lea
[S2-Vlanif7]ip address 10.0.7.254 24

: //
Step 6 IP addressing and default routes for R1, R3, S3 and S4
t t p
:
IP addresses on a switch much be assigned h to a Vlanif, where Vlanif1 is a common
(untagged) Vlanif. Interfaces Ethernets 0/0/13 of S3 and Ethernet 0/0/6 of S4 should
be associated with the commonrc
e
VLAN1. R1 should already be configured with the
address 10.0.4.1/24.
o u
e s
R
i n g
[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.4.254

rn
[S3]interface Vlanif 1

a
L e
[S3-Vlanif1]ip address 10.0.3.3 24
[S3-Vlanif1]quit

r e
[S3]ip route-static 0.0.0.0 0.0.0.0 10.0.3.254

o
M[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.6.3 24
[R3-GigabitEthernet0/0/2]quit
[R3]ip route-static 0.0.0.0 0.0.0.0 10.0.6.254

[S4]interface Vlanif 1
[S4-Vlanif1]ip address 10.0.7.4 24
[S4-Vlanif1]quit

HUAWEI TECHNOLOGIES Page47


[S4]ip route-static 0.0.0.0 0.0.0.0 10.0.7.254

Step 7 Test connectivity between VLAN 3 and VLAN 4

Test connectivity between S3 and R1.


<R1>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=37 ms

e n
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=253 time=2 ms
/
Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=253 time=10 ms

o m
i.c
Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=253 time=3 ms

e
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=253 time=2 ms

aw
u
--- 10.0.3.3 ping statistics ---

.h
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
i n g
r n
lea
round-trip min/avg/max = 2/10/37 ms

Test connectivity between R3 and R1.


: //
<R1>ping 10.0.6.3
t t p
:h
PING 10.0.6.3: 56 data bytes, press CTRL_C to break
Request time out
e s
Request time out
r c
ou
Request time out
Request time out
es
Request time out
R
i n g
--- 10.0.6.3 ping statistics ---

n
ar
5 packet(s) transmitted

L e
0 packet(s) received
100.00% packet loss
e
or
The connectivity between R1 and R3 fails. Use the tracert command to troubleshoot
M
the fault:
[R1]tracert 10.0.6.3
traceroute to 10.0.6.3(10.0.6.3), max hops: 30 ,packet length: 40,press CTRL_C to break
1 10.0.4.254 17 ms 4 ms 4 ms
2 * * *

HUAWEI TECHNOLOGIES Page48


According to the command output, R1 has sent data packets to the destination
address 10.0.6.3, but the gateway at 10.0.4.254 responds that the network is
unreachable.
Check whether the network is unreachable on the gateway (S1).
[S1]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------

e n
/
Routing Tables: Public

m
Destinations : 8 Routes : 8

o
Destination/Mask Proto Pre Cost Flags NextHop Interface

e i.c
10.0.3.0/24 Direct 0 0 D 10.0.3.254 Vlanif3
aw
u
.h
10.0.3.254/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.4.0/24
10.0.4.254/32
Direct
Direct
0
0
0
0
D
D
10.0.4.254
127.0.0.1
i n g
Vlanif4
InLoopBack0
10.0.5.0/24 Direct 0 0 D
r
10.0.5.1
n Vlanif5

lea
10.0.5.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

://
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

tp
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

t
h does not have a route to the network
According to the command output, S1
:
s segment is not directly connected to S1. In
r e
segment 10.0.6.0 because the network
c routing protocol has been configured to
addition, no static route or dynamic
advertise the routes.
o u
Step 8 Enable OSPFRon esS1 and S2
i n g
rn
[S1]ospf

e a
[S1-ospf-1]area 0

L
[S1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

e
o r
[S2]ospf

M[S2-ospf-1]area 0
[S2-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

After the configuration, wait until S1 and S2 exchange OSPF routes and complete the
link state database, then view the resulting routing table of S1.

HUAWEI TECHNOLOGIES Page49


[S1]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.3.0/24 Direct 0 0 D 10.0.3.254 Vlanif3


e n
/
m
10.0.3.254/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.4.0/24 Direct 0 0 D 10.0.4.254 Vlanif4
o
10.0.4.254/32
10.0.5.0/24
Direct 0
Direct 0
0
0
D
D
127.0.0.1
10.0.5.1
InLoopBack0
Vlanif5
e i.c
10.0.5.1/32 Direct 0 0 D 127.0.0.1
aw
InLoopBack0

u
.h
10.0.6.0/24 OSPF 10 2 D 10.0.5.2 Vlanif5

g
10.0.7.0/24 OSPF 10 2 D 10.0.5.2 Vlanif5
127.0.0.0/8 Direct 0 0 D 127.0.0.1

ni n
InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1
r InLoopBack0

//lea
:
S1 has learned two routes using OSPF. Test connectivity between R1 and R3.
p
[R1]ping 10.0.6.3
t t
:h
PING 10.0.6.3: 56 data bytes, press CTRL_C to break

s
r c e
Reply from 10.0.6.3: bytes=56 Sequence=1 ttl=253 time=11 ms
Reply from 10.0.6.3: bytes=56 Sequence=2 ttl=253 time=1 ms

ou
Reply from 10.0.6.3: bytes=56 Sequence=3 ttl=253 time=10 ms

es
Reply from 10.0.6.3: bytes=56 Sequence=4 ttl=253 time=1 ms

R
Reply from 10.0.6.3: bytes=56 Sequence=5 ttl=253 time=1 ms

i n g
n
--- 10.0.6.3 ping statistics ---

ar
5 packet(s) transmitted

L e
5 packet(s) received

e
0.00% packet loss

or
round-trip min/avg/max = 1/4/11 ms

M
[R1]ping 10.0.7.4
PING 10.0.7.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.7.4: bytes=56 Sequence=1 ttl=253 time=30 ms
Reply from 10.0.7.4: bytes=56 Sequence=2 ttl=252 time=2 ms
Reply from 10.0.7.4: bytes=56 Sequence=3 ttl=252 time=3 ms
Reply from 10.0.7.4: bytes=56 Sequence=4 ttl=252 time=2 ms

HUAWEI TECHNOLOGIES Page50


Reply from 10.0.7.4: bytes=56 Sequence=5 ttl=252 time=2 ms

--- 10.0.7.4 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/7/30 ms

Final Configuration e n
/
o m
i.c
[R1]display current-configuration
[V200R007C00SPC600]
#
w e
sysname R1
u a
#

g.h
n
interface GigabitEthernet0/0/1
ip address 10.0.4.1 255.255.255.0
ni
r
lea
#

//
ip route-static 0.0.0.0 0.0.0.0 10.0.4.254
#

p :
return
t t
[S1]display current-configuration
s :h
!Software Version V200R008C00SPC500

r c e
ou
#

s
sysname S1
#
Re
g
vlan batch 3 to 7
#

n i n
ar
interface Vlanif3

e
ip address 10.0.3.254 255.255.255.0
#

e L
or
interface Vlanif4
ip address 10.0.4.254 255.255.255.0

M
#
interface Vlanif5
ip address 10.0.5.1 255.255.255.0
#
interface Eth-Trunk1
port link-type trunk
port trunk pvid vlan 5
port trunk allow-pass vlan 2 to 4094

HUAWEI TECHNOLOGIES Page51


mode lacp
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/9
eth-trunk 1
#
e n
/
m
interface GigabitEthernet0/0/10
eth-trunk 1
o
#
interface GigabitEthernet0/0/13
ei.c
port link-type access
aw
u
.h
port default vlan 3

g
#
ospf 1

ni n
area 0.0.0.0
r
lea
network 10.0.0.0 0.255.255.255

//
#
return
p :
t t
[S2]display current-configuration

s :h
!Software Version V200R008C00SPC500
#
r c e
ou
sysname S2
#
es
vlan batch 3 to 7
R
#

i n g
n
interface Vlanif5

ar
ip address 10.0.5.2 255.255.255.0
#
L e
e
interface Vlanif6

or
ip address 10.0.6.254 255.255.255.0

M
#
interface Vlanif7
ip address 10.0.7.254 255.255.255.0
#
interface Eth-Trunk1
port link-type trunk
port trunk pvid vlan 5
port trunk allow-pass vlan 2 to 4094

HUAWEI TECHNOLOGIES Page52


mode lacp
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/6
port link-type access
port default vlan 7
e n
/
m
#
interface GigabitEthernet0/0/9
o
eth-trunk 1
#
ei.c
interface GigabitEthernet0/0/10
aw
u
.h
eth-trunk 1

g
#
ospf 1

ni n
area 0.0.0.0
r
lea
network 10.0.0.0 0.255.255.255

//
#
return
p :
t t
[S3]display current-configuration

s:h
#
!Software Version V100R006C05
r c e
ou
sysname S3
#
es
interface Vlanif1
R
i n g
ip address 10.0.3.3 255.255.255.0

n
#

ar
interface Ethernet0/0/7
shutdown
L e
e
#

or
ip route-static 0.0.0.0 0.0.0.0 10.0.3.254

M
#
return

[S4]display current-configuration
#
!Software Version V100R006C05
sysname S4
#

HUAWEI TECHNOLOGIES Page53


interface Vlanif1
ip address 10.0.7.4 255.255.255.0
#
interface Ethernet0/0/14
shutdown
#
ip route-static 0.0.0.0 0.0.0.0 10.0.7.254
#
return
e n
/
o m
ei.c
aw
u
g.h
ni n
r
//lea
p :
t t
s :h
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page54


Module 2 Enterprise WAN Configuration

Lab 2-1 HDLC and PPP Configuration

Learning Objectives
e n
/
As a result of this lab section, you should achieve the following tasks:
o m
 Establish HDLC encapsulation as the serial link layer protocol.
e i.c
 Change the DCE clock baud rate on a serial link. aw
hu
g .
 Establish PPP encapsulation as the serial link layer protocol.
i n
n link.
 Implementation of PAP authentication on the PPP
ar
l e
 Implementation of CHAP authentication on
: // the PPP link.
t tp
Topology
: h
e s
r c
o u
es
R
i n g
a rn Figure 2.1 HDLC and PPP configuration topology

L e
r e
Scenario
o
MAs an expanding enterprise business, multiple branch offices have been established
and are to be part of the company’s administrative domain. WAN solutions are
required and as the network administrator the company you have been tasked with
establishing HDLC and PPP solutions at the edge router to be carried over some
service provider network, possibly MPLS, however the details of this have not been
revealed to you since the service provider network remains outside of the scope of
your task. R2 is an edge router located in the HQ, and R1 and R3 are located in

HUAWEI TECHNOLOGIES Page55


branch offices. The HQ and branches need to be established as a single
administrative domain. Use HDLC and PPP on the WAN links, and establish
authentication as a simple security measure.

Tasks

Step 1 Preparing the environment


e n
/
m
If you are starting this section with a non-configured device, begin here and then move to
o
step 3. For those continuing from previous labs, begin at step 2.
i . c
<Huawei>system-view
w e
a
hu
Enter system view, return user view with Ctrl+Z.

.
[Huawei]sysname R1

i n g
n
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
ar
[Huawei]sysname R2
l e
: //
<Huawei>system-view

t tp
h
Enter system view, return user view with Ctrl+Z.

:
[Huawei]sysname R3

e s
r cconfiguration
Step 2 Clean up the previous
o u
e s
Remove the static routes R to R2 and disable the Ethernet interfaces to avoid creating

n g
alternative routes. Remove
i
any unnecessary VLAN configuration.

rn
a
[R1]undo ip route-static 0.0.0.0 0

e
e L
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown

o r
M[R3]undo ip route-static 0.0.0.0 0
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]shutdown

[S1]undo interface Vlanif 3


[S1]undo interface Vlanif 5
[S1]undo vlan batch 3 5 to 7
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y

HUAWEI TECHNOLOGIES Page56


Info: This operation may take a few seconds. Please wait for a moment...done.
[S1]interface GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]undo port default vlan
[S1-GigabitEthernet0/0/1]quit
[S1]undo ospf 1
Warning: The OSPF process will be deleted. Continue? [Y/N]:y

[S2]undo interface Vlanif 5


[S2]undo interface Vlanif 7
e n
/
m
[S2]undo vlan batch 3 to 5 7
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
o
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2]interface GigabitEthernet 0/0/3
e i.c
[S2-GigabitEthernet0/0/3]undo port default vlan
aw
u
.h
[S2-GigabitEthernet0/0/3]quit

g
[S2]undo ospf 1
Warning: The OSPF process will be deleted. Continue? [Y/N]:y

ni n
r
lea
[S3]undo interface Vlanif 1

: //
[S4]undo interface Vlanif 1

t t p
h
Step 3 Configure serial interface:IP addressing for R1, R2 & R3
e s
r c
[R1]interface Serial 1/0/0

o u
s
[R1-Serial1/0/0]ip address 10.0.12.1 24

e
R
i n g
[R2]interface Serial 1/0/0
[R2-Serial1/0/0]ip address 10.0.12.2 24

rn
[R2-Serial1/0/0]quit

a
L e
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]ip address 10.0.23.2 24

r e
o
[R3]interface Serial 2/0/0

M[R3-Serial2/0/0]ip address 10.0.23.3 24

Step 4 Enable the HDLC protocol on the serial interfaces

[R1]interface Serial 1/0/0


[R1-Serial1/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

HUAWEI TECHNOLOGIES Page57


[R2]interface Serial 1/0/0
[R2-Serial1/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R2-Serial1/0/0]quit
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R3]interface Serial 2/0/0
e n
/
m
[R3-Serial2/0/0]link-protocol hdlc

o
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

ei.c
After HDLC is enabled on the serial interfaces, view the serial interface status. The
displayed information for R1 should be used as an example.
aw
u
[R1]display interface Serial1/0/0

g.h
n
Serial1/0/0 current state : UP
Line protocol current state : UP
ni
r
lea
Last line protocol up time : 2016-3-10 11:25:08

//
Description:HUAWEI, AR Series, Serial1/0/0 Interface

:
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

p
Internet Address is 10.0.12.1/24
t t
:h
Link layer protocol is nonstandard HDLC
Last physical up time
s
: 2016-3-10 11:23:55

e
c
Last physical down time : 2016-3-10 11:23:55

r
ou
Current system time: 2016-3-10 11:25:46

s
Physical layer is synchronous, Baudrate is 64000 bps

e
Interface is DCE, Cable type is V24, Clock mode is DCECLK
R
g
Last 300 seconds input rate 3 bytes/sec 24 bits/sec 0 packets/sec

i n
Last 300 seconds output rate 3 bytes/sec 24 bits/sec 0 packets/sec

n
e ar
Input: 100418 packets, 1606804 bytes

e L
Broadcast: 0, Multicast: 0

or
Errors: 0, Runts: 0
Giants: 0, CRC: 0

MAlignments: 0, Overruns: 0
Dribbles: 0, Aborts: 0
No Buffers: 0, Frame Error: 0

Output: 100418 packets, 1606830 bytes


Total Error: 0, Overruns: 0
Collisions: 0, Deferred: 0

HUAWEI TECHNOLOGIES Page58


No Buffers: 0
DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP
Input bandwidth utilization : 0.06%
Output bandwidth utilization : 0.06%

Test connectivity of the directly connected link after verifying that the physical status
and protocol status of the interface are Up.

e n
/
m
<R2>ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
o
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=44 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=39 ms e i.c
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=39 ms
aw
u
.h
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=255 time=40 ms

g
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=255 time=39 ms

ni n
--- 10.0.12.1 ping statistics ---
r
lea
5 packet(s) transmitted
5 packet(s) received

: //
0.00% packet loss
round-trip min/avg/max = 39/40/44 ms
t t p
s :h
[R2]ping 10.0.23.3

r c e
PING 10.0.23.3: 56 data bytes, press CTRL_C to break

ou
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=44 ms

es
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=39 ms

R
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=39 ms

i n g
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=255 time=40 ms

n
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=255 time=39 ms

e ar
L
--- 10.0.23.3 ping statistics ---

e
5 packet(s) transmitted

or
5 packet(s) received

M
0.00% packet loss
round-trip min/avg/max = 39/40/44 ms

Step 5 Configure RIPv2

Enable the RIP routing protocol to advertise the remote networks of R1 & R3.
[R1]rip

HUAWEI TECHNOLOGIES Page59


[R1-rip-1]version 2
[R1-rip-1]network 10.0.0.0

[R2]rip
[R2-rip-1]version 2
[R2-rip-1]network 10.0.0.0

[R3]rip
[R3-rip-1]version 2
e n
/
m
[R3-rip-1]network 10.0.0.0

After the configuration is complete, check that all the routes have been.c
o
Verify that corresponding routes are learned by RIP. e i learned.

aw
hu
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib

g .
n
----------------------------------------------------------------------------
Routing Tables: Public
ni
Destinations : 8 Routes : 8
ar
l e
Destination/Mask Proto Pre Cost
: //
Flags NextHop Interface

t tp
10.0.12.0/24 Direct 0 0

: h D 10.0.12.1 Serial1/0/0
10.0.12.1/32 Direct 0

e s0 D 127.0.0.1 Serial1/0/0
10.0.12.255/32 Direct 0

r c 0 D 127.0.0.1 Serial1/0/0
10.0.23.0/24 RIP

o u100 1 D 10.0.12.2 Serial1/0/0

s
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32
Re
Direct 0 0 D 127.0.0.1 InLoopBack0

g
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

i n
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

a rn
L e
r
On R1,e run the ping command to test connectivity between R1 and R3.
o
M
<R1>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=44 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=39 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=39 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=39 ms

HUAWEI TECHNOLOGIES Page60


--- 10.0.23.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 39/40/44 ms

Step 6 Manage the serial connection

e n
View the type of the cable connected to the serial interface, interface status, and/
clock frequency, and change the clock frequency.
o m
<R1>display interface Serial1/0/0
ei.c
Serial1/0/0 current state : UP

aw
u
Line protocol current state : UP

.h
Last line protocol up time : 2016-03-10 11:25:08
Description:HUAWEI, AR Series, Serial1/0/0 Interface

i n g
n
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

r
lea
Internet Address is 10.0.12.1/24
Link layer protocol is nonstandard HDLC
Last physical up time : 2016-03-10 11:23:55
: //
Last physical down time : 2016-03-10 11:23:55

t t p
:h
Current system time: 2016-03-10 11:51:12

s
Physical layer is synchronous, Baudrate is 64000 bps

c e
Interface is DCE, Cable type is V35, Clock mode is DCECLK1

r
ou
Last 300 seconds input rate 5 bytes/sec 40 bits/sec 0 packets/sec

s
Last 300 seconds output rate 2 bytes/sec 16 bits/sec 0 packets/sec
…output omit…

R e
n g shows that S1/0/0 on R1 connects to a DCE cable and the
The preceding information
i
n
clock frequency is 64000 bit/s. The DCE controls the clock frequency and bandwidth.
r
a
emust be performed on the DCE, R1.
Change the clock frequency on the link between R1 and R2 to 128000 bit/s. This
operation
e L
o r
[R1]interface Serial 1/0/0

M[R1-Serial1/0/0]baudrate 128000

After the configuration is complete, view the serial interface status.


<R1>display interface Serial1/0/0
Serial1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2016-03-10 11:25:08

HUAWEI TECHNOLOGIES Page61


Description:HUAWEI, AR Series, Serial1/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is nonstandard HDLC
Last physical up time : 2016-03-10 11:23:55
Last physical down time : 2016-03-10 11:23:55
Current system time: 2016-03-10 11:54:19
Physical layer is synchronous, Baudrate is 128000 bps
Interface is DCE, Cable type is V35, Clock mode is DCECLK1
e n
/
m
Last 300 seconds input rate 6 bytes/sec 48 bits/sec 0 packets/sec
Last 300 seconds output rate 4 bytes/sec 32 bits/sec 0 packets/sec
o
…output omit…

e i.c
Step 7 Configure PPP on the serial interfaces aw
u
g .h
ni n
Configure PPP between R1 and R2, as well as R2 and R3. Both ends of the link must
use the same encapsulation mode. If different encapsulation modes are used,
r
lea
interfaces may display as ‘Down’.
[R1]interface Serial 1/0/0
: //
[R1-Serial1/0/0]link-protocol ppp

t t p
:h
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

[R2]interface Serial 1/0/0


e s
[R2-Serial1/0/0]link-protocol ppp
r c
ou
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

[R2-Serial1/0/0]quit
es
R
[R2]interface Serial 2/0/0

i n g
[R2-Serial2/0/0]link-protocol ppp

n
ar
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

e
[R3]interface Serial 2/0/0

L
e
[R3-Serial2/0/0]link-protocol ppp

r
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
o
MAfter the configuration is complete, test link connectivity.
<R2>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=255 time=22 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=27 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=27 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=255 time=27 ms

HUAWEI TECHNOLOGIES Page62


Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=255 time=27 ms

--- 10.0.12.1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 22/26/27 ms
<R2>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
e n
/
m
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=35 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=40 ms
o
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=255 time=40 ms
ei.c
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=255 time=40 ms
aw
u
--- 10.0.23.3 ping statistics ---
g .h
5 packet(s) transmitted

ni n
5 packet(s) received
r
lea
0.00% packet loss

//
round-trip min/avg/max = 35/39/40 ms

p :
t t
If the ping operation fails, check the interface status and whether the link layer
protocol type is correct.
s :h
<R1>display interface Serial1/0/0

r c e
ou
Serial1/0/0 current state : UP

s
Line protocol current state : UP

e
Last line protocol up time : 2016-03-10 12:35:41
R
g
Description:HUAWEI, AR Series, Serial1/0/0 Interface

i n
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

n
ar
Internet Address is 10.0.12.1/24

e
Link layer protocol is PPP

L
LCP opened, IPCP opened

e
or
Last physical up time : 2016-03-10 11:57:20
Last physical down time : 2016-03-10 11:57:19

M
Current system time: 2016-03-10 13:38:03
Physical layer is synchronous, Baudrate is 128000 bps
Interface is DCE, Cable type is V35, Clock mode is DCECLK1
Last 300 seconds input rate 7 bytes/sec 56 bits/sec 0 packets/sec
Last 300 seconds output rate 4 bytes/sec 32 bits/sec 0 packets/sec
…output omit…

HUAWEI TECHNOLOGIES Page63


Step 8 Check routing entry changes

After PPP configuration is complete, routers establish connections at the data link
layer. The local device sends a route to the peer device. The route contains the
interface IP address and a 32-bit mask.

The following information uses R2 as an example, for which the routes to R1 and R3
e n
can be seen. /
o m
i.c
[R2]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
w e
Routing Tables: Public
u a
Destinations : 12 Routes : 12

g.h
Destination/Mask Proto Pre Cost Flags NextHop
ni n
Interface

r
10.0.12.0/24 Direct 0 0 D

//
10.0.12.2
lea Serial1/0/0
10.0.12.1/32 Direct 0 0 D
:
10.0.12.1

p
Serial1/0/0
10.0.12.2/32 Direct 0 0 D
t t
127.0.0.1 Serial1/0/0

:h
10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

es
10.0.23.0/24 Direct 0 0 D 10.0.23.2 Serial2/0/0

c
10.0.23.2/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

r
ou
10.0.23.3/32 Direct 0 0 D 10.0.23.3 Serial2/0/0

s
10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
127.0.0.0/8
127.0.0.1/32 Re
Direct 0
Direct 0
0
0
D
D
127.0.0.1
127.0.0.1
InLoopBack0
InLoopBack0

i n g
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

n
ar
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

L e
Think about the origin and functions of the two routes. Check the following items:
e
or
If HDLC encapsulation is used, do these two routes exist?
MCan R1 and R2 communicate using HDLC or PPP when the IP addresses of S1/0/0
interfaces on R1 and R2 are located on different network segments?

Step 9 Enable PAP authentication between R1 and R2

Configure PAP authentication with R1 as the PPP PAP authenticator.

HUAWEI TECHNOLOGIES Page64


[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ppp authentication-mode pap
[R1-Serial1/0/0]quit
[R1]aaa
[R1-aaa]local-user huawei password cipher huawei123

info: A new user added


[R1-aaa]local-user huawei service-type ppp

e n
Configure PAP authentication with R2 acting as the PAP authenticated device. /
o m
[R2]interface Serial 1/0/0

i . c
[R2-Serial1/0/0]ppp pap local-user huawei password cipher huawei123

w e
After R2 sends an authentication request to R1, R1 sends a responseamessage to R2,
husend its password
requesting R2 to use PAP authentication following which R2 will
to R1. g .
ni n
r
After the configuration is complete, test connectivityabetween R1 and R2.
/ l e
<R1>debugging ppp pap packet
: /
<R1>terminal debugging
t tp
<R1>display debugging

: h
PPP PAP packets debugging switch is on

e s
<R1>system-view
r c
[R1]interface Serial 1/0/0

o u
[R1-Serial1/0/0]shutdown

e s
R
[R1-Serial1/0/0]undo shutdown

i n g
Mar 10 2016 14:44:22.440.1+00:00 R1 PPP/7/debug2:
PPP Packet:

a rn
e
Serial1/0/0 Input PAP(c023) Pkt, Len 22

L
State ServerListen, code Request(01), id 1, len 18

e
o r Host Len: 6 Name:huawei
[R1-Serial1/0/0]

MMar 10 2016 14:44:22.440.2+00:00 R1 PPP/7/debug2:


PPP Packet:
Serial1/0/0 Output PAP(c023) Pkt, Len 52
State WaitAAA, code Ack(02), id 1, len 48
Msg Len: 43 Msg:Welcome to use Access ROUTER, Huawei Tech.

[R1-Serial1/0/0]return
<R1>undo debugging all

HUAWEI TECHNOLOGIES Page65


Info: All possible debugging has been turned off

Step 10 Enable CHAP authentication between R2 and R3

Configure R3 as the authenticator. After R2 sends an authentication request to R3,


R3 sends a response message to R2, requesting R2 to use CHAP authentication
following which a challenge is sent to R3.

e n
[R3]interface Serial 2/0/0
/
[R3-Serial2/0/0]ppp authentication-mode chap

o m
i.c
[R3-Serial2/0/0]quit

e
[R3]aaa
[R3-aaa]local-user huawei password cipher huawei123

aw
u
info: A new user added

.h
[R3-aaa]local-user huawei service-type ppp
[R3-aaa]quit

i n g
n
[R3]interface Serial 2/0/0

r
lea
[R3-Serial2/0/0]shutdown
[R3-Serial2/0/0]undo shutdown

: / /
tp
On R3, the following information is displayed.
t
: h
Dec 10 2013 15:06:00+00:00 R3 %%01PPP/4/PEERNOCHAP(l)[5]:On the interface Serial2/0/0,

e s
authentication failed and PPP link was closed because CHAP was disabled on the peer.
[R3-Serial2/0/0]
r c
o u
Dec 10 2013 15:06:00+00:00 R3 %%01PPP/4/RESULTERR(l)[6]:On the interface Serial2/0/0, LCP

e s
negotiation failed because the result cannot be accepted.

R
i n g
The highlighted output indicates that authentication is unable to initialize.

rn
Configure R2 as the CHAP client.
a
e
[R2]interface Serial 2/0/0
L
e
[R2-Serial2/0/0]ppp chap user huawei

o r
[R2-Serial2/0/0]ppp chap password cipher huawei123

MAfter the configuration is complete, the interface changes to an Up state. The ping
command output is as follows:
<R2>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=35 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=41 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=41 ms

HUAWEI TECHNOLOGIES Page66


Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=255 time=41 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=255 time=41 ms

--- 10.0.23.3 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 35/39/41 ms

e n
Step 11 PPP CHAP debugging /
o m
Run the debug command to view negotiation of the PPP connection between
and R3. The PPP connection is established using CHAP. Disable interface e i . c R2
Serial 2/0/0
on R2, run the debug command, and enable Serial 2/0/0 on R2.
aw
[R2]interface Serial 2/0/0
. hu
[R2-Serial2/0/0]shutdown

i n g
Run the debugging ppp chap all and the terminal debugging r n commands to
display the debugging information.
l e a
: //
tp
[R2-Serial2/0/0]return
<R2>debugging ppp chap all

h t
:
<R2>terminal debugging

e s
Info: Current terminal debugging is on.
<R2>display debugging
r c
o u
PPP CHAP packets debugging switch is on

es
PPP CHAP events debugging switch is on

R
PPP CHAP errors debugging switch is on

i n g
PPP CHAP state change debugging switch is on

a rn
Force CHAP authentication to initialize on S2/0/0 of R2.

L e
<R2>system-view

r e
Enter system view, return user view with Ctrl+Z.

o
[R2]interface Serial 2/0/0

M[R2-Serial2/0/0]undo shutdown

The following debugging information is displayed:


Mar 10 2016 09:10:38.700.1+00:00 R2 PPP/7/debug2:
PPP State Change:
Serial2/0/0 CHAP : Initial --> ListenChallenge
[R2-Serial2/0/0]

HUAWEI TECHNOLOGIES Page67


Mar 10 2016 09:10:38.710.1+00:00 R2 PPP/7/debug2:
PPP Packet:
Serial2/0/0 Input CHAP(c223) Pkt, Len 25
State ListenChallenge, code Challenge(01), id 1, len 21
Value_Size: 16 Value: fc 9b 56 e1 53 e3 a6 26 1b 54 e5 e2 a1 ed 90 87
Name:
[R2-Serial2/0/0]
Mar 10 2016 09:10:38.710.2+00:00 R2 PPP/7/debug2:
PPP Event:
e n
/
m
Serial2/0/0 CHAP Receive Challenge Event
state ListenChallenge
o
[R2-Serial2/0/0]
Mar 10 2016 09:10:38.710.3+00:00 R2 PPP/7/debug2:
e i.c
PPP Packet:
aw
u
.h
Serial2/0/0 Output CHAP(c223) Pkt, Len 31

g
State ListenChallenge, code Response(02), id 1, len 27

i n
Value_Size: 16 Value: f9 54 1 69 30 59 a0 af 52 a1 1d de 85 77 27 6b

n
Name: huawei
r
lea
[R2-Serial2/0/0]

//
Mar 10 2016 09:10:38.710.4+00:00 R2 PPP/7/debug2:
PPP State Change:
p :
t t
Serial2/0/0 CHAP : ListenChallenge --> SendResponse
[R2-Serial2/0/0]

s :h
PPP Packet:
r c e
Mar 10 2016 09:10:38.720.1+00:00 R2 PPP/7/debug2:

ou
Serial2/0/0 Input CHAP(c223) Pkt, Len 20

es
State SendResponse, code SUCCESS(03), id 1, len 16
Message: Welcome to .
R
[R2-Serial2/0/0]

i n g
n
Mar 10 2016 09:10:38.720.2+00:00 R2 PPP/7/debug2:

ar
PPP Event:

e
Serial2/0/0 CHAP Receive Success Event
L
e
state SendResponse

or
[R2-Serial2/0/0]

M
Mar 10 2016 09:10:38.720.3+00:00 R2 PPP/7/debug2:
PPP State Change:
Serial2/0/0 CHAP : SendResponse --> ClientSuccess

The highlighted debugging information shows the key CHAP behavior. Disable the
debugging process.
[R2-Serial2/0/0]return

HUAWEI TECHNOLOGIES Page68


<R2>undo debugging all
Info: All possible debugging has been turned off

Additional Exercises: Analyzing and Verifying

Why is the PPP Challenge Handshake Authentication Protocol (CHAP) more secure
than the PPP Password Authentication Protocol (PAP)?

e n
Final Configuration /
o m
[R1]display current-configuration
[V200R007C00SPC600] e i.c
#
aw
u
.h
sysname R1
#
aaa
i n g
authentication-scheme default
r n
lea
authorization-scheme default
accounting-scheme default
: //
domain default
domain default_admin
t t p
:h
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$

s
local-user admin service-type http

r c e
local-user huawei password cipher %$%$B:%I)Io0H8)[%SB[idM3C/!#%$%$

ou
local-user huawei service-type ppp

s
e
#
interface Serial1/0/0
R
link-protocol ppp

i n g
n
ppp authentication-mode pap

ar
ip address 10.0.12.1 255.255.255.0

L e
baudrate 128000
#
e
or
rip 1

M
version 2
network 10.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%
$
user-interface vty 0 4

HUAWEI TECHNOLOGIES Page69


#
return

[R2]display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
e n
/
m
interface Serial1/0/0
link-protocol ppp
o
ppp pap local-user huawei password cipher %$%$u[hr6d<JVHR@->T7xr1<$.iv%$%$
ip address 10.0.12.2 255.255.255.0
e i.c
#
aw
u
.h
interface Serial2/0/0

g
link-protocol ppp
ppp chap user huawei

ni n
ppp chap password cipher %$%$e{5h)gh"/Uz0mUC%vEx3$4<m%$%$
r
lea
ip address 10.0.23.2 255.255.255.0

//
#
rip 1
p :
version 2
t t
network 10.0.0.0

s:h
#
user-interface con 0
r c e
ou
authentication-mode password

es
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%
$
R
user-interface vty 0 4

i n g
n
#

ar
return

L e
e
or
[R3]display current-configuration

M
[V200R007C00SPC600]
#
sysname R3
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default

HUAWEI TECHNOLOGIES Page70


domain default
domain default_admin
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$
local-user admin service-type http
local-user huawei password cipher %$%$fZsyUk1=O=>:L4'ytgR~D*Im%$%$
local-user huawei service-type ppp
#
interface Serial2/0/0
link-protocol ppp
e n
/
m
ppp authentication-mode chap
ip address 10.0.23.3 255.255.255.0
o
#
rip 1
e i.c
version 2
aw
u
.h
network 10.0.0.0

g
#
user-interface con 0

ni n
authentication-mode password
r
lea
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%

//
$
user-interface vty 0 4
p :
#
t t
return

s:h
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page71


Lab 2-2 Configuring Frame Relay at the Customer Edge

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Configuration of frame relay interfaces on the customer edge.


e n
/
 Establishment of RIP in a hub and spoke network.
o m
 Establishment of OSPF in a hub and spoke (NBMA) network.
e i.c
 Configuration of frame relay interfaces when using the OSPFa
w
hu
point-to-multipoint network type. g .
ni n
ar
Topology
l e
: //
t tp
: h
e s
r c
o u
e s
R
i n g
a rn
L e
r e
o
M Figure 2.2 Lab topology for frame relay configuration

Scenario

The enterprise network has existing frame relay virtual circuits between the HQ and
some branch offices. A recent change in equipment requires that these frame relay

HUAWEI TECHNOLOGIES Page72


VC be re-established. The virtual circuits had been provided by the service provider
at the time the service was first implemented and it is the task of the administrator to
implement the frame relay configuration on the edge routers for the HQ and branch
offices. The administrator must configure frame relay on the WAN links and perform
mapping between the local DLCI and IP addresses.

Tasks

e n
Step 1 Preparing the environment /
o m
c
If you are starting this section with a non-configured device, begin herei.and then
move to step 3. For those continuing from previous labs, begin at step 2.e
aw
hu
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
g .
[Huawei]sysname R1

ni n
ar
e
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
// l
:
tp
[Huawei]sysname R2

ht
<Huawei>system-view

s :
[Huawei]sysname R3
r c e
Enter system view, return user view with Ctrl+Z.

o u
e
Step 2 Clean up the previouss configuration
R
i n g
rn
Disable the serial interfaces used for establishing the HDLC & PPP networks.

e a
L
[R1]interface Serial 1/0/0
e
r
[R1-Serial1/0/0]shutdown
o
M[R2]interface Serial 1/0/0
[R2-Serial1/0/0]shutdown
[R2-Serial1/0/0]interface Serial 2/0/0
[R2-Serial2/0/0]shutdown

[R3]interface Serial 2/0/0


[R3-Serial2/0/0]shutdown

HUAWEI TECHNOLOGIES Page73


Step 3 Establish frame relay encapsulation

Set basic parameters, including IP addresses. Manually define the mapping between
the peer and DLCI. The inverse ARP function should be disabled. Ensure that the
broadcast parameter is used in the fr map command to allow the network on the
loopback interface to be advertised using RIP.
[R1]interface Serial 2/0/0

e n
[R1-Serial2/0/0]link-protocol fr
/
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

o m
i.c
[R1-Serial2/0/0]ip address 10.0.123.1 24

e
[R1-Serial2/0/0]undo fr inarp
[R1-Serial2/0/0]fr map ip 10.0.123.2 102 broadcast

aw
u
[R1-Serial2/0/0]fr map ip 10.0.123.3 103 broadcast

.h
[R1-Serial2/0/0]interface loopback 0
[R1-LoopBack0]ip address 10.0.1.1 24

i n g
r n
lea
[R2]interface Serial 3/0/0
[R2-Serial3/0/0]link-protocol fr

: //
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R2-Serial3/0/0]ip address 10.0.123.2 24

t t p
:h
[R2-Serial3/0/0]undo fr inarp

s
[R2-Serial3/0/0]fr map ip 10.0.123.1 201 broadcast

e
c
[R2-Serial3/0/0]interface loopback 0

r
ou
[R2-LoopBack0]ip address 10.0.2.2 24

[R3]interface Serial 1/0/0


es
R
[R3-Serial1/0/0]link-protocol fr

i n g
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

n
ar
[R3-Serial1/0/0]ip address 10.0.123.3 24
[R3-Serial1/0/0]undo fr inarp

L e
[R3-Serial1/0/0]fr map ip 10.0.123.1 301 broadcast

e
or
[R3-Serial1/0/0]interface loopback 0
[R3-LoopBack0]ip address 10.0.3.3 24

MAfter the IP addresses are configured, test network connectivity.


<R1>ping 10.0.123.2
PING 10.0.123.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.123.2: bytes=56 Sequence=1 ttl=255 time=64 ms
Reply from 10.0.123.2: bytes=56 Sequence=2 ttl=255 time=59 ms
Reply from 10.0.123.2: bytes=56 Sequence=3 ttl=255 time=59 ms

HUAWEI TECHNOLOGIES Page74


Reply from 10.0.123.2: bytes=56 Sequence=4 ttl=255 time=59 ms
Reply from 10.0.123.2: bytes=56 Sequence=5 ttl=255 time=59 ms

--- 10.0.123.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 59/60/64 ms
<R1>ping 10.0.123.3
e n
/
m
PING 10.0.123.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.123.3: bytes=56 Sequence=1 ttl=255 time=64 ms
o
Reply from 10.0.123.3: bytes=56 Sequence=2 ttl=255 time=59 ms
Reply from 10.0.123.3: bytes=56 Sequence=3 ttl=255 time=59 ms
ei.c
Reply from 10.0.123.3: bytes=56 Sequence=4 ttl=255 time=59 ms
aw
u
.h
Reply from 10.0.123.3: bytes=56 Sequence=5 ttl=255 time=59 ms

--- 10.0.123.3 ping statistics ---


i n g
5 packet(s) transmitted
r n
lea
5 packet(s) received

//
0.00% packet loss
round-trip min/avg/max = 59/60/64 ms
p :
t t
Run the following commands to view the
: h FR encapsulation information for the R1
interfaces.
e s
r c
u
<R1>display fr interface Serial 2/0/0

o
s
Serial2/0/0, DTE, physical up, protocol up

Re
g
<R1>display fr lmi-info interface Serial 2/0/0

i n
Frame relay LMI statistics for interface Serial2/0/0 (DTE, Q933)

rn
T391DTE = 10 (hold timer 10)

e a
N391DTE = 6, N392DTE = 3, N393DTE = 4

L
out status enquiry = 180, in status = 178

e
r
status timeout = 0, discarded messages = 0

o
M<R1>display fr map-info interface Serial 2/0/0
Map Statistics for interface Serial2/0/0 (DTE)
DLCI = 102, IP 10.0.123.2, Serial2/0/0
create time = 2011/11/16 09:28:49, status = ACTIVE
encapsulation = ietf, vlink = 1, broadcast
DLCI = 103, IP 10.0.123.3, Serial2/0/0
create time = 2011/11/16 09:28:56, status = ACTIVE
encapsulation = ietf, vlink = 2, broadcast

HUAWEI TECHNOLOGIES Page75


Step 4 Configure RIPv2 between R1, R2, and R3

Configure RIPv2 on R1, R2 and R3. If you are continuing from the previous
HDLC/PPP lab, the RIP routes for network 10.0.0.0 may have already been configured,
however the automatic summary must still be disabled to uniquely identify the
routes of the peers.
In addition, split horizon is disabled by default on frame relay networks, and so It is
e n
not necessary for the split horizon parameters to be modified in this exercise. /
o m
i.c
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 10.0.0.0
w e
[R1-rip-1]undo summary
u a
g .h
n
[R2]rip 1
[R2-rip-1]version 2
ni
r
lea
[R2-rip-1]network 10.0.0.0

//
[R2-rip-1]undo summary

p :
[R3]rip 1
t t
:h
[R3-rip-1]version 2
[R3-rip-1]network 10.0.0.0

e s
[R3-rip-1]undo summary

r c
o uR2, and R3 to check the learned routes.
s
View the routing tables on R1,
e
R
<R1>display ip routing-table protocol rip

i n g
Route Flags: R - relay, D - download to fib

rn
----------------------------------------------------------------------------

a
Public routing table : RIP

L e
Destinations : 2 Routes : 2

r e
o
RIP routing table status : <Active>

M
Destinations : 2 Routes : 2

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.2.0/24 RIP 100 1 D 10.0.123.2 Serial2/0/0


10.0.3.0/24 RIP 100 1 D 10.0.123.3 Serial2/0/0

RIP routing table status : <Inactive>

HUAWEI TECHNOLOGIES Page76


Destinations : 0 Routes : 0

<R2>display ip routing-table protocol rip


Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Public routing table : RIP
Destinations : 2 Routes : 2

RIP routing table status : <Active>


e n
/
m
Destinations : 2 Routes : 2

o
Destination/Mask Proto Pre Cost Flags NextHop Interface

e i.c
10.0.1.0/24 RIP 100 1 D 10.0.123.1 Serial3/0/0
aw
u
.h
10.0.3.0/24 RIP 100 2 D 10.0.123.1 Serial3/0/0

RIP routing table status : <Inactive>


i n g
Destinations : 0 Routes : 0
r n
[R3]display ip routing-table protocol rip
//lea
Route Flags: R - relay, D - download to fib
p :
t t
----------------------------------------------------------------------------
Public routing table : RIP

s :h
Destinations : 2

r e
Routes : 2

c
ou
RIP routing table status : <Active>
Destinations : 2
es Routes : 2

R
ing
Destination/Mask Proto Pre Cost Flags NextHop Interface

n
ar
10.0.1.0/24 RIP 100 1 D 10.0.123.1 Serial1/0/0

Le
10.0.2.0/24 RIP 100 2 D 10.0.123.1 Serial1/0/0

r e
o
RIP routing table status : <Inactive>

M
Destinations : 0 Routes : 0

HUAWEI TECHNOLOGIES Page77


Verify that the 10.0.3.0 network of R3 is capable of reaching the 10.0.1.0 network of
R1.
[R3]ping –a 10.0.3.3 10.0.1.1
PING 10.0.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=68 ms
Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=255 time=63 ms
Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=255 time=63 ms
Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=255 time=63 ms

e n
Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=255 time=63 ms
/
o m
i.c
--- 10.0.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
w e
0.00% packet loss
u a
round-trip min/avg/max = 63/64/68 ms

g.h
ni n
Perform the same test to network 10.0.2.2 of R2 from network 10.0.3.3 of R3.
r
//lea
<R3>ping -a 10.0.3.3 10.0.2.2

p :
t t
PING 10.0.2.2: 56 data bytes, press CTRL_C to break

:h
Reply from 10.0.2.2: bytes=56 Sequence=1 ttl=254 time=101 ms

s
Reply from 10.0.2.2: bytes=56 Sequence=2 ttl=254 time=110 ms

e
c
Reply from 10.0.2.2: bytes=56 Sequence=3 ttl=254 time=101 ms

r
ou
Reply from 10.0.2.2: bytes=56 Sequence=4 ttl=254 time=101 ms

s
Reply from 10.0.2.2: bytes=56 Sequence=5 ttl=254 time=101 ms

e
R
g
--- 10.0.2.2 ping statistics ---

i n
5 packet(s) transmitted

n
ar
5 packet(s) received

e
0.00% packet loss

L
round-trip min/avg/max = 101/102/110 ms

e
or
The RIP routing protocol has enabled a route between the loopback interfaces of R2
M
and R3 to be established via R1.
Attempt the same procedure to network 10.0.2.2 of R2 from the S2/0/0 (10.0.123.3)
interface of R3.

[R3]ping 10.0.2.2
PING 10.0.2.2: 56 data bytes, press CTRL_C to break
Request time out

HUAWEI TECHNOLOGIES Page78


Request time out
Request time out
Request time out
Request time out

--- 10.0.2.2 ping statistics ---


5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
e n
/
The preceding test results indicate that R3 is unable to communicate with R2 m
vice versa) when the serial interface is the source. Check the routes to find.c
o (and

R3 and R2 are disconnected. The procedure for diagnosing this fault is as e i out why
follows:

awthe IP address
hu
View the R3 routing table and check whether any route is destined for
10.0.2.2.
.
If there is such a route, find out the next hop IP address n ofgthis route. Then check
ni
whether R3 can reach the next hop and whether there
ar is mapping between the
layer-3 IP addresses and layer-2 PVCs.
l e
If R3 can reach the next hop and there is mapping : // between Layer-3 IP addresses and
Layer-2 PVCs, check the devices on the route
t t p to determine whether there is any
route that can reach IP address 10.0.2.2,
: h whether the next hop of this route is
reachable, and whether there is mapping
e s between Layer-3 IP addresses and Layer-2
PVCs.
r c
o
If there is a route that can reachu IP address 10.0.2.2 and there is mapping between
e s PVCs, check R2 to determine whether there is any
Layer-3 IP addresses and Layer-2
route that reaches theR destination IP address of the response packets and whether
the next hop of thisg
i n route is reachable.
nof this route is unreachable and the destination IP address of the
If the next hop
a r
L
no mapping
e between Layer-3 IP addresses and Layer-2 PVCs.
response packets is 10.0.123.3, R2 has the route that reaches this address but there is

r e
Theo following is the output of the commands used in the preceding fault diagnosis
Mprocedure.
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13

HUAWEI TECHNOLOGIES Page79


Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.0/24 RIP 100 1 D 10.0.123.1 Serial1/0/0


10.0.2.0/24 RIP 100 2 D 10.0.123.1 Serial1/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.3 LoopBack0
10.0.3.3/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.3.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.123.0/24 Direct 0 0 D 10.0.123.3 Serial1/0/0
10.0.123.1/32 Direct 0 0 D 10.0.123.1 Serial1/0/0
e n
/
m
10.0.123.3/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.123.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
o
127.0.0.0/8
127.0.0.1/32
Direct 0
Direct 0
0
0
D
D
127.0.0.1
127.0.0.1
InLoopBack0
InLoopBack0
e i.c
127.255.255.255/32 Direct 0 0 D 127.0.0.1
aw
InLoopBack0

u
.h
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

<R3>display fr map-info interface Serial 1/0/0


i n g
Map Statistics for interface Serial1/0/0 (DTE)
r n
lea
DLCI = 301, IP 10.0.123.1, Serial1/0/0

//
create time = 2011/11/16 09:22:30, status = ACTIVE
encapsulation = ietf, vlink = 1, broadcast
p :
t t
<R1>display ip routing-table

s :h
r c e
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------

ou
Routing Tables: Public
Destinations : 14
es Routes : 14

R
ing
Destination/Mask Proto Pre Cost Flags NextHop Interface

n
ar
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0

Le
10.0.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

e
10.0.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

o r10.0.2.0/24 RIP 100 1 D 10.0.123.2 Serial2/0/0

M
10.0.3.0/24 RIP 100 1 D 10.0.123.3 Serial2/0/0
10.0.123.0/24 Direct 0 0 D 10.0.123.1 Serial2/0/0
10.0.123.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.123.2/32 Direct 0 0 D 10.0.123.2 Serial2/0/0
10.0.123.3/32 Direct 0 0 D 10.0.123.3 Serial2/0/0
10.0.123.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

HUAWEI TECHNOLOGIES Page80


127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

<R1>display fr map-info interface Serial 2/0/0


Map Statistics for interface Serial2/0/0 (DTE)
DLCI = 102, IP 10.0.123.2, Serial2/0/0
create time = 2011/11/16 09:28:49, status = ACTIVE
encapsulation = ietf, vlink = 1, broadcast
DLCI = 103, IP 10.0.123.3, Serial2/0/0
e n
/
m
create time = 2011/11/16 09:28:56, status = ACTIVE
encapsulation = ietf, vlink = 2, broadcast
o
<R2>display ip routing-table
e i.c
Route Flags: R - relay, D - download to fib
aw
u
.h
----------------------------------------------------------------------------

g
Routing Tables: Public
Destinations : 13 Routes : 13

ni n
r
lea
Destination/Mask Proto Pre Cost Flags NextHop Interface

: //
10.0.1.0/24
10.0.2.0/24
RIP
Direct
100 1
0 0
t
D

t
D p
10.0.123.1
10.0.2.2
Serial3/0/0
LoopBack0
10.0.2.2/32 Direct 0 0

s :h D 127.0.0.1 InLoopBack0
10.0.2.255/32
10.0.3.0/24
Direct
RIP
0
100 2
0

r c e D
D
127.0.0.1
10.0.123.1
InLoopBack0
Serial3/0/0

ou
10.0.123.0/24 Direct 0 0 D 10.0.123.2 Serial3/0/0
10.0.123.1/32 Direct
es0 0 D 10.0.123.1 Serial3/0/0
10.0.123.2/32 Direct
R 0 0 D 127.0.0.1 InLoopBack0

ing
10.0.123.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

n
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

ar
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Le
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

e
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

o r
M

HUAWEI TECHNOLOGIES Page81


<R2>display fr map-info interface Serial 3/0/0
Map Statistics for interface Serial3/0/0 (DTE)
DLCI = 201, IP 10.0.123.1, Serial3/0/0
create time = 2011/11/16 09:21:10, status = ACTIVE
encapsulation = ietf, vlink = 1, broadcast

The conclusion is that there is no PVC that allows R2 to reach IP address 10.0.123.3.

Step 5 Modify network parameters to enable the connection


e n
/
between R2 and R3
o m
i . c there
is no virtual circuit between the frame relay interfaces on R2 and R3. e
The fault diagnosis results from step 2 indicate that communication fails since

resolve this, configure a frame relay PVC between the interfaces on a


w In order to

hu R2 and R3.
[R2]interface Serial 3/0/0
g .
[R2-Serial3/0/0]fr map ip 10.0.123.3 201

ni n
ar
e
[R3]interface Serial 1/0/0
[R3-Serial1/0/0]fr map ip 10.0.123.2 301
// l
:
t
After the mapping has been configured between tp IP addresses and PVCs, check the IP
address-PVC mapping tables on R2 and h
s : R3 and detect network connectivity.

c e
<R3>display fr lmi-info inter Serial 1/0/0
r
u
Frame relay LMI statistics for interface Serial1/0/0 (DTE, Q933)

o
s
T391DTE = 10 (hold timer 10)

e
R
N391DTE = 6, N392DTE = 3, N393DTE = 4

g
out status enquiry = 326, in status = 324

i n
status timeout = 0, discarded messages = 0

a rn
e
<R3>display fr map-info interface Serial 1/0/0

L
Map Statistics for interface Serial1/0/0 (DTE)

e
o r
DLCI = 301, IP 10.0.123.1, Serial1/0/0
create time = 2011/11/16 09:22:30, status = ACTIVE

M encapsulation = ietf, vlink = 1, broadcast


DLCI = 301, IP 10.0.123.2, Serial1/0/0
create time = 2011/11/16 09:55:23, status = ACTIVE
encapsulation = ietf, vlink = 2

<R3>ping 10.0.2.2
PING 10.0.2.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.2.2: bytes=56 Sequence=1 ttl=254 time=118 ms

HUAWEI TECHNOLOGIES Page82


Reply from 10.0.2.2: bytes=56 Sequence=2 ttl=254 time=123 ms
Reply from 10.0.2.2: bytes=56 Sequence=3 ttl=254 time=123 ms
Reply from 10.0.2.2: bytes=56 Sequence=4 ttl=254 time=123 ms
Reply from 10.0.2.2: bytes=56 Sequence=5 ttl=254 time=123 ms

--- 10.0.2.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
e n
/
m
round-trip min/avg/max = 118/122/123 ms

o
Step 6 Configure OSPF between R1 and R2 i.c
e
awmapping
hu
Delete the RIP configurations referenced in step 2 and the frame relay
between R2 and R3 that was established during step 3.
g .
[R1]undo rip 1
ni n
a
Warning: The RIP process will be deleted. Continue?[Y/N]y
r
l e
[R2]interface Serial 3/0/0
: //
tp
[R2-Serial3/0/0]undo fr map ip 10.0.123.3 201

t
[R2-Serial3/0/0]quit

: h
s
[R2]undo rip 1

c e
Warning: The RIP process will be deleted. Continue?[Y/N]y

r
o u
s
[R3]interface Serial 1/0/0

[R3-Serial1/0/0]quit Re
[R3-Serial1/0/0]undo fr map ip 10.0.123.2 301

[R3]undo rip 1
i n g
rn
Warning: The RIP process will be deleted. Continue?[Y/N]y
[R3]

e a
e L
Configure single-area OSPF on R1, R2, and R3.
o r
[R1]ospf 1 router-id 10.0.1.1
M[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

[R2]ospf 1 router-id 10.0.2.2


[R2-ospf-1]area 0

HUAWEI TECHNOLOGIES Page83


[R2-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

[R3]ospf 1 router-id 10.0.3.3


[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255

After the basic parameters are set, OSPF cannot establish neighbor adjacencies.
When using frame relay for data link layer encapsulation, OSPF will set the network
type to NBMA by default. As a result, OSPF does not support broadcasts, and
e n
therefore cannot automatically discover neighbors. /
o m
<R3>display ospf interface Serial 1/0/0 verbose
ei.c
OSPF Process 1 with Router ID 10.0.3.3

aw
Interfaces
u
g.h
n
Interface: 10.0.123.3 (Serial1/0/0)
Cost: 1562 State: DR Type: NBMA MTU: 1500
ni
r
lea
Priority: 1

//
Designated Router: 10.0.123.3
Backup Designated Router: 0.0.0.0

p :
t t
Timers: Hello 30 , Dead 120 , Poll 120 , Retransmit 5 , Transmit Delay 1

:h
IO Statistics
Type Input Output

e s
Hello 0

r c 0

ou
DB Description 0 0
Link-State Req

es0 0

R
Link-State Update 0 0

g
Link-State Ack 0 0
OpaqueId: 0

n i n
PrevState: Waiting

a r
L e
Step 7 Configuring the NBMA environment
e
r R3 is the DR, R2 is unable to establish a full adjacency with the DR since R3 is
o
While
Mnot reachable via the PVC between R2 and R1. Therefore the DR must be set on R1.
Additionally OSPF hello messages are unicast in an NBMA network. Peers must be
manually specified to allow hello packet forwarding.

[R1]ospf

HUAWEI TECHNOLOGIES Page84


[R1-ospf-1]peer 10.0.123.2
[R1-ospf-1]peer 10.0.123.3
[R1-ospf-1]interface Serial 2/0/0
[R1-Serial2/0/0]ospf dr-priority 255

[R2]ospf
[R2-ospf-1]peer 10.0.123.1

[R3]ospf
e n
/
m
[R3-ospf-1]peer 10.0.123.1

. co
from any DR election. e i
Optionally the DR priority for R2 and R3 can be set to 0 to force their exemption

aw
<R1>display ospf interface Serial 2/0/0 verbose
. hu
OSPF Process 1 with Router ID 10.0.1.1

i n g
n
Interfaces

ar
l e
//
Interface: 10.0.123.1 (Serial2/0/0)
Cost: 1562 State: DR Type: NBMA
: MTU: 1500
Priority: 255
t tp
Designated Router: 10.0.123.1

: h
Backup Designated Router: 10.0.123.3

e s
c
Timers: Hello 30 , Dead 120 , Poll 120 , Retransmit 5 , Transmit Delay 1

r
IO Statistics

o u
s
Type Input Output
Hello
Re 32 32

g
DB Description 8 29
Link-State Req
i n 3 2

rn
Link-State Update 16 30

e a
Link-State Ack 20 9

e L
OpaqueId: 0 PrevState: BDR

r
Effective cost: 1562, enabled by OSPF Protocol

oR1 is not the designated router, reset the ospf process on all routers using the
Mfollowing command and reattempt the above display command.
If

<R1>reset ospf process graceful-restart

Display the routing table to confirm that OSPF has been established over the frame
relay network.

HUAWEI TECHNOLOGIES Page85


<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14

Destination/Mask Proto Pre Cost Flags NextHop Interface

e n
/
m
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
o
10.0.1.255/32
10.0.2.2/32
Direct
OSPF
0
10
0
1562
D
D
127.0.0.1
10.0.123.2
LoopBack0
Serial2/0/0
e i.c
10.0.3.3/32 OSPF 10 1562 D 10.0.123.3
aw
Serial2/0/0

u
.h
10.0.123.0/24 Direct 0 0 D 10.0.123.1 Serial2/0/0

g
10.0.123.1/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
10.0.123.2/32 Direct 0 0 D 10.0.123.2

ni n
Serial2/0/0
10.0.123.3/32 Direct 0 0 D
r
10.0.123.3 Serial2/0/0

lea
10.0.123.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

://
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

tp
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0
t D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0

s :h D 127.0.0.1 InLoopBack0

<R1>ping -a 10.0.1.1 10.0.2.2


r c e
ou
PING 10.0.2.2: 56 data bytes, press CTRL_C to break

es
Reply from 10.0.2.2: bytes=56 Sequence=1 ttl=255 time=51 ms

R
Reply from 10.0.2.2: bytes=56 Sequence=2 ttl=255 time=60 ms

i n g
Reply from 10.0.2.2: bytes=56 Sequence=3 ttl=255 time=51 ms

n
Reply from 10.0.2.2: bytes=56 Sequence=4 ttl=255 time=51 ms

ar
Reply from 10.0.2.2: bytes=56 Sequence=5 ttl=255 time=60 ms

L e
e
--- 10.0.2.2 ping statistics ---

or
5 packet(s) transmitted

M
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 51/54/60 ms

Attempts to establish a connection between 10.0.2.2 and 10.0.3.3 when using the
NBMA network type will fail unless a virtual circuit (PVC) is established between R2
and R3. Alternatively the point-to-multipoint network type can be applied.

HUAWEI TECHNOLOGIES Page86


Step 8 Setting the OSPF network type to point-to-multipoint

OSPF configuration can also use the point-to-multipoint OSPF network type over
frame relay networks. First remove the manual peering and change the network type
to point-to-multipoint.

e n
/
[R1]ospf

o m
i.c
[R1-ospf-1]undo peer 10.0.123.2

e
[R1-ospf-1]undo peer 10.0.123.3

aw
u
[R2]ospf

.h
[R2-ospf-1]undo peer 10.0.123.1

i n g
n
[R3]ospf

r
lea
[R3-ospf-1]undo peer 10.0.123.1

Establish the Point-to-multipoint network type.


: //
t t p
:h
[R1]interface Serial 2/0/0

e
[R1-Serial2/0/0]ospf network-type p2mp
s
r c
ou
[R2]interface Serial 3/0/0

es
[R2-Serial3/0/0]ospf network-type p2mp

R
i n g
[R3]interface Serial 1/0/0
[R3-Serial1/0/0]ospf network-type p2mp

rn
a
e then check the neighbor relationship and route information.
After setting the OSPF network type, wait until the neighbor relationship is
L
established,
e
o r
M<R1>display ospf peer brief

OSPF Process 1 with Router ID 10.0.1.1


Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 Serial2/0/0 10.0.2.2 Full
0.0.0.0 Serial2/0/0 10.0.3.3 Full

HUAWEI TECHNOLOGIES Page87


----------------------------------------------------------------------------

<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14

e n
/
m
Destination/Mask Proto Pre Cost Flags NextHop Interface

o
10.0.1.0/24
10.0.1.1/32
Direct
Direct
0
0
0
0
D
D
10.0.1.1
127.0.0.1
LoopBack0
LoopBack0
e i.c
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
aw
u
.h
10.0.2.2/32 OSPF 10 1562 D 10.0.123.2 Serial2/0/0

g
10.0.3.3/32 OSPF 10 1562 D 10.0.123.3 Serial2/0/0
10.0.123.0/24 Direct 0 0 D 10.0.123.1

ni n
Serial2/0/0
10.0.123.1/32 Direct 0 0 D 127.0.0.1
r Serial2/0/0

lea
10.0.123.2/32 Direct 0 0 D 10.0.123.2 Serial2/0/0

://
10.0.123.3/32 Direct 0 0 D 10.0.123.3 Serial2/0/0

tp
10.0.123.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
127.0.0.0/8 Direct 0 0
t D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0

s :h D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct
255.255.255.255/32 Direct
0
0
0
0
r c e D
D
127.0.0.1
127.0.0.1
InLoopBack0
InLoopBack0

s ou
e
<R2>display ospf peer brief

R
i n g
OSPF Process 1 with Router ID 10.0.2.2

n
Peer Statistic Information

ar
----------------------------------------------------------------------------

Le
Area Id Interface Neighbor id State

e
0.0.0.0 Serial3/0/0 10.0.1.1 Full

o r
----------------------------------------------------------------------------

M
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14

Destination/Mask Proto Pre Cost Flags NextHop Interface

HUAWEI TECHNOLOGIES Page88


10.0.1.1/32 OSPF 10 1562 D 10.0.123.1 Serial3/0/0
10.0.2.0/24 Direct 0 0 D 10.0.2.2 LoopBack0
10.0.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.2.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.3.3/32 OSPF 10 3124 D 10.0.123.1 Serial3/0/0
10.0.123.0/24 Direct 0 0 D 10.0.123.2 Serial3/0/0
10.0.123.1/32 Direct 0 0 D 10.0.123.1 Serial3/0/0
10.0.123.2/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
e n
/
m
10.0.123.3/32 OSPF 10 3124 D 10.0.123.1 Serial3/0/0
10.0.123.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
o
127.0.0.0/8
127.0.0.1/32
Direct
Direct
0
0
0
0
D
D
127.0.0.1
127.0.0.1
InLoopBack0
InLoopBack0
e i.c
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
aw
u
.h
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

<R3>display ospf peer brief


i n g
r n
lea
OSPF Process 1 with Router ID 10.0.3.3

//
Peer Statistic Information

p :
----------------------------------------------------------------------------
Area Id Interface
t t Neighbor id State
0.0.0.0 Serial1/0/0

s :h 10.0.1.1 Full

r c e
----------------------------------------------------------------------------

ou
<R3>display ip routing-table

es
Route Flags: R - relay, D - download to fib

R
----------------------------------------------------------------------------
Routing Tables: Public

i n g
n
Destinations : 14 Routes : 14

ar
Le
Destination/Mask Proto Pre Cost Flags NextHop Interface

r e
o
10.0.1.1/32 OSPF 10 1562 D 10.0.123.1 Serial1/0/0

M
10.0.2.2/32 OSPF 10 3124 D 10.0.123.1 Serial1/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.3 LoopBack0
10.0.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.3.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.123.0/24 Direct 0 0 D 10.0.123.3 Serial1/0/0
10.0.123.1/32 Direct 0 0 D 10.0.123.1 Serial1/0/0
10.0.123.2/32 OSPF 10 3124 D 10.0.123.1 Serial1/0/0
10.0.123.3/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

HUAWEI TECHNOLOGIES Page89


10.0.123.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Perform a network connectivity test on R3 from the source 10.0.3.3.


<R3>ping -a 10.0.3.3 10.0.1.1

e n
PING 10.0.1.1: 56 data bytes, press CTRL_C to break
/
Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=60 ms

o m
i.c
Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=255 time=51 ms
Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=255 time=60 ms
w e
Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=255 time=51 ms
u a
g.h
n
--- 10.0.1.1 ping statistics ---
5 packet(s) transmitted
ni
r
lea
5 packet(s) received

//
0.00% packet loss
round-trip min/avg/max = 50/54/60 ms

p :
t t
:h
<R3>ping -a 10.0.3.3 10.0.123.2
PING 10.0.123.2: 56
s
data bytes, press CTRL_C to break

e
c
Reply from 10.0.123.2: bytes=56 Sequence=1 ttl=254 time=110 ms

r
ou
Reply from 10.0.123.2: bytes=56 Sequence=2 ttl=254 time=101 ms

s
Reply from 10.0.123.2: bytes=56 Sequence=3 ttl=254 time=101 ms

e
Reply from 10.0.123.2: bytes=56 Sequence=4 ttl=254 time=110 ms
R
g
Reply from 10.0.123.2: bytes=56 Sequence=5 ttl=254 time=101 ms

n i n
ar
--- 10.0.123.2 ping statistics ---

e
5 packet(s) transmitted

e L
5 packet(s) received

or
0.00% packet loss
round-trip min/avg/max = 101/104/110 ms

M
<R3>ping -a 10.0.3.3 10.0.2.2
PING 10.0.2.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.2.2: bytes=56 Sequence=1 ttl=254 time=102 ms
Reply from 10.0.2.2: bytes=56 Sequence=2 ttl=254 time=101 ms
Reply from 10.0.2.2: bytes=56 Sequence=3 ttl=254 time=110 ms
Reply from 10.0.2.2: bytes=56 Sequence=4 ttl=254 time=101 ms
Reply from 10.0.2.2: bytes=56 Sequence=5 ttl=254 time=102 ms

HUAWEI TECHNOLOGIES Page90


--- 10.0.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 101/103/110 ms

Final Configuration
e n
/
[R1]display current-configuration

o m
i.c
[V200R007C00SPC600]
#
sysname R1
w e
#
u a
interface Serial2/0/0

g.h
n
link-protocol fr
undo fr inarp
ni
r
lea
fr map ip 10.0.123.2 102 broadcast

//
fr map ip 10.0.123.3 103 broadcast
ip address 10.0.123.1 255.255.255.0

p :
ospf network-type p2mp
t t
:h
ospf dr-priority 255
#

e s
interface LoopBack0

r c
ou
ip address 10.0.1.1 255.255.255.0

s
#
ospf 1 router-id 10.0.1.1
Re
g
area 0.0.0.0

i n
network 10.0.0.0 0.255.255.255

n
ar
#

e
user-interface con 0

L
authentication-mode password

e
or
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%
$

M
user-interface vty 0 4
#
return

[R2]display current-configuration
[V200R007C00SPC600]
#
sysname R2

HUAWEI TECHNOLOGIES Page91


#
interface Serial3/0/0
link-protocol fr
undo fr inarp
fr map ip 10.0.123.1 201 broadcast
ip address 10.0.123.2 255.255.255.0
ospf network-type p2mp
#
interface LoopBack0
e n
/
m
ip address 10.0.2.2 255.255.255.0
#
o
ospf 1 router-id 10.0.2.2
area 0.0.0.0
e i.c
network 10.0.0.0 0.255.255.255
aw
u
.h
#

g
user-interface con 0
authentication-mode password

ni n
r
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%

lea
$

//
user-interface vty 0 4
#
p :
return
t t
s:h
[R3]display current-configuration
[V200R007C00SPC600]
r c e
ou
#
sysname R3
es
#
R
interface Serial1/0/0

i n g
n
link-protocol fr

ar
undo fr inarp

e
fr map ip 10.0.123.1 301 broadcast
L
e
ip address 10.0.123.3 255.255.255.0

or
ospf network-type p2mp

M
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
ospf 1 router-id 10.0.3.3
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#

HUAWEI TECHNOLOGIES Page92


user-interface con 0
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%
$
user-interface vty 0 4
#
return

e n
/
o m
e i.c
aw
u
g.h
ni n
r
//lea
p :
t t
s:h
r c e
sou
Re
i n g
n
e ar
e L
or
Lab 2-3 PPPoE Client Session Establishment
M
Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Configuration of a Dialer interface for PPPoE

HUAWEI TECHNOLOGIES Page93


 Authentication of a client over PPPoE.

Topology

e n
/
o m
ei.c
aw
u
g .h
ni n
r
//lea
p :
t t
s :h
r c e
Figure 2.3 PPPoE Server and Client Topology

s ou
Scenario Re
i n g
The enterprise subscribes to a (typically high speed) DSL service from the service
n
ar
provider over which WAN services are supported. R1 and R3 are enterprise edge
routers of different offices, and establish a connection to the service provider
L e
through the PPPoE server (R2). The enterprise is required to establish a PPPoE dialer
e
or
on the edge routers to allow hosts in the local area network to access external
resources transparently via the service provider network over PPPoE.
M
Tasks

Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then

HUAWEI TECHNOLOGIES Page94


move to step 3. For those continuing from previous labs, begin at step 2.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2

e n
/
<Huawei>system-view

o m
i.c
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3

w e
Step 2 Clean up the previous configuration u a
.hg
ni n
Disable the serial interfaces to avoid routing over the frame relay network.
ar
l e
[R1]interface Serial 2/0/0
: //
[R1-Serial2/0/0]shutdown

t tp
: h
s
[R3]interface Serial 1/0/0
[R3-Serial1/0/0]shutdown

r c e
o u
Step 3 Configure PPPoE
e s Server
R
The PPPoE server isgnot part of the enterprise network, however it is required to

n i n
allow the enterprise edge routers R1 and R3 to be authenticated.

a r
L e
[R2]ip pool pool1
Info: It's successful to create an IP address pool.

r e
[R2-ip-pool-pool1]network 119.84.111.0 mask 255.255.255.0

o
[R2-ip-pool-pool1]gateway-list 119.84.111.254

M[R2-ip-pool-pool1]quit
[R2]interface Virtual-Template 1
[R2-Virtual-Template1]ppp authentication-mode chap
[R2-Virtual-Template1]ip address 119.84.111.254 255.255.255.0
[R2-Virtual-Template1]remote address pool pool1
[R2-Virtual-Template1]quit

HUAWEI TECHNOLOGIES Page95


Bind the Virtual Template to interface Gigabit Ethernet 0/0/0.
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1
[R2-GigabitEthernet0/0/0]quit

Configure a PPPoE authenticated user.


[R2]aaa

e n
/
[R2-aaa]local-user huawei1 password cipher huawei123

m
Info: Add a new user.
[R2-aaa]local-user huawei1 service-type ppp
o
[R2-aaa]local-user huawei2 password cipher huawei123
Info: Add a new user.
ei.c
[R2-aaa]local-user huawei2 service-type ppp
aw
u
.h
[R2-aaa]quit

Step 4 Configure PPPoE Client i n g


r n
//lea
:
Configure R1 as a PPPoE client, for which the dialer interface needs to be created,
p
t t
:h
and PPP authentication enabled. The PPP authenticated username and password

e s
should match that configured on the PPPoE server.
r c
[R1]dialer-rule
s ou
Re
[R1-dialer-rule]dialer-rule 1 ip permit
[R1-dialer-rule]quit

i n
[R1]interface Dialer 1 g
n
ar
[R1-Dialer1]dialer user user1

L e
[R1-Dialer1]dialer-group 1
[R1-Dialer1]dialer bundle 1
e
or
[R1-Dialer1]ppp chap user huawei1
[R1-Dialer1]ppp chap password cipher huawei123
M
[R1-Dialer1]dialer timer idle 300
[R1-Dialer1]dialer queue-length 8
[R1-Dialer1]ip address ppp-negotiate
[R1-Dialer1]quit

HUAWEI TECHNOLOGIES Page96


Bind the PPPoE Dialer to the outbound interface
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[R1-GigabitEthernet0/0/0]quit

e n
Configure a default static route to the PPPoE server
/
[R1]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
o m
ei.c
awto be created,
Configure R3 as a PPPoE client, for which the dialer interface needs
hu
and PPP authentication enabled. The PPP authenticated username g . and password

ni n
should match that configured on the PPPoE server.
ar
/ l e
/
[R3]dialer-rule

:
tp
[R3-dialer-rule]dialer-rule 1 ip permit
[R3-dialer-rule]quit

ht
[R3]interface Dialer 1

s :
[R3-Dialer1]dialer user user2
[R3-Dialer1]dialer-group 1
r c e
o
[R3-Dialer1]dialer bundle 1
u
es
[R3-Dialer1]ppp chap user huawei2

R
[R3-Dialer1]ppp chap password cipher huawei123

i n g
[R3-Dialer1]dialer timer idle 300

rn
[R3-Dialer1]dialer queue-length 8

a
[R3-Dialer1]ip address ppp-negotiate

e
[R3-Dialer1]quit
L
r e
o the PPPoE Dialer to the outbound interface
M
Bind
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[R3-GigabitEthernet0/0/0]quit

Configure a default static route to the PPPoE server

HUAWEI TECHNOLOGIES Page97


[R3]ip route-static 0.0.0.0 0.0.0.0 Dialer 1

Step 5 Verify the configuration results

Execute the command display pppoe-server session all command to view the

status and configuration information.


e n
<R2>display pppoe-server session all
/
SID Intf State OIntf RemMAC LocMAC
o m
i.c
1 Virtual-Template1:0 UP GE0/0/0 00e0.fc03.d0ae 00e0.fc03.7516
2 Virtual-Template1:1 UP GE0/0/0
e
00e0.fc03.aedd 00e0.fc03.7516

w
u a
. h
According to displayed information, the session state is normal.
i n g
r n
l e a
:
Check the dialer interface of R1 and R3, and ensure
// both can obtain an IP address
t tp
from the PPPoE server.
: h
e s
<R1>display ip interface brief
r c
u
*down: administratively down

o
^down: standby

e s
(l): loopback
R
(s): spoofing

i n g
The number of interface that is UP in Physical is 7

rn
The number of interface that is DOWN in Physical is 4

a
L e
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 6

r e
o
Interface IP Address/Mask Physical Protocol

MCellular0/0/0
Cellular0/0/1
unassigned
unassigned
down
down
down
down
Dialer1 119.84.111.253/32 up up(s) GigabitEthernet0/0/0
unassigned up down
…output omitted…

<R3>display ip interface brief


…output omitted…

HUAWEI TECHNOLOGIES Page98


Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
Dialer1 119.84.111.252/32 up up(s) GigabitEthernet0/0/0
unassigned up down
…output omitted…

Final Configuration
e n
/
[R1]display current-configuration

o m
i.c
[V200R007C00SPC600]
#
sysname R1
w e
#
u a
aaa

g .h
n
authentication-scheme default
authorization-scheme default
ni
r
lea
accounting-scheme default

//
domain default
domain default_admin

p :
t t
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$

:h
local-user admin service-type http

s
local-user huawei password cipher %$%$B:%I)Io0H8)[%SB[idM3C/!#%$%$

e
local-user huawei service-type ppp

r c
ou
#

s
interface Dialer1
link-protocol ppp
Re
g
ppp chap user huawei1

i n
ppp chap password cipher %$%$A8E~UjX}@;bhCL*C4w#<%"Ba%$%$

n
ar
ip address ppp-negotiate

e
dialer user user1

L
dialer bundle 1

e
or
dialer queue-length 8
dialer timer idle 300

M
dialer-group 1
#
interface GigabitEthernet0/0/0
pppoe-client dial-bundle-number 1
#
dialer-rule
dialer-rule 1 ip permit
#

HUAWEI TECHNOLOGIES Page99


ip route-static 0.0.0.0 0.0.0.0 Dialer1
#
return

[R2]dis current-configuration
[V200R007C00SPC600]
#
sysname R2
e n
/
m
#
ip pool pool1
o
gateway-list 119.84.111.254
network 119.84.111.0 mask 255.255.255.0
ei.c
#
aw
u
.h
aaa

g
authentication-scheme default
authorization-scheme default

ni n
accounting-scheme default
r
lea
domain default

//
domain default_admin

p :
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$
local-user admin service-type http
t t
:h
local-user huawei1 password cipher %$%$MjCY6,a82N4W`]F]3LMAKG9+%$%$

s
local-user huawei1 service-type ppp

r c e
local-user huawei2 password cipher %$%$Ctq55RX:]R,8Jc13{|,)KH!m%$%$

ou
local-user huawei2 service-type ppp
#
es
R
interface Virtual-Template1

i n g
ppp authentication-mode chap

n
remote address pool pool1

ar
ip address 119.84.111.254 255.255.255.0
#
L e
e
interface GigabitEthernet0/0/0

or
pppoe-server bind Virtual-Template 1

M
#
return

[R3]display current-configuration
[V200R007C00SPC600]
#
sysname R3

HUAWEI TECHNOLOGIES Page100


#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$
local-user admin service-type http
e n
/
m
local-user huawei password cipher %$%$fZsyUk1=O=>:L4'ytgR~D*Im%$%$
local-user huawei service-type ppp
o
#
interface Dialer1
ei.c
link-protocol ppp
aw
u
.h
ppp chap user huawei2

g
ppp chap password cipher %$%$0f8(;^]1NS:q;SPo8TyP%.Ei%$%$
ip address ppp-negotiate

ni n
dialer user user2
r
lea
dialer bundle 1

//
dialer queue-length 8
dialer timer idle 300
p :
dialer-group 1
t t
#

s :h
interface GigabitEthernet0/0/0
pppoe-client dial-bundle-number 1
r c e
ou
#
#
es
dialer-rule
R
i n g
dialer-rule 1 ip permit

n
#

ar
ip route-static 0.0.0.0 0.0.0.0 Dialer1
#
L e
e
return

or
M

HUAWEI TECHNOLOGIES Page101


Module 3 Implementing IP Security

Lab 3-1 Filtering Enterprise Data with Access Control Lists

Learning Objectives
e n
/
As a result of this lab section, you should achieve the following tasks:
o m
 Establishment of a basic ACL to implement source based filtering. i.c

w e
 Establishment of an advanced ACL to implement enhanced filtering. a
. hu
Topology
i n g
r n
l e a
: //
t tp
: h
e s
r c
o u
e s
R
i n g
a rn
L e Figure 3.1 Filtering enterprise network data with Access Control Lists

r e
o
Scenario
M
Assume that you are a network administrator of a company that has three networks
belonging to three sites. R2 is deployed at the border of the network for the main
site, while R1 and R3 are deployed at the boundary of the remaining sites. The
routers are interconnected over a private WAN connection. The company needs to
control the access of employees to telnet and FTP services. Only site R1 has
permission to access the telnet server in the main site. Only site R3 has permission to

HUAWEI TECHNOLOGIES Page102


access the FTP server.

Tasks

Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then
e n
move to step 3. For those continuing from previous labs, begin at step 2.
/
o m
[Huawei]sysname R1
[Huawei]sysname R2
ei.c
[Huawei]sysname R3
aw
u
[Huawei]sysname S1
g.h
[S1]vlan 4

ni n
[S1-vlan4]quit
r
lea
[S1]interface vlanif 4

//
[S1-Vlanif4]ip address 10.0.4.254 24

p :
[Huawei]sysname S2
t t
[S2]vlan 6

s :h
[S2-vlan6]quit
[S2]interface vlanif 6
r c e
ou
[S2-Vlanif6]ip address 10.0.6.254 24

e s
Step 2 Clean up theRprevious configuration

i n g
rn
Remove the current network being advertised in OSPF, the PPPoE dialer interfaces,

e a PPPoE server virtual template configuration from R2.


as well as the

e L
or
[R1]ospf

M[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]undo network 10.0.0.0 0.255.255.255
[R1-ospf-1-area-0.0.0.0]quit
[R1-ospf-1]quit
[R1]undo ip route-static 0.0.0.0 0
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]undo pppoe-client dial-bundle-number 1
[R1]interface Dialer 1

HUAWEI TECHNOLOGIES Page103


[R1-Dialer1]undo dialer user
[R1]undo interface Dialer 1
[R1]dialer-rule
[R1-dialer-rule]undo dialer-rule 1

[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]undo network 10.0.0.0 0.255.255.255
[R2-ospf-1-area-0.0.0.0]quit
e n
/
m
[R2-ospf-1]quit
[R2]interface GigabitEthernet 0/0/0
o
[R2-GigabitEthernet0/0/0]undo pppoe-server bind

e i.c
Warning:All PPPoE sessions on this interface will be deleted, continue?[Y/N]:y
[R2-GigabitEthernet0/0/0]quit
aw
u
.h
[R2]undo interface Virtual-Template 1

g
[R2]undo ip pool pool1
[R2]aaa

ni n
[R2-aaa]undo local-user huawei1
r
lea
[R2-aaa]undo local-user huawei2

: //
[R3]ospf
[R3-ospf-1]area 0
t t p
:h
[R3-ospf-1-area-0.0.0.0]undo network 10.0.0.0 0.255.255.255

s
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]quit
r c e
ou
[R3]undo ip route-static 0.0.0.0 0

es
[R3]interface GigabitEthernet 0/0/0

R
[R3-GigabitEthernet0/0/0]undo pppoe-client dial-bundle-number 1

i n g
[R3-GigabitEthernet0/0/0]quit

n
[R3]interface Dialer 1

ar
[R3-Dialer1]undo dialer user

e
[R3-Dialer1]quit
L
e
[R3]undo interface Dialer 1

or
[R3]dialer-rule

M
[R3-dialer-rule]undo dialer-rule 1

Step 3 Configure IP addressing

Configure addressing for the 10.0.13.0/24. 10.0.4.0/24 and 10.0.6.0/24 networks as


shown in the topology of figure 7.1.

HUAWEI TECHNOLOGIES Page104


[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24

[R2]interface GigabitEthernet 0/0/0


[R2-GigabitEthernet0/0/0]ip address 10.0.13.2 24
[R2-GigabitEthernet0/0/0]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.4.2 24
[R2-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.0.6.2 24
e n
/
[R3]interface GigabitEthernet 0/0/0
o m
[R3-GigabitEthernet0/0/0]ip address 10.0.13.3 24
i.c
e
aw
Establish VLAN trunks on S1 and S2. The port link type should already
hu be configured
for interface GigabitEthernet 0/0/2 on S1.
g .
nin
[S1]interface GigabitEthernet 0/0/2
ar
[S1-GigabitEthernet0/0/2]port link-type trunk
/ l e
: /
[S1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

t tp
[S1-GigabitEthernet0/0/2]port trunk pvid vlan 4
[S1-GigabitEthernet0/0/2]quit

: h
e s
c
[S2]interface GigabitEthernet 0/0/2

r
u
[S2-GigabitEthernet0/0/2]port link-type trunk

o
s
[S2-GigabitEthernet0/0/2]port trunk allow-pass vlan all

e
[S2-GigabitEthernet0/0/2]port trunk pvid vlan 6
R
g
[S2-GigabitEthernet0/0/2]quit

i n
rn OSPF to enable internetwork communication
Step 4 Configure
a
L eOSPF for R1, R2, and R3. Ensure that all are part of the same OSPF area
e
Configure
and radvertise the networks that have been created.
o
M[R1]ospf
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255

[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255

HUAWEI TECHNOLOGIES Page105


[R2-ospf-1-area-0.0.0.0]network 10.0.4.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.6.0 0.0.0.255

[R3]ospf
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255

Configure a static route on S1 and S2, the nexthop as the private network’s
gateway.
e n
/
o m
i.c
[S1]ip route-static 0.0.0.0 0.0.0.0 10.0.4.2
[S2]ip route-static 0.0.0.0 0.0.0.0 10.0.6.2

w e
u a
g .h
i n
Verify that a path exists from R1 and R3 to S1 and S2. rn
l e a
: //
tp
<R1>ping 10.0.4.254
PING 10.0.4.254: 56
t
data bytes, press CTRL_C to break

h
:
Reply from 10.0.4.254: bytes=56 Sequence=1 ttl=253 time=2 ms

s
r c e
Reply from 10.0.4.254: bytes=56 Sequence=2 ttl=253 time=10 ms
Reply from 10.0.4.254: bytes=56 Sequence=3 ttl=253 time=1 ms

o u
Reply from 10.0.4.254: bytes=56 Sequence=4 ttl=253 time=2 ms

e s
Reply from 10.0.4.254: bytes=56 Sequence=5 ttl=253 time=2 ms

R
i n g
--- 10.0.4.254 ping statistics ---

rn
5 packet(s) transmitted

a
5 packet(s) received

L e
0.00% packet loss

e
round-trip min/avg/max = 1/3/10 ms

o r
M
<R1>ping 10.0.6.254
PING 10.0.6.254: 56 data bytes, press CTRL_C to break
Reply from 10.0.6.254: bytes=56 Sequence=1 ttl=253 time=10 ms
Reply from 10.0.6.254: bytes=56 Sequence=2 ttl=253 time=2 ms
Reply from 10.0.6.254: bytes=56 Sequence=3 ttl=253 time=2 ms
Reply from 10.0.6.254: bytes=56 Sequence=4 ttl=253 time=10 ms
Reply from 10.0.6.254: bytes=56 Sequence=5 ttl=253 time=2 ms

HUAWEI TECHNOLOGIES Page106


--- 10.0.6.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/5/10 ms

<R3>ping 10.0.4.254
PING 10.0.4.254: 56 data bytes, press CTRL_C to break
Reply from 10.0.4.254: bytes=56 Sequence=1 ttl=253 time=10 ms
e n
/
m
Reply from 10.0.4.254: bytes=56 Sequence=2 ttl=253 time=2 ms
Reply from 10.0.4.254: bytes=56 Sequence=3 ttl=253 time=2 ms
o
Reply from 10.0.4.254: bytes=56 Sequence=4 ttl=253 time=10 ms
Reply from 10.0.4.254: bytes=56 Sequence=5 ttl=253 time=2 ms
ei.c
aw
u
.h
--- 10.0.4.254 ping statistics ---

g
5 packet(s) transmitted
5 packet(s) received

ni n
0.00% packet loss
r
lea
round-trip min/avg/max = 2/5/10 ms

: //
<R3>ping 10.0.6.254
t t p
PING 10.0.6.254: 56
:h
data bytes, press CTRL_C to break

s
r c e
Reply from 10.0.6.254: bytes=56 Sequence=1 ttl=253 time=10 ms
Reply from 10.0.6.254: bytes=56 Sequence=2 ttl=253 time=2 ms

ou
Reply from 10.0.6.254: bytes=56 Sequence=3 ttl=253 time=2 ms

es
Reply from 10.0.6.254: bytes=56 Sequence=4 ttl=253 time=10 ms

R
Reply from 10.0.6.254: bytes=56 Sequence=5 ttl=253 time=2 ms

i n g
n
--- 10.0.6.254 ping statistics ---

ar
5 packet(s) transmitted

e
5 packet(s) received
L
e
0.00% packet loss

or
round-trip min/avg/max = 2/5/10 ms

MStep 5 Configure Filters using Access Control Lists


Configure S1 as a telnet server.
[S1]telnet server enable
[S1]user-interface vty 0 4
[S1-ui-vty0-4]protocol inbound all

HUAWEI TECHNOLOGIES Page107


[S1-ui-vty0-4]authentication-mode password
[S1-ui-vty0-4]set authentication password cipher huawei123

Configure S2 as an FTP server.


[S2]ftp server enable
[S2]aaa
[S2-aaa]local-user huawei password cipher huawei123
[S2-aaa]local-user huawei privilege level 3

e n
[S2-aaa]local-user huawei service-type ftp
/
[S2-aaa]local-user huawei ftp-directory flash:/

o m
i . cand R3
to access the FTP server.
w e
Configure an access control list on R2 to allow R1 to access the telnet server,

a
hu
[R2]acl 3000

g .
[R2-acl-adv-3000]rule 5 permit tcp source 10.0.13.1 0.0.0.0 destination 10.0.4.254 0.0.0.0
destination-port eq 23

ni n
r
[R2-acl-adv-3000]rule 10 permit tcp source 10.0.13.3 0.0.0.0 destination 10.0.6.254 0.0.0.0

a
e
destination-port range 20 21
[R2-acl-adv-3000]rule 15 permit ospf
// l
:
tp
[R2-acl-adv-3000]rule 20 deny ip source any
[R2-acl-adv-3000]quit

h t
:
s 0/0/0 interface of R2.
Apply the ACL to the Gigabit Ethernet
r c e
u
[R2]interface GigabitEthernet0/0/0

o
s
[R2-GigabitEthernet0/0/0]traffic-filter inbound acl 3000

e
Verify the results of theRaccess control list on the network.

i n g
a rn
e
<R1>telnet 10.0.4.254

L
Press CTRL_] to quit telnet mode

e
o r
Trying 10.0.4.254 ...
Connected to 10.0.4.254 ...

MLogin authentication

Password:
Info: The max number of VTY users is 5, and the number
of current VTY users on line is 1.
<S1>

HUAWEI TECHNOLOGIES Page108


Note: use the quit command to exit the telnet session

<R1>ftp 10.0.6.254
Trying 10.0.6.254 ...
Press CTRL+K to abort
Error: Failed to connect to the remote host.

e n
Note: The FTP connection may take a while to respond (approx 60 seconds). /
o m
i . c
<R3>telnet 10.0.4.254
Press CTRL_] to quit telnet mode
w e
a
hu
Trying 10.0.4.254 ...
Error: Can't connect to the remote host

g .
<R3>ftp 10.0.6.254
ni n
Trying 10.0.6.254 ...
ar
l e
//
Press CTRL+K to abort
Connected to 10.0.6.254.
:
220 FTP service ready.
t tp
User(10.0.6.254:(none)):huawei

: h
331 Password required for huawei.

e s
Enter password:

r c
230 User logged in.

o u
[R3-ftp]

e s
R can be used to close the FTP connection
Note: The bye command
i n g
a rn
L
Additional
e Exercises: Analyzing and Verifying
r e
o requires two ports to be defined in the access control list, why is this?
MShould basic ACL and advanced ACL be deployed near the source network or target
FTP

network, and why?

Final Configuration

<R1>display current-configuration

HUAWEI TECHNOLOGIES Page109


[V200R007C00SPC600]
#
sysname R1
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
e n
/
m
domain default_admin
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$
o
local-user admin service-type http
local-user huawei password cipher %$%$B:%I)Io0H8)[%SB[idM3C/!#%$%$
e i.c
local-user huawei service-type ppp
aw
u
.h
#

g
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0

ni n
#
r
lea
ospf 1 router-id 10.0.1.1

//
area 0.0.0.0
network 10.0.13.0 0.0.0.255
p :
#
t t
user-interface con 0

s:h
authentication-mode password

r c e
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%

ou
$
user-interface vty 0 4
es
#
R
return

i n g
n
e ar
e L
<R2>display current-configuration

or
[V200R007C00SPC600]

M
#
sysname R2
#
acl number 3000
rule 5 permit tcp source 10.0.13.1 0 destination 10.0.4.254 0 destination-port eq telnet
rule 10 permit tcp source 10.0.13.3 0 destination 10.0.6.254 0 destination-port range ftp-data
ftp
rule 15 permit ospf

HUAWEI TECHNOLOGIES Page110


rule 20 deny ip
#
interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0
traffic-filter inbound acl 3000
#
interface GigabitEthernet0/0/1
ip address 10.0.4.2 255.255.255.0
#
e n
/
m
interface GigabitEthernet0/0/2
ip address 10.0.6.2 255.255.255.0
o
#
ospf 1 router-id 10.0.2.2
e i.c
area 0.0.0.0
aw
u
.h
network 10.0.4.0 0.0.0.255

g
network 10.0.6.0 0.0.0.255
network 10.0.13.0 0.0.0.255

ni n
#
r
lea
user-interface con 0

//
authentication-mode password

p :
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%
$
t t
user-interface vty 0 4

s:h
#
return
r c e
s ou
Re
<R3>display current-configuration
[V200R007C00SPC600]

i n g
n
#

ar
sysname R3
#
L e
e
interface GigabitEthernet0/0/0

or
ip address 10.0.13.3 255.255.255.0

M
#
ospf 1 router-id 10.0.3.3
area 0.0.0.0
network 10.0.13.0 0.0.0.255
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%

HUAWEI TECHNOLOGIES Page111


$
user-interface vty 0 4
#
return

<S1>display current-configuration
#
!Software Version V200R008C00SPC500
e n
/
m
sysname S1
#
o
vlan batch 3 to 4
#
ei.c
interface Vlanif4
aw
u
.h
ip address 10.0.4.254 255.255.255.0

g
#
interface GigabitEthernet0/0/2

ni n
port link-type trunk
r
lea
port trunk pvid vlan 4

//
port trunk allow-pass vlan 2 to 4094
#
p :
ip route-static 0.0.0.0 0.0.0.0 10.0.4.2
t t
#

s :h
user-interface con 0
user-interface vty 0 4
r c e
ou
authentication-mode password

es
set authentication password cipher N`C55QK<`=/Q=^Q`MAF4<1!!
Protocol inbound all
R
#

i n g
n
return

e ar
e L
or
<S2>dis current-configuration

M
#
!Software Version V200R008C00SPC500
sysname S2
#
FTP server enable
#
vlan batch 6
#

HUAWEI TECHNOLOGIES Page112


aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
local-user huawei password cipher N`C55QK<`=/Q=^Q`MAF4<1!!
e n
/
m
Local-user huawei privilege level 3
local-user huawei ftp-directory flash:/
o
#
local-user huawei service-type ftp

e i.c
interface Vlanif6
aw
u
.h
ip address 10.0.6.254 255.255.255.0

g
#
interface GigabitEthernet0/0/2

ni n
port link-type trunk
r
lea
port trunk pvid vlan 6

//
port trunk allow-pass vlan 2 to 4094
#
p :
ip route-static 0.0.0.0 0.0.0.0 10.0.6.2
t t
#

s :h
user-interface con 0
user-interface vty 0 4
r c e
ou
#
return
es
R
i n g
a rn Address Translation
Lab 3-2 Network
L e
r e Objectives
o
Learning

MAs a result of this lab section, you should achieve the following tasks:
 Translation of addresses between networks (NAT).

 Configuration of Easy IP.

HUAWEI TECHNOLOGIES Page113


Topology

e n
/
o m
ei.c
aw
u
g .h
ni n
r
//lea
p :
t
Figure 3.2 Network Address Translation Topology
t
s:h
Scenario
r c e
o u the offices of the enterprise network have
In order to conserve addressing

e s internally. Users however require a means to be


implemented private addressing
routed between these R private networks and the public network domain. R1 and R3

n g of the enterprise branch offices ,the branch network need


represent edge routers
i
a rn NAT solutions on the in order to allow R1 to perform address
access to the public network. The administrator of the network is requested to
configure dynamic
L e An easyIP NAT solution is to be applied to R3.
translation.

r e
o
Tasks
M
Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then
move to step 3. For those continuing from previous labs, begin at step 2.

HUAWEI TECHNOLOGIES Page114


[Huawei]sysname R1
[R1]inter GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.4.1 24

[Huawei]sysname R3
[R3]interface GigabitEthernet0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.6.3 24

[Huawei]sysname S1
e n
/
m
[S1]vlan 4
[S1-vlan3]quit
o
[S1]interface vlanif 4
[S1-Vlanif4]ip address 10.0.4.254 24
ei.c
[S1-Vlanif4]quit
aw
u
[Huawei]sysname S2
g.h
[S2]vlan 6

ni n
[S2-vlan6]quit
r
lea
[S2]interface vlanif 6

//
[S2-Vlanif6]ip address 10.0.6.254 24
[S2-Vlanif6]quit
p :
t t
: h
s
Step 2 Clean up the previous configuration
e
r c and S2 via Gigabit Ethernet 0/0/1 on R1 and
Re-establish the connection to
o uRemove OSPF from all routers.
S1
s
Gigabit Ethernet 0/0/2 on R3.
e
R
i n g
[R1]interface GigabitEthernet 0/0/0

rn
[R1-GigabitEthernet0/0/0]undo ip address

a
[R1]interface GigabitEthernet 0/0/1

e
L
[R1-GigabitEthernet0/0/1]undo shutdown

e
r
[R1]undo ospf 1

o
Warning: The OSPF process will be deleted. Continue? [Y/N]:y

M[R2]undo ospf 1
Warning: The OSPF process will be deleted. Continue? [Y/N]:y

[R3-GigabitEthernet0/0/0]undo ip address
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]undo shutdown
[R3]undo ospf 1

HUAWEI TECHNOLOGIES Page115


Warning: The OSPF process will be deleted. Continue? [Y/N]:y

Remove the static routes pointing to R2 on S1 and S2.

[S1]undo ip route-static 0.0.0.0 0.0.0.0

[S2]undo ip route-static 0.0.0.0 0.0.0.0

e n
Step 3 Implement VLAN configuration for S1 and S2 /
o m
[S1]interface GigabitEthernet 0/0/1
ei.c
[S1-GigabitEthernet0/0/1]port link-type trunk

aw
u
[S1-GigabitEthernet0/0/1]port trunk pvid vlan 4

.h
[S1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[S1-GigabitEthernet0/0/1]quit

i n g
r n
lea
[S2]interface GigabitEthernet 0/0/3
[S2-GigabitEthernet0/0/3]port link-type trunk
[S2-GigabitEthernet0/0/3]port trunk pvid vlan 6
: //
t p
[S2-GigabitEthernet0/0/3]port trunk allow-pass vlan all

t
[R1]interface GigabitEthernet0/0/0
s :h
c e
[R1-GigabitEthernet0/0/0]ip address 119.84.111.1 24

r
ou
[R3]interface GigabitEthernet0/0/0
s
e
[R3-GigabitEthernet0/0/0]ip address 119.84.111.3 24

R
i n g
Verify that R1 is able to reach both S1 and R3.
n
ar
<R1>ping 10.0.4.254

e
e L
PING 10.0.4.254: 56 data bytes, press CTRL_C to break

or
Reply from 10.0.4.254: bytes=56 Sequence=1 ttl=255 time=23 ms
Reply from 10.0.4.254: bytes=56 Sequence=2 ttl=254 time=1 ms

M Reply from 10.0.4.254: bytes=56 Sequence=3 ttl=254 time=1 ms


Reply from 10.0.4.254: bytes=56 Sequence=4 ttl=254 time=10 ms
Reply from 10.0.4.254: bytes=56 Sequence=5 ttl=254 time=1 ms

--- 10.0.4.254 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss

HUAWEI TECHNOLOGIES Page116


round-trip min/avg/max = 1/7/23 ms

<R1>ping 119.84.111.3
PING 119.84.111.3: 56 data bytes, press CTRL_C to break
Reply from 119.84.111.3: bytes=56 Sequence=1 ttl=255 time=1 ms
Reply from 119.84.111.3: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 119.84.111.3: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 119.84.111.3: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 119.84.111.3: bytes=56 Sequence=5 ttl=255 time=10 ms
e n
/
--- 119.84.111.3 ping statistics ---
o m
5 packet(s) transmitted
5 packet(s) received
e i.c
0.00% packet loss
aw
u
.h
round-trip min/avg/max = 1/4/10 ms

Step 4 Configure Access Control Lists for R1 and R3 i n g


r n
l e aflow with the source of S1, the
// port.
Configure an advanced ACL on R1 and select the data
:
destination of R3, and destined for the telnet service

t tp
[R1]acl 3000

: h
s
[R1-acl-adv-3000]rule 5 permit tcp source 10.0.4.254 0.0.0.0 destination 119.84.111.3

c
0.0.0.0 destination-port eq 23

r e
u
[R1-acl-adv-3000]rule 10 permit ip source 10.0.4.0 0.0.0.255 destination any

o
Configure a basic ACL on sR3 and select the data flow whose source IP address is
[R1-acl-adv-3000]rule 15 deny ip

10.0.6.0/24. Re
[R3]acl 2000
i n g
rn
[R3-acl-basic-2000]rule permit source 10.0.6.0 0.0.0.255
a
L e
Step 5 Configure Dynamic NAT
r e
o
M
Configure static route on S1 and S2,the nexthop as the private network’s gateway.
[S1]ip route-static 0.0.0.0 0.0.0.0 10.0.4.1
[S2]ip route-static 0.0.0.0 0.0.0.0 10.0.6.3

Configure dynamic NAT on the GigabitEthernet0/0/0 interface of R1.


[R1]nat address-group 1 119.84.111.240 119.84.111.243
[R1]interface GigabitEthernet 0/0/0

HUAWEI TECHNOLOGIES Page117


[R1-GigabitEthernet0/0/0]nat outbound 3000 address-group 1

Configure R3 as the telnet server.


[R3]telnet server enable
[R3]user-interface vty 0 4
[R3-ui-vty0-4]authentication-mode password
[R3-ui-vty0-4]set authentication password cipher

e n
Warning: The “password” authentication mode is not secure,and it is strongly recommended
/
m
to use ”aaa” authentication mode.
Enter Password(<8-128>):huawei123
o
Confirm password:huawei123
[R3-ui-vty0-4]quit
e i.c
aw
Verify the address group has been configured correctly. u
g .h
n
<R1>display nat address-group
NAT Address-Group Information:
ni
r
lea
--------------------------------------

//
Index Start-address End-address
--------------------------------------

p :
1 119.84.111.240 119.84.111.243
t t
:h
--------------------------------------
Total : 1

e s
c the remote peer from the internal network.
Test connectivity to the gatewayrof
o u
<S1>ping 119.84.111.3
e s
R
PING 119.84.111.3: 56 data bytes, press CTRL_C to break
Request time out

i n g
rn
Reply from 119.84.111.3: bytes=56 Sequence=2 ttl=254 time=1 ms

a
Reply from 119.84.111.3: bytes=56 Sequence=3 ttl=254 time=1 ms

L e
Reply from 119.84.111.3: bytes=56 Sequence=4 ttl=254 time=1 ms

e
Reply from 119.84.111.3: bytes=56 Sequence=5 ttl=254 time=1 ms

o r
M
--- 119.84.111.3 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 1/1/1 ms

Establish a telnet connection to the public address of the remote peer.


<S1>telnet 119.84.111.3
Trying 119.84.111.3 ...

HUAWEI TECHNOLOGIES Page118


Press CTRL+K to abort
Connected to 119.84.111.3 ...

Login authentication

Password:
<R3>

Do not exit the telnet session, instead open a second session window to R1 and view
the results of the ACL and NAT session translation.
e n
/
o m
i.c
<R1>display acl 3000
Advanced ACL 3000, 3 rules
Acl's step is 5
w e
u a
rule 5 permit tcp source 10.0.4.254 0 destination 119.84.111.3 0 destination-port eq telnet
(1 matches)

g.h
n
rule 10 permit ip source 10.0.4.0 0.0.0.255 (1 matches)
rule 15 deny ip
ni
r
<R1>display nat session all

//lea
NAT Session Table Information:

p :
t t
:h
Protocol : ICMP(1)
SrcAddr Vpn
s
: 10.0.4.254

e
DestAddr Vpn
c
: 119.84.111.3

r
ou
Type Code IcmpId : 8 0 44003

s
NAT-Info
New SrcAddr
Re
: 119.84.111.242

g
New DestAddr : ----
New IcmpId

n i n : 10247

e
Protocol
ar : TCP(6)

e L
SrcAddr Port Vpn : 10.0.4.254 49646

or
DestAddr Port Vpn : 119.84.111.3 23
NAT-Info

M New SrcAddr
New SrcPort
: 119.84.111.242
: 10249
New DestAddr : ----
New DestPort : ----

Total : 2

The ICMP session has a lifetime of only 20 seconds and therefore may not appear to

HUAWEI TECHNOLOGIES Page119


be present when displaying the NAT session results. The following command can be
used in this case to extend the period over which the ICMP results are maintained:

[R1]firewall-nat session icmp aging-time 300

Configure easyIP on the Gigabit Ethernet 0/0/0 interface of R3, associating the
easyIP configuration with ACL 2000 that had been configured earlier.
e n
/
o m
i.c
[R3-GigabitEthernet0/0/0]nat outbound 2000

Test the connectivity from S2 to R1 via R3.


w e
u a
.h
<S2>ping 119.84.111.1
PING 119.84.111.1: 56 data bytes, press CTRL_C to break

i
Reply from 119.84.111.1: bytes=56 Sequence=1 ttl=254 time=1 ms
n g
r n
Reply from 119.84.111.1: bytes=56 Sequence=2 ttl=254 time=1 ms

lea
Reply from 119.84.111.1: bytes=56 Sequence=3 ttl=254 time=1 ms

: //
Reply from 119.84.111.1: bytes=56 Sequence=4 ttl=254 time=1 ms

t p
Reply from 119.84.111.1: bytes=56 Sequence=5 ttl=254 time=1 ms

t
--- 119.84.111.1 ping statistics ---

s :h
5 packet(s) transmitted
5 packet(s) received
r c e
0.00% packet loss

s ou
e
round-trip min/avg/max = 1/1/1 ms

R
n
<R3>display acl 2000

i g
n
Basic ACL 2000, 1 rule

ar
Acl's step is 5

e
L
rule 5 permit source 10.0.6.0 0.0.0.255 (1 matches)

e
or
<R3>display nat outbound acl 2000

M
NAT Outbound Information:
---------------------------------------------------------------------
Interface Acl Address-group/IP/Interface Type
---------------------------------------------------------------------
GigabitEthernet0/0/0 2000 119.84.111.3 easyip
---------------------------------------------------------------------
Total : 1

HUAWEI TECHNOLOGIES Page120


Final Configuration

<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
firewall-nat session icmp aging-time 300
e n
#
/
acl number 3000
o m
i.c
rule 5 permit tcp source 10.0.4.254 0 destination 119.84.111.3 0 destination-port eq telnet
rule 10 permit ip source 10.0.4.0 0.0.0.255

w e
a
rule 15 deny ip
#
u
nat address-group 1 119.84.111.240 119.84.111.243

g.h
#

ni n
r
interface GigabitEthernet0/0/0

lea
ip address 119.84.111.1 255.255.255.0

//
nat outbound 3000 address-group 1
#
p :
interface GigabitEthernet0/0/1
t t
:h
ip address 10.0.4.1 255.255.255.0
#
e s
user-interface con 0
r c
ou
authentication-mode password

s
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%

e
$
R
#
i n g
user-interface vty 0 4

n
ar
return

L e
e
or
<R3>display current-configuration
[V200R007C00SPC600]

M
#
sysname R3
#
telnet server enable
#
acl number 2000
rule 5 permit source 10.0.6.0 0.0.0.255
#

HUAWEI TECHNOLOGIES Page121


interface GigabitEthernet0/0/0
ip address 119.84.111.3 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/2
ip address 10.0.6.3 255.255.255.0
#
user-interface con 0
authentication-mode password
e n
/
m
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%
$
o
user-interface vty 0 4
authentication-mode password
e i.c
aw
set authentication password cipher %$%$7ml|,!ccE$SQ~CZ{GtaE%hO>v}~bVk18p5qq<:UPtI:9hOA%%$%

u
.h
$

g
#
return

ni n
r
<S1>display current-configuration
//lea
#
p :
!Software Version V200R008C00SPC500
t t
sysname S1

s :h
#
vlan batch 4
r c e
ou
#
interface Vlanif4
es
R
ip address 10.0.4.254 255.255.255.0
#

i n g
n
interface GigabitEthernet0/0/1

ar
port link-type trunk

e
port trunk pvid vlan 4
L
e
port trunk allow-pass vlan 2 to 4094

or
#

M
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 4
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/14
shutdown
#

HUAWEI TECHNOLOGIES Page122


ip route-static 0.0.0.0 0.0.0.0 10.0.4.1
#
user-interface con 0
user-interface vty 0 4
set authentication password cipher N`C55QK<`=/Q=^Q`MAF4<1!!
#
return

e n
/
m
<S2>display current-configuration
#
o
!Software Version V200R008C00SPC500
sysname S2
ei.c
#
aw
u
.h
vlan batch 6

g
#
interface Vlanif6

ni n
ip address 10.0.6.254 255.255.255.0
r
lea
#

//
interface GigabitEthernet0/0/2
port link-type trunk
p :
port trunk pvid vlan 6
t t
port trunk allow-pass vlan 2 to 4094

s :h
#
interface GigabitEthernet0/0/3
r c e
ou
port link-type trunk
port trunk pvid vlan 6
es
R
port trunk allow-pass vlan 2 to 4094
#

i n g
n
interface GigabitEthernet0/0/23

ar
shutdown
#
L e
e
ip route-static 0.0.0.0 0.0.0.0 10.0.6.3

or
#

M
user-interface con 0
user-interface vty 0 4
#
return

HUAWEI TECHNOLOGIES Page123


Lab 3-3 Establishing Local AAA solutions

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Configuration of local AAA for which authentication and authorization


e n
/
schemes are to be used.
o m
 Establishment of a domain named huawei
ei.c
 Implementation of privilege levels for authenticated users. a
w
. hu
Topology i n g
r n
l e a
: //
t tp
: h
e s
r c
o u
es Figure 3.3 AAA configuration

R
Scenario i n g
rn
R1 and R3 e ahave been deployed on the network and are to provide remote

e L services using AAA. The company requires that both routers are
authentication

o
mader part of the huawei domain and that the telnet service is made available to
Musers, with limited privileges given once authenticated.

HUAWEI TECHNOLOGIES Page124


Tasks

Step 1 Preparing the environment

If you are starting this section with a non-configured device, begin here and then
move to step 3. For those continuing from previous labs, begin at step 2.

e n
/
[Huawei]sysname R1

o m
i.c
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]ip address 119.84.111.1 24

w e
[Huawei]sysname R3

u a
.h
[R3]inter GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]ip address 119.84.111.3 24

i n g
r n
Step 2 Clean up the previous configurationea
/: /l
t tp from R1 and R3.
Remove the previous NAT and ACL configuration

: h
e s
c
[R1]interface GigabitEthernet 0/0/0

ur
[R1-GigabitEthernet0/0/0]undo nat outbound 3000 address-group 1

s o
[R1-GigabitEthernet0/0/0]quit

[R1]undo acl 3000 Re


[R1]undo nat address-group 1

i n g
rn
[R3]interface GigabitEthernet 0/0/0

a
[R3-GigabitEthernet0/0/0]undo nat outbound 2000

e
L
[R3-GigabitEthernet0/0/0]quit

e
r
[R3]undo acl 2000

o
M
Step 3 Verify connectivity between R1 and R3
<R1>ping 119.84.111.3
PING 119.84.111.3: 56 data bytes, press CTRL_C to break
Reply from 119.84.111.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 119.84.111.3: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 119.84.111.3: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 119.84.111.3: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 119.84.111.3: bytes=56 Sequence=5 ttl=255 time=10 ms

HUAWEI TECHNOLOGIES Page125


--- 119.84.111.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/26/70 ms

Step 4 Perform AAA configuration on R1


e n
Configure an authentication-scheme and authorization-scheme on R1. The
/
configuration for R3 can be found at step 5.
o m
[R1]aaa
[R1-aaa]authentication-scheme auth1
e i.c
Info: Create a new authentication scheme.
aw
[R1-aaa-authen-auth1]authentication-mode local
u
[R1-aaa-authen-auth1]quit
g.h
[R1-aaa]authorization-scheme auth2

ni n
r
Info: Create a new authorization scheme.

lea
[R1-aaa-author-auth2]authorization-mode local

//
[R1-aaa-author-auth2]quit

p :
t t
Configure the domain huawei on R1, then
: h create a user and apply the user to this
domain.
e s
r c
o u
s
[R1]telnet server enable
[R1]aaa
[R1-aaa]domain huawei R e
i n g
[R1-aaa-domain-huawei]authentication-scheme auth1

rn
[R1-aaa-domain-huawei]authorization-scheme auth2

a
[R1-aaa-domain-huawei]quit
e
L
[R1-aaa]local-user user1@huawei password cipher huawei123

e
r
[R1-aaa]local-user user1@huawei service-type telnet

o
[R1-aaa]local-user user1@huawei privilege level 0

MConfigure R1 as the telnet server, using AAA authentication mode.


[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa

Verify whether the telnet service on R1 has been established successfully.

HUAWEI TECHNOLOGIES Page126


<R3>telnet 119.84.111.1
Press CTRL_] to quit telnet mode
Trying 119.84.111.1 ...
Connected to 119.84.111.1 ...

Login authentication

Username:user1@huawei
e n
/
m
Password:
<R1>system-view
o
^
Error: Unrecognized command found at '^' position. i.ce
<R1>quit
a w
hu
g
Operations are restricted as user privileges are limited to privilege . level 0 for

ni n
user1@huawei.
ar
/ l e
Step 5 Perform AAA configuration on R3 : /
t tp
: h R3, as well as authorization mode as local.
configure authentication mode as local
e s on

r c
o u
[R3]aaa
e s
R
[R3-aaa]authentication-scheme auth1

i n g
Info: Create a new authentication scheme.
[R3-aaa-authen-auth1]authentication-mode local

a rn
[R3-aaa-authen-auth1]quit

e
[R3-aaa]authorization-scheme auth2

L
e
Info: Create a new authorization scheme.

o r
[R3-aaa-author-auth2]authorization-mode local

M
[R3-aaa-author-auth2]quit

Configure the domain huawei on R3, then create a user and apply the user to this
domain.

[R3]telnet server enable


[R3]aaa

HUAWEI TECHNOLOGIES Page127


[R3-aaa]domain huawei
[R3-aaa-domain-huawei]authentication-scheme auth1
[R3-aaa-domain-huawei]authorization-scheme auth2
[R3-aaa-domain-huawei]quit
[R3-aaa]local-user user3@huawei password cipher huawei123
[R3-aaa]local-user user3@huawei service-type telnet
[R3-aaa]local-user user3@huawei privilege level 0

Configure the telnet service on R3 to use AAA authentication mode.


e n
/
o m
[R3]user-interface vty 0 4
ei.c
[R3-ui-vty0-4]authentication-mode aaa

aw
u
Verify the results of implementing AAA on the vty interface. g.h
ni n
r
<R1>telnet 119.84.111.3

//lea
Press CTRL_] to quit telnet mode

p :
Trying 119.84.111.1 ...
t t
:h
Connected to 119.84.111.1 ...

e s
Login authentication

r c
Username:user3@huawei
sou
Password:
Re
g
<R3>system-view
^

n i n
ar
Error: Unrecognized command found at '^' position.

e
<R3>

e L
o r
Operations
user3@huawei
are restricted as user privileges are set to privilege
.
level 0 for

MStep 6 Observe the results of the AAA configuration

<R1>display domain name huawei

Domain-name : huawei

HUAWEI TECHNOLOGIES Page128


Domain-state : Active
Authentication-scheme-name : auth1
Accounting-scheme-name : default
Authorization-scheme-name : auth2
Service-scheme-name : -
RADIUS-server-template : -
HWTACACS-server-template : -
User-group : -

e n
/
m
<R1>display local-user username user1@huawei
The contents of local user(s):
o
Password
State
: ****************
: active
ei.c
Service-type-mask : T
aw
u
.h
Privilege level : 0

g
Ftp-directory : -
Access-limit : -

ni n
Accessed-num : 0
r
lea
Idle-timeout : -

//
User-group : -

p :
<R3>display domain name huawei
t t
s :h
Domain-name
Domain-state
r c e
: huawei
: Active

ou
Authentication-scheme-name : auth1
Accounting-scheme-name
es : default
Authorization-scheme-name
R : auth2

ing
Service-scheme-name : -

n
RADIUS-server-template : -

ar
HWTACACS-server-template : -

Le
User-group : -

r e
o
<R3>display local-user username user3@huawei

M
The contents of local user(s):
Password : ****************
State : active
Service-type-mask : T
Privilege level : 0
Ftp-directory : -
Access-limit : -
Accessed-num : 0

HUAWEI TECHNOLOGIES Page129


Idle-timeout : -
User-group : -

Final Configuration

<R1>display current-configuration

e n
[V200R007C00SPC600]
/
#

o m
i.c
sysname R1

e
#
telnet server enable

aw
u
#

.h
aaa
authentication-scheme default

i n g
n
authentication-scheme auth1

r
lea
authorization-scheme default
authorization-scheme auth2
accounting-scheme default
: //
domain default

t t p
:h
domain default_admin

s
domain huawei
authentication-scheme auth1

r c e
ou
authorization-scheme auth2

s
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$

Re
local-user admin service-type http
local-user huawei password cipher %$%$B:%I)Io0H8)[%SB[idM3C/!#%$%$

i n g
local-user huawei service-type ppp

n
ar
local-user user1@huawei password cipher %$%$^L*5IP'0^A!;R)R*L=LFcXgv%$%$
local-user user1@huawei privilege level 0

L e
local-user user1@huawei service-type telnet

e
or
#
interface GigabitEthernet0/0/0

M
ip address 119.84.111.1 255.255.255.0
nat outbound 3000 address-group 1 //may remain from previous labs
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%
$
user-interface vty 0 4

HUAWEI TECHNOLOGIES Page130


authentication-mode aaa
#
return

<R3>dis current-configuration
[V200R007C00SPC600]
e n
/
m
#
sysname R3
o
#
telnet server enable
e i.c
#
aw
u
.h
aaa

g
authentication-scheme default
authentication-scheme auth1

ni n
authorization-scheme default
r
lea
authorization-scheme auth2

//
accounting-scheme default
domain default
p :
domain default_admin
t t
domain huawei

s:h
authentication-scheme auth1
authorization-scheme auth2
r c e
ou
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$

es
local-user admin service-type http

R
local-user huawei password cipher %$%$fZsyUk1=O=>:L4'ytgR~D*Im%$%$

i n g
local-user huawei service-type ppp

n
local-user user3@huawei password cipher %$%$WQt.;bEsR<8fz3LCiPY,che_%$%$

ar
local-user user3@huawei privilege level 0

e
local-user user3@huawei service-type telnet
L
e
#

or
interface GigabitEthernet0/0/0

M
ip address 119.84.111.3 255.255.255.0
nat outbound 2000 //may remain from previous labs
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%
$
user-interface vty 0 4

HUAWEI TECHNOLOGIES Page131


authentication-mode aaa
#
return

e n
/
o m
ei.c
aw
u
g.h
ni n
r
//lea
p :
t t
s:h
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page132


Lab 3-4 Securing Traffic with IPSec VPN

Learning Objectives

As a result of this lab section, you should achieve the following tasks:

 Configuration of an IPSec proposal using an esp transform set.


e n
/
 Configuration of an ACL used to determine interesting traffic.
o m
 Configuration of an IPSec policy
e i.c
aw
 The binding of an IPSec policy to an interface.
u
g.h
Topology
ni n
r
//lea
p :
t t
s :h
r c e
s ou
Re Figure 3.4 IPSec VPN topology

i n g
Scenario rn
e a
e L of protecting both the integrity and confidentiality of company data,
In the interests
it is rrequired that the communication between the offices of the enterprise secure
o private data as it is transmitted over the public network infrastructure. As the
Mnetwork administrator of the company, the task has been assigned to implement
specific

IPSec VPN solutions between the HQ edge router (R1) and the branch office (R3).
Currently only select departments within the HQ require secured communication
over the public network (R2). The administrator should establish IPSec using tunnel
mode between the two offices for all traffic originating from the department.

HUAWEI TECHNOLOGIES Page133


Tasks

Step 1 Preparing the environment


If you are starting this section with a non-configured device, begin here and then
move to step 3. For those continuing from previous labs, begin at step 2.
<Huawei>system-view

e n
/
[Huawei]sysname R1

m
[R1]interface Serial 1/0/0

o
i.c
[R1-Serial1/0/0]ip address 10.0.12.1 24
[R1-Serial1/0/0]interface loopback 0
[R1-LoopBack0]ip address 10.0.1.1 24
w e
u a
.h
<Huawei>system-view
[Huawei]sysname R2
[R2]interface Serial 1/0/0
i n g
[R2-Serial1/0/0]ip address 10.0.12.2 24
r n
lea
[R2-Serial1/0/0]interface serial 2/0/0
[R2-Serial2/0/0]ip address 10.0.23.2 24
: //
[R2-Serial2/0/0]interface loopback 0
[R2-LoopBack0]ip address 10.0.2.2 24
t t p
s :h
<Huawei>system-view
[Huawei]sysname R3
r c e
[R3]interface Serial 2/0/0

s ou
e
[R3-Serial2/0/0]ip address 10.0.23.3 24

R
[R3-Serial2/0/0]interface loopback 0

n g
[R3-LoopBack0]ip address 10.0.3.3 24

i
Step 2 Cleana rnup the previous configuration
e
RemoveLthe addressing for the Gigabit Ethernet 0/0/0 interface on R1 & R3, and
r e the interfaces as shown to prevent alternative routes.
o
disable
M[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]undo ip address
[R1-GigabitEthernet0/0/0]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown
[R1-GigabitEthernet0/0/1]quit
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]undo shutdown

HUAWEI TECHNOLOGIES Page134


[R2]interface Serial 1/0/0
[R2-Serial1/0/0]undo shutdown
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]undo shutdown

[R3]interface GigabitEthernet 0/0/0


[R3-GigabitEthernet0/0/0]undo ip address
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]shutdown
e n
/
m
[R3]interface Serial 2/0/0
[R3-Serial2/0/0]undo shutdown
o
ei.c
Step 3 Establish additional logical interfaces
aw
u
[R1-LoopBack0]interface loopback 1

g.h
[R1-LoopBack1]ip address 10.0.11.11 24

ni n
r
lea
[R3-LoopBack0]interface loopback 1

//
[R3-LoopBack1]ip address 10.0.33.33 24

p :
Step 4 Configure OSPF t t
s :h
c e
Use the IP address of Loopback 0 as the router ID, use the default OSPF process (1),
r
ou
and specify the public network segments 10.0.12.0/24, and 10.0.23.0/24 as part of
OSPF area 0.
es
R
[R1]ospf router-id 10.0.1.1
[R1-ospf-1]area 0

i n g
n
[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255

ar
[R1-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255

e
L
[R1-ospf-1-area-0.0.0.0]network 10.0.11.0 0.0.0.255

e
or
[R2]ospf router-id 10.0.2.2

M
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255

[R3]ospf router-id 10.0.3.3


[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255

HUAWEI TECHNOLOGIES Page135


[R3-ospf-1-area-0.0.0.0]network 10.0.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.0.33.0 0.0.0.255

After OSPF route convergence is complete, view the configuration.


<R2>display ospf peer brief
OSPF Process 1 with Router ID 10.0.2.2
Peer Statistic Information
----------------------------------------------------------------------------

e n
Area Id Interface Neighbor id State
/
0.0.0.0 Serial1/0/0 10.0.1.1 Full

o m
i.c
0.0.0.0 Serial2/0/0 10.0.3.3 Full
----------------------------------------------------------------------------

w e
<R1>display ip routing-table
u a
Route Flags: R - relay, D - download to fib

g .h
n
----------------------------------------------------------------------------
Routing Tables: Public
ni
r
lea
Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost


: //
Flags NextHop Interface

t t p
:h
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0

es
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0

r c D 127.0.0.1 LoopBack0

ou
10.0.2.2/32 OSPF 10 781 D 10.0.12.2 Serial1/0/0

s
10.0.3.3/32 OSPF 10 2343 D 10.0.12.2 Serial1/0/0
10.0.11.0/24 Direct
Re 0 0 D 10.0.11.11 LoopBack1

g
10.0.11.11/32 Direct 0 0 D 127.0.0.1 LoopBack1

n i n
10.0.11.255/32 Direct 0 0 D 127.0.0.1 LoopBack1

ar
10.0.12.0/24 Direct 0 0 D 10.0.12.1 Serial1/0/0

e
10.0.12.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

e L
10.0.12.2/32 Direct 0 0 D 10.0.12.2 Serial1/0/0

or
10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.0.23.0/24 OSPF 10 2343 D 10.0.12.2 Serial1/0/0

M 10.0.33.33/32
127.0.0.0/8
OSPF
Direct
10
0
2343
0
D
D
10.0.12.2
127.0.0.1
Serial1/0/0
InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

If the baudrate is maintained as 128000 from lab 6-1, the OSPF cost will be set as
shown, and thus may vary due to the the metric calculation used by OSPF.

HUAWEI TECHNOLOGIES Page136


<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 OSPF 10 3124 D 10.0.23.2 Serial2/0/0


e n
/
m
10.0.2.2/32 OSPF 10 1562 D 10.0.23.2 Serial2/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.3 LoopBack0
o
10.0.3.3/32
10.0.3.255/32
Direct
Direct
0
0
0
0
D
D
127.0.0.1
127.0.0.1
LoopBack0
LoopBack0
e i.c
10.0.11.11/32 OSPF 10 3124 D 10.0.23.2
aw
Serial2/0/0

u
.h
10.0.12.0/24 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

g
10.0.23.0/24 Direct 0 0 D 10.0.23.3 Serial2/0/0
10.0.23.2/32 Direct 0 0 D 10.0.23.2

ni n
Serial2/0/0
10.0.23.3/32 Direct 0 0 D 127.0.0.1
r Serial2/0/0

lea
10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

//
10.0.33.0/24 Direct 0 0 D 10.0.33.33 LoopBack1
10.0.33.33/32 Direct 0 0 D
p :
127.0.0.1 LoopBack1
10.0.33.255/32 Direct 0 0
t t
D 127.0.0.1 LoopBack1
127.0.0.0/8 Direct 0 0

s :h D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct
127.255.255.255/32 Direct
0
0
0
0
r c e D
D
127.0.0.1
127.0.0.1
InLoopBack0
InLoopBack0

ou
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

es
Step 5 Configure the R ACL to define interesting traffic
i n g
An advanced ACL
r n is created to identify interesting traffic for which the IPSec VPN will
be applied. a
e The advanced ACL is capable of filtering based on specific parameters for
selectiveLtraffic filtering.
r e
o
[R1]acl 3001

M[R1-acl-adv-3001]rule 5 permit ip source 10.0.1.0 0.0.0.255 destination 10.0.3.0 0.0.0.255

[R3]acl 3001
[R3-acl-adv-3001]rule 5 permit ip source 10.0.3.0 0.0.0.255 destination 10.0.1.0 0.0.0.255

Step 6 Configure IPSec VPN Proposal

Create an IPSec proposal and enter the IPSec proposal view to specify the security

HUAWEI TECHNOLOGIES Page137


protocols to be used. Ensure both peers use the same protocols.
[R1]ipsec proposal tran1
[R1-ipsec-proposal-tran1]esp authentication-algorithm sha1
[R1-ipsec-proposal-tran1]esp encryption-algorithm 3des

[R3]ipsec proposal tran1


[R3-ipsec-proposal-tran1]esp authentication-algorithm sha1
[R3-ipsec-proposal-tran1]esp encryption-algorithm 3des

e n
/
Run the display ipsec proposal command to verify the configuration.
o m
[R1]display ipsec proposal

ei.c
Number of proposals: 1
aw
u
IPSec proposal name : tran1
g.h
Encapsulation mode : Tunnel

ni n
Transform : esp-new
r
lea
ESP protocol : Authentication SHA1-HMAC-96
Encryption 3DES

: //
[R3]display ipsec proposal
t t p
s:h
Number of proposals: 1

r c e
ou
IPSec proposal name : tran1
Encapsulation mode :
es
Tunnel
Transform :
R
esp-new

ing
ESP protocol : Authentication SHA1-HMAC-96

rn
Encryption 3DES

a
e Policy Creation
L
Step 7 IPSec
e
r
o an IPSec policy and define the parameters for establishing the SA.
Create
M[R1]ipsec policy P1 10 manual
[R1-ipsec-policy-manual-P1-10]security acl 3001
[R1-ipsec-policy-manual-P1-10]proposal tran1
[R1-ipsec-policy-manual-P1-10]tunnel remote 10.0.23.3
[R1-ipsec-policy-manual-P1-10]tunnel local 10.0.12.1
[R1-ipsec-policy-manual-P1-10]sa spi outbound esp 54321
[R1-ipsec-policy-manual-P1-10]sa spi inbound esp 12345

HUAWEI TECHNOLOGIES Page138


[R1-ipsec-policy-manual-P1-10]sa string-key outbound esp simple huawei
[R1-ipsec-policy-manual-P1-10]sa string-key inbound esp simple huawei

[R3]ipsec policy P1 10 manual


[R3-ipsec-policy-manual-P1-10]security acl 3001
[R3-ipsec-policy-manual-P1-10]proposal tran1
[R3-ipsec-policy-manual-P1-10]tunnel remote 10.0.12.1
[R3-ipsec-policy-manual-P1-10]tunnel local 10.0.23.3
[R3-ipsec-policy-manual-P1-10]sa spi outbound esp 12345
e n
/
m
[R3-ipsec-policy-manual-P1-10]sa spi inbound esp 54321
[R3-ipsec-policy-manual-P1-10]sa string-key outbound esp simple huawei
o
[R3-ipsec-policy-manual-P1-10]sa string-key inbound esp simple huawei

e i.c
Run the display ipsec policy command to verify the configuration. w
u a
<R1>display ipsec policy
. h
i n g
n
===========================================
IPSec policy group: "P1"
ar
l e
//
Using interface:
===========================================
:
t tp
Sequence number: 10

: h
Security data flow: 3001

e s
c
Tunnel local address: 10.0.12.1

r
u
Tunnel remote address: 10.0.23.3

o
s
Qos pre-classify: Disable
Proposal name:tran1
Re
g
Inbound AH setting:
AH SPI:
i n
rn
AH string-key:

e a
AH authentication hex key:

L
Inbound ESP setting:

e
o r ESP SPI: 12345 (0x3039)
ESP string-key: huawei

M ESP encryption hex key:


ESP authentication hex key:
Outbound AH setting:
AH SPI:
AH string-key:
AH authentication hex key:
Outbound ESP setting:
ESP SPI: 54321 (0xd431)

HUAWEI TECHNOLOGIES Page139


ESP string-key: huawei
ESP encryption hex key:
ESP authentication hex key:

<R3>display ipsec policy

===========================================
IPSec policy group: "P1"
Using interface:
e n
/
m
===========================================

o
Sequence number: 10
Security data flow: 3001
ei.c
Tunnel local address: 10.0.23.3
aw
u
.h
Tunnel remote address: 10.0.12.1

g
Qos pre-classify: Disable
Proposal name:tran1

ni n
Inbound AH setting:
r
lea
AH SPI:

//
AH string-key:
AH authentication hex key:
p :
Inbound ESP setting:
t t
ESP SPI: 54321 (0xd431)

s:h
ESP string-key: huawei
ESP encryption hex key:
r c e
ou
ESP authentication hex key:
Outbound AH setting:
es
AH SPI:
R
AH string-key:

i n g
n
AH authentication hex key:

ar
Outbound ESP setting:

e
ESP SPI: 12345 (0x3039)
L
e
ESP string-key: huawei

or
ESP encryption hex key:

M
ESP authentication hex key:

HUAWEI TECHNOLOGIES Page140


Step 8 Applying IPSec Policies to Interfaces

Apply the policy to the physical interface upon which traffic will be subjected to
IPSec processing.
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ipsec policy P1

[R3]interface Serial 2/0/0


e n
[R3-Serial2/0/0]ipsec policy P1 /
o m
Step 9 Test connectivity between the IP networks i.c
e
aw
Observe and verity that non-interesting traffic bypasses the IPSec processing.
<R1>ping -a 10.0.11.11 10.0.33.33
. hu
PING 10.0.33.33: 56 data bytes, press CTRL_C to break
i n g
r n
Reply from 10.0.33.33: bytes=56 Sequence=1 ttl=254 time=60 ms

l e a
Reply from 10.0.33.33: bytes=56 Sequence=2 ttl=254 time=50 ms

//
Reply from 10.0.33.33: bytes=56 Sequence=3 ttl=254 time=50 ms

:
tp
Reply from 10.0.33.33: bytes=56 Sequence=4 ttl=254 time=60 ms

t
Reply from 10.0.33.33: bytes=56 Sequence=5 ttl=254 time=50 ms

h
:
--- 10.0.33.33 ping statistics ---
5 packet(s) transmitted
e s
5 packet(s) received
r c
0.00% packet loss

o u
s
round-trip min/avg/max = 50/54/60 ms

e
R
Inpacket count
i g
<R1>display ipsec statistics esp

n : 0

a rn
Inpacket auth count : 0

L e
Inpacket decap count
Outpacket count
: 0
: 0

r e
Outpacket auth count : 0

oOutpacket encap count : 0

M Inpacket drop count


Outpacket drop count
: 0
: 0
BadAuthLen count : 0
AuthFail count : 0
InSAAclCheckFail count : 0
PktDuplicateDrop count : 0
PktSeqNoTooSmallDrop count : 0
PktInSAMissDrop count : 0

HUAWEI TECHNOLOGIES Page141


Observe that only the interesting traffic will be secured by the IPSec VPN.
<R1>ping -a 10.0.1.1 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=80 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=77 ms
Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=255 time=77 ms
Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=255 time=80 ms

e n
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=255 time=77 ms
/
--- 10.0.3.3 ping statistics ---

o m
i.c
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
w e
round-trip min/avg/max = 77/78/80 ms
u a
g.h
n
<R1>display ipsec statistics esp
Inpacket count : 5
ni
r
lea
Inpacket auth count : 0

//
Inpacket decap count : 0
Outpacket count : 5

p :
Outpacket auth count : 0
t t
:h
Outpacket encap count : 0
Inpacket drop count : 0

e s
Outpacket drop count : 0

r c
ou
BadAuthLen count : 0

s
AuthFail count : 0
InSAAclCheckFail count
Re : 0

g
PktDuplicateDrop count : 0

i n
PktSeqNoTooSmallDrop count : 0

n
ar
PktInSAMissDrop count : 0

L e
r
Final eConfiguration
o
M<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
acl number 3001
rule 5 permit ip source 10.0.1.0 0.0.0.255 destination 10.0.3.0 0.0.0.255

HUAWEI TECHNOLOGIES Page142


#
ipsec proposal tran1
esp authentication-algorithm sha1
esp encryption-algorithm 3des
#
ipsec policy P1 10 manual
security acl 3001
proposal tran1
tunnel local 10.0.12.1
e n
/
m
tunnel remote 10.0.23.3
sa spi inbound esp 12345
o
sa string-key inbound esp simple huawei
sa spi outbound esp 54321
ei.c
sa string-key outbound esp simple huawei
aw
u
.h
#

g
interface Serial1/0/0
link-protocol ppp

ni n
ppp authentication-mode pap
r
lea
ip address 10.0.12.1 255.255.255.0

//
ipsec policy P1
baudrate 128000
p :
#
t t
interface LoopBack0

s:h
ip address 10.0.1.1 255.255.255.0
#
r c e
ou
interface LoopBack1

es
ip address 10.0.11.11 255.255.255.0
#
R
i n g
ospf 1 router-id 10.0.1.1

n
area 0.0.0.0

ar
network 10.0.1.0 0.0.0.255

e
network 10.0.11.0 0.0.0.255
L
e
network 10.0.12.0 0.0.0.255

or
#

M
user-interface con 0
authentication-mode password
set authentication password
cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%$
user-interface vty 0 4
authentication-mode aaa
#
return

HUAWEI TECHNOLOGIES Page143


<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
interface Serial1/0/0
link-protocol ppp
e n
/
m
ppp pap local-user huawei password cipher %$%$u[hr6d<JVHR@->T7xr1<$.iv%$%$
ip address 10.0.12.2 255.255.255.0
o
#
interface Serial2/0/0
e i.c
link-protocol ppp
aw
u
.h
ppp chap user huawei

g
ppp chap password cipher %$%$e{5h)gh"/Uz0mUC%vEx3$4<m%$%$
ip address 10.0.23.2 255.255.255.0

ni n
#
r
lea
interface LoopBack0

//
ip address 10.0.2.2 255.255.255.0
#
p :
ospf 1 router-id 10.0.2.2
t t
area 0.0.0.0

s:h
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
r c e
ou
#
user-interface con 0
es
R
authentication-mode password

i n g
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%

n
$

ar
user-interface vty 0 4
#
L e
e
return

or
M
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
acl number 3001
rule 5 permit ip source 10.0.3.0 0.0.0.255 destination 10.0.1.0 0.0.0.255

HUAWEI TECHNOLOGIES Page144


#
ipsec proposal tran1
esp authentication-algorithm sha1
esp encryption-algorithm 3des
#
ipsec policy P1 10 manual
security acl 3001
proposal tran1
tunnel local 10.0.23.3
e n
/
m
tunnel remote 10.0.12.1
sa spi inbound esp 54321
o
sa string-key inbound esp simple huawei
sa spi outbound esp 12345
e i.c
sa string-key outbound esp simple huawei
aw
u
.h
#

g
interface Serial2/0/0
link-protocol ppp

ni n
ppp authentication-mode chap
r
lea
ip address 10.0.23.3 255.255.255.0

//
ipsec policy P1
#
p :
interface LoopBack0
t t
ip address 10.0.3.3 255.255.255.0

s:h
#
interface LoopBack1
r c e
ou
ip address 10.0.33.33 255.255.255.0
#
es
ospf 1 router-id 10.0.3.3
R
area 0.0.0.0

i n g
n
network 10.0.3.0 0.0.0.255

ar
network 10.0.23.0 0.0.0.255

e
network 10.0.33.0 0.0.0.255
L
e
#

or
user-interface con 0

M
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%
$
user-interface vty 0 4
authentication-mode aaa
#
return

HUAWEI TECHNOLOGIES Page145


Lab 3-5 Supporting Dynamic Routing with GRE

Learning Objectives

As a result of this lab section, you should achieve the following tasks:
e n
/
 Configuration of an ACL to support GRE encapsulation
o m
 Establishment of a tunnel interface for GRE
e i.c
 Implementation of the GRE keepalive feature. aw
u
g .h
Topology
ni n
r
//lea
p :
t t
s :h
r c e
s ou
Re
Figure 3.5 Dynamic routing with GRE topology

i n g
Scenario
a rn
L e has been made to allow networks from other offices to be advertised
A requirement
r
to theeHQ. Following the implementation of IPSec VPN solutions, it was discovered
o this was not possible. After some consultation the administrator has been
that
Madvised to implement a GRE solution over the existing IPSec network to enable the
enterprise offices to truly operate as a single administrative domain.

Tasks

Note: It is a prerequisite that lab 3-4 be completed before attempting this lab.

HUAWEI TECHNOLOGIES Page146


Step 1 Set GRE traffic as the interesting traffic

Reconfigure the access control list establish GRE encapsulation over IPSec.
[R1]acl 3001
[R1-acl-adv-3001]rule 5 permit gre source 10.0.12.1 0 destination 10.0.23.3 0

e n
/
[R3]acl 3001

o m
i.c
[R3-acl-adv-3001]rule 5 permit gre source 10.0.23.3 0 destination 10.0.12.1 0

Step 2 Configure a tunnel interface w e


a
Create a tunnel interface and specify GRE as the encapsulation.type.hu Set the tunnel
i n
source address or source interface, and set the tunnel destination
g address.
r n
[R1]interface Tunnel 0/0/1

l e a
//
[R1-Tunnel0/0/1]ip address 100.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
:
[R1-Tunnel0/0/1]source 10.0.12.1
t tp
[R1-Tunnel0/0/1]destination 10.0.23.3
: h
e s
[R3]interface Tunnel 0/0/1
r c
u
[R3-Tunnel0/0/1]ip address 100.1.1.2 24

o
s
[R3-Tunnel0/0/1]tunnel-protocol gre

e
R
[R3-Tunnel0/0/1]source 10.0.23.3

i n g
[R3-Tunnel0/0/1]destination 10.0.12.1

a rn
L e
Step 3 Configure a second OSPF process to route the tunnel

r ethe tunnel interface network to OSPF 1 process, and create a second OSPF
o of the link state database (process 2) for the 10.0.12.0 and 10.0.23.0
Add
Mnetworks, be sure to remove these networks from OSPF 1.
instance

[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]undo network 10.0.12.0 0.0.0.255

HUAWEI TECHNOLOGIES Page147


[R1]ospf 2 router-id 10.0.1.1
[R1-ospf-2]area 0
[R1-ospf-2-area-0.0.0.0]network 10.0.12.0 0.0.0.255

[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]undo network 10.0.23.0 0.0.0.255
[R3]ospf 2 router-id 10.0.3.3
e n
/
m
[R3-ospf-2]area 0
[R3-ospf-2-area-0.0.0.0]network 10.0.23.0 0.0.0.255
o
e i.c
OSPF LSDB are significant only to the local router, therefore allowing routes from
OSPF LSDB 2 of R1 and R3 to reach OSPF LSDB 1 of R2.
a w
hu
Run the display interface Tunnel 0/0/1 command to verify the g . configuration.

ni n
<R1>display interface Tunnel 0/0/1

ar
e
Tunnel0/0/1 current state : UP
Line protocol current state : UP
/ / l
:
tp
Last line protocol up time : 2016-03-17 17:10:16

t
Description:HUAWEI, AR Series, Tunnel0/0/1 Interface

h
:
Route Port,The Maximum Transmit Unit is 1500

s
Internet Address is 100.1.1.1/24

r c e
Encapsulation is TUNNEL, loopback not set

o u
Tunnel source 10.0.12.1 (Serial1/0/0), destination 10.0.23.3

e s
Tunnel protocol/transport GRE/IP, key disabled
keepalive disabled
R
i n g
Checksumming of packets disabled

rn
Current system time: 2016-03-17 17:35:39

a
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec

L e
Last 300 seconds output rate 9 bytes/sec, 0 packets/sec

e
Realtime 0 seconds input rate 0 bytes/sec, 0 packets/sec

o rRealtime 0 seconds output rate 0 bytes/sec, 0 packets/sec

M
0 packets input, 0 bytes, 0 drops
145 packets output, 14320 bytes, 0 drops
Input bandwidth utilization : --
Output bandwidth utilization : --

<R3>display interface Tunnel 0/0/1


Tunnel0/0/1 current state : UP
Line protocol current state : UP

HUAWEI TECHNOLOGIES Page148


Last line protocol up time : 2016-03-17 17:10:40
Description:HUAWEI, AR Series, Tunnel0/0/1 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 100.1.1.2/24
Encapsulation is TUNNEL, loopback not set
Tunnel source 10.0.23.3 (Serial2/0/0), destination 10.0.12.1
Tunnel protocol/transport GRE/IP, key disabled
keepalive disabled
Checksumming of packets disabled
e n
/
m
Current system time: 2016-03-17 17:36:44
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec
o
Last 300 seconds output rate 9 bytes/sec, 0 packets/sec
Realtime 0 seconds input rate 0 bytes/sec, 0 packets/sec
e i.c
Realtime 0 seconds output rate 0 bytes/sec, 0 packets/sec
aw
u
.h
0 packets input, 0 bytes, 0 drops

g
162 packets output, 14420 bytes, 15 drops
Input bandwidth utilization : --

ni n
Output bandwidth utilization : --
r
//lea
Step 4 Verify that the routes are being carried via GRE
p :
t t
:h
Run the display ip routing-table command to check the IPv4 routing table.
s
<R1>display ip routing-table

r c e
ou
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
es
Destinations : 21
R Routes : 21

i n g
n
Destination/Mask Proto Pre Cost Flags NextHop Interface

e ar
e L
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0

or
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 10.0.1.255/32
Direct 0 0 D 127.0.0.1 LoopBack0

M 10.0.2.2/32
10.0.3.3/32
OSPF
OSPF
10
10
781
1562
D
D
10.0.12.2
100.1.1.2
Serial1/0/0
Tunnel0/0/1
10.0.11.0/24 Direct 0 0 D 10.0.11.11 LoopBack1
10.0.11.11/32 Direct 0 0 D 127.0.0.1 LoopBack1
10.0.11.255/32 Direct 0 0 D 127.0.0.1 LoopBack1
10.0.12.0/24 Direct 0 0 D 10.0.12.1 Serial1/0/0
10.0.12.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.0.12.2/32 Direct 0 0 D 10.0.12.2 Serial1/0/0

HUAWEI TECHNOLOGIES Page149


10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.0.23.0/24 OSPF 10 2343 D 10.0.12.2 Serial1/0/0
10.0.33.33/32 OSPF 10 1562 D 100.1.1.2 Tunnel0/0/1
100.1.1.0/24 Direct 0 0 D 100.1.1.1 Tunnel0/0/1
100.1.1.1/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/1
100.1.1.255/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
e n
/
m
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

o
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
e i.c
aw
----------------------------------------------------------------------------

u
.h
Routing Tables: Public

g
Destinations : 21 Routes : 21

ni n
Destination/Mask Proto Pre Cost Flags NextHop
r Interface

lea
://
10.0.1.1/32 OSPF 10 1562 D 100.1.1.1 Tunnel0/0/1

tp
10.0.2.2/32 OSPF 10 1562 D 10.0.23.2 Serial2/0/0
10.0.3.0/24 Direct 0 0
t D 10.0.3.3 LoopBack0
10.0.3.3/32 Direct 0 0

s :h D 127.0.0.1 LoopBack0
10.0.3.255/32
10.0.11.11/32
Direct
OSPF
0
10
0

r c
1562 e D
D
127.0.0.1
100.1.1.1
LoopBack0
Tunnel0/0/1

ou
10.0.12.0/24 OSPF 10 3124 D 10.0.23.2 Serial2/0/0
10.0.23.0/24 Direct
es
0 0 D 10.0.23.3 Serial2/0/0
10.0.23.2/32 Direct
R 0 0 D 10.0.23.2 Serial2/0/0

ing
10.0.23.3/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

n
10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

ar
10.0.33.0/24 Direct 0 0 D 10.0.33.33 LoopBack1

Le
10.0.33.33/32 Direct 0 0 D 127.0.0.1 LoopBack1

e
10.0.33.255/32 Direct 0 0 D 127.0.0.1 LoopBack1

o r
100.1.1.0/24 Direct 0 0 D 100.1.1.2 Tunnel0/0/1

M
100.1.1.2/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/1
100.1.1.255/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

After a GRE tunnel is set up, the router can exchange OSPF packets through the GRE

HUAWEI TECHNOLOGIES Page150


tunnel. Clear the IPSec statistics and test the connection
<R1>reset ipsec statistics esp
[R1]ping -a 10.0.1.1 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=69 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=70 ms
Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=255 time=68 ms
Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=255 time=68 ms

e n
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=255 time=68 ms
/
o m
i.c
--- 10.0.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
w e
0.00% packet loss
u a
round-trip min/avg/max = 68/68/70 ms

g.h
<R1>display ipsec statistics esp
ni n
r
lea
Inpacket count : 8

//
Inpacket auth count : 0
Inpacket decap count : 0

p :
Outpacket count : 8
t t
:h
Outpacket auth count : 0
Outpacket encap count : 0

e s
Inpacket drop count : 0

r c
ou
Outpacket drop count : 0

s
BadAuthLen count : 0
AuthFail count
Re : 0

g
InSAAclCheckFail count : 0

i n
PktDuplicateDrop count

n
: 0

ar
PktSeqNoTooSmallDrop count : 0

e
PktInSAMissDrop count : 0

e L
or
GRE encapsulates all OSPF traffic including the hello packets over IPSec, the gradual
M
increment of the IPSec esp statistics verifies this.

Step 5 Implement the keepalive feature on the GRE tunnel

[R1]interface Tunnel 0/0/1


[R1-Tunnel0/0/1]keepalive period 3

HUAWEI TECHNOLOGIES Page151


Verify that the keepalive feature has been enabled on the tunnel interface.

<R1>display interface Tunnel 0/0/1


Tunnel0/0/1 current state : UP
Line protocol current state : UP
Last line protocol up time : 2016-03-18 09:50:21

e n
Description:HUAWEI, AR Series, Tunnel0/0/1 Interface
/
Route Port,The Maximum Transmit Unit is 1500
o m
i.c
Internet Address is 100.1.1.1/24
Encapsulation is TUNNEL, loopback not set
Tunnel source 10.0.12.1 (Serial1/0/0), destination 10.0.23.3
w e
Tunnel protocol/transport GRE/IP, key disabled
u a
keepalive enable period 3 retry-times 3

g.h
n
Checksumming of packets disabled
Current system time: 2013-12-18 11:05:49
ni
r
lea
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec

//
Last 300 seconds output rate 8 bytes/sec, 0 packets/sec

:
Realtime 0 seconds input rate 0 bytes/sec, 0 packets/sec

p
t t
Realtime 0 seconds output rate 0 bytes/sec, 0 packets/sec

:h
0 packets input, 0 bytes, 0 drops

s
503 packets output, 47444 bytes, 0 drops

e
c
Input bandwidth utilization : --

r
ou
Output bandwidth utilization : --

es
Final ConfigurationR
i n g
a rn
<R1>display current-configuration

L e
[V200R007C00SPC600]

e
#

o r
sysname R1

M
#
acl number 3001
rule 5 permit gre source 10.0.12.1 0 destination 10.0.23.3 0
#
ipsec proposal tran1
esp authentication-algorithm sha1
esp encryption-algorithm 3des
#

HUAWEI TECHNOLOGIES Page152


ipsec policy P1 10 manual
security acl 3001
proposal tran1
tunnel local 10.0.12.1
tunnel remote 10.0.23.3
sa spi inbound esp 12345
sa string-key inbound esp simple huawei
sa spi outbound esp 54321
sa string-key outbound esp simple huawei
e n
/
m
#
interface Serial1/0/0
o
link-protocol ppp
ppp authentication-mode pap
ei.c
ip address 10.0.12.1 255.255.255.0
aw
u
.h
ipsec policy P1

g
baudrate 128000
#

ni n
interface LoopBack0
r
lea
ip address 10.0.1.1 255.255.255.0

//
#
interface LoopBack1
p :
ip address 10.0.11.11 255.255.255.0
t t
#

s:h
interface Tunnel0/0/1
ip address 100.1.1.1 255.255.255.0
r c e
ou
tunnel-protocol gre
keepalive period 3
es
source 10.0.12.1
R
destination 10.0.23.3

i n g
n
#

ar
ospf 1 router-id 10.0.1.1

e
area 0.0.0.0
L
e
network 10.0.1.0 0.0.0.255

or
network 10.0.11.0 0.0.0.255

M
network 100.1.1.0 0.0.0.255
#
ospf 2 router-id 10.0.1.1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
#
user-interface con 0
authentication-mode password

HUAWEI TECHNOLOGIES Page153


set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%
$
user-interface vty 0 4
authentication-mode aaa
#
return

<R2>display current-configuration
e n
/
m
[V200R007C00SPC600]
#
o
sysname R2
#
e i.c
interface Serial1/0/0
aw
u
.h
link-protocol ppp

g
ppp pap local-user huawei password cipher %$%$u[hr6d<JVHR@->T7xr1<$.iv%$%$
ip address 10.0.12.2 255.255.255.0

ni n
#
r
lea
interface Serial2/0/0

//
link-protocol ppp
ppp chap user huawei
p :
t t
ppp chap password cipher %$%$e{5h)gh"/Uz0mUC%vEx3$4<m%$%$
ip address 10.0.23.2 255.255.255.0

s:h
#
interface LoopBack0
r c e
ou
ip address 10.0.2.2 255.255.255.0
#
es
ospf 1 router-id 10.0.2.2
R
area 0.0.0.0

i n g
n
network 10.0.2.0 0.0.0.255

ar
network 10.0.12.0 0.0.0.255

e
network 10.0.23.0 0.0.0.255
L
e
#

or
user-interface con 0

M
authentication-mode password
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%
$
user-interface vty 0 4
#
return

HUAWEI TECHNOLOGIES Page154


<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
acl number 3001
rule 5 permit gre source 10.0.23.3 0 destination 10.0.12.1 0
#
ipsec proposal tran1
e n
/
m
esp authentication-algorithm sha1
esp encryption-algorithm 3des
o
#
ipsec policy P1 10 manual
ei.c
security acl 3001
aw
u
.h
proposal tran1

g
tunnel local 10.0.23.3
tunnel remote 10.0.12.1

ni n
sa spi inbound esp 54321
r
lea
sa string-key inbound esp simple huawei

//
sa spi outbound esp 12345
sa string-key outbound esp simple huawei
p :
#
t t
interface Serial2/0/0

s :h
link-protocol ppp
ppp authentication-mode chap
r c e
ou
ip address 10.0.23.3 255.255.255.0
ipsec policy P1
es
#
R
interface LoopBack0

i n g
n
ip address 10.0.3.3 255.255.255.0

ar
#

e
interface LoopBack1
L
e
ip address 10.0.33.33 255.255.255.0

or
#

M
interface Tunnel0/0/1
ip address 100.1.1.2 255.255.255.0
tunnel-protocol gre
source 10.0.23.3
destination 10.0.12.1
#
ospf 1 router-id 10.0.3.3
area 0.0.0.0

HUAWEI TECHNOLOGIES Page155


network 10.0.3.0 0.0.0.255
network 10.0.33.0 0.0.0.255
network 100.1.1.0 0.0.0.255
#
ospf 2 router-id 10.0.3.3
area 0.0.0.0
network 10.0.23.0 0.0.0.255
#
user-interface con 0
e n
/
m
authentication-mode password

o
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%
$
user-interface vty 0 4
e i.c
authentication-mode aaa
aw
u
.h
#

g
return

ni n
r
//lea
p :
t t
s:h
r c e
s ou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page156


Module 4 Establishing IPv6 Networks

Lab 4-1 Implementing IPv6 Networks and Solutions

Learning Objectives
e n
/
As a result of this lab section, you should achieve the following tasks:
o m
 Configuration of basic IPv6 addressing.
e i.c
 Configuration of the OSPFv3 routing protocol. aw
u
 Configuration of DHCPv6 server functions.
g .h
ni n
r
 Verification of the results using IPv6 display commands.
a
l e
: //
t tp
Topology
: h
e s
r c
o u
e s
R
i n g
a rn
L e
r e
o
M

Figure 4.1 IPv6 topology

HUAWEI TECHNOLOGIES Page157


Scenario

In line with plans for deployment of solutions for next generation networks, it has
been decided that the enterprise network should implement an IPv6 design to the
existing infrastructure. As the administrator you have been tasked with the job of
implementing the addressing scheme and routing for IPv6, as well as providing
stateful addressing solutions for IPv6.

e n
Tasks /
o m
Step 1 Preparing the environment i.c
e
aw
If you are starting this section with a non-configured device, begin
hu here and then
g .
move to step 2. For those continuing from previous labs, begin at step 2.

ni n
<huawei>system-view
ar
l e
//
[huawei]sysname R1

:
<huawei>system-view
t tp
[huawei]sysname R2
: h
e s
<huawei>system-view
r c
[huawei]sysname R3
o u
e s
R
Step 2 Configure i n gIPv6 addressing
a rn
L e global unicast addressing on the loopback interfaces and manually
Establish IPv6

r e link local addressing on interface Gigabit Ethernet 0/0/0 of all routers.


configure
o
M[R1]ipv6
[R1]interface loopback 0
[R1-LoopBack0]ipv6 enable
[R1-LoopBack0]ipv6 address 2001:1::A 64
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address fe80::1 link-local

HUAWEI TECHNOLOGIES Page158


[R2]ipv6
[R2]interface loopback 0
[R2-LoopBack0]ipv6 enable
[R2-LoopBack0]ipv6 address 2001:2::B 64
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ipv6 enable
[R2-GigabitEthernet0/0/0]ipv6 address fe80::2 link-local

e n
/
[R3]ipv6
o m
[R3]interface loopback 0
[R3-LoopBack0]ipv6 enable
ei.c
[R3-LoopBack0]ipv6 address 2001:3::C 64
aw
u
.h
[R3]interface GigabitEthernet 0/0/0

g
[R3-GigabitEthernet0/0/0]ipv6 enable
[R3-GigabitEthernet0/0/0]ipv6 address fe80::3 link-local

ni n
r
<R1>display ipv6 interface GigabitEthernet 0/0/0
//lea
GigabitEthernet0/0/0 current state : UP
p :
IPv6 protocol current state : UP
t t
:h
IPv6 is enabled, link-local address is FE80::1

s
Joined group address(es):
r c e
No global unicast address configured

ou
FF02::1:FF00:1
FF02::2
es
FF02::1
R
MTU is 1500 bytes

i n g
n
ND DAD is enabled, number of DAD attempts: 1

ar
ND reachable time is 30000 milliseconds

e
ND retransmit interval is 1000 milliseconds
L
e
Hosts use stateless autoconfig for addresses

or
IPv6 interfaces become part of various multicast groups for support of stateless
M
address auto-configuration (SLAAC). The Network Discovery (ND) Duplicate Address
Detection (DAD) verifies the link local address is unique.

HUAWEI TECHNOLOGIES Page159


Step 3 Configure OSPFv3

Enable the OSPFv3 process and specify its router ID on R1, R2 and R3. OSPFv3 must
then be enabled on the interface.

[R1]ospfv3 1
[R1-ospfv3-1]router-id 1.1.1.1
e n
[R1-ospfv3-1]quit /
[R1]interface GigabitEthernet 0/0/0
o m
[R1-GigabitEthernet0/0/0]ospfv3 1 area 0
[R1-GigabitEthernet0/0/0]quit
ei.c
[R1]interface loopback 0
aw
[R1-LoopBack0]ospfv3 1 area 0
u
g.h
[R2]ospfv3 1

ni n
r
[R2-ospfv3-1]router-id 2.2.2.2

lea
[R2-ospfv3-1]quit

//
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ospfv3 1 area 0
p :
[R2-GigabitEthernet0/0/0]quit
t t
:h
[R2]interface loopback 0
[R2-LoopBack0]ospfv3 1 area 0
e s
r c
ou
[R3]ospfv3 1

s
[R3-ospfv3-1]router-id 3.3.3.3
e
[R3-ospfv3-1]quit
R
i n g
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ospfv3 1 area 0

n
ar
[R3-GigabitEthernet0/0/0]quit

e
[R3]interface loopback 0

L
e
[R3-LoopBack0]ospfv3 1 area 0

o r
MRun the display ospfv3 peer command on R1 and R3 to verify the OSPFv3 peering
has been established.

<R1>display ospfv3 peer


OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)

HUAWEI TECHNOLOGIES Page160


Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:30 GE0/0/0 0
3.3.3.3 1 Full/DROther 00:00:40 GE0/0/0 0

<R3>display ospfv3 peer


OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DR 00:00:32 GE0/0/0 0
e n
/
m
2.2.2.2 1 Full/Backup 00:00:38 GE0/0/0 0

If 1.1.1.1 is not currently the DR, the following command can be used to .reset
o
c the
OSPFv3 process. e i
aw
<R1>reset ospfv3 1 graceful-restart
. hu
i n g
Test connectivity to the peer link local address and the
r n global unicast address of
interface LoopBack 0.
l e a
: //
t tp
h
<R1>ping ipv6 fe80::3 -i GigabitEthernet 0/0/0

:
PING fe80::3 : 56 data bytes, press CTRL_C to break

s
Reply from FE80::3

r c e
bytes=56 Sequence=1 hop limit=64 time = 2 ms
Reply from FE80::3
o u
e s
bytes=56 Sequence=2 hop limit=64 time = 2 ms
Reply from FE80::3
R
n g
bytes=56 Sequence=3 hop limit=64 time = 11 ms

i
rn
Reply from FE80::3

a
bytes=56 Sequence=4 hop limit=64 time = 2 ms

e
L
Reply from FE80::3

e
bytes=56 Sequence=5 hop limit=64 time = 2 ms

r
o
M --- fe80::3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/3/11 ms

<R1>ping ipv6 2001:3::C


PING 2001:3::C : 56 data bytes, press CTRL_C to break

HUAWEI TECHNOLOGIES Page161


Reply from 2001:3::C
bytes=56 Sequence=1 hop limit=64 time = 11 ms
Reply from 2001:3::C
bytes=56 Sequence=2 hop limit=64 time = 6 ms
Reply from 2001:3::C
bytes=56 Sequence=3 hop limit=64 time = 2 ms
Reply from 2001:3::C
bytes=56 Sequence=4 hop limit=64 time = 2 ms
Reply from 2001:3::C
e n
/
m
bytes=56 Sequence=5 hop limit=64 time = 6 ms

o
--- 2001:3::C ping statistics ---
5 packet(s) transmitted
e i.c
5 packet(s) received
aw
u
.h
0.00% packet loss

g
round-trip min/avg/max = 2/5/11 ms

ni n
Step 4 Configure DHCPv6 to distribute IPv6 addresses
ar
Enable the DHCPv6 Server function on R2 so /that
l e
/ devices can be assigned IPv6
:
addresses using DHCPv6.
t tp
: h
e s
[R2]dhcp enable
r c
[R2] dhcpv6 duid ll

o u
s
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change

e
R
it? [Y/N]y

i n g
[R2]dhcpv6 pool pool1
[R2-dhcpv6-pool-pool1]address prefix 2001:FACE::/64

rn
[R2-dhcpv6-pool-pool1]dns-server 2001:444e:5300::1

a
L e
[R2-dhcpv6-pool-pool1]excluded-address 2001:FACE::1
[R2-dhcpv6-pool-pool1]quit

r e
o
M
Configure IPv6 functions on the GigabitEthernet 0/0/0 interface.
Enable the DHCPv6 server function on the interface.

[R2]interface GigabitEthernet 0/0/0


[R2-GigabitEthernet0/0/0]ipv6 address 2001:FACE::1 64
[R2-GigabitEthernet0/0/0]dhcpv6 server pool1

HUAWEI TECHNOLOGIES Page162


Enable the DHCPv6 client function on R1 and R3 so that devices can obtain IPv6
addresses using DHCPv6.

[R1]dhcp enable
[R1] dhcpv6 duid ll
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change
it? [Y/N]y
[R1]interface Gigabitethernet 0/0/0

e n
[R1-GigabitEthernet0/0/0]ipv6 address auto dhcp
/
o m
i.c
[R3]dhcp enable
[R3] dhcpv6 duid ll

w e
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change
it? [Y/N]y
u a
[R3]interface GigabitEthernet 0/0/0

g .h
n
[R3-GigabitEthernet0/0/0]ipv6 address auto dhcp

i
rn
Run the display dhcpv6 pool command on R2 toacheck information about the
/ l e
DHCPv6 address pool.
: /
t tp
<R2>display dhcpv6 pool

: h
DHCPv6 pool: pool1

e s
Address prefix: 2001:FACE::/64
r c
u
Lifetime valid 172800 seconds, preferred 86400 seconds

o
2 in use, 0 conflicts

es
R
Excluded-address 2001:FACE::1

g
1 excluded addresses

i n
Information refresh time: 86400

rn
DNS server address: 2001:444E:5300::1

a
e
Conflict-address expire-time: 172800

L
Active normal clients: 2

e display ipv6 interface brief command on R1 and R3 to check the IPv6


Run
r
o information.
the
M
address

[R1]display ipv6 interface brief


*down: administratively down
(l): loopback
(s): spoofing
Interface Physical Protocol

HUAWEI TECHNOLOGIES Page163


GigabitEthernet0/0/0 up up
[IPv6 Address] 2001:FACE::2
LoopBack0 up up(s)
[IPv6 Address] 2001:1::A

[R3]display ipv6 interface brief


*down: administratively down
(l): loopback
(s): spoofing
e n
/
m
Interface Physical Protocol
GigabitEthernet0/0/0 up up
o
[IPv6 Address] 2001:FACE::3
LoopBack0 up up(s)
ei.c
[IPv6 Address] 2001:3::C
aw
u
g.h
ni n
Final Configuration r
// lea
<R1>display current-configuration

p :
[V200R007C00SPC600]
t t
:h
#
sysname R1

e s
#

r c
ou
ipv6

s
#
dhcp enable
Re
g
#
ospfv3 1

n i n
ar
router-id 1.1.1.1

e
#

L
interface GigabitEthernet0/0/0

e
or
ipv6 enable
ip address 10.0.13.1 255.255.255.0

M
ipv6 address FE80::1 link-local
ospfv3 1 area 0.0.0.0
ipv6 address auto dhcp
#
interface LoopBack0
ipv6 enable
ip address 10.0.1.1 255.255.255.0
ipv6 address 2001:1::A/64

HUAWEI TECHNOLOGIES Page164


ospfv3 1 area 0.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$dD#}P<HzJ;Xs%X>hOkm!,.+Iq61QK`K6tI}cc-;k_o`C.+L,%$%
$
user-interface vty 0 4
authentication-mode aaa
#
e n
/
m
return

o
e i.c
<R2>display current-configuration
aw
u
.h
[V200R007C00SPC600]

g
#
sysname R2

ni n
#
r
lea
ipv6

//
#
dhcp enable
p :
#
t t
dhcpv6 pool pool1

s:h
address prefix 2001:FACE::/64
excluded-address 2001:FACE::1
r c e
ou
dns-server 2001:444E:5300::1
#
es
ospfv3 1
R
router-id 2.2.2.2

i n g
n
#

ar
interface GigabitEthernet0/0/0
ipv6 enable
L e
e
ip address 10.0.13.2 255.255.255.0

or
ipv6 address 2001:FACE::1/64

M
ipv6 address FE80::2 link-local
ospfv3 1 area 0.0.0.0
traffic-filter inbound acl 3000
dhcpv6 server pool1
#
interface LoopBack0
ipv6 enable
ip address 10.0.2.2 255.255.255.0

HUAWEI TECHNOLOGIES Page165


ipv6 address 2001:2::B/64
ospfv3 1 area 0.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$|nRPL^hr2IXi7LHDID!/,.*%.8%h;3:,hXO2dk#ikaWI.*(,%$%
$
user-interface vty 0 4
#
e n
/
m
return

o
e i.c
aw
u
.h
<R3>display current-configuration

g
[V200R007C00SPC600]
#

ni n
sysname R3
r
lea
#

//
ipv6
#
p :
dhcp enable
t t
#

s:h
ospfv3 1
router-id 3.3.3.3
r c e
ou
#

es
interface GigabitEthernet0/0/0
ipv6 enable
R
i n g
ip address 10.0.13.3 255.255.255.0

n
ipv6 address FE80::3 link-local

ar
ospfv3 1 area 0.0.0.0

e
ipv6 address auto dhcp
L
e
#

or
interface LoopBack0

M
ipv6 enable
ip address 10.0.3.3 255.255.255.0
ipv6 address 2001:3::C/64
ospfv3 1 area 0.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$W|$)M5D}v@bY^gK\;>QR,.*d;8Mp>|+EU,:~D~8b59~..*g,%$%

HUAWEI TECHNOLOGIES Page166


$
user-interface vty 0 4
authentication-mode aaa
#
return

e n
/
o m
ei.c
aw
u
g.h
ni n
r
//lea
p :
t t
s:h
r c e
sou
Re
i n g
n
e ar
e L
or
M

HUAWEI TECHNOLOGIES Page167


The privilege of HCNA/HCNP/HCIE:
With any Huawei Career Certification, you have the privilege on http://learning.huawei.com/en to enjoy:
n
 1、e-Learning Courses: Logon http://learning.huawei.com/en and enter Huawei Training/e-Learning
/e

o m
If you have the HCNA/HCNP certificate:You can access Huawei Career Certification and Basic Technology e-Learning
courses.
e i .c
If you have the HCIE certificate: You can access all the e-Learning courses which marked for HCIE Certification Users.

aw

Methods to get the HCIE e-Learning privilege : Please associate HCIE certificate information with your Huawei account, and

hu

email the account to Learning@huawei.com to apply for HCIE e-Learning privilege.


g .
 2、 Training Material Download
i n

arn
Content: Huawei product training material and Huawei career certification training material.

//le
Method:Logon http://learning.huawei.com/en and enter Huawei Training/Classroom Training ,then you can download
training material in the specific training introduction page.
p :
 3、 Priority to participate in Huawei Online Open Class (LVC)
t t

s :h
The Huawei career certification training and product training covering all ICT technical domains like R&S, UC&C, Security,

4、Learning Tools: rc e
Storage and so on, which are conducted by Huawei professional instructors.

u

s o
eNSP :Simulate single Router&Switch device and large network.

R e
WLAN Planner :Network planning tools for WLAN AP products.

n g
In addition, Huawei has built up Huawei Technical Forum which allows candidates to discuss technical issues with Huawei experts ,

ni
share exam experiences with others or be acquainted with Huawei Products.

a r
 Statement:
L e
r e
This material is for personal use only, and can not be used by any individual or organization for any commercial purposes.
o
M
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential 1

S-ar putea să vă placă și