Routing and Switching Technology Entry Lab Guide V2.2
Routing and Switching Technology Entry Lab Guide V2.2
With any Huawei Career Certification, you have the privilege on http://learning.huawei.com/en to enjoy:
1、e-Learning Courses: Logon http://learning.huawei.com/en and enter Huawei Training/e-Learning
If you have the HCNA/HCNP certificate:You can access Huawei Career Certification and Basic Technology e-Learning
courses.
If you have the HCIE certificate: You can access all the e-Learning courses which marked for HCIE Certification Users.
Methods to get the HCIE e-Learning privilege : Please associate HCIE certificate information with your Huawei account, and
email the account to [email protected] to apply for HCIE e-Learning privilege.
2、 Training Material Download
Content: Huawei product training material and Huawei career certification training material.
Method:Logon http://learning.huawei.com/en and enter Huawei Training/Classroom Training ,then you can download
training material in the specific training introduction page.
3、 Priority to participate in Huawei Online Open Class (LVC)
The Huawei career certification training and product training covering all ICT technical domains like R&S, UC&C, Security,
Storage and so on, which are conducted by Huawei professional instructors.
4、Learning Tools:
eNSP :Simulate single Router&Switch device and large network.
WLAN Planner :Network planning tools for WLAN AP products.
In addition, Huawei has built up Huawei Technical Forum which allows candidates to discuss technical issues with Huawei experts ,
share exam experiences with others or be acquainted with Huawei Products.
Statement:
This material is for personal use only, and can not be used by any individual or organization for any commercial purposes.
HCNA-HNTD
ENTRY
Huawei Networking Technology and Device
Lab Guide
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of
their respective holders.
Notice
The information in this manual is subject to change without notice. Every effort has
been made in the preparation of this manual to ensure accuracy of the contents, but all
statements, information, and recommendations in this manual do not constitute the
warranty of any kind, express or implied.
Huawei Certification
Version 2.2
Huawei Certification System
Relying on its strong technical and professional training and certification system
and in accordance with customers of different ICT technology levels, Huawei
certification is committed to providing customers with authentic, professional
certification, and addresses the need for the development of quality engineers that
are capable of supporting Enterprise networks in the face of an ever changing ICT
industry. The Huawei certification portfolio for routing and switching (R&S) is
comprised of three levels to support and validate the growth and value of customer
skills and knowledge in routing and switching technologies.
The Huawei Certified Network Associate (HCNA) certification level validates the
skills and knowledge of IP network engineers to implement and support small to
medium-sized enterprise networks. The HCNA certification provides a rich
foundation of skills and knowledge for the establishment of such enterprise
networks, along with the capability to implement services and features within
existing enterprise networks, to effectively support true industry operations.
HCNA certification covers fundamentals skills for TCP/IP, routing, switching and
related IP network technologies, together with Huawei data communications
products, and skills for versatile routing platform (VRP) operation and
management.
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Tasks
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
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.
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.
The same action should be taken to position a second laptop on the canvas for
establishing the peer-to-peer network topology.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
The generation of traffic will be confirmed by the resulting output in which case the
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.
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Configure device system parameters including device name, the system time,
Topology
Figure 2.1 Lab topology for basic VRP navigation and operation.
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
VRP (R) software, Version 5.160 (AR2200 V200R007C00SPC600)
Copyright (C) 2011-2013 HUAWEI TECH CO., LTD
Huawei AR2220E Router uptime is 0 week, 3 days, 21 hours, 43 minutes
BKP 0 version information:
......output omitted......
The command output includes the VRP operating system version, device model, and
startup time.
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.
<Huawei>clock timezone Local add 08:00:00
<Huawei>clock datetime 12:00:00 2016-03-11
The keyword Local can be exchanged with the current regional timezone name, and
Run the display clock command to check that the new system time has taken effect.
The question mark (?) is a wildcard, and the Tab is used as a shortcut to enter
commands.
<Huawei>display ?
Cellular 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
......output omit......
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.
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.
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.
If there are no other commands starting with the same letters, dis or disp can be
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]
To more easily identify devices, set device names during the device configuration.
Change device names based on the lab topology, as shown below:
Change the name of the R1 router to R1.
[Huawei]sysname R1
[R1]
[Huawei]sysname R3
[R3]
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
<R1>quit
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.
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.
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.
[R1]user-interface console 0
[R1-ui-console0]authentication-mode password
[R1-ui-console0]set authentication password cipher
Warning: The "password" authentication mode is not secure, and it is strongly recommended to
use "aaa" authentication mode.
Enter Password(<8-128>):
Confirm password:
[R1-ui-console0] idle-timeout 20 0
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.
[R1-ui-console0]return
<R1>quit
Login authentication
Password:
Configure an IP address for the GigabitEthernet 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
[R1-GigabitEthernet0/0/0]description This interface connects to R3-G0/0/0
Run the display this command to check the configuration results at the current
interface view.
[R1-GigabitEthernet0/0/0]display this
[V200R007C00SPC600]
#
interface GigabitEthernet0/0/0
description This interface connects to R3-G0/0/0
ip address 10.0.13.1 255.255.255.0
#
return
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.
Once the status has been verified, configure the IP address and description for the
interface of R3.
[R3]interface GigabitEthernet 0/0/0
[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
After completing the configuration, run the ping command to test the connection
between R1 and R3.
<R1>ping 10.0.13.3
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
Run the dir command in the user view to display the list of files in the current
directory.
<R1>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 1,738,816 Mar 10 2016 11:50:24 web.zip
1 -rw- 68,288,896 Mar 10 2016 14:17:5 ar2220E-v200r007c00spc600.cc
2 -rw- 739 Mar 10 2016 16:01:17 vrpcfg.zip
1,927,476 KB total (1,856,548 KB free)
<R3>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 1,738,816 Mar 10 2016 11:50:58 web.zip
1 -rw- 68,288,896 Mar 10 2016 14:19:0 ar2220E-v200r007c00spc600.cc
2 -rw- 739 Mar 10 2016 16:03:04 vrpcfg.zip
1,927,476 KB total (1,855,076 KB free)
Run the following command again to view the saved configuration information:
<R1>display saved-configuration
[V200R007C00SPC600]
#
sysname R1
header shell information "Welcome to Huawei certification lab"
#
board add 0/1 1SA
board add 0/2 1SA
……output omit……
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
MainBoard:
Startup system software: flash:/ar2220E-V200R007C00SPC600.cc
Next startup system software: flash:/ar2220E-V200R007C00SPC600.cc
Backup system software for next startup: null
Startup saved-configuration file: null
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup license file: null
Next startup license file: null
Startup patch package: null
<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
Clear the configuration in the device successfully.
<R3>reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the next startup configuration. Continue ?
[y/n]:n
System will reboot! Continue ? [y/n]:y
[R1]display current-configuration
[V200R007C00SPC600]
#
sysname R1
header shell information "Welcome to Huawei certification lab"
#
interface GigabitEthernet0/0/0
description This interface connects to R3-G0/0/0
ip address 10.0.13.1 255.255.255.0
#
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
#
return
[R3]display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/0
description This interface connect to R1-G0/0/0
ip address 10.0.13.3 255.255.255.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$M8\HO3:72:ERQ8JLoHU8,%t+lE:$9=a7"8%yMoARB]$B%t.,%$%
$
user-interface vty 0 4
#
return
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
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
Topology
Scenario
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
Tasks
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S2
[S2]interface GigabitEthernet 0/0/1
[S2-GigabitEthernet0/0/1]shutdown
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S3
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]shutdown
[S3-Ethernet0/0/1]quit
[S3]interface Ethernet 0/0/13
[S3-Ethernet0/0/13]shutdown
[S3-Ethernet0/0/13]quit
[S3]interface Ethernet 0/0/7
[S3-Ethernet0/0/7]shutdown
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S4
[S4]inter Ethernet 0/0/1
[S4-Ethernet0/0/1]shutdown
[S4-Ethernet0/0/1]quit
[S4]inter Ethernet 0/0/14
[S4-Ethernet0/0/14]shutdown
[S4-Ethernet0/0/14]quit
[S4]interface Ethernet 0/0/6
[S4-Ethernet0/0/6]shutdown
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.
[S1]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
Run the display stp brief command to view brief information about STP.
<S1>display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/9 DESI FORWARDING NONE
0 GigabitEthernet0/0/10 DESI FORWARDING NONE
Run the display stp interface command to view the STP status of a port.
Run the display stp command to view information about the root bridge.
<S1>display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :0 .d0d0-4ba6-aab0
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :0 .d0d0-4ba6-aab0 / 0 (This bridge is the root)
CIST RegRoot/IRPC :0 .d0d0-4ba6-aab0 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
CIST Root Type :Primary root
TC or TCN received :11
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 2h:32m:25s
……output omit……
<S2>display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :4096 .d0d0-4ba6-ac20
Configure S2 as the root bridge and S1 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.
[S1]undo stp root
[S1]stp priority 8192
Run the display stp command to view information about the new root bridge.
<S1>display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :8192 .d0d0-4ba6-aab0
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :4096 .d0d0-4ba6-ac20 / 20000
CIST RegRoot/IRPC :8192 .d0d0-4ba6-aab0 / 0
CIST RootPortId :128.9 (GigabitEthernet0/0/9)
BPDU-Protection :Disabled
TC or TCN received :47
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:6m:55s
……output omit……
The highlighted lines in the preceding information indicate that S2 has become the
new root bridge.
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
[S2-GigabitEthernet0/0/9]shutdown
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]shutdown
<S1>display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :8192 .d0d0-4ba6-aab0
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :8192 .d0d0-4ba6-aab0 / 0 (This bridge is the root)
CIST RegRoot/IRPC :8192 .d0d0-4ba6-aab0 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :174
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:12m:51s
The highlighted lines in the preceding information indicate that S1 becomes the root
bridge when S2 is faulty.
Re-enable the interfaces that have been disabled on S2.
[S2]interface GigabitEthernet 0/0/9
[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
-------[CIST Global Info][Mode STP]-------
CIST Bridge :8192 .d0d0-4ba6-aab0
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :4096 .d0d0-4ba6-ac20 / 20000
CIST RegRoot/IRPC :8192 .d0d0-4ba6-aab0 / 0
CIST RootPortId :128.9 (GigabitEthernet0/0/9)
BPDU-Protection :Disabled
TC or TCN received :47
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:6m:55s
……output omit……
<S2>display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :4096 .d0d0-4ba6-ac20
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :4096 .d0d0-4ba6-ac20 / 0 (This bridge is the root)
CIST RegRoot/IRPC :4096 .d0d0-4ba6-ac20 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :135
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:8m:4s
The highlighted lines in the preceding information indicate that S2 has been
restored and has become the root bridge once again.
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
0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
0 GigabitEthernet0/0/10 ALTE DISCARDING NONE
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.
Change priorities of G0/0/9 and G0/0/10 on S2.
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.
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]stp port priority 32
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]stp port priority 16
Note that the port priorities are changed on S2, not S1.
<S2>display stp interface GigabitEthernet 0/0/9
-------[CIST Global Info][Mode STP]-------
CIST Bridge :4096 .d0d0-4ba6-ac20
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :4096 .d0d0-4ba6-ac20 / 0 (This bridge is the root)
CIST RegRoot/IRPC :4096 .d0d0-4ba6-ac20 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :147
TC count per hello :0
STP Converge Mode :Normal
Run the display stp brief command on S1 to view the role of the interfaces.
<S1>display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/9 ALTE DISCARDING NONE
0 GigabitEthernet0/0/10 ROOT FORWARDING NONE
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.
Shut down G0/0/10 on S1 and view the port roles.
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]shutdown
<S1>display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
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.
Run the display stp brief and display stp interface command on S1 to view the
roles of interfaces.
<S1>display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
0 GigabitEthernet0/0/10 ALTE DISCARDING NONE
The greyed line in the preceding information indicates that G0/0/9 and G0/0/10 cost
is 20000 by default.
Change the cost of G0/0/9 to 200000 on S1.
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]stp cost 200000
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
----[CIST][Port9(GigabitEthernet0/0/9)][DISCARDING]----
Port Protocol :Enabled
Port Role :Alternate Port
Port Priority :128
Port Cost(Dot1T ) :Config=200000 / Active=200000
Designated Bridge/Port :4096.4c1f-cc45-aacc / 128.9
Port Edged :Config=default / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :147 packets/hello-time
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
The highlighted lines in the preceding information indicates that G0/0/10 has
become the root port.
Final Configuration
<S1>display current-configuration
#
!Software Version V200R008C00SPC500
sysname S1
#
stp mode stp
stp instance 0 priority 8192
#
interface GigabitEthernet0/0/1
shutdown
#
interface GigabitEthernet0/0/2
shutdown
#
interface GigabitEthernet0/0/3
shutdown
#
interface GigabitEthernet0/0/9
stp instance 0 cost 200000
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/13
shutdown
<S2>display current-configuration
#
!Software Version V200R008C00SPC500
sysname S2
#
stp mode stp
stp instance 0 priority 4096
#
interface GigabitEthernet0/0/1
shutdown
#
interface GigabitEthernet0/0/2
shutdown
#
interface GigabitEthernet0/0/3
shutdown
#
interface GigabitEthernet0/0/6
shutdown
#
interface GigabitEthernet0/0/7
shutdown
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
user-interface con 0
user-interface vty 0 4
#
return
<S3>display current-configuration
<S4>display current-configuration
#
!Software Version V100R006C05
sysname S4
#
interface Ethernet0/0/14
shutdown
#
interface Ethernet0/0/1
shutdown
#
interface Ethernet0/0/6
shutdown
#
user-interface con 0
user-interface vty 0 4
#
return
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Topology
Scenario
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.
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.
Irrelevant interfaces must be disabled to ensure test result accuracy.
Shut down port interfaces Ethernet 0/0/1 on S3, Ethernet 0/0/13 and Ethernet 0/0/7
on S3; GigabitEthernet 0/0/1, GigabitEthernet 0/0/2, GigabitEthernet 0/0/3,
GigabitEthernet 0/0/13, GigabitEthernet 0/0/14 on S1; GigabitEthernet 0/0/1,
GigabitEthernet 0/0/2, GigabitEthernet 0/0/3, GigabitEthernet 0/0/6, GigabitEthernet
0/0/7 on S2; as well as Ethernet 0/0/1, Ethernet 0/0/14 and Ethernet 0/0/6 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
[S1]interface GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]shutdown
[S1-GigabitEthernet0/0/1]quit
[S1]interface GigabitEthernet 0/0/2
[S1-GigabitEthernet0/0/2]shutdown
[S1-GigabitEthernet0/0/2]quit
[S1]interface GigabitEthernet 0/0/3
[S1-GigabitEthernet0/0/3]shutdown
[S1-GigabitEthernet0/0/3]quit
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]shutdown
[S1-GigabitEthernet0/0/13]quit
[S1]interface GigabitEthernet 0/0/14
[S1-GigabitEthernet0/0/14]shutdown
[S1-GigabitEthernet0/0/14]quit
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S2
[S2]interface GigabitEthernet 0/0/1
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S3
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]shutdown
[S3-Ethernet0/0/1]quit
[S3]interface Ethernet 0/0/13
[S3-Ethernet0/0/13]shutdown
[S3-Ethernet0/0/13]quit
[S3]interface Ethernet 0/0/7
[S3-Ethernet0/0/7]shutdown
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S4
[S4]inter Ethernet 0/0/1
[S4-Ethernet0/0/1]shutdown
[S4-Ethernet0/0/1]quit
[S4]inter Ethernet 0/0/14
[S4-Ethernet0/0/14]shutdown
[S4-Ethernet0/0/14]quit
[S4]interface Ethernet 0/0/6
[S4-Ethernet0/0/6]shutdown
Remove the configured STP priority from S1 and S2, and assigned cost on S1.
Run the display stp command to view brief information about RSTP.
[S1]display stp
-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.d0d0-4ba6-aab0
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.d0d0-4ba6-aab0 / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.d0d0-4ba6-aab0 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :362
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:0m:45s
……output omit……
[S2]display stp
-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.d0d0-4ba6-ac20
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.d0d0-4ba6-aab0 / 20000
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 GigabitEthernet 0/0/1 on S1 and S2 connect to a router and
can be configured as edge ports.
[S1]interface GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]undo shutdown
[S1-GigabitEthernet0/0/1]stp edged-port enable
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.
Configure BPDU protection on both S1 and S2.
[S1]stp bpdu-protection
[S2]stp bpdu-protection
Run the display stp brief command to view the port protection.
<S1>display stp brief
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.
Configure loop protection on both the root port and the alternate port.
[S2]display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING BPDU
0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
0 GigabitEthernet0/0/10 ALTE DISCARDING NONE
G0/0/9 and G0/0/10 on S2 are now the root port and alternate port. Configure loop
protection on these two ports.
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]stp loop-protection
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]stp loop-protection
Since S1 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
S2 as the root, and configure loop protection on the root port and alternate port of
S1 using the same process as with S2.
Final Configuration
<S1>display current-configuration
#
!Software Version V200R008C00SPC500
sysname S1
#
stp mode rstp
stp bpdu-protection
#
interface GigabitEthernet0/0/1
undo shutdown
stp edged-port enable
#
interface GigabitEthernet0/0/2
shutdown
#
interface GigabitEthernet0/0/3
shutdown
#
interface GigabitEthernet0/0/13
shutdown
#
interface GigabitEthernet0/0/14
shutdown
#
user-interface con 0
user-interface vty 0 4
#
<S2>display current-configuration
#
!Software Version V200R008C00SPC500
sysname S2
#
stp mode rstp
stp bpdu-protection
#
interface GigabitEthernet0/0/1
undo shutdown
stp edged-port enable
#
interface GigabitEthernet0/0/2
shutdown
#
interface GigabitEthernet0/0/3
shutdown
#
interface GigabitEthernet0/0/6
shutdown
#
interface GigabitEthernet0/0/7
shutdown
#
interface GigabitEthernet0/0/9
stp loop-protection
#
interface GigabitEthernet0/0/10
stp loop-protection
#
user-interface con 0
user-interface vty 0 4
#
return
<S3>display current-configuration
#
!Software Version V100R006C05
sysname S3
#
<S4>display current-configuration
#
!Software Version V100R006C05
sysname S4
#
interface Ethernet0/0/14
shutdown
#
interface Ethernet0/0/1
shutdown
#
interface Ethernet0/0/6
shutdown
#
user-interface con 0
user-interface vty 0 4
#
return
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
next hop.
Topology
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.
If a password is requested, and unless otherwise stated, please use the password:
huawei
Tasks
Configure the device names and IP addresses for R1, R2, and R3.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/1]quit
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface 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
[R2]interface LoopBack0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.0.13.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24
[R3-GigabitEthernet0/0/2]quit
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24
<R1>ping 10.0.13.3
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
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
Reply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=2 ms
<R2>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=31 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=31 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=41 ms
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
<R2>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
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.
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.
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.0/24 Direct 0 0 D 10.0.2.2 LoopBack0
10.0.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.2.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.2 GigabitEthernet0/0/1
10.0.12.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.0.12.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.0.23.0/24 Direct 0 0 D 10.0.23.2 GigabitEthernet0/0/2
10.0.23.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2
10.0.23.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
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
[R2]ip route-static 10.0.3.0 24 10.0.23.3
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.
<R2>display ip routing-table
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.
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.
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
View the current static route configuration in the routing table of R2.
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
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.
Test network connectivity to ensure the route between R2 and R3 exists.
<R2>ping 10.0.13.3
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=34 ms
Reply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=34 ms
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
Reply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=34 ms
<R2>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=41 ms
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
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=255 time=41 ms
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.
<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,
press CTRL_C to break
1 10.0.23.3 40 ms 30 ms 30 ms
Compare the routing tables with the previous routing tables before Gigabit Ethernet
0/0/2 was disabled.
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
The next hops and preferences of the two routes as shown in the preceding routing
table for R2 have changed.
Test connectivity between R2 and the destination addresses 10.0.13.3 and 10.0.3.3
on R2.
<R2>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=3 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=2 ms
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
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=255 time=2 ms
<R2>ping 10.0.13.3
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=3 ms
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
Reply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=2 ms
Reply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=2 ms
The network is not disconnected when the link between R2 and R3 is shut down.
The tracert command can also be run to view through over which path the data is
being forwarded.
<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
traceroute to 10.0.3.3(10.0.3.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
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.
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
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.
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.
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.
[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.12.2 preference 80
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
[R3-GigabitEthernet0/0/0]quit
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
-------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 80 0 RD 10.0.12.2 GigabitEthernet0/0/1
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet0/0/1
10.0.12.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.0.12.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
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.
Test network connectivity on R1.
<R1>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=76 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=250 ms
The IP packets are reaching R3 (10.0.23.3) via the next hop 10.0.12.2 of R2.
Final Configuration
<R1>dis current-configuration
[V200R007C00SPC600]
#
sysname R1
#
interface GigabitEthernet0/0/0
shutdown
ip address 10.0.13.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.13.3
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
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD (\WTqB}%N,%
$%$
user-interface vty 0 4
#
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/0
shutdown
ip address 10.0.13.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.0.23.3 255.255.255.0
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Configuration of RIPv1.
Configuration of RIPv2.
Scenario
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
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24
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
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24
Enable RIP on R1, and then advertise the 10.0.0.0 network segment.
[R1]rip 1
[R1-rip-1]network 10.0.0.0
Enable RIP on R2, and then advertise the 10.0.0.0 network segment.
[R2]rip 1
[R2-rip-1]network 10.0.0.0
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.
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Run the undo debugging rip <process-id> or undo debugging all command to
disable the debugging functions.
<R1>undo debugging rip 1
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.
After the preceding configuration, you need to configure only version 2 in the RIP
sub view.
[R1]rip 1
[R1-rip-1]version 2
[R2]rip 1
[R2-rip-1]version 2
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
[R3]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
The debugging command can be used to view the RIPv2 periodic updates.
<R1>terminal debugging
Info: Current terminal debugging is on.
<R1>debugging rip 1 event
<R1>
Mar 29 2016 10:41:04.490.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 update queue
<R1>
Mar 29 2016 10:41:04.500.1+00:00 R1 RIP/7/DBG: 25: 6048: RIP 1: Interface GigabitEthernet0/0/0
(10.0.13.1) is deleted from the periodic update queue
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?
Final Configuration
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
interface GigabitEthernet0/0/0
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
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
rip 1
version 2
network 10.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD (\WTqB}%N,%
$%$
user-interface vty 0 4
#
return
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/0
shutdown
ip address 10.0.13.3 255.255.255.0
#
interface GigabitEthernet0/0/1
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Topology
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.
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.
Tasks
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.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.0.13.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface LoopBack 0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24
[R3-GigabitEthernet0/0/1]quit
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24
After the IP addresses have been configured for the interfaces, test the network
connectivity.
<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
Reply from 10.0.13.2: bytes=56 Sequence=5 ttl=255 time=30 ms
<R2>ping 10.0.12.3
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
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
Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=255 time=31 ms
Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=255 time=41 ms
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 10.0.0.0
[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]network 10.0.0.0
[R3]rip 1
[R3-rip-1]network 172.16.0.0
View the routing table of R1 to verify the new networks are being advertized.
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.
<R1>ping 172.16.0.1
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=80 ms
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
Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=254 time=79 ms
Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=254 time=79 ms
View the routing table of R1 that should now include an aggregated route.
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
The highlighted information shows the aggregated route. There is now no specific
route is listed in the routing table.
The preceding information shows that route aggregation reduces the size of the
routing table without affecting communication to aggregated networks.
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]rip authentication-mode simple huawei
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 usual huawei
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]rip authentication-mode md5 usual huawei
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 19 Routes : 19
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 25 Routes : 25
Destination/Mask Proto Pre Cost Flags NextHop Interface
Since R1 and R2 use different RIP authentication passwords, R1 will not receive any
advertised RIP routes from R2.
Restore the authentication password on G0/0/0 of R2 to huawei.
[R2]interface GigabitEthernet0/0/0
[R2- GigabitEthernet0/0/0]rip authentication-mode simple huawei
Since R2 and R3 use different RIP authentication modes, R3 cannot receive any
advertised RIP routes from R2.
Restore the authentication mode on G0/0/1 of R2 to MD5.
[R2]interface GigabitEthernet0/0/1
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.
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
[R2]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 19 Routes : 19
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 25 Routes : 25
Destination/Mask Proto Pre Cost Flags NextHop Interface
Final Configuration
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0
rip authentication-mode simple cipher %$%$S2AJ2_mJ)Hf++RSng6^NN|Xl%$%$
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
rip 1
version 2
network 10.0.0.0
#
user-interface con 0
authentication-mode password
set authentication password cipher %$%$+L'YR&IZt'4,)>-*#lH",}%K-oJ_M9+'lOU~bD (\WTqB}%N,%
$%$
user-interface vty 0 4
#
return
<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0
rip authentication-mode simple cipher %$%$+Ob&JcQxU6mUJ(ZXLZY#OEXz%$%$
rip summary-address 172.16.0.0 255.255.0.0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/1
ip address 10.0.12.3 255.255.255.0
rip authentication-mode md5 usual cipher %$%$_5VL+wN6FNe]rVKbh[E(O=E>%$%$
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
interface LoopBack2
ip address 172.16.0.1 255.255.255.0
#
interface LoopBack3
ip address 172.16.1.1 255.255.255.0
#
interface LoopBack4
ip address 172.16.2.1 255.255.255.0
#
interface LoopBack5
ip address 172.16.3.1 255.255.255.0
#
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Topology
Tasks
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.
Establish the basic system configuration and addressing for the lab.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet 0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet 0/0/1]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet 0/0/1]ip address 10.0.12.2 24
[R2-GigabitEthernet 0/0/1]quit
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 10.0.2.2 24
Enable the interfaces necessary for this lab and disable those not needed.
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.
[R1]ospf 1 router-id 10.0.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
Different process ID's 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.
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
[R2-ospf-1]area 0
…output omitted…
Mar 30 2016 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)
After OSPF route convergence is complete, view routing tables of R1, R2, and R3.
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 16
<R2>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=37 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=42 ms
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
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=254 time=42 ms
Run the display ospf peer command to view the OSPF neighbor status.
<R1>display ospf peer
Neighbors
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.
The display ospf peer brief command can also be used to display a condensed
version of the OSPF peer information.
<R1>display ospf peer brief
Run the display ospf interface GigabitEthernet 0/0/0 command on R1 to view the
default OSPF hello interval and dead interval.
<R1>display ospf interface GigabitEthernet 0/0/0
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.
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.
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.
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ospf timer hello 15
[R3-GigabitEthernet0/0/0]ospf timer dead 60
…output omitted…
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
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Run the display ospf peer command to view the DR and BDR of R1 and R3.
<R1>display ospf peer 10.0.3.3
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.
Run the ospf dr-priority command to change DR priorities of R1 and R3.
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ospf dr-priority 200
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]shutdown
[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
According to the preceding information, R1's priority is higher than R3's priority, so
R1 becomes DR and R3 becomes the BDR.
Final Configuration
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0
ospf dr-priority 200
ospf timer hello 15
#
interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.0
<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
ospf 1 router-id 10.0.2.2
area 0.0.0.0
network 10.0.2.0 0.0.0.255
network 10.0.12.0 0.0.0.255
#
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
#
return
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Topology
Scenario
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
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
<Huawei>system-view
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
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
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 huawei123
Info: Add a new user.
Warning: The user access modes include Telnet, FTP or HTTP, and so security risks exist.
Info: After you change the rights (including the password, access type, FTP directory, and
level) of a local user, the rights of users already online do not change. The change takes
effect to users who go online after the change.
Info: After you change the rights (including the password, access type, FTP directory, and
level) of a local user, the rights of users already online do not change. The change takes
effect to users who go online after the change.
Info: After you change the rights (including the password, access type, FTP directory, and
level) of a local user, the rights of users already online do not change. The change takes
effect to users who go online after the change.
[R1]display ftp-server
User count 0
Listening port 21
Acl number 0
[R2-ftp]
Following entry of the correct user name and password, the FTP server can be
successfully logged into.
Run the dir command before downloading a file or after uploading a file to view the
detailed information of the file.
[R2-ftp]dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx 1 noone nogroup 0 May 03 18:03 .
-rwxrwxrwx 1 noone nogroup 114552448 Jan 19 2012 AR2220E-V200R006C10SPC300.cc
-rwxrwxrwx 1 noone nogroup 159858 May 03 17:59 mon_file.txt
-rwxrwxrwx 1 noone nogroup 304700 Mar 03 11:11 sacrule.dat
-rwxrwxrwx 1 noone nogroup 783 Mar 03 11:12 default_local.cer
-rwxrwxrwx 1 noone nogroup 0 Dec 20 2015 brdxpon_snmp_cfg.efs
-rwxrwxrwx 1 noone nogroup 777 May 03 18:03 vrpcfg.zip
drwxrwxrwx 1 noone nogroup 0 Mar 10 11:14 update
drwxrwxrwx 1 noone nogroup 0 May 03 18:03 localuser
drwxrwxrwx 1 noone nogroup 0 Mar 17 10:45 dhcp
-rwxrwxrwx 1 noone nogroup 460 May 03 18:03 private-data.txt
-rwxrwxrwx 1 noone nogroup 126352896 Mar 10 11:09 AR2220E-V200R007C00SPC600.cc
drwxrwxrwx 1 noone nogroup 0 Mar 10 11:15 shelldir
-rwxrwxrwx 1 noone nogroup 11606 May 03 18:00 mon_lpu_file.txt
drwxrwxrwx 1 noone nogroup 0 Mar 18 14:45 huawei
-rwxrwxrwx 1 noone nogroup 120 Mar 18 15:02 text.txt226 Transfer complete.
FTP: 836 byte(s) received in 0.976 second(s) 856.55byte(s)/sec.
[R2-ftp]binary
Retrieve a file from the FTP server. Note: If the vrpcfg.zip file is not present in the sd1:
After downloading the file from FTP server, use the bye command to close the
connection
[R2-ftp]bye
221 Server closing.
<R2>dir
Directory of flash:/
A file can be uploaded to the FTP server by using the command put, for which a new
file name can also be assigned.
After uploading the file, check for the presence of the file on FTP server.
<R1>dir
Directory of flash:/
<R2>delete flash:/vrpnew.zip
Delete flash:/vrpnew.zip? (y/n)[n]:y
Info: Deleting file flash:/vrpnew.zip...succeed.
Note: Please take extreme care when deleting the configuration files so to ensure
that the entire flash:/ directory of R1 and R2 is not erased.
Final Configuration
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
ftp server enable
<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
ftp server enable
set default ftp-directory flash:
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$=i~>Xp&aY+*2cEVcS-A23Uwe%$%$
local-user admin service-type http
local-user huawei password cipher %$%$<;qM3D/O;ZLqy/"&6wEESdg$%$%$
Learning Objectives
As a result of this lab section, you should achieve the following tasks:
Topology
Scenario
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.
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
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/1]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24
[R3-GigabitEthernet0/0/1]shutdown
[R3-GigabitEthernet0/0/1]quit
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S1
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S2
Disable the port interfaces between S1 and S2 as well as other interfaces to prevent
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/6 and 0/0/7
Verify that only interface Gigabit Ethernet 0/0/2 is disabled on R1 and that only
The DHCP service is not enabled by default, enable the DHCP service on the
router(s).
[R1]dhcp enable
[R3]dhcp enable
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.
[R1]ip pool pool1
Info: It's successful to create an IP address pool.
[R1-ip-pool-pool1]network 10.0.12.0 mask 24
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
Pool-name : pool1
Pool-No : 0
Lease : 1 Days 12 Hours 0 Minutes
Domain-name : -
DNS-server0 : -
NBNS-server0 : -
Netbios-type : -
Position : Local Status : Unlocked
Gateway-0 : 10.0.12.1
Network : 10.0.12.0
Mask : 255.255.255.0
VPN instance : --
---------------------------------------------------------------------------- Start
End Total Used Idle(Expired) Conflict Disable
----------------------------------------------------------------------------
10.0.12.1 10.0.12.254 253 0 253(0) 0 0
----------------------------------------------------------------------------
the DHCP server (R1). Perform the same steps on S2 for R3.
[S1]dhcp enable
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.
----------------------------------------------------------------------------
Start End Total Used Idle(Expired) Conflict Disable
----------------------------------------------------------------------------
10.0.12.1 10.0.12.254 253 1 252(0) 0 0
----------------------------------------------------------------------------
Ensure that global pool configuration has been completed for both R1 and R3
before continuing!
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
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.
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]dhcp select interface
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
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.
Flush the existing Vlanif1 address from S2 to allow for dynamic allocation of a new
[S2]interface Vlanif 1
[S2-Vlanif1]shutdown
[S2-Vlanif1]undo shutdown
The interface Vlanif1 shows to have been allocated an address from the
GigabitEthernet0/0/2 address pool of R1.
Flush the existing Vlanif1 address from S1 to allow for dynamic allocation of a new
IP address from the interface GigabitEther0/0/1 pool.
[S1]interface Vlanif 1
[S1-Vlanif1]shutdown
[S1-Vlanif1]undo shutdown
Enable interface Gigabit Ethernet 0/0/1 to allow the DHCP server to become active
Verify that the new IP address as been allocated from the interface pool.
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.
Final Configuration
[R1]display current-configuration
[V200R007C00SPC600]
#
[R3]dis current-configuration
[V200R007C00SPC600]
#
sysname R3
#
dhcp enable
#
ip pool pool2
gateway-list 10.0.23.3
network 10.0.23.0 mask 255.255.255.0
lease day 1 hour 12 minute 0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.3 255.255.255.0
<S1>dis current-configuration
#
!Software Version V200R008C00SPC500
sysname S1
#
dhcp enable
#
interface Vlanif1
ip address dhcp-alloc
#
ip route-static 0.0.0.0 0.0.0.0 10.0.12.3
#
user-interface con 0
user-interface vty 0 4
#
return
<S2>display current-configuration
#
!Software Version V200R008C00SPC500
sysname S2
#
dhcp enable
#
Statement:
This material is for personal use only, and can not be used by any individual or organization for any commercial purposes.