You are on page 1of 24

ODO000103 File Management

System
ISSUE 1.0

Fixed
Fixed Network
Network Curriculum
Curriculum
Development
Development Section
Section
Objectives

At the end of this session, you should be able to:

 Use the file system

 Use FTP/TFTP

 Manage the configuration file

2
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Contents

Chapter 1 File System

Chapter 2 FTP/TFTP Operation

Chapter 3 Configuration File Management

3
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
File System

 Overview

 Directory operations

 File operations

4
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Overview

 The file system allows you to manage the files and directories,
such as create a file system, create, delete, modify, and
rename a file and directory, and display the contents of a file.

5
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Directory Operations
 Create a directory
 mkdir directory
<Quidway> mkdir dd

Created dir dd.

 Delete a directory All the


rmdir directory

commands are
<Quidway> rmdir test
Rmdir test?[Y/N]:y
performed in
% Removed directory test the user view.
 Display the current working directory
 pwd
<Quidway> pwd
flash:/test
6
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Directory Operations (Continued)

 Display directories or files details


 dir
<Quidway> dir flash:/test/
Directory of flash:/test/
0 -rw- 4 Mar 01 2004 21:19:27 sample.txt

1 -rw- 80 Mar 09 2004 09:47:36 test.txt

 Change the current directory


 cd directory
All the
<Quidway> cd test
<Quidway> pwd
commands are
flash:/test performed in
the user view.
7
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
File Operations

 Delete a file
 delete [ /unreserved ] filename
<Quidway> delete flash:/test/test.txt
Delete flash:/test/test.txt?[Y/N]
<Quidway> All the
 Undelete a deleted file commands are
 undelete filename performed in
<Quidway> undelete sample.bak
the user view.
Undelete flash:/test/sample.bak ?[Y/N]:y
% Undeleted file flash:/test/sample.bak

 Empty the recycle bin


 reset recycle-bin [ filename ]
<Quidway> reset recycle-bin 8
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
File Operations (Cont.)

 Display the contents of a file


 more filename
<Quidway> more test.txt
AppWizard has created this test application for you.
This file contains a summary of what you will find in each of the files that
make up your test application.
Test.dsp
All the
 Copy a file commands are
 copy source-filename destination-filename performed in
<Quidway> copy hda1:/sample.txt flash:/ the user view.
Copy hda1:/sample.txt to flash:/sample.txt ?[Y/N]:Y
% Copyed file hda1:/sample.txt to flash:/sample.txt

9
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Storage Device Operations

 Format a storage device


 format device-name
<Quidway> format flash:
All data on flash: will be lost , proceed with format ? [Y/N]:y/
%Format flash: completed.

 Fix the storage device that malfunctions in the file system.


 fixdisk device-name All the
<Quidway> fixdisk flash: commands are
Fixdisk flash: will take long time if needed. performed in
Fixdisk flash: completed.
the user view.
10
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Contents

Chapter 1 File System

Chapter 2 FTP/TFTP Operation

Chapter 3 Configuration File Management

11
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Chapter 2 NE5000E/NE80E FTP/TFTP Operations

 Introduction to FTP/TFTP

 FTP operations

 TFTP operations

12
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Introduction to FTP/TFTP

 FTP is an application layer protocol in the TCP/IP protocol


suite, designed to provide file transport services between
remote hosts. The FTP protocol is implemented based on an
appropriate file system, and usually on TCP.
 TFTP (Trivial File Transfer Protocol) is a simple file transfer
protocol. Compared with FTP, TFTP has no complex
interactive storage interface and authentication control, and is
suitable for use in the environment where no complex
interaction is required between the client and server. It is
implemented based on UDP.

13
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
FTP Operations

 Routers and switches Support FTP Server and FTP Client.


 TFTP Protocol Configuration
 Start the FTP server
 ftp server enable (System View)
 Configure the Authentication and Authorization of the FTP server
 Only these users who have passed the authentication and been authorized
can use the services of the FTP server.
 Below is an example of configuring the authentication and authorization of
the FTP server (aaa is available on AR46 series routers).
– [Quidway] aaa
– [Quidway-aaa] local-user quidway
– [Quidway-aaa] local-user quidway service-type ftp
– [Quidway-aaa] local-user quidway password simple huawei
– [Quidway-aaa] local-user quidway ftp-directory flash:/ftp/quidway
14
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
FTP Operations (Continued)

 Display and debug the FTP server


 Display the FTP server
 display ftp-server
<Quidway> display ftp-server
FTP server is running
Max user number 5
User count 0
T imeout value(in minute) 30

 Display on-line FTP users


 display ftp-users
<Quidway> display ftp-users
username host port idle topdir
ftp 192.168.200.100 1130 0 hda1:

15
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
TFTP Operations

 VRP can only be the client terminal of TFTP and perform transmission
in binary mode.
 TFTP protocol configuration
 Download files through TFTP
 tftp ip-address get source-filename [ destination-filename ] (in user view)

 An example for downloading files via TFTP:


 Download the vrpcfg.txt file in the root directory of the TFTP server to the
local hard disk. The IP address of the TFTP server is 1.1.254.2. Save the
file as vrpcfg.bak after downloading.
 <Quidway> tftp 1.1.254.2 get vrpcfg.txt vrpcfg.bak

16
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
TFTP Operations (Continued)

 Upload files through the TFTP


 tftp ip-address put source-filename [ destination-filename ] (user View)

 An example for TFTP uploading files


 Upload the vrpcfg.txt file in the root directory of the Flash to the default
path of the TFTP server. The IP address of the TFTP server is 1.1.254.2.
Save the file as vrpcfg.bak on the TFTP server.
 <Quidway> tftp 1.1.254.2 put flash:/vrpcfg.txt vrpcfg.bak

17
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Contents

Chapter 1 File System

Chapter 2 FTP/TFTP Operation

Chapter 3 Configuration File Management

18
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Chapter 3 NE5000E/NE80E Configuration File
Management

 Introduction to the configuration file

 Use the configuration file

19
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Introduction to the Configuration File
 Contents and format of the configuration file
 The configuration file is saved in the text format
 In general, these sections are arranged in the sequence of global
configuration, physical interface configuration, logical interface
configuration, and route protocol configuration.
 Display the current and initial configurations of the router
 Display the current configuration of the router
 display current-configuration [ controller | interface interface-type
[ interface-number ] | configuration [ configuration-type ] ]
 The corresponding name in the CISCO IOS: show running-configuration
 Display the initial configuration of the router
 display saved-configuration
 The corresponding name in the CISCO IOS: show startup-configuration

 Note: The current-configuration is the configuration file running in the RAM,


while the saved-configuration is the file saved in the Flash. The performance
of the command SAVE means to copy the current-configuration file to the
saved-configuration file.
20
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Introduction to the Configuration File (Continued)

 Display the running configuration of the current view/interface view


(HUAWEI features)
 display this
 Execute the command in the current view to display the running
configuration of the view; execute the command in the current interface
view to display the configuration information of the interface.
 Modify and save the current configuration
 save [ cfgfile ]
 The corresponding command in the Cisco IOS: copy running-
configuration startup-configuration
 The default name of the saved file in the Flash is vrpcfg.txt (or
vrpcfg.cfg). You can also specify a name for the saved file, so that you
can save multiple configuration files in the FLASH, and select the
desired one to load when starting up the equipment. 21
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
Introdution to the Configutation File (Continued)

 Erase the configuration file


 reset saved-configuration
 The corresponding command in the Cisco IOS: erase
 This command only deletes the configuration files saved in the
Flash. To delete the running configuration in RAM, you must
reboot the equipment.
Warning: the command will empty all the configuration files,
so it should be used cautiously.

22
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
配置文件使用
 Configure the file name of the system software used for the next
startup
 startup system-software sysfile
 allows you to save multiple VRP applications in the storage device, and
to set the system file name for next startup
 Configure the file name of the configuration file used for next startup
 startup saved-configuration cfgfile
 allows to you to save multiple configuration files in the storage device,
and to set the configuration file name for next startup
 Compare the configuration files saved in the storage with the current
configuration
 compare configuration [ line-number1 line-number2 ]
 The line-number1 is a running-configuration file, while the line-number2
is a startup-configuration file

23
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal
24
Confidential Information of Huawei.
No Spreading without Permission. Security Level: Internal

You might also like