Sie sind auf Seite 1von 136

re

Mo

ni

ar

Le

ng
ur

so

Re
s:

ce
ht
tp
ea

/l

:/

rn

in
g.
hu

aw
ei
.c
om
/e

n
in

g.

hu

HCNA-HNTD
ENTRY

aw
ei
.c
om
/e

Huawei Certification

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

Lab Guide

rn

Huawei Networking Technology and Device

Huawei Technologies Co.,Ltd.

aw
ei
.c
om
/e

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

hu

and other Huawei trademarks are trademarks of Huawei Technologies


Co., Ltd. All other trademarks and trade names mentioned in this document
are the property of their respective holders.

g.

Notice

ht

tp

:/

/l

ea

rn

in

The information in this document is subject to change without notice. Every


effort has been made in the preparation of this document to ensure accuracy of
the contents, but all statements, information, and recommendations in this
document do not constitute the warranty of any kind, express or implied.

s:

Huawei Certification

ur

ce

HCNA-HNTD Huawei Networking Technology and Device

re

Le

ar

ni

ng

Re

so

Entry Lab Guide

Mo

Copyright Huawei Technologies Co., Ltd. 2014. All rights reserved.

Version 2.1

aw
ei
.c
om
/e

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

g.

skills and knowledge in routing and switching technologies.

hu

comprised of three levels to support and validate the growth and value of customer

in

The Huawei Certified Network Associate (HCNA) certification level validates the

rn

skills and knowledge of IP network engineers to implement and support small to


medium-sized enterprise networks. The HCNA certification provides a rich

ea

foundation of skills and knowledge for the establishment of such enterprise

/l

networks, along with the capability to implement services and features within

:/

existing enterprise networks, to effectively support true industry operations.

tp

HCNA certification covers fundamentals skills for TCP/IP, routing, switching and
products,

ht

related IP network technologies, together with Huawei data communications


and skills for versatile routing platform

operation and

s:

management.

(VRP)

ce

The Huawei Certified Network Professional (HCNP-R&S (HCDP)) certification is

ur

aimed at enterprise network engineers involved in design and maintenance, as well


as professionals who wish to develop an in depth knowledge of routing, switching,

so

network efficiency and optimization technologies. HCNP-R&S consists of three

Re

units including Implement Enterprise Switch Network (IESN), Implement Enterprise


Routing Network (IERN), and Improving Enterprise Network Performance (IENP),

ng

which includes advanced IPv4 routing and switching technology principles,

ni

network security, high availability and QoS, as well as application of the covered

ar

technologies in Huawei products.

Le

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,

re

for the diagnosis and troubleshooting of Huawei products, to equip engineers with

Mo

in-depth competency in the planning, design and optimization of large-scale IP

networks.

re

Mo

ni

ar

Le

ng
s:

ce

ur

so

Re
ht
tp
ea

/l

:/
rn

hu

g.

in

aw
ei
.c
om
/e

L3 Switch

L2 Switch

Cloud

g.

hu

Router

aw
ei
.c
om
/e

Reference Icons

Serial link

ea

rn

in

Ethernet link

/l

Lab Environment Specification

Device Model

R1

AR 2220

R2

AR 2220

R3

AR 2220

Version 5.120 (AR2200 V200R003C00SPC200)

S1

S5700-28C-EI-24S

Version 5.70 (S5700 V100R006C00SPC800)

S2

S5700-28C-EI-24S

ng

Version 5.70 (S5700 V100R006C00SPC800)

S3700-28TP-EI-AC

Version 5.70 (S3700 V100R006C00SPC800)

S4

S3700-28TP-EI-AC

Version 5.70 (S3700 V100R006C00SPC800)

Mo

re

VRP version

Version 5.120 (AR2200 V200R003C00SPC200)

ce

ur

so

Re

ni

Le

S3

s:

Identifier

ar

ht

tp

:/

In order to ensure that that the configuration given in this lab is supported on all
devices, it is recommended that the following device models and VRP versions
be used:

Version 5.120 (AR2200 V200R003C00SPC200)

re

Mo

ni

ar

Le

ng
s:

ce

ur

so

Re
ht
tp
ea

/l

:/
rn

hu

g.

in

aw
ei
.c
om
/e

HCNA-HNTD Content

aw
ei
.c
om
/e

CONTENTS
MODULE 1 ESTABLISHING BASIC NETWORKS WITH ENSP .................................................................. 1
LAB 1-1 BUILDING BASIC IP NETWORKS ................................................................................................... 1

MODULE 2 BASIC DEVICE NAVIGATION AND CONFIGURATION ........................................................ 11

hu

LAB 2-1 BASIC DEVICE NAVIGATION AND CONFIGURATION .......................................................................... 11

g.

MODULE 3 STP AND RSTP ................................................................................................................ 22

in

LAB 3-1 CONFIGURING STP ................................................................................................................. 22

ea

rn

LAB 3-2 CONFIGURING RSTP ............................................................................................................... 36

/l

MODULE 4 ROUTING CONFIGURATION ............................................................................................ 43

:/

LAB 4-1 CONFIGURING STATIC ROUTES AND DEFAULT ROUTES ..................................................................... 43

tp

LAB 4-2 CONFIGURING RIPV1 AND RIPV2 .............................................................................................. 60

ht

LAB 4-3 RIPV2 ROUTE AGGREGATION AND AUTHENTICATION...................................................................... 74


LAB 4-4 OSPF SINGLE-AREA CONFIGURATION ......................................................................................... 90

ce

s:

MODULE 5 FTP AND DHCP ............................................................................................................. 107


LAB 5-1 CONFIGURING FTP SERVICES .................................................................................................. 107

Mo

re

Le

ar

ni

ng

Re

so

ur

LAB 5-2 IMPLEMENTING DHCP .......................................................................................................... 114

HC Series

HUAWEI TECHNOLOGIES

Page1

re

Mo

ni

ar

Le

ng
s:

ce

ur

so

Re
ht
tp
ea

/l

:/
rn

hu

g.

in

aw
ei
.c
om
/e

aw
ei
.c
om
/e

Module 1 Establishing Basic Networks with eNSP


Lab 1-1 Building Basic IP Networks
Learning Objectives

hu

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

g.

Set up and navigate the eNSP simulator application.


Establish a simple peer-to-peer network in eNSP
Perform capture of IP packets using Wireshark within eNSP.

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

HC Series

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

Page1

aw
ei
.c
om
/e

The fundamental network behavior can be understood through the application


of packet capture tools to the network. The use of Huaweis simulator platform
eNSP is capable of supporting both the implementation of technologies and
the capture of packets within the network to provide a comprehensive
knowledge of IP networks.

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

Tasks

hu

Step 1 Initiate eNSP.

in

g.

This step introduces how to start and navigate the eNSP simulator application
for rapid development of TCP/IP knowledge and familiarity with network
operation. If eNSP is not available, please inform the course instructor

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

After launching eNSP, the following application user interface will be presented.
The left panel houses the icons that represent the various products and
devices that are supported within eNSP, while the central panel provides lab
examples for practice scenarios.

Mo

re

After launching eNSP, users should select the New operator in the top left
corner of the application window to begin a new lab session.
Page2

HUAWEI TECHNOLOGIES

HC Series

aw
ei
.c
om
/e

The user will be presented with a canvas on which to establish a network


topology for practice and analysis of network behavior. In this example a
simple peer-to-peer network using two end systems is to be established.

Step 2 Build a Topology

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Select the End Devce icon in the top left panel to reveal a list of end devices
that can be applied. Select the Laptop icon and drag it to the canvas, release
the icon to place it on the canvas.

Mo

re

Le

ar

ni

ng

The same action should be taken to position a second laptop on the canvas for
establishing the peer-to-peer network topology.

HC Series

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

Page3

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

aw
ei
.c
om
/e

The devices on the canvas represent simulated end systems that can be used
to emulate real world operations.

Step 3 Establish a physical medium

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Select the connections icon from the upper left panel to reveal a list of media
that can be applied to the topology. Select the copper (Ethernet) medium from
the list. Once the icon has been clicked, the cursor will represent a connector
to show the current role of the cursor as a connector. Click on the client device
to reveal a list of port interfaces supported by the simulated device. For the
client click the option for Ethernet 0/0/1 to apply the connection.

Mo

re

Le

ar

ni

ng

Once this has been achieved, click on the peering device to apply the opposite
end of the medium to the end system. Again select the interface Ethernet 0/0/1
to establish the medium between the two devices and complete the
construction of a peer-to-peer topology.

Page4

HUAWEI TECHNOLOGIES

HC Series

aw
ei
.c
om
/e

The establishment of a point-to-point network reveals a connection with two


red dots on the medium that represent the current state of the interfaces to
which the medium connects as down.

Step 4 Access the end system settings.

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Select the end system and use the right click option to display a properties
menu. The settings option should be selected in order to display the current
system settings for the end system devices.

HC Series

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

Page5

aw
ei
.c
om
/e

The settings option in the properties window reveals a set of four tabs for
establishment of basic configuration, the device command line interface,
multicast traffic generator configuration, and UDP packet generator
configuration.

Step 5 Configure the end system.

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Ensure the Basic Config tab is selected and enter a host name in the Host
Name field window. Ensure the IPv4 configuration is currently set to static and
configure an IP address in the IP address window. It is recommended that the
address (together with the subnet mask) be configured as shown in the below
example. Once this has been configured, click the Apply button in the bottom
left corner of the window before closing with the x in the top left corner of the
CLIENT 1 window.

Mo

re

Le

ar

The same process is required for CLIENT2. It is recommended that initially the
IP address 192.168.1.2 be configured, with a subnet mask of 255.255.255.0.
The basic configuration enables peer-to-peer communication to be supported
between the two end systems.

Page6

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

aw
ei
.c
om
/e

Step 6 Initiate the end system devices.

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

The devices can be activated using one of two methods. The first involves
using the right click option to open the properties menu and select start for the
individual icons. The alternative involves dragging the cursor over the icons (as
shown) to highlight multiple devices and using the right click settings option
start multiple devices simultaneously.

Mo

re

Le

ar

ni

ng

Re

so

Once the devices are online and active, it is common to notice a change in the
status of the connectors through a switch in the colour of the red dot on the
medium to green, highlighting that the status of the connectors is now up.

HC Series

HUAWEI TECHNOLOGIES

Page7

aw
ei
.c
om
/e

Once the devices within the network topology are operational, it is possible to
begin to monitor the flow of traffic that is carried over the medium and the
interfaces via which the devices have established a physical peering.

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

Step 7 Implement the capture of packets on an interface.

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Select the device to for whose interface is to be monitored and use the right
click option to display the settings menu. Highlight the capture data option to
reveal a list of interfaces that belong to the device and are available for
observation by the packet capture tool. Select the interface from the list that is
to be monitored.

Mo

re

Le

ar

ni

The selection of an interface will result in the activation of the Wireshark packet
capture tool for the selected interface. If additional interfaces are to be
monitored, separate instances of the same packet capture tool will be
activated.

Page8

HUAWEI TECHNOLOGIES

HC Series

aw
ei
.c
om
/e

Depending on the devices being monitored, the packet capture tool may or
may not begin to generate packet capture results for all traffic that passes
through the selected interface. In the case of the peer-to-peer relationship, it
will be necessary to generate some traffic.

Step 8 Generate traffic on the interface.

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

Open the command window on the client by either double clicking the client
icon and selecting the Command tab, or alternatively use the right click option
to enter the properties menu and select settings from which point the
Command tab can be selected.
The most basic means for generating traffic is through the ping command. This
can be achieved by entering ping <ip address> where the IP address refers to
the address of the peer.

Mo

re

Le

ar

The generation of traffic will be confirmed by the resulting output in which case
the number of packets transmitted are shown to also be received.

HC Series

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

Page9

aw
ei
.c
om
/e

Following the generation of traffic, the resulting traffic flow shall be captured by
the packet capture tool and can be used for observation of the behavior of
protocols within the IP network along with details of the various layers as
referenced in the OSI reference model.

Step 9 Observe the captured traffic flow

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

An instance of the Wireshark packet capture tool should currently be active


following the action to capture data on the client interface. Maximize the active
window to observe the results of the packet capture process.

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

The Wireshark application contains many functions for management of the


packet capture process. One of the more common functions includes the filter
function to isolate the packet capture display to a select group of packets or
protocols. This can be achieved using the filter field below the menu bar. The
simplest filter method involves entering the protocol name (in lower case) and
pressing Enter. In the given example packets for two protocols have been
captured, entering either icmp, or arp into the filter window will result in only the
protocol entered in the filter field being displayed in the output.
The packet capture tool consists of three panels, to show the list of packets, a
breakdown of the content of each packet and finally display the equivalent data
format of the packet. The breakdown is invaluable for understanding the format
of protocol packets and displays the details for protocols as referenced at each
layer of the OSI reference model.

Page10

HCNA-HNTD Module 1 Establishing Basic Networks with eNSP

HUAWEI TECHNOLOGIES

HC Series

aw
ei
.c
om
/e

Module 2 Basic Device Navigation and Configuration


Lab 2-1 Basic Device Navigation and Configuration
Learning Objectives

/l

ea

rn

in

g.

Configure device system parameters including device name, the


system time, and the system time zone.
Configure the console port idle timeout duration.
Configure the login information.
Configure the login password
Save configuration files.
Configure IP addresses for router interfaces.
Test the connectivity between two directly connected routers.
Restart a device using VRP.

:/

hu

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

so

ur

ce

s:

ht

tp

Topology

ng

Re

Figure 2.1 Lab topology for basic VRP navigation and operation.

ni

Scenario

Mo

re

Le

ar

A company has purchased two AR G3 routers that require commissioning


before they can be used in the enterprise network. Items to be commissioned
include setting device names, the system time, and password management.

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

HUAWEI TECHNOLOGIES

Page11

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

Step 1 View the system information.

aw
ei
.c
om
/e

Tasks

Run the display version command to view the software version and hardware
information for the system.
<Huawei>display version
Huawei Versatile Routing Platform Software

hu

VRP (R) software, Version 5.120 (AR2200 V200R003C00SPC200)

g.

Copyright (C) 2011-2013 HUAWEI TECH CO., LTD

Huawei AR2220 Router uptime is 0 week, 3 days, 21 hours, 43 minutes

in

BKP 0 version information:

rn

......output omitted......

/l

ea

The command output includes the VRP operating system version, device
model, and startup time.

tp

:/

Step 2 Change the system time parameter.

ht

The system automatically saves the time. If the time is incorrect, run the clock
timezone and clock datetime commands in the user view to change the
system time.

s:

<Huawei>clock timezone Local add 08:00:00

ce

<Huawei>clock datetime 12:00:00 2013-09-15

so

ur

The keyword Local can be exchanged with the current regional timezone name,
and add replaced with minus where the timezone is west of UTC+0.

Re

Run the display clock command to check that the new system time has taken
effect.

ng

<Huawei>display clock
Sunday

ni

2013-09-15 12:00:21

Mo

re

Le

ar

Time Zone(Default Zone Name) : UTC+00:00

Page12

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

aw
ei
.c
om
/e

Step 3 Help features & Auto-completion functions.


The question mark (?) is a wildcard, and the Tab is used as a shortcut to enter
commands.
<Huawei>display ?
Cellular interface

aaa

AAA

access-user

User access

accounting-scheme

Accounting scheme

acl

<Group> acl command group

actual

Current actual

adp-ipv4

Ipv4 information

adp-mpls

Adp-mpls module

alarm

Alarm

antenna

Current antenna that outputting radio

anti-attack

Specify anti-attack configurations

ap

<Group> ap command group

ap-auth-mode

Display AP authentication mode

/l

ea

rn

in

g.

hu

Cellular

:/

......output omit......

s:

ht

tp

To display all the commands that start with a specific letter or string of letters,
enter the desired letters and the question mark (?). The system displays all the
commands that start with the letters entered. For example, if the string dis? is
entered, the system displays all the commands that start with dis.

Re

so

ur

ce

If a space exists between the character string and the question mark (?), the
system will identify the commands corresponding to the string and display the
parameters of the command. For example, if the string dis ? is entered and
only the display command matches the dis string, the system displays the
parameters of the display command. If multiple commands start with dis, the
system displays an error.

ni

ng

The Tab key can also be pressed to complete a command. For example, if dis
is entered followed by Tab, the system completes the display command. If
multiple commands start with dis, the appropriate command can be selected.

Mo

re

Le

ar

If there are no other commands starting with the same letters, dis or disp can
be entered to indicate display, and int or inter to indicate interface.

HC Series

HUAWEI TECHNOLOGIES

Page13

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

aw
ei
.c
om
/e

Step 4 Access the system view.


Run the system-view command to access the system view to configure
interfaces and protocols.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]

g.

hu

Step 5 Change device names.

rn

in

To more easily identify devices, set device names during the device
configuration. Change device names based on the lab topology, as shown
below:

ea

Change the name of the R1 router to R1.


[Huawei]sysname R1

:/

/l

[R1]

tp

Change the name of the R3 router to R3.

ht

[Huawei]sysname R3

s:

[R3]

ce

Step 6 Configure the login information.

ur

Configure the login information to indicate the login result.

Re

so

[R1]header shell information "Welcome to the Huawei certification lab."

ni

ng

Run the preceding command to configure the login information. To check


whether the login information has been changed, exit from the router
command line interface, and log back in to view the login information.
[R1]quit

ar

<R1>quit

Le

Configuration console exit, please press any key to log on

Welcome to the Huawei certification lab.

Mo

re

<R1>

Page14

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

aw
ei
.c
om
/e

Step 7 Configure console port parameters.


The console port by default does not have a login password. Users must
configure a password for the console port before logging in to the device.
The password can be changed in the password authentication mode to
huawei in plain text.

hu

If there is no activity on the console port for the period of time specified by the
timeout interval, the system will automatically log out the user. When this
occurs, log in to the system again using the configured password.

in

g.

The default timeout interval is set to 10 minutes. If a 10 minutes idle period is


not a reasonable amount of time for the timeout interval, change the timeout
interval to a more suitable duration, here this is set to 20 minutes.

rn

[R1]user-interface console 0

ea

[R1-ui-console0]authentication-mode password

[R1-ui-console0]set authentication password cipher huawei

:/

/l

[R1-ui-console0]idle-timeout 20 0

tp

Run the display this command to check the configuration results.


[R1-ui-console0]display this

ht

[V200R003C01SPC200]
#

s:

user-interface con 0
authentication-mode password

ce

set authentication password cipher %$%$fIn'6>NZ6*~as(#J:WU%,#72Uy8cVlN^NXkT51E

so

idle-timeout 20 0

ur

^RX;>#75,%$%$

Re

Log out of the system and log back in, using the password set. It should be
noted that this password is required to be set when the router is first initialized.

ni

<R1>quit

ng

[R1-ui-console0]return

ar

Configuration console exit, please press any key to log on


Welcome to Huawei certification lab

Mo

re

Le

<R1>

HC Series

HUAWEI TECHNOLOGIES

Page15

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

aw
ei
.c
om
/e

Step 8 Configure interface IP addresses and descriptions.


Configure an IP address for the Gigabit Ethernet 0/0/0 interface of R1. The
subnet mask can be configured using a dotted decimal format (255.255.255.0),
or based on the subnet mask prefix length.
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24

hu

[R1-GigabitEthernet0/0/0]description This interface connects to R3-G0/0/0

g.

Run the display this command to check the configuration results at the
current interface view.

in

[R1-GigabitEthernet0/0/0]display this
[V200R003C00SPC200]

rn

ea

interface GigabitEthernet0/0/0

description This interface connects to R3-G0/0/0

/l

ip address 10.0.13.1 255.255.255.0

:/

tp

Return

ht

Run the display interface command to view the interface description.


[R1]display interface GigabitEthernet0/0/0

s:

GigabitEthernet0/0/0 current state : UP


Line protocol current state : UP

ce

Last line protocol up time : 2013-10-08 04:13:09


Description:This interface connects to R3-G0/0/0

ur

Route Port,The Maximum Transmit Unit is 1500

so

Internet Address is 10.0.13.1/24


IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 5489-9876-830b
:

2013-10-08 03:24:01

Last physical down time :

2013-10-08 03:25:29

Re

Last physical up time

ng

Current system time: 2013-10-08 04:15:30


Port Mode: FORCE COPPER

ni

Speed : 100, Loopback: NONE


Mdi

ar

Duplex: FULL, Negotiation: ENABLE


: AUTO

Le

Last 300 seconds input rate 2296 bits/sec, 1 packets/sec


Last 300 seconds output rate 88 bits/sec, 0 packets/sec

re

Input peak rate 7392 bits/sec,Record time: 2013-10-08 04:08:41

Mo

Output peak rate 1120 bits/sec,Record time: 2013-10-08 03:27:56

Page16

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration


Input: 3192 packets, 895019 bytes
0,

Multicast:

1592

Broadcast:

1600,

Jumbo:

Discard:

0,

Total Error:

CRC:

0,

Giants:

Jabbers:

0,

Throttles:

Runts:

0,

Symbols:

Ignoreds:

0,

Frames:

aw
ei
.c
om
/e

Unicast:

0,

Multicast:

Broadcast:

181,

Jumbo:

Discard:

0,

Total Error:

Collisions:

0,

ExcessiveCollisions:

Late Collisions:

0,

Deferreds:

rn

Output bandwidth utilization threshold: 100.00%

ea

Input bandwidth utilization : 0.01%


0%

/l

Output bandwidth utilization :

in

Input bandwidth utilization threshold : 100.00%

g.

Unicast:

hu

Output: 181 packets, 63244 bytes

tp

:/

The command output shows that the physical status and protocol status of the
interface are UP, and the corresponding physical layer and data link layer are
functional.

ht

Once the status has been verified, configure the IP address and description for
the interface of R3.

s:

[R3]interface GigabitEthernet 0/0/0

ce

[R3-GigabitEthernet0/0/0]ip address 10.0.13.3 255.255.255.0


[R3-GigabitEthernet0/0/0]description This interface connects to R1-G0/0/0

Re

<R1>ping 10.0.13.3

so

ur

After completing the configuration, run the ping command to test the
connection between R1 and R3.
PING 10.0.13.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.13.3: bytes=56 Sequence=1 ttl=255 time=35 ms

ng

Reply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=32 ms

ni

Reply from 10.0.13.3: bytes=56 Sequence=3 ttl=255 time=32 ms


Reply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=32 ms

ar

Reply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=32 ms

Le

--- 10.0.13.3 ping statistics --5 packet(s) transmitted

re

5 packet(s) received
0.00% packet loss

Mo

round-trip min/avg/max = 32/32/35 ms

HC Series

HUAWEI TECHNOLOGIES

Page17

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

aw
ei
.c
om
/e

Step 9 View the file list stored on the current device.


Run the dir command in the user view to display the list of files in the current
directory.
<R1>dir
Directory of sd1:/
Idx Attr Size(Byte) Date
0 -rw-

1,738,816

Time(LMT)

FileName

Mar 14 2013 11:50:24

web.zip

ar2220-v200r003c00spc200.cc

2 -rw-

vrpcfg.zip

Mar 14 2013 16:01:17

g.

739

hu

1 -rw- 68,288,896 Mar 14 2013 14:17:58

in

1,927,476 KB total (1,856,548 KB free)

rn

<R3>dir

Time(LMT)

FileName

/l

Idx Attr Size(Byte) Date

ea

Directory of sd1:/

0 -rw- 1,738,816

Mar 14 2013 11:50:58

web.zip
ar2220-v200r003c00spc200.cc

2 -rw-

vrpcfg.zip

Mar 14 2013 16:03:04

tp

739

:/

1 -rw- 68,288,896 Mar 14 2013 14:19:02

ht

1,927,476 KB total (1,855,076 KB free)

Manage device configuration files.

ce

s:

Step 10

ur

Attempt to display the saved-configuration file.


<R1>display saved-configuration

Re

so

There is no correct configuration file in FLASH

<R1>save

ng

Since no save-configuration file exists, save the current configuration file.

ni

The current configuration will be written to the device.


Are you sure to continue? (y/n)[n]:y

ar

It will take several minutes to save configuration file, please wait............


Configuration file had been saved successfully

Mo

re

Le

Note: The configuration file will take effect after being activated

Page18

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration

Run the following command again to view the saved configuration information:

<R1>display saved-configuration

aw
ei
.c
om
/e

[V200R003C00SPC200]
#
sysname R1

header shell information "Welcome to Huawei certification lab"


#
board add 0/1 1SA
board add 0/2 1SA

hu

output omit

g.

Run the following command to view the current configuration information:


<R1>display current-configuration

in

[V200R003C00SPC200]

rn

#
sysname R1

ea

header shell information "Welcome to Huawei certification lab"

/l

#
board add 0/1 1SA

:/

board add 0/2 1SA

tp

board add 0/3 2FE

ht

output omit

s:

A router can store multiple configuration files. Run the following command to
view the configuration file to currently be used after the next startup:
<R3>display startup

ce

MainBoard:

ur

Startup system software:

Next startup system software:

sd1:/ar2220-v200r003c00spc200.cc
sd1:/ar2220-v200r003c00spc200.cc

so

Backup system software for next startup: null


null

Next startup saved-configuration file:

sd1:/vrpcfg.zip

Startup license file:

null

Next startup license file:

null

Startup patch package:

null

Next startup patch package:

null

Startup voice-files:

null

ar

ni

ng

Re

Startup saved-configuration file:

null

Le

Next startup voice-files:

re

Delete configuration files from the flash memory.

Mo

<R1>reset saved-configuration

HC Series

HUAWEI TECHNOLOGIES

Page19

HCNA-HNTD Module 2 Basic Device Navigation and Configuration


This will delete the configuration in the flash memory.

The device configurations will be erased to reconfigure.

aw
ei
.c
om
/e

Are you sure? (y/n)[n]:y


Clear the configuration in the device successfully.
<R3>reset saved-configuration
This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n)[n]:y

hu

Clear the configuration in the device successfully.

in

g.

Device restart procedure.

Step 11

rn

Use the reboot command to restart the router.


<R1>reboot

ea

Info: The system is now comparing the configuration, please wait.

/l

Warning: All the configuration will be saved to the next startup configuration.
System will reboot! Continue ? [y/n]:y

:/

Continue ? [y/n]:n

tp

Info: system is rebooting ,please wait...

ht

<R3>reboot

Info: The system is now comparing the configuration, please wait.


Warning: All the configuration will be saved to the next startup configuration.

s:

Continue ? [y/n]:n

ce

System will reboot! Continue ? [y/n]:y

Re

so

ur

The system asks to save the current configuration. It is necessary to determine


whether the current configuration should be saved based on the requirements
for the lab. If unsure as to whether the current configuration should be saved,
do not save.

ni

ng

Final Configuration
[R1]display current-configuration

ar

[V200R003C00SPC200]

Le

sysname R1
header shell information "Welcome to Huawei certification lab"

re

Mo

interface GigabitEthernet0/0/0

Page20

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 2 Basic Device Navigation and Configuration


description This interface connects to R3-G0/0/0

ip address 10.0.13.1 255.255.255.0

aw
ei
.c
om
/e

#
user-interface con 0
authentication-mode password
set authentication password

cipher %$%$4D0K*-E"t/I7[{HD~kgW,%dgkQQ!&|;XTDq9SFQJ.27M%dj,%$%$
idle-timeout 20 0
#

hu

return
[R3]display current-configuration

g.

[V200R003C00SPC200]

in

#
sysname R3

rn

ea

interface GigabitEthernet0/0/0
description This interface connect to R1-G0/0/0

/l

ip address 10.0.13.3 255.255.255.0

:/

#
user-interface con 0

tp

authentication-mode password
set authentication password

ht

cipher %$%$M8\HO3:72:ERQ8JLoHU8,%t+lE:$9=a7"8%yMoARB]$B%t.,%$%$
user-interface vty 0 4

s:

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

return

HC Series

HUAWEI TECHNOLOGIES

Page21

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Module 3 STP and RSTP


Lab 3-1 Configuring STP
Learning Objectives

g.

in

rn

ea

/l

Enable and disable STP.


Change the STP mode that is used by a switch.
Change the bridge priority to control root bridge election.
Change the port priority to control election of the root port and
designated port.
Change the port cost to control election of the root port and designated
port.
Configure an edge port.

:/

hu

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

ur

ce

s:

ht

tp

Topology

Re

Scenario

so

Figure 3.1 STP topology

Mo

re

Le

ar

ni

ng

Assume that you are a network administrator of a company. The company


network consists of two layers: core layer and access layer. The network uses
a design that supports network redundancy. STP will be used to prevent loops.
The STP network should include setting the bridge priority to control STP root
bridge election, and configuration of features to speed up STP route
convergence.

Page22

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Tasks
Step 1 Configure STP and verify the STP configuration.
Irrelevant interfaces must be disabled to ensure test result accuracy.

g.

hu

Shut down port interfaces Ethernet 0/0/1 on S3, Ethernet 0/0/13 and Ethernet
0/0/23 on S3, as well as Ethernet 0/0/14 and Ethernet 0/0/24 on S4 before
starting STP configuration. Ensure that the devices start without any
configuration files. If STP is disabled, run the stp enable command to enable
STP.

in

<Quidway>system-view
[Quidway]sysname R3

rn

[R3]interface Ethernet 0/0/1


[R3-Ethernet0/0/1]shutdown

ea

[R3-Ethernet0/0/1]quit

/l

[R3]interface Ethernet 0/0/13


[R3-Ethernet0/0/13]shutdown

:/

[R3-Ethernet0/0/13]quit

tp

[R3]interface Ethernet 0/0/23

ht

[R3-Ethernet0/0/23]shutdown
<Quidway>system-view
[S4]inter Ethernet 0/0/14

ur

[S4-Ethernet0/0/14]quit

ce

[S4-Ethernet0/0/14]shutdown

s:

[Quidway]sysname S4

[S4]interface Ethernet 0/0/24

Re

so

[S4-Ethernet0/0/24]shutdown

ng

In the lab,S1 and S2 are connected through two links, and STP is used.
Enable STP on S1 and S2 and set S1 as the root.
<Quidway>system-view

ni

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

ar

[Quidway]sysname S1
[S1]stp mode stp

Mo

re

Le

[S1]stp root primary

HC Series

HUAWEI TECHNOLOGIES

Page23

HCNA-HNTD Module 3 STP and RSTP


<Quidway>system-view

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


[S2]stp mode stp
[S2]stp root secondary

aw
ei
.c
om
/e

[Quidway]sysname S2

Run the display stp brief command to view brief information about STP.
<S1>display stp brief
Port

Role

STP State

Protection

GigabitEthernet0/0/9

DESI

FORWARDING NONE

GigabitEthernet0/0/10

DESI

FORWARDING NONE

g.

hu

MSTID

in

<S2>display stp brief


Port

Role

STP State

Protection

GigabitEthernet0/0/9

ROOT

FORWARDING NONE

GigabitEthernet0/0/10

ALTE

DISCARDING NONE

/l

ea

rn

MSTID

tp

:/

Run the display stp interface command to view the STP status of a port.

<S1>display stp interface GigabitEthernet 0/0/10


Port Protocol

ht

----[CIST][Port10(GigabitEthernet0/0/10)][FORWARDING]---:Enabled

:Designated Port
:128

Port Cost(Dot1T )

ce

Port Priority

s:

Port Role

:Config=auto / Active=20000
:0.4c1f-cc45-aace / 128.10

ur

Designated Bridge/Port
Port Edged

:Config=default / Active=disabled
:Config=auto / Active=true

so

Point-to-point

:147 packets/hello-time

Re

Transit Limit
Protection Type

:None

Port STP Mode

:STP

ng

Port Protocol Type :Config=auto / Active=dot1s

ni

BPDU Encapsulation :Config=stp / Active=stp


PortTimes

ar

TC or TCN send

:Hello 2s MaxAge 20s FwDly 15s RemHop 20


:17

Le

TC or TCN received :33


BPDU Sent

TCN: 0, Config: 221, RST: 0, MST: 0

Mo

re

BPDU Received

Page24

:221
:68

TCN: 0, Config: 68, RST: 0, MST: 0

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP


<S2>display stp interface GigabitEthernet 0/0/10
:Enabled

Port Role

aw
ei
.c
om
/e

Port Protocol

----[CIST][Port10(GigabitEthernet0/0/10)][DISCARDING]---:Alternate Port

Port Priority

:128

Port Cost(Dot1T )

:Config=auto / Active=20000

Designated Bridge/Port

:Config=default / Active=disabled

Point-to-point

:Config=auto / Active=true

Transit Limit

:147 packets/hello-time

Protection Type

:None

Port STP Mode

:STP

hu

Port Edged

:0.4c1f-cc45-aace / 128.10

g.

Port Protocol Type :Config=auto / Active=dot1s


PortTimes

in

BPDU Encapsulation :Config=stp / Active=stp

:Hello 2s MaxAge 20s FwDly 15s RemHop 0


:17

rn

TC or TCN send
BPDU Sent

:35
:158

:/

BPDU Received

/l

TCN: 0, Config: 35, RST: 0, MST: 0

ea

TC or TCN received :17

tp

TCN: 0, Config: 158, RST: 0, MST: 0

ht

Step 2 Control root bridge election.

s:

Run the display stp command to view information about the root bridge.

ce

<S1>display stp

-------[CIST Global Info][Mode STP]------:0

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20


:0

.4c1f-cc45-aace / 0

:0

.4c1f-cc45-aace / 0

Re

CIST RegRoot/IRPC

so

CIST Root/ERPC
CIST RootPortId

ng

BPDU-Protection
CIST Root Type

.4c1f-cc45-aace

ur

CIST Bridge

:0.0
:Disabled

:Primary root

ni

TC or TCN received :108

ar

TC count per hello :0


STP Converge Mode

:Normal

Le

Share region-configuration :Enabled


Time since last TC :0 days 0h:9m:23s

Mo

re

output omit

HC Series

HUAWEI TECHNOLOGIES

Page25

HCNA-HNTD Module 3 STP and RSTP


<S2>display stp
CIST Bridge

:4096 .4c1f-cc45-aacc

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:0

CIST RegRoot/IRPC

:4096 .4c1f-cc45-aacc / 0

CIST RootPortId

:128.9

BPDU-Protection

:Disabled

CIST Root Type

:Secondary root

.4c1f-cc45-aace / 20000

TC or TCN received :55


STP Converge Mode

hu

TC count per hello :0

aw
ei
.c
om
/e

-------[CIST Global Info][Mode STP]-------

:Normal

g.

Share region-configuration :Enabled

in

Time since last TC :0 days 0h:9m:30s

rn

output omit

:/

/l

ea

Configure S1 as the root bridge and S2 as the backup root bridge using priority
values. The device with the same value for the CIST Bridge and CIST
Root/ERPC is the root bridge. A smaller bridge priority value indicates a higher
bridge priority. Change the priorities of S1 and S2 to 8192 and 4096
respectively so that S2 becomes the root bridge.

tp

[S1]undo stp root

ht

[S1]stp priority 8192


[S2]undo stp root

ce

s:

[S2]stp priority 4096

<S1>display stp

ur

Run the display stp command to view information about the new root bridge.

so

-------[CIST Global Info][Mode STP]------Bridge Times


CIST Root/ERPC

:8192 .4c1f-cc45-aace
:Hello 2s MaxAge 20s FwDly 15s 0

Re

CIST Bridge

:4096 .4c1f-cc45-aacc / 20000


:8192 .4c1f-cc45-aace / 0

CIST RootPortId

:128.9

BPDU-Protection

:Disabled

ni

ng

CIST RegRoot/IRPC

ar

TC or TCN received :143


TC count per hello :0

Le

STP Converge Mode

:Normal

Share region-configuration :Enabled

re

Time since last TC :0 days 0h:0m:27s

Mo

output omit

Page26

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP


<S2>display stp
CIST Bridge

:4096 .4c1f-cc45-aacc

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:4096 .4c1f-cc45-aacc / 0

CIST RegRoot/IRPC

:4096 .4c1f-cc45-aacc / 0

CIST RootPortId

:0.0

BPDU-Protection

:Disabled

TC or TCN received :55


TC count per hello :0
:Normal

hu

STP Converge Mode

aw
ei
.c
om
/e

-------[CIST Global Info][Mode STP]-------

Share region-configuration :Enabled

g.

Time since last TC :0 days 0h:14m:7s

in

output omit

ea

rn

The highlighted lines in the preceding information indicate that S2 has become
the new root bridge.

/l

Shut down interfaces Gigabit Ethernet 0/0/9 and Gigabit Ethernet 0/0/10 on S2
to isolate S2.

:/

[S2]interface GigabitEthernet 0/0/9

tp

[S2-GigabitEthernet0/0/9]shutdown
[S2-GigabitEthernet0/0/9]quit

ht

[S2]interface GigabitEthernet 0/0/10

s:

[S2-GigabitEthernet0/0/10]shutdown
[S1]display stp

ce

-------[CIST Global Info][Mode STP]------:8192 .4c1f-cc45-aace

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:8192 .4c1f-cc45-aace / 0

CIST RegRoot/IRPC

:8192 .4c1f-cc45-aace / 0

:0.0

Re

CIST RootPortId

so

ur

CIST Bridge

BPDU-Protection

:Disabled

ng

TC or TCN received :146


TC count per hello :0

ni

STP Converge Mode

:Normal

ar

Share region-configuration :Enabled


Time since last TC :0 days 0h:0m:11s

Le

output omit

Mo

re

The highlighted lines in the preceding information indicate that S1 becomes


the root bridge when S2 is faulty.

HC Series

HUAWEI TECHNOLOGIES

Page27

HCNA-HNTD Module 3 STP and RSTP

Re-enable the interfaces that have been disabled on S2.

[S2]interface GigabitEthernet 0/0/9

aw
ei
.c
om
/e

[S2-GigabitEthernet0/0/9]undo shutdown
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]undo shutdown
<S1>display stp
:8192 .4c1f-cc45-aace

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s 0

CIST Root/ERPC

:4096 .4c1f-cc45-aacc / 20000

CIST RegRoot/IRPC

:8192 .4c1f-cc45-aace / 0

CIST RootPortId

:128.9

BPDU-Protection

:Disabled

in
rn

TC or TCN received :143

ea

TC count per hello :0


:Normal

/l

STP Converge Mode

g.

CIST Bridge

hu

-------[CIST Global Info][Mode STP]-------

Time since last TC :0 days 0h:0m:27s

tp

output omitted

:/

Share region-configuration :Enabled

ht

<S2>display stp

-------[CIST Global Info][Mode STP]------:4096 .4c1f-cc45-aacc

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:4096 .4c1f-cc45-aacc / 0

CIST RegRoot/IRPC

:4096 .4c1f-cc45-aacc / 0

CIST RootPortId

:0.0

BPDU-Protection

:Disabled

so

ur

ce

s:

CIST Bridge

TC or TCN received :55

Re

TC count per hello :0


STP Converge Mode

:Normal

ng

Share region-configuration :Enabled


Time since last TC :0 days 0h:14m:7s

ar

ni

output omitted

Mo

re

Le

The highlighted lines in the preceding information indicate that S2 has been
restored and has become the root bridge once again.

Page28

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Step 3 Control root port election.


Run the display stp brief command on S1 to view the roles of the interfaces.
<S1>display stp brief
MSTID

Port

Role

STP State

Protection

GigabitEthernet0/0/9

ROOT

FORWARDING NONE

GigabitEthernet0/0/10

ALTE

DISCARDING NONE

g.

hu

The preceding information shows that G0/0/9 is the root port and G0/0/10 is
the alternate port. You can change port priorities so that port interface G0/0/10
will become the root port and G0/0/9 will become the alternate port.

in

Change priorities of G0/0/9 and G0/0/10 on S2.

ea

rn

The default port priority is 128. A larger port priority value indicates a lower
priority. The priorities of G0/0/9 and G0/0/10 on S2 are set to 32 and 16;
therefore, G0/0/10 on S1 becomes the root port.

/l

[S2]interface GigabitEthernet 0/0/9


[S2-GigabitEthernet0/0/9]quit

tp

[S2]interface GigabitEthernet 0/0/10

:/

[S2-GigabitEthernet0/0/9]stp port priority 32

ht

[S2-GigabitEthernet0/0/10]stp port priority 16

s:

Note that the port priorities are changed on S2, not S1.
<S2>display stp interface GigabitEthernet 0/0/9

ce

----[CIST][Port9(GigabitEthernet0/0/9)][FORWARDING]---Port Protocol

:Enabled

:Designated Port

ur

Port Role

:32

Port Cost(Dot1T )

so

Port Priority

:Config=auto / Active=20000

Port Edged

Re

Designated Bridge/Port

:4096.4c1f-cc45-aacc / 32.9

:Config=default / Active=disabled
:Config=auto / Active=true

Transit Limit

:147 packets/hello-time

Protection Type

:None

Port STP Mode

:STP

ar

ni

ng

Point-to-point

Port Protocol Type :Config=auto / Active=dot1s

Le

BPDU Encapsulation :Config=stp / Active=stp


PortTimes

:22

re

TC or TCN send

:Hello 2s MaxAge 20s FwDly 15s RemHop 20

Mo

TC or TCN received :1

HC Series

HUAWEI TECHNOLOGIES

Page29

HCNA-HNTD Module 3 STP and RSTP


BPDU Sent

:164
:2

aw
ei
.c
om
/e

BPDU Received

TCN: 0, Config: 164, RST: 0, MST: 0


TCN: 1, Config: 1, RST: 0, MST: 0
<S2>display stp interface GigabitEthernet 0/0/10
----[CIST][Port10(GigabitEthernet0/0/10)][FORWARDING]---Port Protocol

:Enabled

Port Role

:Designated Port
:16
:Config=auto / Active=20000

Designated Bridge/Port
Port Edged

hu

Port Cost(Dot1T )

:4096.4c1f-cc45-aacc / 16.10

:Config=default / Active=disabled
:Config=auto / Active=true

Transit Limit

:147 packets/hello-time

Protection Type

:None

Port STP Mode

:STP

ea

rn

in

Point-to-point

g.

Port Priority

Port Protocol Type :Config=auto / Active=dot1s

/l

BPDU Encapsulation :Config=stp / Active=stp

:Hello 2s MaxAge 20s FwDly 15s RemHop 20

TC or TCN send

:/

PortTimes

:35

BPDU Sent

tp

TC or TCN received :1
:183

BPDU Received

ht

TCN: 0, Config: 183, RST: 0, MST: 0


:2

ce

s:

TCN: 1, Config: 1, RST: 0, MST: 0

<S1>display stp brief

ur

Run the display stp brief command on S1 to view the role of the interfaces.
Port

Role

STP State

GigabitEthernet0/0/9

ALTE

DISCARDING NONE

GigabitEthernet0/0/10

ROOT

FORWARDING NONE

Re

so

MSTID

Protection

ni

ng

The highlighted lines in the preceding information indicate that G0/0/10 on S1


has become the root port and G0/0/9 has become the alternate port.

ar

Shut down G0/0/10 on S1 and view the port roles.


[S1]interface GigabitEthernet 0/0/10

Le

[S1-GigabitEthernet0/0/10]shutdown

Mo

re

<S1>display stp brief


MSTID

Port

Role

STP State

GigabitEthernet0/0/9

ROOT

FORWARDING NONE

Page30

HUAWEI TECHNOLOGIES

Protection

HC Series

aw
ei
.c
om
/e

The highlighted line in the preceding information indicates that G0/0/9 has
become the root port. Resume the default priorities of G0/0/9 and G0/0/10 on
S2 and re-enable the shutdown interfaces on S1.
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]undo stp port priority
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10

hu

[S2-GigabitEthernet0/0/10]undo stp port priority

g.

[S1]interface GigabitEthernet 0/0/10

in

[S1-GigabitEthernet0/0/10]undo shutdown

rn

Run the display stp brief and display stp interface command on S1 to view
the roles of interfaces.
Role

GigabitEthernet0/0/9

ROOT

GigabitEthernet0/0/10

ALTE

STP State

Protection

/l

Port

FORWARDING NONE
DISCARDING NONE

tp

:/

MSTID

ea

<S1>display stp brief

ht

[S1]display stp interface GigabitEthernet 0/0/9


----[CIST][Port9(GigabitEthernet0/0/9)][FORWARDING]---Port Protocol

:Enabled
:Root Port
:128

Port Cost(Dot1T )

:Config=auto / Active=20000
:4096.4c1f-cc45-aacc / 128.9

ur

Designated Bridge/Port

:Config=default / Active=disabled

so

Port Edged

:Config=auto / Active=true

:147 packets/hello-time

Re

Point-to-point
Transit Limit

ce

Port Priority

s:

Port Role

:None

Port STP Mode

:STP

ng

Protection Type

Port Protocol Type :Config=auto / Active=dot1s

ni

BPDU Encapsulation :Config=stp / Active=stp


PortTimes

ar

TC or TCN send

:Hello 2s MaxAge 20s FwDly 15s RemHop 0


:4

Le

TC or TCN received :90


BPDU Sent

re
Mo

:5

TCN: 4, Config: 1, RST: 0, MST: 0

BPDU Received

:622

TCN: 0, Config: 622, RST: 0, MST: 0

HC Series

HCNA-HNTD Module 3 STP and RSTP

HUAWEI TECHNOLOGIES

Page31

HCNA-HNTD Module 3 STP and RSTP

[S1]display stp interface GigabitEthernet 0/0/10


Port Protocol

aw
ei
.c
om
/e

----[CIST][Port10(GigabitEthernet0/0/10)][DISCARDING]---:Enabled

Port Role

:Alternate Port

Port Priority

:128

Port Cost(Dot1T )

:Config=auto / Active=20000

Designated Bridge/Port

:Config=default / Active=disabled
:Config=auto / Active=true

Transit Limit

:147 packets/hello-time

Protection Type

:None

Port STP Mode

:STP

hu

Point-to-point

g.

Port Edged

:4096.4c1f-cc45-aacc / 128.10

in

Port Protocol Type :Config=auto / Active=dot1s


BPDU Encapsulation :Config=stp / Active=stp

:Hello 2s MaxAge 20s FwDly 15s RemHop 0


:3

ea

TC or TCN send

rn

PortTimes

BPDU Sent

:4

:/

TCN: 3, Config: 1, RST: 0, MST: 0


BPDU Received

/l

TC or TCN received :90

:637

ht

tp

TCN: 0, Config: 637, RST: 0, MST: 0

s:

The greyed line in the preceding information indicates that G0/0/9 and G0/0/10
cost is 20000 by default.

ce

Change the cost of G0/0/9 to 200000 on S1.


[S1]interface GigabitEthernet 0/0/9

so

ur

[S1-GigabitEthernet0/0/9]stp cost 200000

Re

Run the display stp brief and display stp interface command on S1 to view
the roles of interfaces.
<S1>display stp interface GigabitEthernet 0/0/9

ng

----[CIST][Port9(GigabitEthernet0/0/9)][DISCARDING]---Port Protocol

ni

Port Role

ar

Port Priority

Port Cost(Dot1T )

:Enabled
:Alternate Port
:128
:Config=200000 / Active=200000

Le

Designated Bridge/Port
Port Edged

:Config=default / Active=disabled

Point-to-point

:Config=auto / Active=true

Transit Limit

:147 packets/hello-time

re
Mo

:4096.4c1f-cc45-aacc / 128.9

Page32

HUAWEI TECHNOLOGIES

HC Series

Protection Type

:None

Port STP Mode

:STP

HCNA-HNTD Module 3 STP and RSTP

BPDU Encapsulation :Config=stp / Active=stp


PortTimes

:Hello 2s MaxAge 20s FwDly 15s RemHop 0

TC or TCN send

:4

TC or TCN received :108


BPDU Sent

:5

TCN: 4, Config: 1, RST: 0, MST: 0


BPDU Received

:818

<S1>display stp brief

g.

hu

TCN: 0, Config: 818, RST: 0, MST: 0

aw
ei
.c
om
/e

Port Protocol Type :Config=auto / Active=dot1s

Port

Role

STP State

Protection

GigabitEthernet0/0/9

ALTE

DISCARDING NONE

GigabitEthernet0/0/10

ROOT

FORWARDING NONE

ea

rn

in

MSTID

Final Configuration

ht

<S1>display current-configuration

tp

:/

/l

The highlighted lines in the preceding information indicates that G0/0/10 has
become the root port.

s:

!Software Version V100R006C00SPC800


sysname S1

ce

ur

stp mode stp

stp instance 0 priority 8192

so

interface GigabitEthernet0/0/9

Re

stp instance 0 cost 200000


#

ng

interface GigabitEthernet0/0/10
#

ni

user-interface con 0
#

ar

user-interface vty 0 4

Le

return

re

<S2>display current-configuration

Mo

HC Series

HUAWEI TECHNOLOGIES

Page33

HCNA-HNTD Module 3 STP and RSTP


!Software Version V100R006C00SPC800

sysname S2

aw
ei
.c
om
/e

#
stp mode stp
stp instance 0 priority 4096
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#

hu

user-interface con 0
user-interface vty 0 4

g.

in

return

rn

<S3>display current-configuration

ea

#
!Software Version V100R006C00SPC800

/l

sysname S3

:/

#
interface Ethernet0/0/1

tp

shutdown
#

ht

interface Ethernet0/0/13
shutdown

s:

#
interface Ethernet0/0/23

ce

shutdown
user-interface con 0

ur

so

user-interface vty 0 4

Re

ng

return

ni

<S4>display current-configuration
#

ar

!Software Version V100R006C00SPC800

Le

sysname S4
#

interface Ethernet0/0/14

re

shutdown

Mo

Page34

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP


interface Ethernet0/0/24

shutdown

aw
ei
.c
om
/e

#
user-interface con 0
user-interface vty 0 4
#

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

return

HC Series

HUAWEI TECHNOLOGIES

Page35

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Lab 3-2 Configuring RSTP


Learning Objectives

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

g.

hu

Enable and disable RSTP .


Configuration of an edge port.
Configuration of RSTP BPDU protection.
Configuration of RSTP loop protection

:/

/l

ea

rn

in

Topology

ht

tp

Figure 3.2 RSTP topology

s:

Scenario

Re

so

ur

ce

Assume that you are a network administrator of a company. The company


network consists of two layers: core layer and access layer. The network uses
a redundancy design. RSTP will be used to prevent loops. You can configure
features to speed up RSTP route convergence at the edge network and
configure RSTP protection function.

ng

Tasks

ni

Step 1 Preparing the environment

Le

ar

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.

re

Irrelevant interfaces must be disabled to ensure test result accuracy.

Mo

Shut down port interfaces Ethernet 0/0/1 on S3, Ethernet 0/0/13 and Ethernet

Page36

HUAWEI TECHNOLOGIES

HC Series

aw
ei
.c
om
/e

0/0/23 on S3, as well as Ethernet 0/0/14 and Ethernet 0/0/24 on S4 before


starting STP configuration. Ensure that the devices start without any
configuration files. If STP is disabled, run the stp enable command to enable
STP.
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S1
<Quidway>system-view

hu

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

g.

[Quidway]sysname S2
<Quidway>system-view

in

[Quidway]sysname R3

rn

[R3]interface Ethernet 0/0/1


[R3-Ethernet0/0/1]shutdown

ea

[R3-Ethernet0/0/1]quit

/l

[R3]interface Ethernet 0/0/13


[R3-Ethernet0/0/13]shutdown

:/

[R3-Ethernet0/0/13]quit

tp

[R3]interface Ethernet 0/0/23

ht

[R3-Ethernet0/0/23]shutdown
<Quidway>system-view
[S4]inter Ethernet 0/0/14

ur

[S4-Ethernet0/0/14]quit

ce

[S4-Ethernet0/0/14]shutdown

s:

[Quidway]sysname S4

[S4]interface Ethernet 0/0/24

Re

so

[S4-Ethernet0/0/24]shutdown

ni

ng

Step 2 Clean up the previous configuration

ar

Remove the configured STP priority from S1 and S2, and assigned cost on S1.

Le

[S1]undo stp priority


[S1]inter GigabitEthernet 0/0/9

re

[S1-GigabitEthernet0/0/9]undo stp cost

Mo

[S2]undo stp priority

HC Series

HCNA-HNTD Module 3 STP and RSTP

HUAWEI TECHNOLOGIES

Page37

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Step 3 Configure RSTP and verify the RSTP configuration.


Configure S1 and S2 to use RSTP as the spanning tree protocol.
[S1]stp mode rstp
[S2]stp mode rstp

Run the display stp command to view brief information about RSTP.

hu

[S1]display stp
-------[CIST Global Info][Mode RSTP]------:32768.4c1f-cc45-aace

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:32768.4c1f-cc45-aacc / 20000
:128.9

BPDU-Protection

:Disabled

/l

TC or TCN received :28


TC count per hello :0
:Normal

:/

STP Converge Mode

rn

:32768.4c1f-cc45-aace / 0

CIST RootPortId

ea

CIST RegRoot/IRPC

in

g.

CIST Bridge

tp

Share region-configuration :Enabled


Time since last TC :0 days 0h:11m:1s

ht

output omitted

s:

[S2]display stp

-------[CIST Global Info][Mode RSTP]------:32768.4c1f-cc45-aacc

Bridge Times

:Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC

:32768.4c1f-cc45-aacc / 0

CIST RegRoot/IRPC

:32768.4c1f-cc45-aacc / 0

so
:0.0

Re

CIST RootPortId

ur

ce

CIST Bridge

BPDU-Protection

:Disabled

TC or TCN received :14

ng

TC count per hello :0


:Normal

ni

STP Converge Mode

Share region-configuration :Enabled

ar

Time since last TC :0 days 0h:12m:23s

Mo

re

Le

output omitted

Page38

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Step 4 Configure an edge port.


Configure ports connected to the user terminals as edge ports. An edge port
can transition to the forwarding state without participating in the RSTP
calculation. In this example, interface Gigabit Ethernet 0/0/4 on S1 and S2
connect to a router and can be configured as edge ports.
[S1]interface GigabitEthernet 0/0/4
[S1-GigabitEthernet0/0/4]stp edged-port enable

hu

[S2]interface GigabitEthernet 0/0/4

in

g.

[S2-GigabitEthernet0/0/4]stp edged-port enable

rn

Step 5 Configure BPDU protection.

tp

:/

/l

ea

Edge ports are directly connected to user terminal and will not receive BPDUs.
Attackers may send pseudo BPDUs to attack the switching device. If the edge
ports receive the BPDUs, the switching device configures the edge ports as
non-edge ports and triggers a new spanning tree calculation. Network flapping
then occurs. BPDU protection can be used to protect switching devices against
malicious attacks.

ht

Configure BPDU protection on both S1 and S2.

ce

[S2]stp bpdu-protection

s:

[S1]stp bpdu-protection

ur

Run the display stp brief command to view the port protection.

so

<S1>display stp brief

Re

MSTID Port

Role STP State

Protection

GigabitEthernet0/0/4

DESI FORWARDING

BPDU

GigabitEthernet0/0/9

ROOT FORWARDING

NONE

GigabitEthernet0/0/10

ALTE DISCARDING

NONE

ni

ng

<S2>display stp brief


GigabitEthernet0/0/4

Role STP State

Protection

DESI FORWARDING

BPDU

GigabitEthernet0/0/9

DESI FORWARDING

NONE

GigabitEthernet0/0/10

DESI FORWARDING

NONE

Mo

re

Le

ar

MSTID Port

After the configuration is complete, interface Gigabit Ethernet 0/0/4 on S1 and


HC Series

HUAWEI TECHNOLOGIES

Page39

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

S2 shows as supporting BPDU protection.

Step 6 Configure Loop protection

in

g.

hu

On a network running RSTP, a switching device maintains the root port status
and status of alternate ports by receiving BPDUs from an upstream switching
device. If the switching device cannot receive BPDUs from the upstream
device because of link congestion or unidirectional-link failure, the switching
device re-selects a root port. The original root port becomes a designated port
and the original discarding ports change to the Forwarding state. This
switching may cause network loops, which can be mitigated by configuring
loop protection.

rn

Configure loop protection on both the root port and the alternate port.

ea

[S1]display stp brief


Role STP State

Protection

GigabitEthernet0/0/4

DESI FORWARDING

BPDU

GigabitEthernet0/0/9

ROOT FORWARDING

NONE

GigabitEthernet0/0/10

ALTE DISCARDING

NONE

tp

:/

/l

MSTID Port

ht

G0/0/9 and G0/0/10 on S1 are now the root port and alternate port. Configure
loop protection on these two ports.

s:

[S1]interface GigabitEthernet 0/0/9


[S1-GigabitEthernet0/0/9]stp loop-protection

ce

[S1-GigabitEthernet0/0/9]quit

ur

[S1]interface GigabitEthernet 0/0/10

so

[S1-GigabitEthernet0/0/10]stp loop-protection

Re

Run the display stp brief command to view the port protection.
<S1>display stp brief

Role STP State

Protection

GigabitEthernet0/0/4

DESI FORWARDING

BPDU

GigabitEthernet0/0/9

ROOT FORWARDING

LOOP

GigabitEthernet0/0/10

ALTE DISCARDING

LOOP

ar

ni

ng

MSTID Port

Mo

re

Le

Since S2 is root, all the ports are designated ports and therefore do not need to
configure loop protection. After completing the configuration, you may wish to
set S1 as the root, and configure loop protection on the root port and alternate
port of S2 using the same process as with S1.
Page40

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 3 STP and RSTP

aw
ei
.c
om
/e

Final Configuration
<S1>display current-configuration
#
!Software Version V100R006C00SPC800
sysname S1
#
stp mode rstp
stp bpdu-protection

hu

#
interface GigabitEthernet0/0/4

g.

stp edged-port enable

in

#
interface GigabitEthernet0/0/9

rn

stp loop-protection
#

ea

interface GigabitEthernet0/0/10

/l

stp loop-protection
#

:/

user-interface con 0

tp

user-interface vty 0 4
#

s:

ht

return

ce

<S2>display current-configuration

ur

!Software Version V100R006C00SPC800

so

sysname S2
stp mode rstp

Re

stp bpdu-protection

ng

ni

interface GigabitEthernet0/0/4
#

ar

stp edged-port enable


user-interface con 0

Le

user-interface vty 0 4
#

Mo

re

return

HC Series

HUAWEI TECHNOLOGIES

Page41

HCNA-HNTD Module 3 STP and RSTP

<S3>display current-configuration

aw
ei
.c
om
/e

#
!Software Version V100R006C00SPC800
sysname S3
#
interface Ethernet0/0/1
shutdown
#
interface Ethernet0/0/13

hu

shutdown
#

g.

interface Ethernet0/0/23

in

shutdown
#

rn

user-interface con 0

ea

user-interface vty 0 4
#

<S4>dis current-configuration
#

ht

!Software Version V100R006C00SPC800

tp

:/

/l

return

sysname S4

s:

#
interface Ethernet0/0/14

ce

shutdown

ur

#
interface Ethernet0/0/24

so

shutdown

Re

user-interface con 0

user-interface vty 0 4

ng

Mo

re

Le

ar

ni

return

Page42

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Module 4 Routing Configuration


Lab 4-1 Configuring Static Routes and Default Routes
Learning Objectives

g.

in

rn

Configuration of a static route using an interface and an IP address as


the next hop.
Verification of static route operation
Implementation of the interconnection between a local and external
network using a default route.
Configuration of a backup static route on a router

ea

hu

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

Figure 4.1 Lab topology for static and default routes

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

Topology

HC Series

HUAWEI TECHNOLOGIES

Page43

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Scenario
Assume that you are a network administrator of a company that contains a
single administrative domain and within the administrative domain, multiple
networks have been defined, for which currently no method of routing exists.

Since the network scale is small, with only a few networks, static routes and
default routes are to be used to implement interwork communication. The
network addressing is to be applied as shown in Figure 4.1.

g.

hu

If a password is requested, and unless otherwise stated, please use the


password: huawei

rn

in

Tasks

/l

ea

Step 1 Perform basic system and IP address configuration.


Configure the device names and IP addresses for R1, R2, and R3.

:/

<Huawei>system-view
[Huawei]sysname R1

ht

[R1]interface GigabitEthernet 0/0/0

tp

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

[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24

s:

[R1-GigabitEthernet0/0/0]quit

[R1]interface GigabitEthernet 0/0/1

ce

[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24

ur

[R1-GigabitEthernet0/0/1]quit
[R1]interface LoopBack 0

Re

so

[R1-LoopBack0]ip address 10.0.1.1 24

ng

Run the display current-configuration command to check the configuration.


<R1>display ip interface brief

ni

Interface

IP Address/Mask

Physical

Protocol

ar

......output omitted......
10.0.13.1/24

up

up

GigabitEthernet0/0/1

10.0.12.1/24

up

up

GigabitEthernet0/0/2

unassigned

up

down

LoopBack0

10.0.1.1/24

up

up(s)

re

Le

GigabitEthernet0/0/0

Mo

......output omitted......

Page44

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

<Huawei>system-view

aw
ei
.c
om
/e

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


[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2]ip add 10.0.23.2 24
[R2-GigabitEthernet0/0/2]quit

hu

[R2]interface LoopBack0

in

g.

[R2-LoopBack0]ip address 10.0.2.2 24

<R2>display ip interface brief


IP Address/Mask

Physical

rn

Interface

unassigned

GigabitEthernet0/0/1

10.0.12.2/24

GigabitEthernet0/0/2

10.0.23.2/24

LoopBack0

10.0.2.2/24

:/

/l

GigabitEthernet0/0/0

ea

......output omitted......

up

down

up

up

up

up

up

up(s)

tp

......output omitted......

Protocol

ht

<Huawei>system-view

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

s:

[Huawei]sysname R3

[R3]interface GigabitEthernet 0/0/0

ce

[R3-GigabitEthernet0/0/0]ip address 10.0.13.3 24

ur

[R3-GigabitEthernet0/0/0]quit

[R3]interface GigabitEthernet0/0/2

so

[R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24

Re

[R3-GigabitEthernet0/0/2]quit
[R3]interface LoopBack 0

ng

[R3-LoopBack0]ip address 10.0.3.3 24

ni

<R3>display ip interface brief


Interface

IP Address/Mask

Physical

Protocol

ar

......output omitted......
10.0.13.3/24

up

up

GigabitEthernet0/0/1

unassigned

up

down

GigabitEthernet0/0/2

10.0.23.3/24

up

up

LoopBack0

10.0.3.3/24

up

up(s)

re

Le

GigabitEthernet0/0/0

Mo

......output omitted......

HC Series

HUAWEI TECHNOLOGIES

Page45

HCNA-HNTD Module 4 Routing Configuration

Use the ping command to test network connectivity from R1.

aw
ei
.c
om
/e

<R1>ping 10.0.12.2
PING 10.0.12.2: 56 data bytes, press CTRL_C to break

Reply from 10.0.12.2: bytes=56 Sequence=1 ttl=255 time=30 ms


Reply from 10.0.12.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 10.0.12.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.0.12.2: bytes=56 Sequence=4 ttl=255 time=30 ms

hu

Reply from 10.0.12.2: bytes=56 Sequence=5 ttl=255 time=30 ms


--- 10.0.12.2 ping statistics ---

g.

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

in

0.00% packet loss

rn

round-trip min/avg/max = 30/30/30 ms

ea

<R1>ping 10.0.13.3

/l

PING 10.0.13.2: 56 data bytes, press CTRL_C to break


Reply from 10.0.13.3: bytes=56 Sequence=1 ttl=255 time=6 ms

:/

Reply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=2 ms

tp

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


Reply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=2 ms

ht

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

5 packet(s) received
0.00% packet loss

ce

5 packet(s) transmitted

s:

--- 10.0.13.3 ping statistics ---

so

ur

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

Re

Use the ping command to test network connectivity from R2


<R2>ping 10.0.23.3

ng

PING 10.0.23.3: 56 data bytes, press CTRL_C to break

ni

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


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

ar

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

Le

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


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

Mo

re

--- 10.0.23.3 ping statistics --5 packet(s) transmitted

Page46

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


5 packet(s) received

0.00% packet loss

aw
ei
.c
om
/e

round-trip min/avg/max = 31/35/41 ms

Step 2 Test connectivity

Use the ping command to test network connectivity from R2 to neworks


10.0.13.0/24 and 10.0.3.0/24

hu

<R2>ping 10.0.13.3
PING 10.0.13.3: 56 data bytes, press CTRL_C to break

g.

Request time out

in

Request time out


Request time out

rn

Request time out

ea

Request time out

/l

--- 10.0.13.3 ping statistics --5 packet(s) transmitted

:/

0 packet(s) received

tp

100.00% packet loss

ht

<R2>ping 10.0.3.3

PING 10.0.3.3: 56 data bytes, press CTRL_C to break

s:

Request time out


Request time out

ce

Request time out

so

Request time out

ur

Request time out

Re

--- 10.0.3.3 ping statistics --5 packet(s) transmitted


0 packet(s) received

ni

ng

100.00% packet loss

Le

ar

If R2 wishes to communicate with the network segment 10.0.3.0, a route


destined for this network segment must be configured on R2, and routes
destined for the R2 interface must be configured on R3.

Mo

re

The preceding test result shows that R2 cannot communicate with 10.0.3.3
and 10.0.13.3.

HC Series

HUAWEI TECHNOLOGIES

Page47

Run the display ip routing-table command to view the routing table of R2.
The routing table does not contain the routes of the two networks.

aw
ei
.c
om
/e

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

---------------------------------------------------------------------------Routing Tables: Public


Destinations : 13
Destination/Mask

Proto

Routes : 13
Pre Cost Flags NextHop

Interface

Direct 0

10.0.2.2

LoopBack0

10.0.2.2/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.23.0/24

Direct 0

10.0.23.2

GigabitEthernet0/0/2

10.0.23.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/2

10.0.23.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/2

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.255.255.255/32 Direct 0

255.255.255.255/32 Direct 0

/l

ea

rn

in

g.

hu

10.0.2.0/24

InLoopBack0

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

:/

127.0.0.1

tp

s:

ht

Step 3 Configure static routes on R2.

ur

ce

Configure a static route for destination networks 10.0.13.0/24 and 10.0.3.0/24,


with the next hop set as the IP address 10.0.23.3 of R3, a preference value of
60 is the default and need not be set.
[R2]ip route-static 10.0.13.0 24 10.0.23.3

Re

so

[R2]ip route-static 10.0.3.0 24 10.0.23.3

ng

Note: In the ip route-static command, 24 indicates the subnet mask length,


which can also be expressed using the decimal format 255.255.255.0.

ni

<R2>display ip routing-table

ar

Route Flags: R - relay, D - download to fib


Proto

Pre Cost Flags NextHop

Interface

10.0.3.0/24

Static

60

RD 10.0.23.3

GigabitEthernet0/0/2

10.0.12.0/24

Direct

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32

Direct

127.0.0.1

GigabitEthernet0/0/1

Mo

re

Le

Destination/Mask

Page48

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

Static

60

RD 10.0.23.3

GigabitEthernet0/0/2

10.0.23.0/24

Direct

10.0.23.2

GigabitEthernet0/0/2

10.0.23.2/32

Direct

127.0.0.1

GigabitEthernet0/0/2

aw
ei
.c
om
/e

10.0.13.0/24

Step 4 Configure backup static routes.

hu

The data exchanged between R2 and 10.0.13.3 and 10.0.3.3 is transmitted


through the link between R2 and R3. R2 fails to communicate with 10.0.13.3
and 10.0.3.3 if the link between R2 and R3 is faulty.

in

g.

According to the topology, R2 can communicate with R3 through R1 if the link


between R2 and R3 fails. A backup static route can be configured to enable
this redundancy. Backup static routes do not take effect in normal cases. If the
link between R2 and R3 fails, backup static routes are used to transfer data.

:/

/l

ea

rn

Amend th preferences for on the backup static routes to ensure that the routes
are used only when the primary link fails. In this example, the preference of the
backup static route is set to 80.
[R1]ip route-static 10.0.3.0 24 10.0.13.3

tp

[R2]ip route-static 10.0.13.0 255.255.255.0 10.0.12.1 preference 80

ht

[R2]ip route-static 10.0.3.0 24 10.0.12.1 preference 80

s:

[R3]ip route-static 10.0.12.0 24 10.0.13.1

ur

ce

Step 5 Test the static routes.

so

View the current static route configuration in the routing table of R2.
<R2>display ip routing-table

Re

Route Flags: R - relay, D - download to fib


----------------------------------------------------------------------------

ng

Routing Tables: Public


Destinations : 15

Flags NextHop

Interface

10.0.2.2

LoopBack0

10.0.2.2/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

Static 60

RD

10.0.23.3

GigabitEthernet0/0/2

10.0.12.0/24 Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

ar
Le

10.0.3.0/24

re

Pre Cost

Direct 0

10.0.2.0/24

Mo

Routes : 15

ni

Destination/Mask Proto

HC Series

HCNA-HNTD Module 4 Routing Configuration

HUAWEI TECHNOLOGIES

Page49

RD

10.0.23.3

GigabitEthernet0/0/2

10.0.23.0/24 Direct 0

10.0.23.2

GigabitEthernet0/0/2

10.0.23.2/32 Direct 0

127.0.0.1

GigabitEthernet0/0/2

10.0.23.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/2

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32 Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

127.0.0.0/8

aw
ei
.c
om
/e

10.0.13.0/24 Static 60

g.

hu

The routing table contains two static routes that were configured in step 3. The
value of the Protocol field is Static, indicating a static route. The value of the
Preference field is 60, indicating the default preference is used for the route.

in

Test network connectivity to ensure the route between R2 and R3 exists.


<R2>ping 10.0.13.3

rn

PING 10.0.13.3: 56 data bytes, press CTRL_C to break

ea

Reply from 10.0.13.3: bytes=56 Sequence=1 ttl=255 time=34 ms


Reply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=34 ms

/l

Reply from 10.0.13.3: bytes=56 Sequence=3 ttl=255 time=34 ms

:/

Reply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=34 ms

ht

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

s:

0.00% packet loss

tp

Reply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=34 ms


--- 10.0.13.3 ping statistics ---

ce

round-trip min/avg/max = 34/34/34 ms

ur

<R2>ping 10.0.3.3

PING 10.0.3.3: 56 data bytes, press CTRL_C to break

so

Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=41 ms

Re

Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=41 ms


Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=255 time=41 ms
Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=255 time=41 ms

ni

ng

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


--- 10.0.3.3 ping statistics ---

ar

5 packet(s) transmitted

Le

5 packet(s) received
0.00% packet loss

Mo

re

round-trip min/avg/max = 41/41/41 ms

Page50

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

The command output shows that the route is functioning normally. The tracert
command can also be run to view the path over which the data is transferred.

aw
ei
.c
om
/e

<R2>tracert 10.0.13.3

traceroute to 10.0.13.3(10.0.13.3), max hops: 30 ,packet length: 40,


press CTRL_C to break
1 10.0.23.3 40 ms 31 ms 30 ms
<R2>tracert 10.0.3.3

traceroute to 10.0.3.3(10.0.3.3), max hops: 30 ,packet length: 40,

hu

press CTRL_C to break

g.

1 10.0.23.3 40 ms 30 ms 30 ms

in

The command output verifies that R2 directly sends data to R3.

ea

rn

Step 6 Test the backup static routes.

[R2-GigabitEthernet0/0/2]shutdown

ht

[R2-GigabitEthernet0/0/2]quit

tp

[R2]interface GigabitEthernet0/0/2

:/

/l

Disable the path to 10.0.23.3 via GigabitEthernet0/0/2 on R2 and observe the


changes in the IP routing tables.

s:

Compare the routing tables with the previous routing tables before Gigabit
Ethernet 0/0/2 was disabled.

ce

<R2>display ip routing-table

Route Flags: R - relay, D - download to fib

ur

----------------------------------------------------------------------------

so

Routing Tables: Public

Re

Destinations : 12

Pre Cost

Flags NextHop

Interface

Direct 0

10.0.2.2

LoopBack0

10.0.2.2/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

Static 80

10.0.12.2

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

10.0.12.2

GigabitEthernet0/0/1

Le

ni

10.0.2.0/24

Static 80

Mo

re

Proto

Routes : 12

ar

ng

Destination/Mask

HC Series

HCNA-HNTD Module 4 Routing Configuration

HUAWEI TECHNOLOGIES

Page51

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

aw
ei
.c
om
/e

127.0.0.0/8

The next hops and preferences of the two routes as shown in the preceding
routing table for R2 have changed.

hu

Test connectivity between R2 and the destination addresses 10.0.13.3 and


10.0.3.3 on R2.
PING 10.0.3.3: 56 data bytes, press CTRL_C to break

g.

<R2>ping 10.0.3.3

Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=3 ms

in

Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=2 ms

rn

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


Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=255 time=2 ms

/l

ea

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


--- 10.0.3.3 ping statistics ---

:/

5 packet(s) transmitted

tp

5 packet(s) received
0.00% packet loss

ht

round-trip min/avg/max = 2/2/3 ms

s:

<R2>ping 10.0.13.3

PING 10.0.13.3: 56 data bytes, press CTRL_C to break

ce

Reply from 10.0.13.3: bytes=56 Sequence=1 ttl=255 time=3 ms

ur

Reply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=2 ms


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

so

Reply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=2 ms

Re

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


--- 10.0.13.3 ping statistics ---

ng

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

ni

0.00% packet loss

ar

round-trip min/avg/max = 2/2/3 ms

Mo

re

Le

The network is not disconnected when the link between R2 and R3 is shut
down.

Page52

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

The tracert command can also be run to view through over which path the
data is being forwarded.

aw
ei
.c
om
/e

<R2>tracert 10.0.13.3

traceroute to 10.0.13.3(10.0.13.3), max hops: 30 ,packet length: 40,press CTRL_C


to break
1 10.0.12.1 40 ms 21 ms 21 ms
2 10.0.13.3 30 ms 21 ms 21 ms
<R2>tracert 10.0.3.3

hu

traceroute to 10.0.3.3(10.0.3.3), max hops: 30 ,packet length: 40,press CTRL_C


to break

g.

1 10.0.12.1 40 ms 21 ms 21 ms

in

2 10.0.13.3 30 ms 21 ms 21 ms

ea

rn

The command output shows that the data sent by R2 reaches R3 via the
10.0.12.0 and 10.0.13.0 networks connected to R1.

:/

/l

Step 7 Using default routes to implement network connectivity.

[R2]interface GigabitEthernet 0/0/2

tp

Enable the interface that was disabled in step 6 on R2.

ht

[R2-GigabitEthernet0/0/2]undo shutdown

s:

Verify connectivity to the network 10.0.23.0 from R1.

ce

[R1]ping 10.0.23.3

so

Request time out

ur

PING 10.0.23.3: 56 data bytes, press CTRL_C to break


Request time out
Request time out

Re

Request time out

ng

Request time out

--- 10.0.23.3 ping statistics ---

ni

5 packet(s) transmitted

ar

0 packet(s) received

Le

100.00% packet loss

Mo

re

R3 cannot be reached because the route destined for 10.0.23.3 is not


configured on R1.

HC Series

HCNA-HNTD Module 4 Routing Configuration

HUAWEI TECHNOLOGIES

Page53

HCNA-HNTD Module 4 Routing Configuration


<R1>display ip routing-table

aw
ei
.c
om
/e

---------------------------------------------------------------------------Routing Tables: Public


Destinations : 14

Routes : 14

Proto

Pre Cost Flags NextHop

Interface

10.0.1.0/24

Direct

10.0.1.1

LoopBack0

10.0.1.1/32

Direct

127.0.0.1

LoopBack0

Direct

127.0.0.1

LoopBack0

10.0.3.0/24

Static

60

RD

10.0.13.3

GigabitEthernet0/0/0

10.0.12.0/24

Direct

10.0.12.1

GigabitEthernet0/0/1

10.0.12.1/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct

g.

in

rn

ea

/l

127.0.0.1

InLoopBack0

tp

hu

10.0.1.255/32

:/

Destination/Mask

ht

A default route can be configured on R1 to implement network connectivity via


a next hop of 10.0.13.3.

s:

[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.13.3

ur

ce

After the configuration is complete, test connectivity between R1 and


10.0.23.3.
<R1>ping 10.0.23.3

so

PING 10.0.23.3: 56 data bytes, press CTRL_C to break

Re

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


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

ng

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

ni

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

ar

--- 10.0.23.3 ping statistics ---

Le

5 packet(s) transmitted
5 packet(s) received
0.00% packet loss

Mo

re

round-trip min/avg/max = 2/2/3 ms

Page54

HUAWEI TECHNOLOGIES

Route Flags: R - relay, D - download to fib

HC Series

aw
ei
.c
om
/e

The default route forwards traffic destined for 10.0.23.3 to the next hop of
10.0.13.3 on R3. R3 is directly connected to the 10.0.23.0 network.

Step 8 Configure a backup default route.

If the link between R1 and R3 fails, a backup default route can be used to
communicate with 10.0.23.3 and 10.0.3.3 via the 10.0.12.0 network.

hu

However, R1 is not directly connected to these networks and therefore a


backup route (in both directions) must be configured to provide a forwarding
path.

g.

[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.12.2 preference 80

/l

ea

rn

in

[R3]ip route-static 10.0.12.0 24 10.0.23.2 preference 80

Step 9 Test the backup default route.

View the routes of R1 when the link between R1 and R3 is operational.

:/

<R1>display ip routing-table

tp

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

ht

Routing Tables: Public


Destinations : 15

Routes : 15
Pre Cost Flags NextHop

s:

Proto

Interface

Static 60

RD

10.0.13.3

GigabitEthernet0/0/0

10.0.1.0/24

Direct 0

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

10.0.1.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

Static 60

RD

10.0.13.3

GigabitEthernet0/0/0

Direct 0

10.0.12.1

GigabitEthernet0/0/1

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct 0

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

so

Re

10.0.12.0/24

ce

0.0.0.0/0

ur

Destination/Mask

Mo

re

Le

ar

ni

ng

10.0.12.1/32

HC Series

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

Page55

aw
ei
.c
om
/e

Disable Gigabit Ethernet 0/0/0 on R1 and disable interface Gigabit Ethernet


0/0/0 on R3 to simulate a link failure, and then view the routes of R1. Compare
the current routes with the routes before Gigabit Ethernet 0/0/0 was disabled.
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]shutdown
[R1-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]shutdown

hu

[R3-GigabitEthernet0/0/0]quit

g.

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

in

-------------------------------------------------------------------------

Pre Cost

Flags NextHop

Interface

GigabitEthernet0/0/1

Static 80

RD

10.0.1.0/24

Direct 0

10.0.1.1/32

Direct 0

10.0.1.255/32

Direct 0

10.0.12.0/24

Direct 0

10.0.12.1/32

10.0.12.2
10.0.1.1

LoopBack0

127.0.0.1

LoopBack0

127.0.0.1

LoopBack0

:/

0.0.0.0/0

ea

Proto

Routes : 11

/l

Destination/Mask

rn

Routing Tables: Public


Destinations : 11

Direct 0

tp

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

10.0.12.1

GigabitEthernet0/0/1

so

ur

ce

s:

ht

Re

According to the preceding routing table, the value of 80 in the Preference


column indicates that the backup default route 0.0.0.0 is actively forwarding
traffic to the next hop of 10.0.23.3.

ng

Test network connectivity on R1.

ni

<R1>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break

ar

Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=76 ms

Le

Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=250 ms


Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=76 ms

Mo

re

Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=76 ms


Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=76 ms

Page56

HCNA-HNTD Module 4 Routing Configuration

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


--- 10.0.23.3 ping statistics ---

5 packet(s) transmitted

aw
ei
.c
om
/e

5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 76/110/250 ms
<R1>tracert 10.0.23.3

traceroute to 10.0.23.3(10.0.23.2), max hops: 30 ,packet length: 40,press CTRL_C


to break
1 10.0.12.2 30 ms 26 ms 26 ms

hu

2 10.0.23.3 60 ms 53 ms 56 ms

g.

The IP packets are reaching R3 (10.0.23.3) via the next hop 10.0.12.2 of R2.

rn

in

Final Configuration
<R1>dis current-configuration

ea

[V200R003C00SPC200]

/l

#
sysname R1
interface GigabitEthernet0/0/0
shutdown

ht

ip address 10.0.13.1 255.255.255.0

tp

:/

s:

interface GigabitEthernet0/0/1

ip address 10.0.12.1 255.255.255.0

ce

#
interface LoopBack0

ur

ip address 10.0.1.1 255.255.255.0

so

ip route-static 0.0.0.0 0.0.0.0 10.0.13.3

Re

ip route-static 0.0.0.0 0.0.0.0 10.0.12.2 preference 80


ip route-static 10.0.3.0 255.255.255.0 10.0.13.3

ng

ip route-static 10.0.12.0 255.255.255.0 10.0.23.2 preference 80


#

ni

user-interface con 0

ar

authentication-mode password
set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD

Le

(\WTqB}%N,%$%$
user-interface vty 0 4

re

Mo

return

HC Series

HUAWEI TECHNOLOGIES

Page57

HCNA-HNTD Module 4 Routing Configuration


<R2>display current-configuration

[V200R003C00SPC200]

aw
ei
.c
om
/e

#
sysname R2
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.0.23.2 255.255.255.0
#

hu

interface LoopBack0
ip address 10.0.2.2 255.255.255.0

g.

in

ip route-static 10.0.3.0 255.255.255.0 10.0.23.3

ip route-static 10.0.3.0 255.255.255.0 10.0.12.1 preference 80

rn

ip route-static 10.0.13.0 255.255.255.0 10.0.23.3

ea

ip route-static 10.0.13.0 255.255.255.0 10.0.12.1 preference 80


#

/l

user-interface con 0

:/

authentication-mode password

set authentication password cipher %$%$1=cd%b%/O%Id-8X:by1N,+s}'4wD6TvO<I|/pd#

tp

#44C@+s#,%$%$
user-interface vty 0 4

ht

s:

return

<R3>display current-configuration

ce

[V200R003C00SPC200]

ur

#
sysname R3

so

Re

interface GigabitEthernet0/0/0
shutdown

ip address 10.0.13.3 255.255.255.0

ng

ni

interface GigabitEthernet0/0/2
ip address 10.0.23.3 255.255.255.0

ar

Le

interface LoopBack0
ip address 10.0.3.3 255.255.255.0

re

ip route-static 10.0.12.0 255.255.255.0 10.0.13.1

Mo

ip route-static 10.0.12.0 255.255.255.0 10.0.23.2 preference 80

Page58

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


#

user-interface con 0

aw
ei
.c
om
/e

authentication-mode password
set authentication password cipher %$%$ksXDMg7Ry6yUU:63:DQ),#/sQg"@*S\U#.s.bHW
xQ,y%#/v,%$%$
user-interface vty 0 4
#

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

return

HC Series

HUAWEI TECHNOLOGIES

Page59

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Lab 4-2 Configuring RIPv1 and RIPv2


Learning Objectives

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

g.

hu

Establish routing loop prevention mechanisms for RIP


Configuration of RIPv1.
Enable RIP for a specified network and interface.
Use of the display and debugging commands to view RIP operation.
Procedure for testing connectivity of the RIP network.
Configuration of RIPv2.

in

Figure 4.2 Lab topology for RIPv1 and RIPv2

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

Topology

Page60

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Scenario
Assume that you are a network administrator in charge of managing a small
administrative domain consisting of three routers and five networks. Due to the
limited requirement, RIP is to be used to support routing. RIPv1 is initially
configured, but you realize that RIPv2 has many advantages. After some
consideration, you transition the domain to support RIPv2.

hu

Tasks

in

g.

Step 1 Preparing the environment.

ea

rn

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

/l

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


[Huawei]sysname R1

:/

[R1]interface GigabitEthernet 0/0/0

tp

[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24


[R1-GigabitEthernet0/0/0]quit

ht

[R1]interface LoopBack 0

[R1-LoopBack0]ip address 10.0.1.1 24

s:

[R1-LoopBack0]quit

ce

<Huawei>system-view

ur

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


[Huawei]sysname R2

so

[R2]interface GigabitEthernet 0/0/1

Re

[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24


[R2-GigabitEthernet0/0/1]quit
[R2]interface LoopBack 0

ni

ng

[R2-LoopBack0]ip address 10.0.2.2 24


<Huawei>system-view

ar

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


[Huawei]sysname R3

Le

[R3]interface LoopBack 0

Mo

re

[R3-LoopBack0]ip address 10.0.3.3 24

HC Series

HUAWEI TECHNOLOGIES

Page61

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Step 2 Clean up the previous configuration


Clean up previous static route configuration and disable all unused interfaces
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]shutdown
[R1-GigabitEthernet0/0/1]quit
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]undo shutdown

hu

[R1-GigabitEthernet0/0/0]quit
[R1]undo ip route-static 0.0.0.0 0.0.0.0

g.

[R1]undo ip route-static 10.0.3.0 255.255.255.0

rn

in

[R1]undo ip route-static 10.0.12.0 255.255.255.0

ea

[R2]interface GigabitEthernet 0/0/2


[R2-GigabitEthernet0/0/2]shutdown

/l

[R2-GigabitEthernet0/0/2]quit

[R2]undo ip route-static 10.0.3.0 255.255.255.0

[R3]interface GigabitEthernet 0/0/2

ht

[R3-GigabitEthernet0/0/2]shutdown

tp

:/

[R2]undo ip route-static 10.0.13.0 255.255.255.0

[R3-GigabitEthernet0/0/2]quit

ce

s:

[R3]undo ip route-static 10.0.12.0 255.255.255.0

so

ur

Step 3 Additional address configuration

Re

Configure the following additional interfaces for R2 and R3.


[R2]interface GigabitEthernet 0/0/0

ng

[R2-GigabitEthernet0/0/0]ip address 10.0.13.2 24

ni

[R3]interface GigabitEthernet0/0/1

Mo

re

Le

ar

[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24

Page62

HUAWEI TECHNOLOGIES

HC Series

Verify that R1 and R2 can communicate with one another over the 10.0.13.0
network.

aw
ei
.c
om
/e

<R1>ping 10.0.13.2
PING 10.0.13.2: 56 data bytes, press CTRL_C to break

Reply from 10.0.13.2: bytes=56 Sequence=1 ttl=255 time=30 ms


Reply from 10.0.13.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 10.0.13.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.0.13.2: bytes=56 Sequence=4 ttl=255 time=30 ms

hu

Reply from 10.0.13.2: bytes=56 Sequence=5 ttl=255 time=30 ms


--- 10.0.13.2 ping statistics ---

g.

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

in

0.00% packet loss

rn

round-trip min/avg/max = 30/30/30 ms

ea

Verify that R2 can successfully reach R3 over the 10.0.12.0 network.

/l

<R2>ping 10.0.12.3

:/

PING 10.0.12.2: 56 data bytes, press CTRL_C to break


Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=255 time=31 ms

tp

Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=255 time=31 ms


Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=255 time=41 ms

ht

Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=255 time=31 ms

s:

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

ce

--- 10.0.12.3 ping statistics --5 packet(s) transmitted


0.00% packet loss

ur

5 packet(s) received

Re

so

round-trip min/avg/max = 31/35/41 ms

ng

Step 4 Configure RIPv1.

ni

Enable RIP on R1, and then advertise the 10.0.0.0 network segment.

ar

[R1]rip 1

Le

[R1-rip-1]network 10.0.0.0

Enable RIP on R2, and then advertise the 10.0.0.0 network segment.

re

[R2]rip 1

Mo

[R2-rip-1]network 10.0.0.0

HC Series

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

Page63

HCNA-HNTD Module 4 Routing Configuration

Enable RIP on R3, and then advertise the 10.0.0.0 network segment.

aw
ei
.c
om
/e

[R3]rip 1
[R3-rip-1]network 10.0.0.0

Step 5 Verify RIPv1 routes.

hu

View the routing tables of R1, R2, and R3. Make sure that these routers have
learned the RIP routes that are highlighted in gray in the following command
output.

g.

<R1>display ip routing-table

in

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Pre Cost Flags NextHop


D

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

10.0.1.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.3.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

10.0.12.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.13.0/24

Direct 0

10.0.13.1/32

Direct 0

10.0.13.1

GigabitEthernet0/0/0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

ce

tp

Interface

ht

Direct 0

s:

10.0.1.0/24

:/

/l

Proto

ur

Destination/Mask

Routes : 13

ea

Destinations : 13

rn

Routing Tables: Public

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

Re

so

127.0.0.0/8

255.255.255.255/32 Direct 0

ng

<R2>display ip routing-table

ni

Route Flags: R - relay, D - download to fib


----------------------------------------------------------------------------

ar

Routing Tables: Public

Le

Destinations : 15

Mo

re

Destination/Mask
10.0.1.0/24

Page64

Routes : 15

Proto

Pre Cost Flags NextHop

Interface

RIP

100 1

GigabitEthernet0/0/0

10.0.13.1

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


Direct 0

10.0.2.2

LoopBack0

10.0.2.2/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct 0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

aw
ei
.c
om
/e

10.0.2.0/24

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

in

g.

hu

10.0.13.255/32 Direct 0

rn

<R3>display ip routing-table

ea

Route Flags: R - relay, D - download to fib


Routing Tables: Public
Routes : 13

:/

Destinations : 13

/l

----------------------------------------------------------------------------

Proto

Pre Cost Flags NextHop

Interface

10.0.1.0/24

RIP

100 2

10.0.2.0/24

RIP

100 1

10.0.3.0/24

Direct 0

10.0.3.3/32

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2

GigabitEthernet0/0/1

10.0.3.3

LoopBack0

Direct 0

127.0.0.1

LoopBack0

10.0.3.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.12.0/24

Direct 0

10.0.12.3

GigabitEthernet0/0/1

10.0.12.3/32

Direct 0

ur

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

RIP

100 1

10.0.12.2

GigabitEthernet0/0/1

Direct 0

127.0.0.1

InLoopBack0

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

s:

ce

so

10.0.13.0/24
127.0.0.0/8

ni

ng

127.0.0.1/32

ht

Re

tp

Destination/Mask

Mo

re

Le

ar

Test connectivity from R1 to IP address 10.0.23.3. R1 and R3 can


communicate with one another.

HC Series

HUAWEI TECHNOLOGIES

Page65

HCNA-HNTD Module 4 Routing Configuration


[R1]ping 10.0.12.3

aw
ei
.c
om
/e

Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=254 time=70 ms


Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=254 time=65 ms
Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=254 time=65 ms
Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=254 time=65 ms

Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=254 time=65 ms


--- 10.0.12.3 ping statistics --5 packet(s) transmitted

hu

5 packet(s) received
0.00% packet loss

in

g.

round-trip min/avg/max = 65/66/70 ms

rn

The debugging command can be used to view RIP periodic updates.

:/

/l

ea

Run the debugging command to enable the RIP debugging function. The
debugging command can be used only in the user view. To identify the
currently enabled debugging information, use the display debugging
command. Run the terminal debugging command to display the debugging
information.

tp

The information about RIP interactions between routers is displayed.

ht

<R1>debugging rip 1
<R1>display debugging

s:

RIP Process id: 1


Debugs ON: SEND, RECEIVE, PACKET, TIMER, EVENT, BRIEF,

ce

JOB, ROUTE-PROCESSING, ERROR,

ur

REPLAY-PROTECT, GR
<R1>terminal debugging

so

Info: Current terminal debugging is on.


<R1>

Re

Nov 29 2013 09:45:07.860.1+00:00 R1 RIP/7/DBG: 6: 12734: RIP 1: Receiving v1


response on GigabitEthernet0/0/0 from 10.0.13.2 with 3 RTEs

ng

<R1>

Nov 29 2013 09:45:07.860.2+00:00 R1 RIP/7/DBG: 6: 12785: RIP 1: Receive response

ar

ni

from 10.0.13.2 on GigabitEthernet0/0/0


<R1>

Nov 29 2013 09:45:07.860.3+00:00 R1 RIP/7/DBG: 6: 12796: Packet: Version 1, Cmd

Le

response, Length 64
<R1>

re

Nov 29 2013 09:45:07.860.4+00:00 R1 RIP/7/DBG: 6: 12845: Dest 10.0.2.0, Cost 1

Mo

<R1>

Page66

PING 10.0.12.3: 56 data bytes, press CTRL_C to break

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


Nov 29 2013 09:45:07.860.5+00:00 R1 RIP/7/DBG: 6: 12845: Dest 10.0.3.0, Cost 2

aw
ei
.c
om
/e

Nov 29 2013 09:45:07.860.6+00:00 R1 RIP/7/DBG: 6: 12845: Dest 10.0.12.0, Cost


1
<R1>

Nov 29 2013 09:45:09.370.1+00:00 R1 RIP/7/DBG: 25: 5071: RIP 1: Periodic timer


expired for interface GigabitEthernet0/0/1

hu

Run the undo debugging rip <process-id> or undo debugging all


command to disable the debugging functions.

g.

<R1>undo debugging rip 1

ea

rn

in

Individual parameters can be specified to control the debugging information


viewed. For example, the debugging rip 1 event command allows for only
periodical update events sent or received by routers to be viewed. The
question mark (?) can be added to the command to query other parameters.
<R1>debugging rip 1 event

/l

<R1>

:/

Nov 29 2013 10:00:04.880.1+00:00 R1 RIP/7/DBG: 25: 5719: RIP 1: Periodic timer


expired for interface GigabitEthernet0/0/0 (10.0.13.1) and its added to periodic

tp

update queue

ht

<R1>

Nov 29 2013 10:00:04.890.1+00:00 R1 RIP/7/DBG: 25: 6048: RIP 1: Interface

s:

GigabitEthernet0/0/0 (10.0.13.1) is deleted from the periodic update queue

ce

<R1>undo debugging all

ur

Info: All possible debugging has been turned off

ng

Re

so

Warning: If too many debugging functions are enabled, a large number of


router resources will be utilized that may result in system service failure.
Therefore, the use of commands (such as debug all) for enabling debugging
functions in batches should be performed with caution.

ni

Step 6 Configure RIPv2.

Le

ar

After the preceding configuration, you need to configure only version 2 in the
RIP sub view.
[R1]rip 1

Mo

re

[R1-rip-1]version 2

HC Series

<R1>

HUAWEI TECHNOLOGIES

Page67

HCNA-HNTD Module 4 Routing Configuration


[R2]rip 1

aw
ei
.c
om
/e

[R2-rip-1]version 2
[R3]rip 1
[R3-rip-1]version 2

Step 7 Verify RIPv2 routes.


View the routing tables of R1, R2, and R3.

g.

hu

Run the display ip routing-table command to view the routing tables of R1,
R2, and R3. Compare the routes that are highlighted with RIPv1 routes.

in

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

rn

----------------------------------------------------------------------------

10.0.1.0/24

Direct

10.0.1.1/32

Direct

10.0.1.255/32

Direct

10.0.2.0/24

RIP

/l

Pre Cost

Flags NextHop

:/

Proto

10.0.1.1

Interface
LoopBack0

127.0.0.1

LoopBack0

127.0.0.1

LoopBack0

100 1

10.0.13.2

GigabitEthernet0/0/0

ht

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

10.0.12.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.13.0/24

Direct

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

so

ce

s:

10.0.3.0/24

ur

Destination/Mask

Routes : 13

tp

Destinations : 13

ea

Routing Tables: Public

Direct

127.0.0.1

InLoopBack0

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

ni

ng

Re

127.0.0.1/32

ar

<R2>display ip routing-table

Le

Route Flags: R - relay, D - download to fib


----------------------------------------------------------------------------

Mo

re

Routing Tables: Public


Destinations : 15

Page68

Routes : 15

HUAWEI TECHNOLOGIES

HC Series

Destination/Mask

Proto

Pre Cost Flags NextHop

Interface

10.0.1.0/24

RIP

100 1

10.0.2.0/24

Direct 0

10.0.2.2/32

10.0.13.1

GigabitEthernet0/0/0

10.0.2.2

LoopBack0

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

aw
ei
.c
om
/e

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct 0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

ea

rn

in

g.

hu

10.0.12.255/32 Direct 0

/l

[R3]display ip routing-table

:/

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

tp

Routing Tables: Public

Pre Cost Flags NextHop

10.0.1.0/24

RIP

100 2

10.0.12.2

GigabitEthernet0/0/1

10.0.2.0/24

RIP

100 1

10.0.12.2

GigabitEthernet0/0/1

10.0.3.0/24

Direct 0

10.0.3.3

LoopBack0

10.0.3.3/32

Direct 0

ur

127.0.0.1

LoopBack0

10.0.3.255/32

Direct 0

127.0.0.1

LoopBack0

Direct 0

10.0.12.3

GigabitEthernet0/0/1

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

100 1

10.0.12.2

GigabitEthernet0/0/1

ce

Re

10.0.12.0/24

s:

Proto

so

Destination/Mask

Routes : 13

ht

Destinations : 13

10.0.12.3/32

Interface

RIP

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

ni

ng

10.0.13.0/24

Le

ar

127.0.0.1/32

Mo

re

Test connectivity from R1 to the IP destination 10.0.12.3 on interface Gigabit


Ethernet 0/0/2 of R3.

HC Series

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

Page69

HCNA-HNTD Module 4 Routing Configuration


<R1>ping 10.0.12.3

aw
ei
.c
om
/e

Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=254 time=74 ms


Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=254 time=75 ms
Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=254 time=75 ms

Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=254 time=75 ms


Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=254 time=75 ms
--- 10.0.12.3 ping statistics --5 packet(s) transmitted

hu

5 packet(s) received
0.00% packet loss

in

g.

round-trip min/avg/max = 74/74/75 ms

rn

The debugging command can be used to view the RIPv2 periodic updates.
<R1>terminal debugging

ea

Info: Current terminal debugging is on.

/l

<R1>debugging rip 1 event


<R1>

:/

Nov 29 2013 10:41:04.490.1+00:00 R1 RIP/7/DBG: 25: 5719: RIP 1: Periodic timer

tp

expired for interface GigabitEthernet0/0/0 (10.0.13.1) and its added to periodic


update queue

ht

<R1>

Nov 29 2013 10:41:04.500.1+00:00 R1 RIP/7/DBG: 25: 6048: RIP 1: Interface

ce

s:

GigabitEthernet0/0/0 (10.0.13.1) is deleted from the periodic update queue


<R1>undo debugging rip 1

ur

<R1>debugging rip 1 packet

so

<R1>

Nov 29 2013 10:43:07.770.1+00:00 R1 RIP/7/DBG: 6: 12776: RIP 1: Sending response

Re

on interface GigabitEthernet0/0/0 from 10.0.13.1 to 224.0.0.9


<R1>

ng

Nov 29 2013 10:43:07.770.2+00:00 R1 RIP/7/DBG: 6: 12796: Packet: Version 2, Cmd

ni

response, Length 24
<R1>

ar

Nov 29 2013 10:43:07.770.3+00:00 R1 RIP/7/DBG: 6: 12864: Dest 10.0.1.0/24, Nexthop

Le

0.0.0.0, Cost 1, Tag 0

Mo

re

<R1>undo debugging rip 1

Page70

PING 10.0.12.3: 56 data bytes, press CTRL_C to break

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Additional Exercises: Analyzing and Verifying


When using RIPv1, a router sends network IDs and other route update
information to its neighbor routers without sending subnet masks. How do
neighbor routers process the route update information and generate the
corresponding subnet masks?
How are RIPv1 and RIPv2 compatible with each other?

hu

Final Configuration

g.

<R1>display current-configuration

in

[V200R003C00SPC200]
#

rn

sysname R1

ea

#
interface GigabitEthernet0/0/0

/l

ip address 10.0.13.1 255.255.255.0


interface GigabitEthernet0/0/1
shutdown
ip address 10.0.12.1 255.255.255.0

ht

tp

:/

interface LoopBack0

s:

ip address 10.0.1.1 255.255.255.0


#

ce

rip 1

ur

version 2
network 10.0.0.0

so

Re

user-interface con 0

authentication-mode password
set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD

ng

(\WTqB}%N,%$%$
#

Mo

re

Le

ar

return

ni

user-interface vty 0 4

HC Series

HUAWEI TECHNOLOGIES

Page71

HCNA-HNTD Module 4 Routing Configuration


<R2>display current-configuration

[V200R003C00SPC200]

aw
ei
.c
om
/e

#
sysname R2
#
interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0

hu

#
interface GigabitEthernet0/0/2

g.

shutdown

in

ip address 10.0.23.2 255.255.255.0


#

rn

interface LoopBack0

ea

ip address 10.0.2.2 255.255.255.0


#

/l

rip 1

:/

version 2
network 10.0.0.0

tp

#
user-interface con 0

ht

authentication-mode password

set authentication password cipher %$%$1=cd%b%/O%Id-8X:by1N,+s}'4wD6TvO<I|/pd#

s:

#44C@+s#,%$%$
user-interface vty 0 4

ce

so

ur

return

Re

<R3>display current-configuration
[V200R003C00SPC200]
#

ng

sysname R3

ni

interface GigabitEthernet0/0/0

ar

shutdown

Le

ip address 10.0.13.3 255.255.255.0


#

interface GigabitEthernet0/0/1

re

ip address 10.0.12.3 255.255.255.0

Mo

Page72

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


interface GigabitEthernet0/0/2

shutdown

aw
ei
.c
om
/e

ip address 10.0.23.3 255.255.255.0


#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
rip 1
version 2
network 10.0.0.0

hu

#
user-interface con 0

g.

authentication-mode password

in

set authentication password cipher %$%$ksXDMg7Ry6yUU:63:DQ),#/sQg"@*S\U#.s.bHW


xQ,y%#/v,%$%$

rn

user-interface vty 0 4

ea

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

return

HC Series

HUAWEI TECHNOLOGIES

Page73

HCNA-HNTD Module 4 Routing Configuration

Learning Objectives

aw
ei
.c
om
/e

Lab 4-3 RIPv2 Route Aggregation and Authentication

As a result of this lab section, you should achieve the following tasks:
Aggregation of routes in RIPv2
Implementation of authentication between RIP peers
Troubleshoot RIP peer authentication failures.

hu

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

Topology

Mo

re

Le

ar

Figure 4.3 RIPv2 route aggregation and authentication topology

Page74

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Scenario
As the network administrator of a small company you are responsible for the
support of a RIPv2 based enterprise network. In order to better manage and
optimize the routing table, route aggregation is required.

hu

Additionally, concerns over the insertion of rogue devices into the network that
may affect routing tables means that RIP authentication is required to protect
the network.

g.

Tasks

rn

in

Step 1 Preparing the environment

/l

ea

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.

:/

Configure the base system information and addressing for R1, R2 and R3 on
the network.

tp

<Huawei>system-view

ht

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


[Huawei]sysname R1

[R1]interface GigabitEthernet 0/0/0

s:

[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24


[R1]interface LoopBack 0

ce

[R1-GigabitEthernet0/0/0]quit

so

ur

[R1-LoopBack0]ip address 10.0.1.1 24


<Huawei>system-view

Re

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


[Huawei]sysname R2

ng

[R2]interface GigabitEthernet 0/0/0


[R2-GigabitEthernet0/0/0]ip address 10.0.13.2 24

ni

[R2-GigabitEthernet0/0/0]quit

ar

[R2]interface GigabitEthernet 0/0/1


[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24

Le

[R2-GigabitEthernet0/0/1]quit
[R2]interface LoopBack 0

Mo

re

[R2-LoopBack0]ip address 10.0.2.2 24

HC Series

HUAWEI TECHNOLOGIES

Page75

HCNA-HNTD Module 4 Routing Configuration


<Huawei>system-view

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

aw
ei
.c
om
/e

[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24
[R3-GigabitEthernet0/0/1]quit
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24

<R1>ping 10.0.13.2
PING 10.0.13.2: 56 data bytes, press CTRL_C to break

g.

hu

After the IP addresses have been configured for the interfaces, test the
network connectivity.

in

Reply from 10.0.13.2: bytes=56 Sequence=1 ttl=255 time=30 ms

rn

Reply from 10.0.13.2: bytes=56 Sequence=2 ttl=255 time=30 ms


Reply from 10.0.13.2: bytes=56 Sequence=3 ttl=255 time=30 ms

ea

Reply from 10.0.13.2: bytes=56 Sequence=4 ttl=255 time=30 ms

tp

5 packet(s) transmitted

:/

--- 10.0.13.2 ping statistics ---

/l

Reply from 10.0.13.2: bytes=56 Sequence=5 ttl=255 time=30 ms

5 packet(s) received

ht

0.00% packet loss

s:

round-trip min/avg/max = 30/30/30 ms


<R2>ping 10.0.12.3

ce

PING 10.0.12.3: 56 data bytes, press CTRL_C to break


Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=255 time=31 ms

ur

Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=255 time=31 ms

so

Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=255 time=41 ms


Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=255 time=31 ms

Re

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

ng

--- 10.0.12.3 ping statistics --5 packet(s) transmitted

ni

5 packet(s) received

ar

0.00% packet loss

Mo

re

Le

round-trip min/avg/max = 31/35/41 ms

Page76

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

Configure RIPv2 on R1, R2, and R3.

[R1]rip 1

aw
ei
.c
om
/e

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

hu

[R3]rip 1
[R3-rip-1]version 2

in

g.

[R3-rip-1]network 10.0.0.0

rn

Step 2 Configuration of additional loopback addresses

ea

Establish additional loopback interfaces to represent multiple networks on R3.

/l

[R3-LoopBack0]interface LoopBack 2
[R3-LoopBack2]interface LoopBack 3
[R3-LoopBack3]interface LoopBack 4

tp

[R3-LoopBack3]ip address 172.16.1.1 24

:/

[R3-LoopBack2]ip address 172.16.0.1 24

ht

[R3-LoopBack4]ip address 172.16.2.1 24


[R3-LoopBack4]interface LoopBack 5

ce

s:

[R3-LoopBack5]ip address 172.16.3.1 24

ur

Step 3 Advertize the loopback addresses in RIP.

Re

so

The networks for the configured loopback interfaces need to be advertized.


Advertise the 172.16.0.0 network range on R3.
[R3]rip

ni

ng

[R3-rip-1]network 172.16.0.0

View the routing table of R1 to verify the new networks are being advertized.

ar

<R1>display ip routing-table

Le

Route Flags: R - relay, D - download to fib


---------------------------------------------------------------------------Destinations : 17

Routes : 17

Mo

re

Routing Tables: Public

HC Series

HUAWEI TECHNOLOGIES

Page77

HCNA-HNTD Module 4 Routing Configuration


Proto

Pre Cost Flags NextHop

Interface

Direct 0

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

10.0.1.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.3.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

10.0.12.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.13.0/24

Direct 0

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

aw
ei
.c
om
/e

10.0.1.0/24

127.0.0.1

GigabitEthernet0/0/0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

in

g.

hu

Direct 0

10.0.13.255/32 Direct 0

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

172.16.1.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

172.16.2.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

172.16.3.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

127.0.0.1

InLoopBack0

ea

/l

:/

rn

172.16.0.0/24

255.255.255.255/32 Direct 0

ht

tp

The information in grey shows that R1 has learned specific routes but not
aggregated routes.
Test network connectivity from R1 to the 172.16.0.0 network range.

s:

<R1>ping 172.16.0.1

PING 172.16.0.1: 56 data bytes, press CTRL_C to break

ce

Reply from 172.16.0.1: bytes=56 Sequence=1 ttl=254 time=80 ms

ur

Reply from 172.16.0.1: bytes=56 Sequence=2 ttl=254 time=79 ms


Reply from 172.16.0.1: bytes=56 Sequence=3 ttl=254 time=79 ms

so

Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=254 time=79 ms

Re

Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=254 time=79 ms


--- 172.16.0.1 ping statistics ---

ng

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

ni

0.00% packet loss

Mo

re

Le

ar

round-trip min/avg/max = 79/79/80 ms

Page78

HUAWEI TECHNOLOGIES

Destination/Mask

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Step 4 Configure RIP manual route aggregation on R2.


Run the rip summary-address command on S1/0/0 of R2 to configure RIP
route aggregation. The four routes (172.16.0.0/24, 172.16.1.0/24,
172.16.2.0/24, and 172.16.3.0/24) are to be aggregated into one route,
172.16.0.0/16.
[R2]interface GigabitEthernet0/0/0

hu

[R2-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.0.0

View the routing table of R1 that should now include an aggregated route.

g.

<R1>display ip routing-table

in

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Pre Cost Flags NextHop


0

10.0.1.1/32

Direct 0

10.0.1.255/32

Direct 0

10.0.2.0/24

RIP

100 1

10.0.3.0/24

RIP

100 2

10.0.12.0/24

RIP

100 1

10.0.13.0/24

Direct 0

10.0.13.1/32

Interface

10.0.1.1

LoopBack0

127.0.0.1

LoopBack0

127.0.0.1

LoopBack0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.1

GigabitEthernet0/0/0

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

ce

127.0.0.1

GigabitEthernet0/0/0

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

100 2

10.0.13.2

GigabitEthernet0/0/0

127.0.0.1

InLoopBack0

Re

so

127.0.0.0/8

ur

tp

Direct 0

s:

10.0.1.0/24

:/

/l

Proto

ht

Destination/Mask

Routes : 14

ea

Destinations : 14

rn

Routing Tables: Public

172.16.0.0/16

RIP

ng

255.255.255.255/32 Direct 0

Mo

re

Le

ar

ni

The highlighted information shows the aggregated route. There is now no


specific route is listed in the routing table.

HC Series

HUAWEI TECHNOLOGIES

Page79

HCNA-HNTD Module 4 Routing Configuration

Verify that the routes are still supported for the 172.16.0.0 network range.

<R1>ping 172.16.0.1

aw
ei
.c
om
/e

PING 172.16.0.1: 56 data bytes, press CTRL_C to break

Reply from 172.16.0.1: bytes=56 Sequence=1 ttl=254 time=60 ms


Reply from 172.16.0.1: bytes=56 Sequence=2 ttl=254 time=59 ms
Reply from 172.16.0.1: bytes=56 Sequence=3 ttl=254 time=80 ms
Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=254 time=60 ms

Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=254 time=60 ms

hu

--- 172.16.0.1 ping statistics --5 packet(s) transmitted

g.

5 packet(s) received
0.00% packet loss

rn

in

round-trip min/avg/max = 59/63/80 ms

/l

ea

The preceding information shows that route aggregation reduces the size of
the routing table without affecting communication to aggregated networks.

tp

:/

Step 5 Configure RIP authentication.

ht

Configure plain text authentication between R1 and R2 and MD5 based


authentication between R2 and R3. The authentication password in all cases
should be huawei.

s:

[R1]interface GigabitEthernet0/0/0

ce

[R1-GigabitEthernet0/0/0]rip authentication-mode simple huawei

ur

[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]rip authentication-mode simple huawei

so

[R2-GigabitEthernet0/0/0]quit

Re

[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 usual huawei

ng

[R3]interface GigabitEthernet0/0/1

Mo

re

Le

ar

ni

[R3-GigabitEthernet0/0/1]rip authentication-mode md5 usual huawei

Page80

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

After the configuration is complete, verify that the routes are not affected.

<R1>display ip routing-table

aw
ei
.c
om
/e

Route Flags: R - relay, D - download to fib

---------------------------------------------------------------------------Routing Tables: Public


Destinations : 14
Destination/Mask

Proto

Routes : 14
Pre Cost Flags NextHop

Interface

Direct 0

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

10.0.1.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.3.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

10.0.12.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.13.0/24

Direct 0

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1/32

Direct 0

127.255.255.255/32 Direct 0

100 2

255.255.255.255/32 Direct 0

g.

in

rn

ea

/l

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

:/

InLoopBack0

10.0.13.2

GigabitEthernet0/0/0

127.0.0.1

InLoopBack0

s:

<R2>display ip routing-table

127.0.0.1

tp

RIP

ht

172.16.0.0/16

hu

10.0.1.0/24

Route Flags: R - relay, D - download to fib


Routing Tables: Public

ce

----------------------------------------------------------------------------

Proto

Pre Cost Flags NextHop

Interface

100 1

RIP

10.0.13.1

GigabitEthernet0/0/0

10.0.2.0/24

Direct 0

10.0.2.2

LoopBack0

10.0.2.2/32

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/1

Le

ni

ng

10.0.1.0/24

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct 0

10.0.13.2

GigabitEthernet0/0/0

10.0.13.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

Mo

re

Routes : 19

ar

Re

Destination/Mask

so

ur

Destinations : 19

HC Series

HUAWEI TECHNOLOGIES

Page81

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

aw
ei
.c
om
/e

10.0.13.255/32 Direct 0

172.16.0.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.1.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.2.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

hu

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

g.

----------------------------------------------------------------------------

Pre Cost Flags NextHop

10.0.1.0/24

RIP

100 2

10.0.12.2

GigabitEthernet0/0/1

10.0.2.0/24

RIP

100 1

10.0.12.2

GigabitEthernet0/0/1

10.0.3.0/24

Direct

10.0.3.3

LoopBack0

10.0.3.3/32

Direct

10.0.3.255/32

Direct

10.0.12.0/24

Direct

10.0.12.3/32

Direct

10.0.12.255/32 Direct

10.0.13.0/24

ea

/l

127.0.0.1

LoopBack0

127.0.0.1

LoopBack0

10.0.12.3

GigabitEthernet0/0/1

127.0.0.1

GigabitEthernet0/0/1

127.0.0.1

GigabitEthernet0/0/1

RIP

100 1

10.0.12.2

GigabitEthernet0/0/1

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

ce

s:

ht

tp

Direct

172.16.0.1 LoopBack2

172.16.0.1/32

Direct

127.0.0.1

LoopBack2

172.16.0.255/32 Direct

127.0.0.1

LoopBack2

172.16.1.0/24

Direct

172.16.1.1 LoopBack3

172.16.1.1/32

Direct

127.0.0.1

LoopBack3

172.16.1.255/32 Direct

127.0.0.1

LoopBack3

172.16.2.0/24

Direct

172.16.2.1 LoopBack4

127.0.0.1

LoopBack4

172.16.2.255/32 Direct

127.0.0.1

LoopBack4

172.16.3.1 LoopBack5

ni

Direct

ar

ng

Re

so

172.16.0.0/24

172.16.3.0/24

Direct

172.16.3.1/32

Direct

127.0.0.1

LoopBack5

172.16.3.255/32 Direct

127.0.0.1

LoopBack5

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

re

Le

172.16.2.1/32

Mo

Interface

rn

Proto

ur

Destination/Mask

Routes : 25

:/

Destinations : 25

in

Routing Tables: Public

Page82

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Step 6 Generate and rectify RIPv2 authentication faults.


Change the authentication password on G0/0/0 of R2 to huawei2.
[R2]interface GigabitEthernet0/0/0

[R2-GigabitEthernet0/0/0]rip authentication-mode simple huawei2

View the routing table of R1.


<R1>display ip routing-table

hu

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

in

Proto

Pre Cost

Flags NextHop

rn

Destination/Mask

Routes : 10

ea

Destinations : 10

g.

Routing Tables: Public

Interface

Direct 0

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

10.0.1.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.13.0/24

Direct 0

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.0/8

Direct 0

127.0.0.1/32

Direct 0

:/

/l

10.0.1.0/24

tp

127.0.0.1

GigabitEthernet0/0/0

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

ce

s:

ht

so

ur

Since R1 and R2 use different RIP authentication passwords, R1 will not


receive any advertised RIP routes from R2.

Re

Restore the authentication password on G0/0/0 of R2 to huawei.


[R2]interface GigabitEthernet0/0/0

ng

[R2- GigabitEthernet0/0/0]rip authentication-mode simple huawei

ni

Change the authentication mode on G0/0/1 of R2 to plain text authentication.

ar

[R2]interface GigabitEthernet0/0/1

Le

[R2-GigabitEthernet0/0/1]rip authentication-mode simple huawei

Mo

re

Run the following command to delete the routes learned by R3 from R2 before
you change the authentication password.
View the routing table of R3.
HC Series

HUAWEI TECHNOLOGIES

Page83

HCNA-HNTD Module 4 Routing Configuration

<R3>display ip routing-table

aw
ei
.c
om
/e

Route Flags: R - relay, D - download to fib


---------------------------------------------------------------------------Routing Tables: Public
Destinations : 22

Pre Cost Flags NextHop

10.0.3.0/24

Direct

10.0.3.3

LoopBack0

10.0.3.3/32

Direct

127.0.0.1

LoopBack0

10.0.3.255/32

Direct

127.0.0.1

LoopBack0

10.0.12.0/24

Direct

10.0.12.3

GigabitEthernet0/0/1

10.0.12.3/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct

127.0.0.1

GigabitEthernet0/0/1

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

172.16.0.1 LoopBack2

172.16.0.1/32

g.

in

rn

ea

Direct
Direct

172.16.0.255/32 Direct

172.16.1.0/24

Direct

:/

172.16.0.0/24

Interface

hu

Proto

/l

Destination/Mask

Routes : 22

127.0.0.1

172.16.1.1/32

Direct

172.16.1.255/32 Direct

172.16.2.0/24

Direct

172.16.2.1/32

Direct

InLoopBack0
LoopBack2

127.0.0.1

172.16.1.1 LoopBack3

127.0.0.1

LoopBack3

127.0.0.1

LoopBack3

172.16.2.1 LoopBack4

127.0.0.1

LoopBack4

172.16.2.255/32 Direct

127.0.0.1

LoopBack4

172.16.3.0/24

Direct

172.16.3.1 LoopBack5

172.16.3.1/32

Direct

127.0.0.1

ht

s:

ce

ur

tp

LoopBack2

LoopBack5

127.0.0.1

LoopBack5

127.0.0.1

InLoopBack0

Re

so

172.16.3.255/32 Direct
255.255.255.255/32 Direct

ng

Since R2 and R3 use different RIP authentication modes, R3 cannot receive


any advertised RIP routes from R2.

ni

Restore the authentication mode on G0/0/1 of R2 to MD5.


[R2]interface GigabitEthernet0/0/1

Le

ar

[R2-GigabitEthernet0/0/1]rip authentication-mode md5 usual huawei

re

Verify that routes in routing tables of R1, R2, and R3 have been restored. Note
that RIP updates routes periodically, so may take a moment to be restored.

Mo

<R1>display ip routing-table

Page84

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


Route Flags: R - relay, D - download to fib

---------------------------------------------------------------------------Destinations : 14
Destination/Mask

Proto

aw
ei
.c
om
/e

Routing Tables: Public


Routes : 14
Pre Cost Flags NextHop

Interface

10.0.1.0/24

Direct 0

10.0.1.1

LoopBack0

10.0.1.1/32

Direct 0

127.0.0.1

LoopBack0

Direct 0

127.0.0.1

LoopBack0

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.3.0/24

RIP

100 2

10.0.13.2

GigabitEthernet0/0/0

10.0.12.0/24

RIP

100 1

10.0.13.2

GigabitEthernet0/0/0

10.0.13.0/24

Direct 0

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

g.

in

rn

ea

/l

100 2

10.0.13.2

:/

RIP

127.0.0.1

GigabitEthernet0/0/0
InLoopBack0

tp

172.16.0.0/16

255.255.255.255/32 Direct 0

hu

10.0.1.255/32
10.0.2.0/24

[R2]display ip routing-table

ht

Route Flags: R - relay, D - download to fib


Routing Tables: Public

RIP

100 1

Direct 0

Re

10.0.2.0/24

Pre Cost Flags NextHop

ur

10.0.1.0/24

Proto

so

Destination/Mask

Routes : 19

ce

Destinations : 19

s:

----------------------------------------------------------------------------

10.0.13.1

GigabitEthernet0/0/0

10.0.2.2

LoopBack0

Direct 0

127.0.0.1

LoopBack0

10.0.2.255/32

Direct 0

127.0.0.1

LoopBack0

10.0.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

10.0.13.2

GigabitEthernet0/0/0

ni

ng

10.0.2.2/32

Direct 0

10.0.13.2/32

Direct 0

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct 0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct 0

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct 0

127.0.0.1

InLoopBack0

Le

ar

10.0.12.2/32

Mo

re

Interface

HC Series

HUAWEI TECHNOLOGIES

Page85

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.1.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.2.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

172.16.3.0/24

RIP

100 1

10.0.12.3

GigabitEthernet0/0/1

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

aw
ei
.c
om
/e

172.16.0.0/24

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

----------------------------------------------------------------------------

Pre Cost Flags NextHop

Interface

10.0.1.0/24

RIP

100 2

10.0.12.2

GigabitEthernet0/0/1

10.0.2.0/24

RIP

100 1

10.0.12.2

GigabitEthernet0/0/1

10.0.3.0/24

Direct

10.0.3.3

LoopBack0

10.0.3.3/32

Direct

127.0.0.1

LoopBack0

10.0.3.255/32

Direct

127.0.0.1

LoopBack0

10.0.12.0/24

Direct

10.0.12.3

GigabitEthernet0/0/1

10.0.12.3/32

Direct

10.0.12.255/32 Direct

10.0.13.0/24

RIP

100 1

127.0.0.0/8

Direct

127.0.0.1/32

Direct

127.255.255.255/32 Direct

/l

ea

rn

in

g.

Proto

:/

Routes : 25

127.0.0.1

GigabitEthernet0/0/1

127.0.0.1

GigabitEthernet0/0/1

10.0.12.2

GigabitEthernet0/0/1

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

s:

ht

tp

Direct

172.16.0.1 LoopBack2

172.16.0.1/32

Direct

127.0.0.1

LoopBack2

172.16.0.255/32 Direct

127.0.0.1

LoopBack2

ce

172.16.0.0/24

ur

Destination/Mask

hu

Routing Tables: Public


Destinations : 25

172.16.1.1 LoopBack3

Direct

127.0.0.1

LoopBack3

172.16.1.255/32 Direct

127.0.0.1

LoopBack3

172.16.2.0/24

Direct

172.16.2.1 LoopBack4

172.16.2.1/32

Direct

127.0.0.1

LoopBack4

172.16.2.255/32 Direct

127.0.0.1

LoopBack4

172.16.3.0/24

Direct

172.16.3.1 LoopBack5

Direct

127.0.0.1

LoopBack5

172.16.3.255/32 Direct

127.0.0.1

LoopBack5

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

ng

Re

so

Direct

172.16.1.1/32

ni

172.16.1.0/24

Mo

re

Le

ar

172.16.3.1/32

Page86

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Final Configuration
<R1>display current-configuration
[V200R003C00SPC200]
#
sysname R1
#
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0

hu

rip authentication-mode simple cipher %$%$S2AJ2_mJ)Hf++RSng6^NN|Xl%$%$


#

g.

interface LoopBack0

in

ip address 10.0.1.1 255.255.255.0


#

rn

rip 1
version 2

ea

network 10.0.0.0

/l

#
user-interface con 0

:/

authentication-mode password

tp

set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD


(\WTqB}%N,%$%$

ht

user-interface vty 0 4
#

s:

return

ce

<R2>display current-configuration

ur

[V200R003C00SPC200]
#

so

sysname R2

Re

interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0

ng

rip authentication-mode simple cipher %$%$+Ob&JcQxU6mUJ(ZXLZY#OEXz%$%$


#

ni

rip summary-address 172.16.0.0 255.255.0.0

ar

interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0

Le

rip authentication-mode md5 usual cipher %$%$C]'$.`NWGZ}|gLV%:XF>OG}|%$%$

re

interface LoopBack0

Mo

ip address 10.0.2.2 255.255.255.0

HC Series

HUAWEI TECHNOLOGIES

Page87

HCNA-HNTD Module 4 Routing Configuration


#

rip 1

aw
ei
.c
om
/e

version 2
network 10.0.0.0
#
user-interface con 0
authentication-mode password

set authentication password cipher %$%$1=cd%b%/O%Id-8X:by1N,+s}'4wD6TvO<I|/pd#


#44C@+s#,%$%$
user-interface vty 0 4

hu

in

g.

return

<R3>display current-configuration

rn

[V200R003C00SPC200]

ea

#
sysname R3

/l

:/

interface GigabitEthernet0/0/1
ip address 10.0.12.3 255.255.255.0

tp

rip authentication-mode md5 usual cipher %$%$_5VL+wN6FNe]rVKbh[E(O=E>%$%$


#

ht

interface LoopBack0

ip address 10.0.3.3 255.255.255.0

s:

#
interface LoopBack2

ce

ip address 172.16.0.1 255.255.255.0


interface LoopBack3

ur

so

ip address 172.16.1.1 255.255.255.0

Re

interface LoopBack4

ip address 172.16.2.1 255.255.255.0

ng

ni

interface LoopBack5
ip address 172.16.3.1 255.255.255.0

ar

Le

rip 1

version 2
network 10.0.0.0

re

network 172.16.0.0

Mo

Page88

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


user-interface con 0

aw
ei
.c
om
/e

set authentication password cipher %$%$ksXDMg7Ry6yUU:63:DQ),#/sQg"@*S\U#.s.bHW


xQ,y%#/v,%$%$
user-interface vty 0 4
#

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

g.

hu

return

HC Series

authentication-mode password

HUAWEI TECHNOLOGIES

Page89

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Lab 4-4 OSPF Single-Area Configuration


Learning Objectives

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

in

g.

hu

Configuration of the Router-ID for OSPF.


Establish OSPF on a specified interface or network.
View OSPF operations using display commands.
Advertisement of default routes in OSPF.
Change of the OSPF hello interval and dead interval.
Familiarization with DR or BDR election on multi-access networks.
Change of the OSPF route priority to manipulate DR election.

rn

Figure 4.4 OSPF single area topology

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

Topology

Page90

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Scenario
As the network administrator of an establishing small enterprise, it is required
that a network be implemented using OSPF. Then network is to support a
single area and with consideration for future expansion it is requested that this
area be set as area 0. OSPF is required to advertise default routes and also
elect both a DR and BDR for network resiliency.

hu

Tasks

in

g.

Step 1 Prepare the environment

ea

rn

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.

/l

Establish the basic system configuration and addressing for the lab.
<Huawei>system-view

:/

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


[R1]interface GigabitEthernet 0/0/1

tp

[Huawei]sysname R1

ht

[R1-GigabitEthernet 0/0/1]ip address 10.0.12.1 24


[R1-GigabitEthernet 0/0/1]quit

s:

[R1]interface GigabitEthernet 0/0/0


[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24

ur

[R1]interface LoopBack 0

ce

[R1-GigabitEthernet0/0/0]quit

so

[R1-LoopBack0]ip address 10.0.1.1 24

Re

<Huawei>system-view

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


[Huawei]sysname R2

ng

[R2]interface GigabitEthernet 0/0/1

ni

[R2-GigabitEthernet 0/0/1]ip address 10.0.12.2 24


[R2-GigabitEthernet 0/0/1]quit

ar

[R2]interface LoopBack 0

Mo

re

Le

[R2-LoopBack0]ip address 10.0.2.2 24

HC Series

HUAWEI TECHNOLOGIES

Page91

HCNA-HNTD Module 4 Routing Configuration


<Huawei>system-view

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

aw
ei
.c
om
/e

[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.0.13.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24
[R3-LoopBack0]quit
[R3]interface LoopBack 2

in

Step 2 Clean up the previous configuration.

g.

hu

[R3-LoopBack2]ip address 172.16.0.1 24

ea

rn

Enable the interfaces necessary for this lab and disable those not needed.
[R1]interface GigabitEthernet 0/0/1

/l

[R1-GigabitEthernet0/0/1]undo shutdown

:/

[R1-GigabitEthernet0/0/1]quit

tp

[R2]interface GigabitEthernet 0/0/0

[R2-GigabitEthernet0/0/0]undo rip summary-address 172.16.0.0 255.255.0.0

ht

[R2-GigabitEthernet0/0/0]shutdown

s:

[R3]interface GigabitEthernet 0/0/0


[R3-GigabitEthernet0/0/0]undo shutdown

ce

[R3-GigabitEthernet0/0/0]quit

ur

[R3]interface GigabitEthernet 0/0/1


[R3-GigabitEthernet0/0/1]shutdown

so

[R3-GigabitEthernet0/0/1]quit

Re

[R3]undo interface LoopBack 3


Info: This operation may take a few seconds. Please wait for a moment...succeeded.
[R3]undo interface LoopBack 4

ng

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

ni

[R3]undo interface LoopBack 5

ar

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

Le

Remove the configured RIP authentication and RIP 1 process.


[R1]interface GigabitEthernet 0/0/0

re

[R1-GigabitEthernet0/0/0]undo rip authentication-mode

Mo

[R1-GigabitEthernet0/0/0]quit

Page92

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


[R1]undo rip 1

aw
ei
.c
om
/e

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


[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]undo rip authentication-mode
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]undo rip authentication-mode
[R2-GigabitEthernet0/0/1]quit

[R3]interface GigabitEthernet 0/0/1

in

[R3-GigabitEthernet0/0/1]undo rip authentication-mode

g.

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

hu

[R2]undo rip 1

[R3-GigabitEthernet0/0/1]quit

rn

[R3]undo rip 1

/l

ea

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

:/

Step 3 Configure OSPF.

ht

tp

Assign the value 10.0.1.1 (as used on logical interface loopback 0 for simplicity)
as the router ID. Use OSPF process 1 (the default process), and specify
network segments 10.0.1.0/24, 10.0.12.0/24, and 10.0.13.0/24 as part of
OSPF area 0.

s:

[R1]ospf 1 router-id 10.0.1.1

ce

[R1-ospf-1]area 0

[R1-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255

ur

[R1-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255

so

[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255

ng

Re

Different process IDs will generate multiple link state databases, therefore
ensure that all routers use the same OSPF process ID. The wildcard mask
must be specified as part of the network command.

ar

ni

Manually assign the value 10.0.2.2 as the router ID. Use OSPF process 1, and
advertise network segments 10.0.12.0/24 and 10.0.2.0/24 into OSPF area 0.
[R2]ospf 1 router-id 10.0.2.2

Le

[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.2.0 0.0.0.255

Mo

re

[R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255

HC Series

HUAWEI TECHNOLOGIES

Page93

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

output omitted
Nov 30 2013 09:41:39+00:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes event:
neighbor status changed. (ProcessId=1, NeighborAddress=10.0.12.1,

NeighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

hu

Adjacency is attained when NeighborCurrentState=Full. For R3, Manually


assign the value 10.0.3.3 as the router ID. Use OSPF process 1, and advertise
network segments 10.0.3.0/24 and 10.0.13.0/24 into OSPF area 0.
[R3]ospf 1 router-id 10.0.3.3

g.

[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255

rn

output omitted

in

[R3-ospf-1-area-0.0.0.0]network 10.0.3.0 0.0.0.255

Nov 30 2013 16:05:34+00:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes event:

ea

neighbor status changed. (ProcessId=1, NeighborAddress=10.0.13.1,

:/

/l

NeighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

tp

Step 4 Verify the OSPF configuration.

ht

After OSPF route convergence is complete, view routing tables of R1, R2, and
R3.

s:

<R1>display ip routing-table

Route Flags: R - relay, D - download to fib

ur

Routing Tables: Public

ce

----------------------------------------------------------------------------

Proto

Pre Cost Flags NextHop

Interface

Direct

10.0.1.1

LoopBack0

10.0.1.1/32

Direct

127.0.0.1

LoopBack0

10.0.1.255/32

Direct

127.0.0.1

LoopBack0

10.0.2.2/32

OSPF

10

10.0.12.2

GigabitEthernet0/0/1

10.0.3.3/32

OSPF

10

10.0.13.3

GigabitEthernet0/0/0

10.0.12.0/24

Direct

10.0.12.1

GigabitEthernet0/0/1

10.0.12.1/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct

127.0.0.1

GigabitEthernet0/0/0

ni

ng

10.0.1.0/24

Le
re
Mo

Routes : 15

ar

Re

Destination/Mask

so

Destinations : 15

Page94

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


0

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

aw
ei
.c
om
/e

10.0.13.255/32 Direct

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

---------------------------------------------------------------------------Routing Tables: Public

Cost

Interface

10.0.1.1/32

OSPF

10

10.0.12.1

10.0.2.0/24

Direct

10.0.2.2

10.0.2.2/32

Direct

127.0.0.1

10.0.2.255/32

Direct

127.0.0.1

LoopBack0

10.0.3.3/32

OSPF

10

10.0.12.1

GigabitEthernet0/0/1

10.0.12.0/24

Direct 0

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct 0

10.0.12.255/32 Direct 0

10.0.13.0/24

OSPF

127.0.0.0/8

Direct 0

127.0.0.1/32

Direct 0

in

Flags NextHop

hu

Pre

g.

Proto

GigabitEthernet0/0/1
LoopBack0

rn

ea

/l

Destination/Mask

Routes : 13

:/

Destinations : 13

LoopBack0

127.0.0.1

GigabitEthernet0/0/1

127.0.0.1

GigabitEthernet0/0/1

10.0.12.1

GigabitEthernet0/0/1

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct 0

127.0.0.1

InLoopBack0

ht

ce

s:

10

tp

ur

<R3>display ip routing-table

Route Flags: R - relay, D - download to fib

so

----------------------------------------------------------------------------

Re

Routing Tables: Public

Proto

Pre Cost Flags NextHop

Interface

10.0.1.1/32

OSPF

10

10.0.13.1

GigabitEthernet0/0/0

10.0.2.2/32

OSPF

10

10.0.13.1

GigabitEthernet0/0/0

10.0.3.0/24

Direct

10.0.3.3

LoopBack0

10.0.3.3/32

Direct

127.0.0.1

LoopBack0

10.0.3.255/32

Direct

127.0.0.1

LoopBack0

10.0.12.0/24

OSPF

10

10.0.13.1

GigabitEthernet0/0/0

10.0.13.0/24

Direct

10.0.13.3

GigabitEthernet0/0/0

Mo

re

Le

ni

ng

Destination/Mask

Routes : 16

ar

Destinations : 16

HC Series

HUAWEI TECHNOLOGIES

Page95

Direct

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

aw
ei
.c
om
/e

10.0.13.3/32

Direct

172.16.0.1 LoopBack2

172.16.0.1/32

Direct

127.0.0.1

LoopBack2

172.16.0.255/32 Direct

127.0.0.1

LoopBack2

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

hu

172.16.0.0/24

g.

Test network connectivity between R2 and R1 at 10.0.1.1 and between R2 and


R3 at 10.0.3.3.

in

<R2>ping 10.0.1.1

PING 10.0.1.1: 56 data bytes, press CTRL_C to break

rn

Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=37 ms

ea

Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=255 time=42 ms


Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=255 time=42 ms

/l

Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=255 time=45 ms

:/

Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=255 time=42 ms

tp

--- 10.0.1.1 ping statistics --5 packet(s) transmitted

ht

5 packet(s) received
0.00% packet loss

ce

s:

round-trip min/avg/max = 37/41/45 ms


<R2>ping 10.0.3.3

ur

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

so

Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=42 ms

Re

Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=254 time=42 ms


Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=254 time=42 ms

ng

Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=254 time=42 ms

ni

--- 10.0.3.3 ping statistics --5 packet(s) transmitted

ar

5 packet(s) received

Le

0.00% packet loss

Mo

re

round-trip min/avg/max = 37/41/42 ms

Page96

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 4 Routing Configuration

HC Series

HCNA-HNTD Module 4 Routing Configuration

Run the display ospf peer command to view the OSPF neighbor status.

aw
ei
.c
om
/e

<R1>display ospf peer


OSPF Process 1 with Router ID 10.0.1.1
Neighbors

Area 0.0.0.0 interface 10.0.12.1(GigabitEthernet0/0/1)'s neighbors


Router ID: 10.0.2.2

Address: 10.0.12.2

State: Full Mode:Nbr is Master Priority: 1

hu

DR: 10.0.12.1 BDR: 10.0.12.2 MTU: 0


Dead timer due in 32 sec

g.

Retrans timer interval: 5


Neighbor is up for 00:47:59

rn

in

Authentication Sequence: [ 0 ]

ea

Neighbors

/l

Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)'s neighbors


Router ID: 10.0.3.3

Address: 10.0.13.3

:/

State: Full Mode:Nbr is Master Priority: 1

tp

DR: 10.0.13.1 BDR: 10.0.13.3 MTU: 0


Dead timer due in 34 sec

ht

Retrans timer interval: 5


Neighbor is up for 00:41:44

s:

Authentication Sequence: [ 0 ]

so

ur

ce

The display ospf peer command displays detailed information about any
peering neighbors. In the example given, the link 10.0.13.1 of R1 shows to be
the DR. The DR election is non pre-emptive, meaning that the link of R3 will
not take over the role of DR from R1 unless the OSPF process is reset.

Re

The display ospf peer brief command can also be used to display a
condensed version of the OSPF peer information.

ng

<R1>display ospf peer brief

ar

ni

OSPF Process 1 with Router ID 10.0.1.1


Peer Statistic Information

Area Id

Interface

0.0.0.0

GigabitEthernet0/0/0

10.0.3.3

Full

0.0.0.0

GigabitEthernet0/0/1

10.0.2.2

Full

re

Le

---------------------------------------------------------------------------Neighbor id

State

Mo

----------------------------------------------------------------------------

HC Series

HUAWEI TECHNOLOGIES

Page97

HCNA-HNTD Module 4 Routing Configuration

<R2>display ospf peer brief

aw
ei
.c
om
/e

OSPF Process 1 with Router ID 10.0.2.2


Peer Statistic Information

---------------------------------------------------------------------------Area Id

Interface

0.0.0.0

Neighbor id

GigabitEthernet0/0/1

State

10.0.1.1

Full

---------------------------------------------------------------------------<R3>display ospf peer brief

hu

OSPF Process 1 with Router ID 10.0.3.3


Peer Statistic Information

g.

---------------------------------------------------------------------------Interface

Neighbor id

0.0.0.0

GigabitEthernet0/0/0

in

Area Id

10.0.1.1

State
Full

rn

----------------------------------------------------------------------------

/l

ea

Step 5 Change the OSPF hello interval and dead interval.

:/

Run the display ospf interface GigabitEthernet 0/0/0 command on R1 to


view the default OSPF hello interval and dead interval.

ht

tp

<R1>display ospf interface GigabitEthernet 0/0/0


OSPF Process 1 with Router ID 10.0.1.1

ce

s:

Interfaces

Interface: 10.0.13.1 (GigabitEthernet0/0/0)


State: DR

ur

Cost: 1

MTU: 1500

so

Priority: 1

Type: Broadcast

Designated Router: 10.0.13.1

Re

Backup Designated Router: 10.0.13.3

ng

Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

ni

Run the ospf timer command to change the OSPF hello interval and dead
interval on GE0/0/0 of R1 to 15s and 60s respectively.

ar

[R1]interface GigabitEthernet 0/0/0

Le

[R1-GigabitEthernet0/0/0]ospf timer hello 15


[R1-GigabitEthernet0/0/0]ospf timer dead 60
Nov 30 2013 16:58:39+00:00 R1 %%01OSPF/3/NBR_DOWN_REASON(l)[1]:Neighbor state

re

leaves full or changed to Down. (ProcessId=1, NeighborRouterId=10.0.3.3,

Mo

NeighborAreaId=0,

Page98

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


NeighborInterface=GigabitEthernet0/0/0,NeighborDownImmediate reason=Neighbor

Down Due to Inactivity, NeighborDownPrimeReason=Interface Parameter Mismatch,

aw
ei
.c
om
/e

NeighborChangeTime=2013-11-30 16:58:39)
<R1>display ospf interface GigabitEthernet 0/0/0
OSPF Process 1 with Router ID 10.0.1.1

Interface: 10.0.13.1 (GigabitEthernet0/0/0)


Cost: 1

State: DR

Type: Broadcast

MTU: 1500

g.

Priority: 1

hu

Interfaces

in

Designated Router: 10.0.13.1


Backup Designated Router: 10.0.13.3

ea

rn

Timers: Hello 15 , Dead 60 , Poll 120 , Retransmit 5 , Transmit Delay 1

/l

Check the OSPF neighbor status on R1.

:/

<R1>display ospf peer brief

tp

OSPF Process 1 with Router ID 10.0.1.1


Peer Statistic Information
Area Id

ht

---------------------------------------------------------------------------Interface

GigabitEthernet0/0/1

10.0.2.2

State
Full

s:

0.0.0.0

Neighbor id

ce

----------------------------------------------------------------------------

so

ur

The preceding information shows that R1 has only one neighbor, R2. Since the
OSPF hello intervals and dead intervals on R1 and R3 are different, R1 and R3
will fail to establish an OSPF neighbor relationship.

Re

Run the ospf timer command to change the OSPF hello interval and dead
interval on GE0/0/0 of R3 to 15s and 60s respectively.

ng

[R3]interface GigabitEthernet 0/0/0


[R3-GigabitEthernet0/0/0]ospf timer hello 15

ni

[R3-GigabitEthernet0/0/0]ospf timer dead 60

ar

output omitted
Nov 30 2013 17:03:33+00:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes

Le

event: neighbor status changed. (ProcessId=1, NeighborAddress=10.0.13.1,


NeighborEvent=LoadingDone, NeighborPreviousState=Loading,

Mo

re

NeighborCurrentState=Full)

HC Series

HUAWEI TECHNOLOGIES

Page99

HCNA-HNTD Module 4 Routing Configuration

<R3>display ospf interface GigabitEthernet 0/0/0

aw
ei
.c
om
/e

OSPF Process 1 with Router ID 10.0.3.3


Interfaces
Interface: 10.0.13.3 (GigabitEthernet0/0/0)
Cost: 1

State: DR

Type: Broadcast

MTU: 1500

Priority: 1
Designated Router: 10.0.13.3
Backup Designated Router: 10.0.13.1

g.

hu

Timers: Hello 15 , Dead 60 , Poll 120 , Retransmit 5 , Transmit Delay 1

in

Check the OSPF neighbor status on R1 again.


OSPF Process 1 with Router ID 10.0.1.1

ea

Peer Statistic Information

rn

<R1>display ospf peer brief

---------------------------------------------------------------------------Neighbor id

0.0.0.0

GigabitEthernet0/0/0

0.0.0.0

GigabitEthernet0/0/1

/l

Interface

:/

Area Id

State

10.0.3.3

Full

10.0.2.2

Full

ht

tp

----------------------------------------------------------------------------

s:

Step 6 Advertise default routes in OSPF.

ce

Configure OSPF to advertise default routes on R3.


[R3]ip route-static 0.0.0.0 0.0.0.0 LoopBack 2

ur

[R3]ospf 1

Re

so

[R3-ospf-1]default-route-advertise

ng

View routing tables of R1 and R2. You can see that R1 and R2 have learned
the default routes advertised by R3.
<R1>display ip routing-table

ni

Route Flags: R - relay, D - download to fib

ar

---------------------------------------------------------------------------Routing Tables: Public

Le

Destinations : 16
Proto

Pre Cost Flags NextHop

Interface

Mo

re

Destination/Mask

Routes : 16

Page100

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


O_ASE

150 1

10.0.13.3

GigabitEthernet0/0/0

10.0.1.0/24

Direct

10.0.1.1

LoopBack0

10.0.1.1/32

Direct

127.0.0.1

LoopBack0

10.0.1.255/32

Direct

127.0.0.1

LoopBack0

10.0.2.2/32

OSPF

10

10.0.12.2

GigabitEthernet0/0/1

10.0.3.3/32

OSPF

10

10.0.13.3

GigabitEthernet0/0/0

10.0.12.0/24

Direct

10.0.12.1

GigabitEthernet0/0/1

10.0.12.1/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

Direct

10.0.13.1

GigabitEthernet0/0/0

10.0.13.1/32

Direct

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct

127.0.0.1

GigabitEthernet0/0/0

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

ea

rn

in

g.

hu

aw
ei
.c
om
/e

0.0.0.0/0

/l

<R2>display ip routing-table

:/

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

tp

Routing Tables: Public

Routes : 14

Proto

Pre Cost Flags NextHop

0.0.0.0/0

O_ASE

150 1

10.0.12.1

GigabitEthernet0/0/1

10.0.1.1/32

OSPF1

s:

10.0.12.1

GigabitEthernet0/0/1

10.0.2.0/24

Direct

10.0.2.2

LoopBack0

10.0.2.2/32

Direct

127.0.0.1

LoopBack0

10.0.2.255/32

Direct

127.0.0.1

LoopBack0

OSPF

10

10.0.12.1

GigabitEthernet0/0/1

so

Re

10.0.3.3/32

ce

Destination/Mask

ur

ht

Destinations : 14

Interface

Direct

10.0.12.2

GigabitEthernet0/0/1

10.0.12.2/32

Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.12.255/32 Direct

127.0.0.1

GigabitEthernet0/0/1

10.0.13.0/24

OSPF

10

10.0.12.1

GigabitEthernet0/0/1

127.0.0.0/8

Direct

127.0.0.1

InLoopBack0

127.0.0.1/32

Direct

127.0.0.1

InLoopBack0

127.255.255.255/32 Direct

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

Le

ar

ni

ng

10.0.12.0/24

Mo

re

255.255.255.255/32 Direct

HC Series

HUAWEI TECHNOLOGIES

Page101

HCNA-HNTD Module 4 Routing Configuration

<R3>display ip routing-table

aw
ei
.c
om
/e

Route Flags: R - relay, D - download to fib


---------------------------------------------------------------------------Routing Tables: Public
Destinations : 17

Pre Cost Flags NextHop

Interface

0.0.0.0/0

Static

60

172.16.0.1

LoopBack2

10.0.1.1/32

OSPF

10

10.0.13.1

GigabitEthernet0/0/0

10.0.2.2/32

OSPF

10

10.0.13.1

GigabitEthernet0/0/0

10.0.3.0/24

Direct

10.0.3.3

LoopBack0

10.0.3.3/32

Direct

127.0.0.1

LoopBack0

10.0.3.255/32

Direct

127.0.0.1

10.0.12.0/24

OSPF

10

10.0.13.1

10.0.13.0/24

Direct

10.0.13.3

10.0.13.3/32

Direct

127.0.0.1

GigabitEthernet0/0/0

10.0.13.255/32 Direct

127.0.0.1

GigabitEthernet0/0/0

in

g.

hu

Proto

LoopBack0

GigabitEthernet0/0/0

/l

ea

rn

GigabitEthernet0/0/0

InLoopBack0

127.0.0.1

InLoopBack0

127.0.0.1

InLoopBack0

172.16.0.1

LoopBack2

127.0.0.1

LoopBack2

Direct

127.0.0.1/32

Direct

127.0.0.1

127.255.255.255/32 Direct

tp

127.0.0.0/8

:/

Destination/Mask

Routes : 17

Direct

172.16.0.1/32

Direct

172.16.0.255/32 Direct

127.0.0.1

LoopBack2

255.255.255.255/32 Direct

127.0.0.1

InLoopBack0

ce

s:

ht

172.16.0.0/24

so

<R2>ping 172.16.0.1

ur

Run the ping command to test connectivity between R2 and Loopback2 at


172.16.0.1.
PING 172.16.0.1: 56 data bytes, press CTRL_C to break

Re

Reply from 172.16.0.1: bytes=56 Sequence=1 ttl=254 time=47 ms


Reply from 172.16.0.1: bytes=56 Sequence=2 ttl=254 time=37 ms

ng

Reply from 172.16.0.1: bytes=56 Sequence=3 ttl=254 time=37 ms


Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=254 time=37 ms

ar

ni

Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=254 time=37 ms


--- 172.16.0.1 ping statistics ---

Le

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

Mo

re

0.00% packet loss


round-trip min/avg/max = 37/39/47 ms

Page102

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

Step 7 Control OSPF DR or BDR election.


Run the display ospf peer command to view the DR and BDR of R1 and R3.
<R1>display ospf peer 10.0.3.3
OSPF Process 1 with Router ID 10.0.1.1
Neighbors

Address: 10.0.13.3

g.

Router ID: 10.0.3.3

hu

Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)'s neighbors


State: Full Mode:Nbr is Master Priority: 1

in

DR: 10.0.13.3 BDR: 10.0.13.1 MTU: 0

rn

Dead timer due in 49 sec


Retrans timer interval: 5

ea

Neighbor is up for 00:17:40

/l

Authentication Sequence: [ 0 ]

ht

tp

:/

The preceding information shows that R3 is the DR and R1 is the BDR. This is
because R3's router ID 10.0.3.3 is greater than R1's router ID 10.0.1.1. R1 and
R3 use the default priority of 1, so their router IDs are used for DR or BDR
election.

s:

Run the ospf dr-priority command to change DR priorities of R1 and R3.


[R1]interface GigabitEthernet 0/0/0

ce

[R1-GigabitEthernet0/0/0]ospf dr-priority 200

ur

[R3]interface GigabitEthernet 0/0/0

so

[R3-GigabitEthernet0/0/0]ospf dr-priority 100

ng

Re

A DR or BDR is elected in non-preemption mode, by default. After router


priorities are changed, a DR is not re-elected, so you must reset the OSPF
neighbor relationship between R1 and R3.

ar

ni

Shut down and re-enable Gigabit Ethernet 0/0/0 interfaces on R1 and R3 to


reset the OSPF neighbor relationship between R1 and R3.
[R3]interface GigabitEthernet0/0/0

Le

[R3-GigabitEthernet0/0/0]shutdown

re

[R1]interface GigabitEthernet0/0/0

Mo

[R1-GigabitEthernet0/0/0]shutdown

HC Series

HUAWEI TECHNOLOGIES

Page103

HCNA-HNTD Module 4 Routing Configuration

aw
ei
.c
om
/e

[R1-GigabitEthernet0/0/0]undo shutdown
[R3-GigabitEthernet0/0/0]undo shutdown

Run the display ospf peer command to view the DR and BDR of R1 and R3.
[R1]display ospf peer 10.0.3.3
OSPF Process 1 with Router ID 10.0.1.1

hu

Neighbors

Address: 10.0.13.3

State: Full Mode:Nbr is Master Priority: 100

rn

DR: 10.0.13.1 BDR: 10.0.13.3 MTU: 0

in

Router ID: 10.0.3.3

g.

Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)'s neighbors

Dead timer due in 52 sec

ea

Retrans timer interval: 5

/l

Neighbor is up for 00:00:25

:/

Authentication Sequence: [ 0 ]

ht

tp

According to the preceding information, R1's priority is higher than R3's priority,
so R1 becomes DR and R3 becomes the BDR.

s:

Final Configuration

ce

<R1>display current-configuration
[V200R003C00SPC200]

ur

#
sysname R1

so

Re

interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0

ng

ospf dr-priority 200


ospf timer hello 15

ni

interface GigabitEthernet0/0/1

ar

ip address 10.0.12.1 255.255.255.0

Le

interface LoopBack0
ip address 10.0.1.1 255.255.255.0

Mo

re

Page104

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 4 Routing Configuration


ospf 1 router-id 10.0.1.1

area 0.0.0.0

aw
ei
.c
om
/e

network 10.0.1.0 0.0.0.255


network 10.0.12.0 0.0.0.255
network 10.0.13.0 0.0.0.255
#
user-interface con 0
authentication-mode password

set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD


(\WTqB}%N,%$%$

hu

user-interface vty 0 4
#

in

g.

return

rn

<R2>display current-configuration

ea

[V200R003C00SPC200]
#

/l

sysname R2

ip address 10.0.12.2 255.255.255.0


#

ht

interface LoopBack0

tp

interface GigabitEthernet0/0/1

:/

#
ospf 1 router-id 10.0.2.2

ce

area 0.0.0.0

s:

ip address 10.0.2.2 255.255.255.0

ur

network 10.0.2.0 0.0.0.255

network 10.0.12.0 0.0.0.255

so

Re

user-interface con 0

authentication-mode password
set authentication password cipher %$%$1=cd%b%/O%Id-8X:by1N,+s}'4wD6TvO<I|/pd#

ng

#44C@+s#,%$%$
#

Mo

re

Le

ar

return

ni

user-interface vty 0 4

HC Series

HUAWEI TECHNOLOGIES

Page105

HCNA-HNTD Module 4 Routing Configuration


<R3>display current-configuration

[V200R003C00SPC200]

aw
ei
.c
om
/e

#
sysname R3
#
interface GigabitEthernet0/0/0
ip address 10.0.13.3 255.255.255.0
ospf dr-priority 100
ospf timer hello 15
#

hu

interface LoopBack0
ip address 10.0.3.3 255.255.255.0

g.

in

interface LoopBack2
ip address 172.16.0.1 255.255.255.0

rn

ea

ospf 1 router-id 10.0.3.3


default-route-advertise

/l

area 0.0.0.0

:/

network 10.0.3.0 0.0.0.255


network 10.0.13.0 0.0.0.255

tp

ip route-static 0.0.0.0 0.0.0.0 LoopBack2

ht

#
user-interface con 0

s:

authentication-mode password
xQ,y%#/v,%$%$

ur

user-interface vty 0 4

ce

set authentication password cipher %$%$ksXDMg7Ry6yUU:63:DQ),#/sQg"@*S\U#.s.bHW

Mo

re

Le

ar

ni

ng

Re

so

return

Page106

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Module 5 FTP and DHCP


Lab 5-1 Configuring FTP Services
Learning Objectives

g.

Establishment of the FTP service.


Configuration of FTP server parameters.
Successful file transfer from an FTP server.

in

hu

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

ht

tp

:/

/l

ea

rn

Topology

s:

Figure 5.1 FTP topology

ce

Scenario

Mo

re

Le

ar

ni

ng

Re

so

ur

As a network administrator of a company, you have been tasked with


implementing FTP services on the network. You need to implement the FTP
service on a router assigned to be an FTP server. The router should allow
clients to successfully establish a TCP session to the FTP application and
transfer files.

HC Series

HUAWEI TECHNOLOGIES

Page107

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

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.
<Huawei>system-view

hu

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

g.

[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1

ea

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

rn

<Huawei>system-view

in

[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24

[Huawei]sysname R2

/l

[R2]interface GigabitEthernet 0/0/1

:/

[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24

tp

Verify that R1 can reach R2, and vice versa..

ht

[R1]ping 10.0.12.2

PING 10.0.12.2: 56 data bytes, press CTRL_C to break

s:

Reply from 10.0.12.2: bytes=56 Sequence=1 ttl=255 time=10 ms


Reply from 10.0.12.2: bytes=56 Sequence=2 ttl=255 time=1 ms

ce

Reply from 10.0.12.2: bytes=56 Sequence=3 ttl=255 time=1 ms

ur

Reply from 10.0.12.2: bytes=56 Sequence=4 ttl=255 time=10 ms

so

Reply from 10.0.12.2: bytes=56 Sequence=5 ttl=255 time=1 ms


--- 10.0.12.2 ping statistics ---

Re

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

ng

0.00% packet loss

ni

round-trip min/avg/max = 1/4/10 ms

Le

ar

Step 2 Enable the FTP service on the router.

Mo

re

The FTP service is disabled by default on the router. It must be enabled before
FTP can be used. Configure an FTP server using R1 with R2 as the client. The
same steps can be reversed to enable R2 to also act as an FTP server.
Page108

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP


[R1]ftp server enable

Info: Succeeded in starting the FTP server

aw
ei
.c
om
/e

[R1]set default ftp-directory sd1:

Configure user authorization for FTP users to access the server. Unauthorized
users will not be able to access the FTP server, reducing security risks.
[R1]aaa
[R1-aaa]local-user huawei password cipher huawei
Info: Add a new user.

hu

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


[R1-aaa]local-user huawei privilege level 15

g.

[R1-aaa]local-user huawei ftp-directory sd1:

in

[R1]display ftp-server

User count

Timeout value(in minute)

30

Listening port

21

Acl number

/l

tp

FTP server's source address 0.0.0.0

:/

Max user number

ea

rn

FTP server is running

ht

The FTP server is running on R1 and listens on TCP port 21 by default.

s:

Step 3 Establish an FTP client connection

<R2>ftp 10.0.12.1

so

Trying 10.0.12.1 ...

ur

ce

Establish a connection to the FTP Server from R2.

Press CTRL+K to abort

Re

Connected to 10.0.12.1.
220 FTP service ready.

ng

User(10.0.12.1:(none)):huawei
331 Password required for huawei.

ni

Enter password:

ar

230 User logged in.

Le

[R2-ftp]

Mo

re

Following entry of the correct user name and password, the FTP server can be
successfully logged into.

HC Series

HUAWEI TECHNOLOGIES

Page109

[R2-ftp]dir
200 Port command okay.
150 Opening ASCII mode data connection for *.

aw
ei
.c
om
/e

Run the dir command before downloading a file or after uploading a file to view
the detailed information of the file.

-rwxrwxrwx 1 noone

nogroup

286620 Mar 14 09:22 sacrule.dat

-rwxrwxrwx 1 noone

nogroup

512000 Nov 28 14:39 mon_file.txt

-rwxrwxrwx 1 noone

nogroup

-rwxrwxrwx 1 noone

nogroup

120 Dec 28 2012 iascfg.zip

-rwxrwxrwx 1 noone

nogroup

699 Nov 28 17:52 vrpcfg.zip

-rwxrwxrwx 1 noone

nogroup 93871872 Mar 14 09:13 ar2220-v200r003c00spc200.cc

-rwxrwxrwx 1 noone

nogroup

hu

48128 Oct 10 2011 ar2220_v200r001sph001.pat

g.

512000 Nov 28 14:40 mon_lpu_file.txt

226 Transfer complete.

rn

in

FTP: 836 byte(s) received in 0.976 second(s) 856.55byte(s)/sec.

ea

Set the transfer mode for the files to be transferred.

/l

[R2-ftp]binary

:/

200 Type set to I.

ht

tp

Retrieve a file from the FTP server. Note: If the vrpcfg.zip file is not present in
the sd1: directory of R1, use the save command on R1 to create it.
[R2-ftp]get vrpcfg.zip vrpnew.zip

s:

200 Port command okay.

ce

150 Opening BINARY mode data connection for vrpcfg.zip.


226 Transfer complete.

ur

FTP: 120 byte(s) received in 0.678 second(s) 176.99byte(s)/sec.

Re

so

After downloading the file from FTP server, use the bye command to close the
connection
[R2-ftp]bye

ni

ng

221 Server closing.


<R2>dir

ar

Directory of sd1:/

Mo

re

Le

Idx Attr

Size(Byte) Date

Time(LMT) FileName

0 -rw-

286,620 Mar 14 2013 09:05:14

sacrule.dat

1 -rw-

512,000 Nov 30 2013 03:47:04

mon_file.txt

3 -rw-

48,128 Oct 10 2011 12:30:26

Page110

ar2220_v200r001sph001.pat

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 5 FTP and DHCP

HC Series

4 -rw-

120 Dec 31 2012 04:20:48

iascfg.zip

5 -rw-

856 Nov 30 2013 03:40:56

vrpcfg.zip

93,871,872 Mar 14 2013 08:59:46

7 -rw-

512,000 Nov 30 2013 03:48:06

8 -rw-

699 Dec 02 2013 09:03:16

ar2220-v200r003c00spc200.cc

aw
ei
.c
om
/e

6 -rw-

mon_lpu_file.txt
vrpnew.zip

A file can be uploaded to the FTP server by using the command put, for which
a new file name can also be assigned.
[R2-ftp]put vrpnew.zip vrpnew2.zip

g.

226 Transfer complete.

hu

200 Port command okay.


150 Opening BINARY mode data connection for vrpnew2.zip.

in

FTP: 120 byte(s) sent in 0.443 second(s) 270.88byte(s)/sec.

rn

After uploading the file, check for the presence of the file on FTP server.

ea

<R1>dir

Size(Byte) Date

Time(LMT) FileName

:/

Idx Attr

/l

Directory of sd1:/

286,620 Mar 14 2013 09:22:20

sacrule.dat

1 -rw-

512,000 Nov 28 2013 14:39:16

mon_file.txt

2 -rw-

1,738,816 Feb 17 2013 12:05:36

3 -rw-

48,128 Oct 10 2011 14:16:56

4 -rw-

120 Dec 28 2012 10:09:50

iascfg.zip

5 -rw-

699 Nov 28 2013 17:52:38

vrpcfg.zip

s:

ht

tp

0 -rw-

93,871,872 Mar 14 2013 09:13:26

7 -rw-

512,000 Nov 28 2013 14:40:20

ce

6 -rw-

699 Dec 02 2013 15:44:16

web.zip
ar2220_v200r001sph001.pat

ar2220-v200r003c00spc200.cc
mon_lpu_file.txt
vrpnew2.zip

so

ur

8 -rw-

Re

Remove the created vrpnew.zip and vrpnew2.zip files on R1 and R2.


<R1>delete sd1:/vrpnew2.zip

ng

Delete sd1:/vrpnew2.zip? (y/n)[n]:y

ni

Info: Deleting file sd1:/vrpnew2.zip...succeed.


<R2>delete sd1:/vrpnew.zip

ar

Delete sd1:/vrpnew.zip? (y/n)[n]:y

Le

Info: Deleting file sd1:/vrpnew.zip...succeed.

Mo

re

Note: Please take extreme care when deleting the configuration files so to
ensure that the entire sd1:/ directory of R1 and R2 is not erased.

HC Series

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 5 FTP and DHCP

Page111

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Final Configuration
<R1>display current-configuration
[V200R003C00SPC200]
#
sysname R1
ftp server enable
set default ftp-directory sd1:
#

hu

aaa
authentication-scheme default

g.

authorization-scheme default

in

accounting-scheme default
domain default

rn

domain default_admin

local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$

ea

local-user admin service-type http

/l

local-user huawei password cipher %$%$f+~&ZkCn]NUX7m.t;tF9R48s%$%$


local-user huawei ftp-directory sd1:

tp

local-user huawei service-type ftp

:/

local-user huawei privilege level 15

ht

interface GigabitEthernet0/0/1

ip address 10.0.12.1 255.255.255.0

s:

#
user-interface con 0

ce

authentication-mode password

ur

set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD


(\WTqB}%N,%$%$

so

user-interface vty 0 4

Re

#
return

ng

<R2>display current-configuration

ni

[V200R003C00SPC200]
#

ar

sysname R2

ftp server enable

Le

set default ftp-directory sd1:

re

aaa

Mo

authentication-scheme default

Page112

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP


authorization-scheme default

accounting-scheme default

aw
ei
.c
om
/e

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 %$%$<;qM3D/O;ZLqy/"&6wEESdg$%$%$


local-user huawei privilege level 15
local-user huawei ftp-directory sd1:
local-user huawei service-type ftp

hu

#
interface GigabitEthernet0/0/1

g.

ip address 10.0.12.2 255.255.255.0

in

#
user-interface con 0

rn

authentication-mode password

ea

set authentication password cipher %$%$1=cd%b%/O%Id-8X:by1N,+s}'4wD6TvO<I|/pd#


#44C@+s#,%$%$

/l

user-interface vty 0 4

:/

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

tp

return

HC Series

HUAWEI TECHNOLOGIES

Page113

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Lab 5-2 Implementing DHCP


Learning Objectives

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

hu

Configuration of a global DHCP pool.


Configuration of an interface based DHCP pool.
Enable DHCP discovery and IP allocation for switch interfaces.
Method of global address pool configuration.
Method of interface address pool configuration.

g.

ng

Scenario

Figure 5.2 DHCP topology

Re

so

ur

ce

s:

ht

tp

:/

/l

ea

rn

in

Topology

Mo

re

Le

ar

ni

As the administrator of an enterprise you have been tasked with implementing


DHCP application services within the network. The gateway router in the
company network is to be configured as a DHCP server. IP addressing from an
address pool are to be offered by the gateway(s) (R1 and R3) to respective
access layer devices.

Page114

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

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.

hu

Establish the addressing for the lab and temporarily shut down the interfaces
Gigabit Ethernet 0/0/2 of R1 and Gigabit Ethernet 0/0/1 of R3.
<Huawei>system-view

g.

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

in

[Huawei]sysname R1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24

ea

[R1-GigabitEthernet0/0/1]quit

rn

[R1]interface GigabitEthernet 0/0/1

/l

<Huawei>system-view

[R3]interface GigabitEthernet 0/0/1

tp

[Huawei]sysname R3

:/

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

[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24

ht

[R3-GigabitEthernet0/0/1]shutdown
[R3-GigabitEthernet0/0/1]quit

s:

[R3]interface GigabitEthernet 0/0/2

ur

<Quidway>system-view

ce

[R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24

so

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

Re

[Quidway]sysname S1

<Quidway>system-view

ng

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

Mo

re

Le

ar

ni

[Quidway]sysname S2

HC Series

HUAWEI TECHNOLOGIES

Page115

HCNA-HNTD Module 5 FTP and DHCP

Step 2 Cleaning up the previous configuration

aw
ei
.c
om
/e

Re-enable to Gigabit Ethernet 0/0/2 interface on R3.


[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]undo shutdown

Step 3 Additional configuration

g.

hu

Disable the port interfaces between S1 and S2 as well as other interfaces to


prevent interference from other devices.

in

[S1]interface GigabitEthernet 0/0/9


[S1-GigabitEthernet0/0/9]shutdown

rn

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

ea

[S1-GigabitEthernet0/0/10]shutdown

/l

[S1-GigabitEthernet0/0/10]quit
[S1]interface GigabitEthernet 0/0/13

:/

[S1-GigabitEthernet0/0/13]shutdown

tp

[S1-GigabitEthernet0/0/13]quit
[S1]interface GigabitEthernet 0/0/14

ht

[S1-GigabitEthernet0/0/14]shutdown

s:

[S2]interface GigabitEthernet 0/0/9


[S2-GigabitEthernet0/0/9]shutdown

ce

[S2-GigabitEthernet0/0/9]quit

ur

[S2]interface GigabitEthernet 0/0/10


[S2-GigabitEthernet0/0/10]shutdown

so

[S2-GigabitEthernet0/0/10]quit

Re

[S2]interface GigabitEthernet 0/0/23


[S2-GigabitEthernet0/0/23]shutdown
[S2-GigabitEthernet0/0/23]quit

ng

[S2]interface GigabitEthernet 0/0/24

ni

[S2-GigabitEthernet0/0/24]shutdown

ar

[R1]interface GigabitEthernet 0/0/2


[R1-GigabitEthernet0/0/2]ip address 10.0.23.1 24

Mo

re

Le

[R1-GigabitEthernet0/0/2]shutdown

Page116

HUAWEI TECHNOLOGIES

HC Series

<S1>display interface brief


output omitted
Interface

PHY

Protocol InUti OutUti

GigabitEthernet0/0/1

up

up

0.01%

0.01%

GigabitEthernet0/0/2

up

up

0.01%

0.01%

inErrors outErrors

down

0%

up

up

0%

0.01%

0%

GigabitEthernet0/0/5

up

up

0%

0.01%

GigabitEthernet0/0/6

down

down

0%

0%

GigabitEthernet0/0/7

down

down

0%

0%

GigabitEthernet0/0/8

down

down

0%

0%

GigabitEthernet0/0/9

*down

down

0%

0%

GigabitEthernet0/0/10

*down

down

0%

GigabitEthernet0/0/11

down

down

0%

GigabitEthernet0/0/12

down

down

0%

GigabitEthernet0/0/13

*down

down

GigabitEthernet0/0/14

*down

down

hu

down

0
0

0
0

0%

0%

0%

0%

0%

rn

:/

in

g.

GigabitEthernet0/0/3
GigabitEthernet0/0/4

/l

ea

0%

0%

tp

output omitted

aw
ei
.c
om
/e

Verify that Gigabit Ethernet interfaces 0/0/9, 0/0/10, 0/0/13 and 0/0/14, have
been shut down on S1 and that Gigabit Ethernet interfaces 0/09, 0/0/10, 0/0/23
and 0/0/24 have been shut down on S2.

ht

<S2>display interface brief


output omitted
*down

down

0%

0%

GigabitEthernet0/0/10

*down

down

0%

0%

GigabitEthernet0/0/11

up

up

0.01%

0.01%

GigabitEthernet0/0/12

up

up

0.01%

0.01%

0.01%

up

up

0%

down

down

0%

0%

down

down

0%

0%

GigabitEthernet0/0/16

down

down

0%

0%

GigabitEthernet0/0/17

down

down

0%

0%

GigabitEthernet0/0/18

down

down

0%

0%

GigabitEthernet0/0/19

down

down

0%

0%

ni

ur

ce

s:

GigabitEthernet0/0/9

GigabitEthernet0/0/13

GigabitEthernet0/0/20

down

down

0%

0%

GigabitEthernet0/0/21

down

down

0%

0%

GigabitEthernet0/0/22

down

down

0%

0%

GigabitEthernet0/0/23

*down

down

0%

0%

GigabitEthernet0/0/24

*down

down

0%

0%

so

GigabitEthernet0/0/14

Le

ar

ng

Re

GigabitEthernet0/0/15

Mo

re

output omitted

HC Series

HUAWEI TECHNOLOGIES

HCNA-HNTD Module 5 FTP and DHCP

Page117

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Verify that only interface Gigabit Ethernet 0/0/2 is disabled on R1 and that only
interface Gigabit Ethernet 0/0/1 is disabled on R3.
<R1>display ip interface brief
output omitted
GigabitEthernet0/0/1

10.0.12.1/24

up

up

GigabitEthernet0/0/2

10.0.23.1/24

*down

GigabitEthernet0/0/1

10.0.12.3/24

*down

GigabitEthernet0/0/2

10.0.23.3/24

up

down

output omitted

down

up

rn

in

output omitted

g.

output omitted

hu

<R3>display ip interface brief

ea

Step 4 Enable the DHCP function.

:/

/l

The DHCP service is not enabled by default, enable the DHCP service on the
router(s).

tp

[R1]dhcp enable

ht

[R3]dhcp enable

s:

Step 5 Create a global IP address pool

so

[R1]ip pool pool1

ur

ce

Create an address pool named pool1 for R1 and pool2 for R3. Configure
attributes for pool1 and pool2, including address range, egress gateway, and
IP address lease period.
Info: It's successful to create an IP address pool.

Re

[R1-ip-pool-pool1]network 10.0.12.0 mask 24


[R1-ip-pool-pool1]gateway-list 10.0.12.1

ng

[R1-ip-pool-pool1]lease day 1 hour 12


[R1]interface GigabitEthernet 0/0/1

ar

ni

[R1-GigabitEthernet0/0/1]dhcp select global


[R3]ip pool pool2

Le

Info: It's successful to create an IP address pool.


[R3-ip-pool-pool2]network 10.0.23.0 mask 24

re

[R3-ip-pool-pool2]gateway-list 10.0.23.3

Mo

[R3-ip-pool-pool2]lease day 1 hour 12

Page118

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP


[R3]interface GigabitEthernet 0/0/2

aw
ei
.c
om
/e

[R3-GigabitEthernet0/0/2]dhcp select global

Run the display ip pool name <name> command on the router to view the
assigned IP address pool configuration parameters.
<R1>display ip pool name pool1
: pool1

Pool-No

: 0

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

DNS-server0

: -

NBNS-server0

: -

Netbios-type

: -

Position

: Local

Gateway-0

: 10.0.12.1

Mask

: 255.255.255.0

VPN instance

: --

g.

hu

Pool-name

: Unlocked

/l

ea

rn

in

Status

---------------------------------------------------------------------------End

Total Used Idle(Expired) Conflict Disable

:/

Start
10.0.12.1

10.0.12.254

tp

---------------------------------------------------------------------------253

253(0)

ht

----------------------------------------------------------------------------

[S1]dhcp enable

ur

[S1]interface Vlanif 1

ce

s:

Configure the default management interface for S1 to request an IP address


from the DHCP server (R1). Perform the same steps on S2 for R3.

so

[S1-Vlanif1]ip address dhcp-alloc

Re

<S1>display ip interface brief


Interface
NULL0

ni

MEth0/0/1

ng

output omitted

Physical

Protocol

unassigned

down

down

unassigned

up

up(s)

10.0.12.254/24

up

up

Mo

re

Le

ar

Vlanif1

IP Address/Mask

HC Series

HUAWEI TECHNOLOGIES

Page119

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Verify that this address was taken from the DHCP pool named pool1 on R1,
and for S2, from the DHCP pool named pool2 on R3.

Pool-name

: pool1

Pool-No

: 0

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

DNS-server0

: -

NBNS-server0

: -

Netbios-type

: -

Position

: Local

Gateway-0

: 10.0.12.1

Mask

: 255.255.255.0

VPN instance

: --

: Unlocked

rn

in

g.

Status

hu

<R1>display ip pool name pool1

Start

ea

---------------------------------------------------------------------------End

Total Used Idle(Expired) Conflict Disable

10.0.12.254

253

252(0)

:/

10.0.12.1

/l

----------------------------------------------------------------------------

tp

---------------------------------------------------------------------------<R3>display ip pool name pool2


: pool2

Pool-No

: 0

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

DNS-server0

: -

NBNS-server0

: -

Netbios-type

: -

Position

: Local

Gateway-0

: 10.0.23.3

s:

ce
ur

so

Status

: Unlocked

Re

Mask

ht

Pool-name

: 255.255.255.0

VPN instance

: --

ng

----------------------------------------------------------------------------

ni

Start

End

Total Used Idle(Expired) Conflict Disable

----------------------------------------------------------------------------

ar

10.0.23.1

10.0.23.254

253

252(0)

Le

----------------------------------------------------------------------------

Mo

re

Ensure that global pool configuration has been completed for both R1 and R3
before continuing!
Page120

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP

aw
ei
.c
om
/e

Step 6 Create an interface based IP address pool


Disable the interface Gigabit Ethernet 0/0/1 R1. For R3 disable interface
Gigabit Ethernet 0/0/2.
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown
[R3]interface GigabitEthernet 0/0/2

hu

[R3-GigabitEthernet0/0/2]shutdown

rn

in

g.

Configure an interface address pool to allow the clients connected via Gigabit
Ethernet 0/0/2 of R1 to obtain IP addresses. Perform the same operation for
Gigabit Ethernet 0/0/1 of R3. Do not enable these interfaces, as we do not yet
wish to activate the DHCP service on the network.

ea

[R1]interface GigabitEthernet 0/0/2

/l

[R1-GigabitEthernet0/0/2]dhcp select interface

:/

[R3]interface GigabitEthernet 0/0/1

tp

[R3-GigabitEthernet0/0/1]dhcp select interface

s:

ht

Isolate addresses from the pool GigabitEthernet0/0/2 for R1, and the pool
GigabitEthernet0/0/1 for R3, for DNS services. Additionally, set the IP address
lease period for the interface address pool.
[R1-GigabitEthernet0/0/2]dhcp server dns-list 10.0.23.254

ce

[R1-GigabitEthernet0/0/2]dhcp server excluded-ip-address 10.0.23.254

ur

[R1-GigabitEthernet0/0/2]dhcp server lease day 1 hour 12

so

[R3-GigabitEthernet0/0/1]dhcp server dns-list 10.0.12.254


[R3-GigabitEthernet0/0/1]dhcp server excluded-ip-address 10.0.12.254

Re

[R3-GigabitEthernet0/0/1]dhcp server lease day 1 hour 12

ar

ni

ng

Run the display ip pool interface command on the router to view the
configured parameters of the interface address pool. For R3 the interface is
Gigabit Ethernet 0/0/1.

Le

<R1>display ip pool interface GigabitEthernet0/0/2


: GigabitEthernet0/0/2

Pool-No

: 1

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

Mo

re

Pool-name

HC Series

HUAWEI TECHNOLOGIES

Page121

HCNA-HNTD Module 5 FTP and DHCP


: 10.0.23.254

NBNS-server0

: -

Netbios-type

: -

Position

: Interface

Gateway-0

: 10.0.23.1

Mask

: 255.255.255.0

VPN instance

: --

Status

: Unlocked

aw
ei
.c
om
/e

DNS-server0

---------------------------------------------------------------------------Start

End

Total Used Idle(Expired) Conflict Disable

---------------------------------------------------------------------------10.0.23.254

253

252(0)

hu

10.0.23.1

g.

----------------------------------------------------------------------------

rn

in

Flush the existing Vlanif1 address from S2 to allow for dynamic allocation of a
new IP address from the interface GigabitEthernet0/0/2 pool.

ea

[S2]interface Vlanif 1
[S2-Vlanif1]shutdown

:/

/l

[S2-Vlanif1]undo shutdown

ht

[R1]interface GigabitEthernet0/0/2

tp

Enable interface Gigabit Ethernet 0/0/2 to allow the DHCP server to become
active on the network and to begin sending DHCP discover messages.

s:

[R1-GigabitEthernet0/0/2]undo shutdown

<R1>display ip pool interface GigabitEthernet0/0/2


: GigabitEthernet0/0/2

Pool-No

: 1

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

DNS-server0

: 10.0.23.254

NBNS-server0

: -

Position

ur

so

Re
: -

: Interface

ng

Netbios-type

ce

Pool-name

Status

: 10.0.23.1

Mask

: 255.255.255.0

ni

Gateway-0

ar

VPN instance

: Unlocked

: --

----------------------------------------------------------------------------

Le

Start

End

Total Used Idle(Expired) Conflict Disable

---------------------------------------------------------------------------10.0.23.254

253

251(0)

re

10.0.23.1

Mo

----------------------------------------------------------------------------

Page122

HUAWEI TECHNOLOGIES

HC Series

HCNA-HNTD Module 5 FTP and DHCP


<S2>display ip interface brief
IP Address/Mask

Physical

MEth0/0/1

unassigned

down

NULL0

unassigned

up

Vlanif1

10.0.23.253/24

up

Protocol

aw
ei
.c
om
/e

Interface

output omitted
down

up(s)
up

The interface Vlanif1 shows to have been allocated an address from the
GigabitEthernet0/0/2 address pool of R1.

g.

hu

Flush the existing Vlanif1 address from S1 to allow for dynamic allocation of a
new IP address from the interface GigabitEther0/0/1 pool.

in

[S1]interface Vlanif 1
[S1-Vlanif1]shutdown

ea

rn

[S1-Vlanif1]undo shutdown

:/

/l

Enable interface Gigabit Ethernet 0/0/1 to allow the DHCP server to become
active on the network and to begin sending DHCP discover messages.

tp

[R3]interface GigabitEthernet 0/0/1

ht

[R3-GigabitEthernet0/0/1]undo shutdown

s:

Verify that the new IP address as been allocated from the interface pool.
<R3>display ip pool interface GigabitEthernet0/0/1
: GigabitEthernet0/0/1

Pool-No

: 1

Lease

: 1 Days 12 Hours 0 Minutes

Domain-name

: -

DNS-server0

: 10.0.12.254

NBNS-server0

: -

Position

ur

so

Re
: -

: Interface

ng

Netbios-type

ce

Pool-name

Status

: 10.0.12.3

Mask

: 255.255.255.0

ni

Gateway-0

ar

VPN instance

: Unlocked

: --

----------------------------------------------------------------------------

Le

Start

End

Total Used Idle(Expired) Conflict Disable

---------------------------------------------------------------------------10.0.12.254

253

251(0)

re

10.0.12.1

Mo

----------------------------------------------------------------------------

HC Series

HUAWEI TECHNOLOGIES

Page123

HCNA-HNTD Module 5 FTP and DHCP


<S1>display ip interface brief
IP Address/Mask

Physical

MEth0/0/1

unassigned

down

NULL0

unassigned

up

Vlanif1

10.0.12.253/24

up

Protocol

aw
ei
.c
om
/e

Interface

down

up(s)
up

It should also be noted that a default static route pointing to the DHCP server is
automatically generated by the switch, as seen in the final configuration below.

g.

hu

Final Configuration
[R1]display current-configuration

in

[V200R003C00SPC200]

rn

#
sysname R1

ea

/l

dhcp enable
#

:/

ip pool pool1

tp

gateway-list 10.0.12.1
network 10.0.12.0 mask 255.255.255.0

ht

lease day 1 hour 12 minute 0


#

s:

interface GigabitEthernet0/0/1
shutdown

ce

ip address 10.0.12.1 255.255.255.0


dhcp select global

ur

so

interface GigabitEthernet0/0/2
ip address 10.0.23.1 255.255.255.0

Re

dhcp select interface

dhcp server excluded-ip-address 10.0.23.254

ng

dhcp server lease day 1 hour 12 minute 0


dhcp server dns-list 10.0.23.254

ni

ar

user-interface con 0
authentication-mode password

Le

set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD

(\WTqB}%N,%$%$user-interface vty 0 4

re

Mo

return

Page124

HUAWEI TECHNOLOGIES

output omitted

HC Series

HCNA-HNTD Module 5 FTP and DHCP

[R3]dis current-configuration

aw
ei
.c
om
/e

[V200R003C00SPC200]
#
sysname R3
#
dhcp enable
#
ip pool pool2
gateway-list 10.0.23.3

hu

network 10.0.23.0 mask 255.255.255.0


lease day 1 hour 12 minute 0

g.

in

interface GigabitEthernet0/0/1
ip address 10.0.12.3 255.255.255.0

rn

dhcp select interface

ea

dhcp server excluded-ip-address 10.0.12.254


dhcp server lease day 1 hour 12 minute 0

/l

dhcp server dns-list 10.0.12.254


interface GigabitEthernet0/0/2
shutdown
ip address 10.0.23.3 255.255.255.0

ht

dhcp select global

tp

:/

s:

user-interface con 0

authentication-mode password

ce

set authentication password cipher %$%$ksXDMg7Ry6yUU:63:DQ),#/sQg"@*S\U#.s.bHW

ur

xQ,y%#/v,%$%$
user-interface vty 0 4

so

Re

return

<S1>dis current-configuration

ng

ni

!Software Version V100R006C00SPC800


#

ar

sysname S1

Le

dhcp enable
#

interface Vlanif1

re

ip address dhcp-alloc

Mo

HC Series

HUAWEI TECHNOLOGIES

Page125

HCNA-HNTD Module 5 FTP and DHCP


ip route-static 0.0.0.0 0.0.0.0 10.0.12.3

aw
ei
.c
om
/e

user-interface con 0
user-interface vty 0 4
#
return
<S2>display current-configuration
#
!Software Version V100R006C00SPC800

hu

sysname S2
#

g.

dhcp enable

in

#
interface Vlanif1

rn

ip address dhcp-alloc

ea

#
ip route-static 0.0.0.0 0.0.0.0 10.0.23.1

/l

:/

user-interface con 0
user-interface vty 0 4

tp

Mo

re

Le

ar

ni

ng

Re

so

ur

ce

s:

ht

return

Page126

HUAWEI TECHNOLOGIES

HC Series

re

Mo

ni

ar

Le

ng
ur

so

Re
s:

ce
ht
tp
ea

/l

:/

rn

in
g.
hu

aw
ei
.c
om
/e

Das könnte Ihnen auch gefallen