Configuration Guide - Basic Configurations

Transcription

Configuration Guide - Basic Configurations
HUAWEI NetEngine80E/40E Router
V600R003C00
Configuration Guide - Basic
Configurations
Issue
02
Date
2011-09-10
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2011. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written
consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or representations
of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.
Huawei Technologies Co., Ltd.
Address:
Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website:
http://www.huawei.com
Email:
[email protected]
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
i
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
About This Document
About This Document
Purpose
This part describes the organization of this document, product version, intended audience,
conventions, and Change history.
NOTE
l This document takes interface numbers and link types of the NE40E-X8 as an example. In working
situations, the actual interface numbers and link types may be different from those used in this
document.
l On NE80E/40E series excluding NE40E-X1 and NE40E-X2, line processing boards are called Line
Processing Units (LPUs) and switching fabric boards are called Switching Fabric Units (SFUs). On
the NE40E-X1 and NE40E-X2, there are no LPUs and SFUs, and NPUs implement the same functions
of LPUs and SFUs to exchange and forward packets.
Related Versions
The following table lists the product versions related to this document.
Product Name
Version
HUAWEI NetEngine80E/40E
Router
V600R003C00
Intended Audience
This document is intended for:
l
Commissioning Engineer
l
Data Configuration Engineer
l
Network Monitoring Engineer
l
System Maintenance Engineer
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
ii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Symbol
About This Document
Description
DANGER
WARNING
CAUTION
Alerts you to a high risk hazard that could, if not avoided,
result in serious injury or death.
Alerts you to a medium or low risk hazard that could, if
not avoided, result in moderate or minor injury.
Alerts you to a potentially hazardous situation that could,
if not avoided, result in equipment damage, data loss,
performance deterioration, or unanticipated results.
TIP
Provides a tip that may help you solve a problem or save
time.
NOTE
Provides additional information to emphasize or
supplement important points in the main text.
Command Conventions
The command conventions that may be found in this document are defined as follows.
Issue 02 (2011-09-10)
Convention
Description
Boldface
The keywords of a command line are in boldface.
Italic
Command arguments are in italics.
[]
Items (keywords or arguments) in brackets [ ] are optional.
{ x | y | ... }
Optional items are grouped in braces and separated by
vertical bars. One item is selected.
[ x | y | ... ]
Optional items are grouped in brackets and separated by
vertical bars. One item is selected or no item is selected.
{ x | y | ... }*
Optional items are grouped in braces and separated by
vertical bars. A minimum of one item or a maximum of all
items can be selected.
[ x | y | ... ]*
Optional items are grouped in brackets and separated by
vertical bars. Several items or no item can be selected.
&<1-n>
The parameter before the & sign can be repeated 1 to n times.
#
A line starting with the # sign is comments.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
About This Document
Change History
Changes between document issues are cumulative. The latest document issue contains all the
changes made in earlier issues.
Changes in Issue 02 (2011-09-10)
The second commercial release.
l
Device Maintenance
10.8 Configuring a Working Mode for an LPUF-40 or LPUF-20/21 is added to describe
the configuration of service mode for an LPUF-20/21 or LPUF-40.
Changes in Issue 01 (2011-06-30)
Initial commercial release.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iv
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
Contents
About This Document.....................................................................................................................ii
1 Logging In to the System for the First Time............................................................................1
1.1 Introduction to Log In to the Device for the First Time.....................................................................................2
1.2 Logging In to the Device Through the Console Port..........................................................................................2
1.2.1 Establishing the Configuration Task.........................................................................................................2
1.2.2 Establishing the Physical Connection........................................................................................................3
1.2.3 Logging in to the router.............................................................................................................................3
1.3 Logging In to the router That Supports the Plug-and-Play Function.................................................................5
2 CLI Overview.................................................................................................................................7
2.1 CLI Introduction.................................................................................................................................................8
2.1.1 Command Line Interface...........................................................................................................................8
2.1.2 Command Levels.......................................................................................................................................8
2.1.3 Command Line Views.............................................................................................................................11
2.2 Online Help.......................................................................................................................................................12
2.2.1 Full Help..................................................................................................................................................12
2.2.2 Partial Help..............................................................................................................................................13
2.2.3 Error Messages of the Command Line Interface.....................................................................................13
2.3 CLI Features.....................................................................................................................................................14
2.3.1 Editing.....................................................................................................................................................14
2.3.2 Displaying................................................................................................................................................14
2.3.3 Regular Expressions................................................................................................................................15
2.3.4 Previously-Used Commands...................................................................................................................18
2.3.5 Batch Command Execution.....................................................................................................................19
2.4 Shortcut Keys...................................................................................................................................................20
2.4.1 Classifying Shortcut Keys.......................................................................................................................20
2.4.2 Defining Shortcut Keys...........................................................................................................................22
2.4.3 Use of Shortcut Keys...............................................................................................................................22
2.5 Configuration Examples...................................................................................................................................23
2.5.1 Example for Running Commands in Batches..........................................................................................23
2.5.2 Example for Using Tab............................................................................................................................24
2.5.3 Example for Using Shortcut Keys...........................................................................................................25
2.5.4 Example for Copying Commands Using Shortcut Keys.........................................................................25
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
v
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
3 Basic Configuration.....................................................................................................................27
3.1 Configuring the Basic System Environment....................................................................................................28
3.1.1 Establishing the Configuration Task.......................................................................................................28
3.1.2 Switching the Language Mode................................................................................................................28
3.1.3 Configuring the Equipment Name...........................................................................................................29
3.1.4 Setting the System Clock.........................................................................................................................29
3.1.5 Configuring a Header..............................................................................................................................30
3.1.6 Configuring Command Levels................................................................................................................31
3.1.7 Configuring the Undo Command to Match in the Previous View Automatically..................................32
3.2 Displaying System Status Messages.................................................................................................................33
3.2.1 Displaying System Configuration...........................................................................................................33
3.2.2 Displaying System Status........................................................................................................................34
3.2.3 Collecting System Diagnostic Information.............................................................................................34
4 Configuring User Interface........................................................................................................35
4.1 User Interface Overview...................................................................................................................................36
4.2 Configuring the Console User Interface...........................................................................................................38
4.2.1 Establishing the Configuration Task.......................................................................................................38
4.2.2 Setting Physical Attributes of Console User Interface............................................................................38
4.2.3 Setting Terminal Attributes of Console User Interface...........................................................................40
4.2.4 Configuring User Priority of Console User Interface..............................................................................41
4.2.5 Configuring the User Authentication Mode of the Console User Interface............................................41
4.2.6 Checking the Configuration.....................................................................................................................43
4.3 Configuring the AUX User Interface...............................................................................................................44
4.3.1 Establishing the Configuration Task.......................................................................................................44
4.3.2 Setting Physical Attributes of AUX User Interface.................................................................................44
4.3.3 Setting Terminal Attributes of AUX User Interface................................................................................46
4.3.4 Setting User Priority of AUX User Interface..........................................................................................47
4.3.5 Setting Modem Attributes of AUX User Interface..................................................................................47
4.3.6 (Optional) Configuring Auto-Execute Commands of AUX User Interface............................................48
4.3.7 Setting User Authentication Mode of AUX User Interface.....................................................................49
4.3.8 Checking the Configuration.....................................................................................................................50
4.4 Configuring VTY User Interface......................................................................................................................51
4.4.1 Establishing the Configuration Task.......................................................................................................51
4.4.2 Configuring Maximum VTY User Interfaces.........................................................................................52
4.4.3 (Optional)Setting Limit on Incoming and Outgoing Calls of VTY User Interfaces...............................53
4.4.4 Setting Terminal Attributes of the VTY User Interface..........................................................................53
4.4.5 Setting User Priority of VTY User Interface...........................................................................................54
4.4.6 Setting User Authentication Mode of the VTY User Interface...............................................................55
4.4.7 (Optional) Configuring NMS Users to Log In Through VTY User Interfaces.......................................56
4.4.8 Checking the Configuration.....................................................................................................................58
4.5 Configuration Examples...................................................................................................................................59
4.5.1 Example for Configuring Console User Interface...................................................................................59
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
vi
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
4.5.2 Example for Configuring AUX User Interface.......................................................................................61
4.5.3 Example for Configuring VTY User Interface........................................................................................63
5 Configuring User Login.............................................................................................................65
5.1 Overview of User Login...................................................................................................................................67
5.2 Logging in to the Devices Through the Console Port......................................................................................67
5.2.1 Establishing the Configuration Task.......................................................................................................68
5.2.2 Configuring Console User Interface........................................................................................................68
5.2.3 Logging in to the router Through a Console Port....................................................................................68
5.2.4 Checking the Configuration.....................................................................................................................69
5.3 Logging in to the Devices Through the AUX Port...........................................................................................70
5.3.1 Establishing the Configuration Task.......................................................................................................70
5.3.2 Configuring AUX User Interface............................................................................................................71
5.3.3 Logging in to the routerThrough an AUX Port.......................................................................................71
5.3.4 Checking the Configuration.....................................................................................................................74
5.4 Logging in to the Devices by Using Telnet......................................................................................................75
5.4.1 Establishing the Configuration Task.......................................................................................................75
5.4.2 Configuring VTY User Interface.............................................................................................................76
5.4.3 (Optional) Configuring Local Telnet Users.............................................................................................77
5.4.4 Enabling the Telnet Service.....................................................................................................................77
5.4.5 (Optional) Configuring Listening Port Number for Telnet Server..........................................................78
5.4.6 Logging in to the router by Using Telnet................................................................................................79
5.4.7 Checking the Configuration.....................................................................................................................80
5.5 Logging in to the Devices by Using STelnet....................................................................................................81
5.5.1 Establishing the Configuration Task.......................................................................................................81
5.5.2 Configuring VTY User Interface.............................................................................................................82
5.5.3 Configuring SSH for the VTY User Interface.........................................................................................82
5.5.4 Configuring an SSH User and Specifying STelnet as One of Service Types.........................................83
5.5.5 Enabling the STelnet Server Function.....................................................................................................86
5.5.6 (Optional) Configuring the STelnet Server Parameters...........................................................................86
5.5.7 Logging in to the router by Using STelnet..............................................................................................88
5.5.8 Checking the Configuration.....................................................................................................................89
5.6 Common Operations After Login.....................................................................................................................90
5.6.1 Establishing the Configuration Task.......................................................................................................90
5.6.2 Switching User Levels.............................................................................................................................90
5.6.3 Locking User Interfaces...........................................................................................................................91
5.6.4 Sending Messages to Other User Interfaces............................................................................................92
5.6.5 Displaying Logged-in Users....................................................................................................................92
5.6.6 Clearing Logged-in Users........................................................................................................................93
5.6.7 Configuring Configuration Locking........................................................................................................93
5.7 Configuration Examples...................................................................................................................................94
5.7.1 Example for Configuring User Login Through a Console Port..............................................................94
5.7.2 Example for Logging In Through the AUX Port....................................................................................97
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
vii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
5.7.3 Example for Configuring User Login by Using Telnet...........................................................................98
5.7.4 Example for Configuring User Login by Using STelnet.......................................................................101
6 Managing File System..............................................................................................................105
6.1 File System Overview....................................................................................................................................106
6.1.1 File System............................................................................................................................................106
6.1.2 Methods of File Management................................................................................................................106
6.2 Performing File Operations by Means of the File System.............................................................................107
6.2.1 Establishing the Configuration Task.....................................................................................................107
6.2.2 Managing Storage Devices....................................................................................................................108
6.2.3 Managing the Directory.........................................................................................................................108
6.2.4 Managing Files......................................................................................................................................109
6.3 Performing File Operations by Means of FTP...............................................................................................111
6.3.1 Establishing the Configuration Task.....................................................................................................112
6.3.2 Configuring a Local FTP User..............................................................................................................112
6.3.3 (Optional) Specifying a Port Number for the FTP Server.....................................................................113
6.3.4 Enabling the FTP Server........................................................................................................................114
6.3.5 (Optional) Configuring the FTP Server Parameters..............................................................................114
6.3.6 (Optional) Configuring an FTP ACL....................................................................................................115
6.3.7 Accessing the System by Using FTP.....................................................................................................116
6.3.8 Performing File Operations by Using FTP Commands.........................................................................117
6.3.9 Checking the Configuration...................................................................................................................119
6.4 Performing File Operations by Means of SFTP.............................................................................................119
6.4.1 Establishing the Configuration Task.....................................................................................................119
6.4.2 Configuring VTY User Interface...........................................................................................................120
6.4.3 Configuring SSH for the VTY User Interface.......................................................................................120
6.4.4 Configuring an SSH User and Specifying SFTP as One of Service Types...........................................121
6.4.5 Enabling the SFTP Service....................................................................................................................124
6.4.6 (Optional) Configuring the STelnet Server Parameters.........................................................................125
6.4.7 Accessing the System by Using SFTP..................................................................................................126
6.4.8 Performing File Operations by Using SFTP..........................................................................................127
6.4.9 Checking the Configuration...................................................................................................................128
6.5 Performing File Operations by Means of Xmodem.......................................................................................129
6.5.1 Establishing the Configuration Task.....................................................................................................130
6.5.2 Getting a File Through Xmodem...........................................................................................................130
6.6 Configuration Examples.................................................................................................................................131
6.6.1 Example for Performing File Operations by Means of the File System...............................................131
6.6.2 Example for Performing File Operations by Means of FTP.................................................................132
6.6.3 Example for Performing File Operations by Means of SFTP...............................................................135
6.6.4 Example for Performing File Operations by Means of Xmodem..........................................................137
7 Configuring System Startup....................................................................................................140
7.1 System Startup Overview...............................................................................................................................141
7.1.1 System Software....................................................................................................................................141
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
viii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
7.1.2 Configuration Files................................................................................................................................141
7.1.3 Configuration Files and Current Configurations...................................................................................141
7.2 Managing Configuration Files........................................................................................................................142
7.2.1 Establishing the Configuration Task.....................................................................................................142
7.2.2 Saving Configuration Files....................................................................................................................143
7.2.3 Clearing a Configuration File................................................................................................................144
7.2.4 Comparing Configuration Files.............................................................................................................145
7.2.5 Checking the Configuration...................................................................................................................146
7.3 Specifying a File for System Startup..............................................................................................................147
7.3.1 Establishing the Configuration Task.....................................................................................................147
7.3.2 Configuring System Software for a router to Load for the Next Startup..............................................147
7.3.3 Configuring the Configuration File for Router to Load for the Next Startup.......................................148
7.3.4 Checking the Configuration...................................................................................................................148
7.4 Configuration Examples.................................................................................................................................149
7.4.1 Example for Configuring System Startup.............................................................................................149
8 Accessing Another Device.......................................................................................................152
8.1 Accessing Another Device.............................................................................................................................153
8.1.1 Telnet Method........................................................................................................................................153
8.1.2 FTP Method...........................................................................................................................................155
8.1.3 TFTP Method........................................................................................................................................155
8.1.4 SSH Method..........................................................................................................................................156
8.2 Logging in to Other Devices by Using Telnet................................................................................................157
8.2.1 Establishing the Configuration Task.....................................................................................................157
8.2.2 (Optional) Configuring a Source IP Address for an Telnet Client........................................................158
8.2.3 Logging in to Another Device by Using Telnet....................................................................................158
8.2.4 Checking the Configuration...................................................................................................................159
8.3 Connecting to Another Device by Using the Telnet Redirection Function....................................................160
8.3.1 Establishing the Configuration Task.....................................................................................................160
8.3.2 Enabling the Telnet Redirection Function.............................................................................................161
8.3.3 Connecting Another Device by Using the Telnet Redirection Function...............................................162
8.3.4 Checking the Configuration...................................................................................................................162
8.4 Logging in to Another Device by Using STelnet...........................................................................................163
8.4.1 Establishing the Configuration Task.....................................................................................................163
8.4.2 Configuring the First Successful Login to Another Device (Enabling the First-Time Authentication on
the SSH Client)...............................................................................................................................................163
8.4.3 Configuring the First Successful Login to Another Device (Allocating an RSA Public Key to the SSH
Server)............................................................................................................................................................164
8.4.4 Logging in to Another Device by Using STelnet..................................................................................166
8.4.5 Checking the configuration...................................................................................................................166
8.5 Accessing Files on Another Device by Using TFTP......................................................................................167
8.5.1 Establishing the Configuration Task.....................................................................................................167
8.5.2 (Optional) Configuring a Source IP Address for a TFTP Client...........................................................168
8.5.3 (Optional) Configuring TFTP Access Authority...................................................................................168
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
ix
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
8.5.4 Downloading Files by Using TFTP.......................................................................................................169
8.5.5 Uploading Files by Using TFTP............................................................................................................169
8.5.6 Checking the Configuration...................................................................................................................170
8.6 Accessing Files on Another Device by Using FTP........................................................................................170
8.6.1 Establishing the Configuration Task.....................................................................................................171
8.6.2 (Optional) Configuring Source IP Address and Interface of the FTP Client........................................171
8.6.3 Connecting to Other Devices by Using FTP Commands......................................................................172
8.6.4 Operating Files by Using FTP Commands............................................................................................173
8.6.5 Changing Login Users...........................................................................................................................175
8.6.6 Disconnecting from the FTP Server......................................................................................................176
8.6.7 Checking the Configuration...................................................................................................................176
8.7 Accessing Files on Another Device by Using SFTP......................................................................................177
8.7.1 Establishing the Configuration Task.....................................................................................................177
8.7.2 (Optional) Configuring a Source IP Address for an SFTP Client.........................................................178
8.7.3 Configuring the First Successful Login to Another Device (Enabling the First-Time Authentication on
the SSH Client)...............................................................................................................................................178
8.7.4 Configuring the First Successful Login to Another Device (Allocating an RSA Public Key to the SSH
Server)............................................................................................................................................................179
8.7.5 Connecting to Other Devices by Using SFTP.......................................................................................180
8.7.6 Operating Files by Using SFTP Commands..........................................................................................181
8.7.7 Checking the Configuration...................................................................................................................183
8.8 Configuration Examples.................................................................................................................................183
8.8.1 Example for Logging in to Another Device by Using Telnet...............................................................183
8.8.2 Example for Logging in to Another Device by Using the Telnet Redirection Function.......................186
8.8.3 Example for Logging in to Another Device by Using Telnet on a VPN...............................................187
8.8.4 Example for Configuring the Device as the STelnet Client to Connect to the SSH Server..................189
8.8.5 Example for Accessing Files on Another Device by Using TFTP........................................................195
8.8.6 Example for Configuring the Access of the TFTP Server on the Public Network When the Management
VPN Instance Is Used.....................................................................................................................................197
8.8.7 Example for Accessing Files on Another Device by Using FTP..........................................................199
8.8.8 Example for Configuring the Access of the FTP Server on the Public Network When the Management
VPN Instance Is Used.....................................................................................................................................201
8.8.9 Example for Accessing Files on Another Device by Using SFTP........................................................202
8.8.10 Example for Configuring the Access of the SFTP Server on the Public Network When the Management
VPN Instance Is Used.....................................................................................................................................208
8.8.11 Example for Accessing the SSH Server Through Other Port Numbers..............................................213
8.8.12 Example for an SSH Client in the Public Network to Access an SSH Server in the Private Network
........................................................................................................................................................................219
9 Clock Synchronization Configuration..................................................................................229
9.1 Introduction of Clock Synchronization Configuration...................................................................................230
9.1.1 Overview of Clock Synchronization Configuration..............................................................................230
9.1.2 Clock Synchronization Supported by the NE80E/40E..........................................................................230
9.2 Setting Basic Configurations for Clock Synchronization...............................................................................230
9.2.1 Establishing the Configuration Task.....................................................................................................231
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
x
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
9.2.2 Setting Basic Configurations for Clock Synchronization......................................................................231
9.2.3 Checking the Configuration...................................................................................................................232
9.3 Configuring an External BITS Clock Source.................................................................................................232
9.3.1 Establishing the Configuration Task.....................................................................................................233
9.3.2 Configuring the Lower Threshold of the Clock Signals Output by the BITS Clock............................233
9.3.3 Configuring an External Clock Source and Its Signal Type on the router............................................233
9.3.4 Checking the Configuration...................................................................................................................234
9.4 Configuring a Clock Reference Source Manually or Forcibly.......................................................................234
9.4.1 Establishing the Configuration Task.....................................................................................................234
9.4.2 Configuring a Clock Reference Source.................................................................................................235
9.4.3 Checking the Configuration...................................................................................................................236
9.5 Configuring Clock Protection Switching Based on SSM Levels...................................................................237
9.5.1 Establishing the Configuration Task.....................................................................................................237
9.5.2 Configuring the Router to Automatically Select Clock Sources...........................................................237
9.5.3 Enabling SSM........................................................................................................................................238
9.5.4 Configuring the SSM Level of the Clock Reference Source.................................................................238
9.5.5 Setting a Timeslot of the 2.048 Mbit/s BITS Clock Signal to Carry SSMs..........................................239
9.5.6 Setting the Modes of Extracting SSM Levels.......................................................................................239
9.5.7 Checking the Configuration...................................................................................................................240
9.6 Configuring Clock Protection Switching Based on Priorities........................................................................241
9.6.1 Establishing the Configuration Task.....................................................................................................241
9.6.2 Configuring the Router to Automatically Select Clock Sources...........................................................241
9.6.3 Disabling SSM.......................................................................................................................................242
9.6.4 Setting Priorities of Clock Reference Sources......................................................................................242
9.6.5 Checking the Configuration...................................................................................................................243
9.7 Configuring Ethernet Clock Synchronization................................................................................................243
9.7.1 Establishing the Configuration Task.....................................................................................................243
9.7.2 Enabling Ethernet Clock Synchronization............................................................................................244
9.7.3 Configuring Ethernet Clock Source......................................................................................................245
9.7.4 Checking the Configuration...................................................................................................................245
9.8 Configuration Examples of Clock Synchronization.......................................................................................246
9.8.1 Example for Configuring Protection Switchover of Clock Sources......................................................246
10 Device Maintenance................................................................................................................254
10.1 Introduction of Device Maintenance............................................................................................................256
10.1.1 Overview of Device Maintenance.......................................................................................................256
10.1.2 Maintenance Features Supported by the NE80E/40E.........................................................................256
10.2 Powering off the MPU..................................................................................................................................256
10.2.1 Establishing the Configuration Task...................................................................................................256
10.2.2 Powering off the Slave MPU...............................................................................................................257
10.2.3 Checking the Configuration.................................................................................................................258
10.3 Powering off the SFU...................................................................................................................................258
10.3.1 Establishing the Configuration Task...................................................................................................259
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xi
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
10.3.2 Powering off the SFU..........................................................................................................................259
10.3.3 Checking the Configuration.................................................................................................................260
10.4 Powering off the NPU..................................................................................................................................260
10.4.1 Establishing the Configuration Task...................................................................................................261
10.4.2 Powering off the NPU.........................................................................................................................261
10.4.3 Checking the Configuration.................................................................................................................262
10.5 Powering off the LPU...................................................................................................................................262
10.5.1 Establishing the Configuration Task...................................................................................................262
10.5.2 Powering off the LPU..........................................................................................................................263
10.5.3 Checking the Configuration.................................................................................................................263
10.6 Restoring the Bandwidth of 10GE LAN/WAN Interfaces on an NPU to 10 Gbit/s....................................264
10.6.1 Establishing the Configuration Task...................................................................................................264
10.6.2 Restoring the bandwidth of 10GE LAN/WAN interfaces on an NPU to 10 Gbit/s............................265
10.6.3 Checking the Configuration.................................................................................................................265
10.7 Switching Between the Operation Modes of the LPUF-10..........................................................................266
10.7.1 Establishing the Configuration Task...................................................................................................266
10.7.2 Switching Between the Operation Modes of the LPUF-10.................................................................267
10.7.3 Checking the Configuration.................................................................................................................267
10.8 Configuring a Working Mode for an LPUF-40 or LPUF-20/21..................................................................268
10.8.1 Establishing the Configuration Task...................................................................................................268
10.8.2 Configuring a Service Mode for an LPUF-20/21 or LPUF-40...........................................................269
10.8.3 Checking the Configuration.................................................................................................................270
10.9 Configuring the CMU...................................................................................................................................271
10.9.1 Establishing the Configuration Task...................................................................................................271
10.9.2 Configuring Monitor Items for a CMU...............................................................................................271
10.10 Configuring a Cleaning Cycle for the Air Filter.........................................................................................272
10.10.1 Establishing the Configuration Task.................................................................................................272
10.10.2 Configuring a Cleaning Cycle for the Air Filter................................................................................272
10.10.3 Remonitoring the Cleaning Cycle of the Air Filter...........................................................................273
10.10.4 Checking the Configuration...............................................................................................................273
10.11 Monitoring the Device Status.....................................................................................................................274
10.11.1 Displaying the System Version Information.....................................................................................274
10.11.2 Displaying Basic Information About the Router...............................................................................274
10.11.3 Displaying the Electronic Label........................................................................................................275
10.11.4 Displaying the Soft Boot Mode.........................................................................................................275
10.11.5 Displaying the Threshold of the Memory Usage...............................................................................276
10.11.6 Displaying the Threshold of CPU Usage..........................................................................................276
10.11.7 Displaying Alarm Information..........................................................................................................276
10.11.8 Displaying the Board Temperature....................................................................................................277
10.11.9 Displaying the Board Voltage...........................................................................................................277
10.11.10 Displaying the Power Supply Status...............................................................................................278
10.11.11 Displaying Current Information About Boards...............................................................................278
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
10.11.12 Displaying Entironment Information About the Device.................................................................279
10.11.13 Displaying the Fan Status................................................................................................................279
10.11.14 Displaying the Sequence Number of the MPU...............................................................................279
10.11.15 Displaying the Next Start Mode of the Board.................................................................................280
10.11.16 Displaying the Number of the Registered SFUs By Default...........................................................280
10.12 Board Maintence ........................................................................................................................................281
10.12.1 Resetting a Board...............................................................................................................................281
10.12.2 Clearing the Maximum CPU Usage..................................................................................................281
10.13 Configuring NAP-based Remote Deployment...........................................................................................282
10.13.1 Establishing the Configuration Task.................................................................................................282
10.13.2 Configuring and Starting the NAP Master Interface.........................................................................283
10.13.3 Remote Login....................................................................................................................................285
10.13.4 Disabling NAP on the Slave Device..................................................................................................285
10.13.5 Checking the Configuration...............................................................................................................286
10.14 Configuration Examples of the Device Maintenance.................................................................................287
10.14.1 Example for Powering off the MPU..................................................................................................287
10.14.2 Example for Powering off the SFU...................................................................................................289
10.14.3 Example for Powering off the LPU...................................................................................................290
10.14.4 Example for Configuring the Operation Mode of the LPUF-10.......................................................291
10.14.5 Example for Configuring NAP-based Remote Deployment in Automatic Mode.............................292
10.14.6 Example for Configuring NAP-based Remote Deployment in Static Mode.....................................293
11 Device Upgrading....................................................................................................................296
11.1 Overview of Device Upgrade.......................................................................................................................297
11.2 Upgrade Modes Supported by the NE80E/40E............................................................................................297
12 Patch Management..................................................................................................................299
12.1 Introduction of Patch Management..............................................................................................................300
12.1.1 Overview of Patch Management.........................................................................................................300
12.1.2 Patches Supported by the NE80E/40E................................................................................................301
12.2 Checking the Running of Patch in the System.............................................................................................302
12.2.1 Establishing the Configuration Task...................................................................................................302
12.2.2 Checking the Running of Patch in the System....................................................................................303
12.2.3 (Optional) Deleting a Patch.................................................................................................................303
12.3 Loading a Patch............................................................................................................................................304
12.3.1 Establishing the Configuration Task...................................................................................................304
12.3.2 Loading a Patch...................................................................................................................................304
12.3.3 Checking the Configuration.................................................................................................................305
12.4 Installing a Patch..........................................................................................................................................306
12.4.1 Establishing the Configuration Task...................................................................................................306
12.4.2 Loading a Patch...................................................................................................................................307
12.4.3 Activating a Patch................................................................................................................................307
12.4.4 Running a Patch...................................................................................................................................308
12.4.5 (Optional) Synchronizing Patches.......................................................................................................308
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xiii
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Contents
12.4.6 Checking the Configuration.................................................................................................................309
12.5 (Optional) Unactivating the activating of Patch...........................................................................................313
12.5.1 Establishing the Configuration Task...................................................................................................313
12.5.2 Deactivating a Patch............................................................................................................................313
12.5.3 Checking the Configuration.................................................................................................................313
12.6 Configuration Examples of the Patch Management.....................................................................................314
12.6.1 Example for Installing a Patch.............................................................................................................314
A Glossary......................................................................................................................................317
B Acronyms and Abbreviations.................................................................................................323
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xiv
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1
1 Logging In to the System for the First Time
Logging In to the System for the First Time
About This Chapter
You can log in to a new router through the console port to configure the router.
1.1 Introduction to Log In to the Device for the First Time
A user can log in to the router that is powered on for the first time through the console port or
by the plug-and-play function to configure the router.
1.2 Logging In to the Device Through the Console Port
This section describes how to connect a terminal to a router through the console port to establish
the configuration environment.
1.3 Logging In to the router That Supports the Plug-and-Play Function
The plug-and-play function enables the router to automatically access the network and obtains
an IP address after the router is powered on. This allows engineers to remotely log in to the
router to perform basic configurations.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1 Logging In to the System for the First Time
1.1 Introduction to Log In to the Device for the First Time
A user can log in to the router that is powered on for the first time through the console port or
by the plug-and-play function to configure the router.
Log in to the router through the console port
The console port is a linear port on the main control board.
Each main control board provides one console port that conforms to the EIA/TIA-232 standard
and whose type is DCE. The serial interface of a terminal can be directly connected to the console
port on the router. Users can then configure the router on the terminal.
NOTE
When a device is powered on for the first time, you must log in to the device through the console port. It
is a prerequisite for other login modes. For example, the IP address for Telnet login must be configured by
logging in to the device through the console port.
Log in to the router by the plug-and-play function
NOTE
The plug-and-play function only can be configured on the X1 , X2 and X3 models of the NE80E/40E.
During site deployment, the routers reside far away from the equipment room. Sending software
commissioning engineers to deploy the network at the site is quite costly. After the plug-andplay function is enabled, however, the router automatically obtains an IP address. Software
commissioning engineers are able to remotely deliver configurations to the router through the
NMS after installation personnel finishes hardware installation. This greatly simplifies
installation and reduces costs with minimized site visits.
The plug-and-play function is controlled by a PAF file and users do not need to configure it
manually. This function is automatically disabled after the router correctly obtains an IP address.
1.2 Logging In to the Device Through the Console Port
This section describes how to connect a terminal to a router through the console port to establish
the configuration environment.
1.2.1 Establishing the Configuration Task
Before logging in to the router through the console port, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This will help
you complete the configuration task quickly and accurately.
Applicable Environment
When the router is powered on for the first time, you need to use the console port to log in to
the router to configure and manage the router.
Pre-configuration Tasks
Before logging in to the router through the console port, complete the following tasks:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1 Logging In to the System for the First Time
l
Installing terminal emulation program on the PC (such as Windows XP HyperTerminal)
l
Preparing the RS-232 cable
Data Preparation
To log in to the router through the console port, you need the following data.
No.
Data
1
Terminal communication parameters
l Baud rate
l Data bit
l Parity
l Stop bit
l Flow-control mode
NOTE
When the router is logged in for the first time, the system automatically uses default parameter values.
1.2.2 Establishing the Physical Connection
The console port on the router must be connected to the COM port on a terminal by using a
console cable.
Procedure
Step 1 Power on all devices to perform a self-check.
Step 2 Connect the COM port on the PC and the console port on the router by a cable.
----End
1.2.3 Logging in to the router
You can log in to the router through the console port to configure and manage the router that is
powered on for the first time.
Context
You need to configure terminal attributes for the PC according to the attributes configured for
the console port, including the transmission rate, data bit, parity bit, stop bit, and flow control
mode. As the router is logged in for the first time, every terminal attribute uses the default value
of the router.
Procedure
Step 1 Start a terminal emulator on the PC, and create a new connection, as shown in Figure 1-1.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1 Logging In to the System for the First Time
Figure 1-1 Connection creation
Step 2 Set interface,as shown in Figure 1-2.
Figure 1-2 Interface setting
Step 3 Set communication parameter, same as the default of router,as shown in Figure 1-3.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1 Logging In to the System for the First Time
Figure 1-3 Communication parameter setting
Step 4 Press Enter. A command line prompt such as <HUAWEI> appears, and the user view is
displayed for you to configure the router.
----End
1.3 Logging In to the router That Supports the Plug-and-Play
Function
The plug-and-play function enables the router to automatically access the network and obtains
an IP address after the router is powered on. This allows engineers to remotely log in to the
router to perform basic configurations.
Context
NOTE
The plug-and-play function only can be configured on the X1 , X2 and X3 models of the NE80E/40E.
During site deployment, the routers reside far away from the equipment room. Sending software
commissioning engineers to deploy the network at the site is quite costly. After the plug-andplay function is enabled, however, the router automatically obtains an IP address. Software
commissioning engineers are able to remotely deliver configurations to the router through the
NMS after installation personnel finishes hardware installation. This greatly simplifies
installation and reduces costs with minimized site visits. The plug-and-play function is controlled
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
1 Logging In to the System for the First Time
by a PAF file and users do not need to configure it manually. This function is automatically
disabled after the router correctly obtains an IP address. The process of logging in to the
router supporting the plug-and-play function is as follows:
Procedure
Step 1 After planning the network, network planning engineers provide a planning list for software
commissioning engineers.
Step 2 Based on the planning list, software commissioning engineers configure the mappings between
the router locations and IP addresses on the DHCP server, compile configuration scripts, and
configure the mappings between the router locations and scripts.
Step 3 Hardware installation personnel installs the router and power them on at the site.
Step 4 The router sends a DHCPREQUEST message to the DHCP server, and then the interface
connecting to the DHCP server obtains an IP address.
Step 5 The NMS delivers configurations to the router.
----End
Follow-up Procedure
If there is no DHCP server on the network or the router cannot obtain an IP address for some
reason, the router displays the following information:
PNP State!!!PLEASE UNDO PNP enable for manual Setup!
You can undo PNP in system view with "undo pnp enable"
At this time, do as follows to disable the plug-and-play function:
1.
Run the system-view command to enter the system view.
2.
Run the undo pnp enable command to disable the plug-and-play function.
3.
Run the undo pnp default route command to delete the default route generated by the
plug-and-play function.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2
CLI Overview
About This Chapter
The command line interface (CLI) is used to configure and maintain devices.
2.1 CLI Introduction
After you log in to the router, a prompt is displayed, indicating that you enter the command line
interface (CLI). The CLI is used by users to interact with the router.
2.2 Online Help
When inputting command lines or configuring services, you can use the online help function to
obtain real-time help.
2.3 CLI Features
The CLI provides the following features to help users flexibly use it.
2.4 Shortcut Keys
Using the system or user-defined shortcut keys makes it easier to enter commands.
2.5 Configuration Examples
This section provides several examples for using command lines.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2.1 CLI Introduction
After you log in to the router, a prompt is displayed, indicating that you enter the command line
interface (CLI). The CLI is used by users to interact with the router.
2.1.1 Command Line Interface
You can configure and manage the router by using the CLI commands.
The characteristics of CLI are as follows:
l
Local or remote configuration through the AUX port.
l
Local configuration through console port.
l
Local or remote configuration through Telnet or Secure Shell (SSH).
l
Remote configuration by logging in to an asynchronous serial interface on the router
through Modem dialup.
l
The telnet command for directly logging in to and managing other routers.
l
FTP service for file uploading and downloading.
l
A user interface view for specific configuration management.
l
Hierarchical command protection for users of different levels, that is, running the
commands of the corresponding levels.
l
Three authentication modes are supported, namely, none-authentication, password
authentication, and Authentication, Authorization, and Accounting (AAA) authentication.
Password and AAA authentication prohibit unauthorized users from logging in to the
router, guaranteeing system security.
l
Entering "?" for online help at any time.
l
A command line interpreter provides intelligent command resolution methods such as key
word fuzzy match and context conjunction. These methods make it easy for users to enter
their commands.
l
Network testing commands such as tracert and ping for rapidly diagnosing a network.
l
Abundant debugging information to help in diagnosing the network.
l
Running a command used previously on the device, like DosKey.
NOTE
l The system supports the command with up to 512 characters. The command can be incomplete. This
means that you can input initial characters (one or some) of the command to represent the whole
command. The incomplete command, however, must be unqiue in the system. For example, to use the
display current-configuration command, just input d cu, di cu, or dis cu. d c or dis c, however, cannot
be input, becuse they are not unique to represent the display current-configuration command.
l The system saves the incomplete command to the configuration files in the complete form; therefore,
the command may have more than 512 characters. When the system is restarted, however, the
incomplete command cannot be restored. Therefore, pay attention to the length of the incomplete
command.
2.1.2 Command Levels
The system manages commands in hierarchy for security. The administrator can set user levels
corresponding to command levels to implement user-specific access control.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
The default command levels are as follows:
Table 2-1 Command line levels
Level
Name
Description
0
Visit level
Commands of this level include commands of network
diagnosis tool (such as ping and tracert) and commands that
start from the local device and visit external device (such
as Telnet client side).
1
Monitoring level
Commands of this level, including the display commands,
are used for system maintenance and fault diagnosis.
2
Configuration
level
Commands of this level are service configuration
commands that provide direct network service to the user,
including routing and network layer commands.
3
Management level
Commands of this level are commands that influence the
basic operation of the system and provide support to the
service. They include file system commands, FTP
commands, TFTP commands, XModem downloading
commands, configuration file switching commands, power
supply control commands, backup board control
commands, user management commands, level setting
commands, system internal parameter setting commands,
and debugging commands that are used for fault diagnosis.
To implement efficient management, you can increase the command levels to 0-15. For the
increase in the command levels, refer to Chapter 4 "Basic Configuration" Configuring
Command Levels in the HUAWEI NetEngine80E/40E Configuration Guide - Basic
Configurations.
NOTE
l The default command level may be higher than the command level defined according to the command
rules in application.
l The level of the command that a user can run is determined by the level of this user.
l Login users have the same 16 levels as the command levels. The login users can use only the command
of the levels that are equal to or lower than their own levels. The user privilege level level command
sets the user level.
Searching Commands Based on Command Levels
You can search for all commands of a specific level simultaneously. The procedure is as follows:
1.
Open the command reference (.chm.) file.
2.
Click the "Search" tab. The search window will be displayed as shown in Figure 2-1.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Figure 2-1 Entering the search window
3.
Issue 02 (2011-09-10)
Enter a desired command level in the "Type in the word(s) to search for" textbox and click
"List Topics". All commands of the specified level will be displayed as shown in Figure
2-2.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Figure 2-2 Searching commands based on a specific level
2.1.3 Command Line Views
The command line interface has different command views. All the commands are registered in
one or more command views. You can run a command only when you enter the corresponding
command view.
The following part uses the user, system, and BFD views as an example:
# Establish connection to the router. If the router adopts the default configuration, you can enter
the user view with the prompt of <HUAWEI>.
<HUAWEI>
# Run the system-view command to enter the system view.
<HUAWEI> system-view
[HUAWEI]
# Run the aaa command in the system view to enter the AAA view.
[HUAWEI] aaa
[HUAWEI-aaa]
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
NOTE
l
The command prompt "HUAWEI" is the default host name.
l
The prompt indicates a specific view. For example, "<HUAWEI>" indicates the user view, and
"[HUAWEI-ui-console0]" indicates the console user interface view.
Some commands can be used in both system and other views, but have different effects. For
example, the mpls command can be run in the system view to enable MPLS globally or in the
interface view to enable MPLS only on this interface.
2.2 Online Help
When inputting command lines or configuring services, you can use the online help function to
obtain real-time help.
2.2.1 Full Help
When inputting a command, you can use the full help function to obtain all keywords or
parameters of this command.
Procedure
l
You can obtain the full help of a command line in the following manners.
– Enter a question mark (?) in any command line view to display all the commands and
their simple descriptions.
<HUAWEI> ?
User view commands:
arp-ping
backup
batch-cmd
board-channel-check
capture-packet
cd
...
...
ARP-ping
Backup information
Batch commands
Board-Channel-Check enable/disable
enable capturing packet
Change current directory
– Enter a command and a question mark (?) separated by a space. If the key word is at
this position, all key words and their simple descriptions are displayed. For example:
<HUAWEI> language-mode ?
Chinese Chinese environment
English English environment
Chinese and English are keywords; Chinese environment and English
environment describe the keywords respectively.
– Enter a command and a question mark (?) separated by a space, and if a parameter is at
this position, the related parameter names and parameter descriptions are displayed. For
example:
[HUAWEI] ftp timeout ?
INTEGER<1-35791> The value of FTP timeout (in minutes)
[HUAWEI] ftp timeout 35 ?
<cr> Please press ENTER to execute command
[HUAWEI] ftp timeout 35
In the preceding display, INTEGER<1-35791> describes the parameter value; The
value of FTP timeout (in minutes) is a simple description of the parameter usage;
<cr> indicates that no parameter is at this position. The command is repeated in the next
command line. You can press Enter to run the command.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
12
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2.2.2 Partial Help
If you enter only the first one or a few characters of a command, you can use the partial help
function to obtain all keywords following the character or character string.
Procedure
l
You can obtain the partial help of a command line in the following manners.
– Enter a character string with a question mark (?) closely following it to display all
commands that begin with this character string.
<HUAWEI> d?
debugging
dir
delete
display
– Enter a command and a character string with a question mark (?) closely following it
to display all the key words that begin with this character string.
<HUAWEI> display b?
bas-interface
bgp
board-power
bootmode-current
bootrom
buffer
bfd
board-current
board-type
bootmode-next
btv
bulk-stat
– Enter the first several letters of a key word in the command and then press Tab to display
the complete key word on the condition that the letters uniquely identify the key word.
Otherwise, if you continue to press Tab, different key words are displayed. You can
select the needed key word.
----End
2.2.3 Error Messages of the Command Line Interface
If an entered command passes the syntax check, the system executes it. Otherwise, the system
prompts an error message.
All the commands entered by the user are run correctly, if the grammar check has been passed.
Otherwise, error messages are reported to the user. See Table 2-2 for the common error
messages.
Table 2-2 Common error messages of the command line
Error messages
Cause of the error
Unrecognized command
The command cannot be found
The key word cannot be found
Wrong parameter
Parameter type error
The parameter value exceeds the limit
Issue 02 (2011-09-10)
Incomplete command
Incomplete command entered
Too many parameters
Too many parameters entered
Ambiguous command
Indefinite parameters entered
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
13
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2.3 CLI Features
The CLI provides the following features to help users flexibly use it.
2.3.1 Editing
The editing function of command lines helps you edit command lines or obtain help by using
certain keys.
The command line supports multi-line edition. The maximum length of each command is 512
characters.
Keys for editing that are often used are shown in Table 2-3.
Table 2-3 Keys for editing
Key
Function
Common key
Inserts a character in the current position of the cursor if the editing
buffer is not full and the cursor moves to the right. Otherwise, an
alarm is generated.
Backspace
Deletes the character on the left of the cursor that moves to the
left. When the cursor reaches the head of the command, an alarm
is generated.
Left cursor key ← or
Ctrl_B
Moves the cursor to the left by the space of a character. When the
cursor reaches the head of the command, an alarm is generated.
Right cursor key → or
Ctrl_F
Moves the cursor to the right by the space of a character. When
the cursor reaches the end of the command, an alarm is generated.
Tab
Press Tab after typing the incomplete key word and the system
runs the partial help:
l If the matching key word is unique, the system replaces the
typed one with the complete key word and displays it in a new
line with the cursor a space behind.
l If there are several matches or no match at all, the system
displays the prefix first. Then you can press Tab to view the
matching key word one by one. In this case, the cursor closely
follows the end of the word and you can type a space to enter
the next word.
l If a wrong key word is entered, press Tab and the word is
displayed in a new line.
2.3.2 Displaying
All command lines have the same displaying feature. You can construct the displaying mode as
required.
You can control the display of information on the CLI as follows:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
14
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
l
Prompts and help information can be displayed in both Chinese and English. You can use
the language-mode language-name command to change the language mode.
l
If output information cannot be displayed on a full screen, you have three options to view
the information, as shown in Table 2-4.
Table 2-4 Keys for displaying
Key
Function
Ctrl_C
Stops the display and running of the command.
NOTE
You can also press any of the keys except the spacebar and Enter key
to stop the display and running of the command.
Space
Allows information to be displayed on the next screen.
Enter
Allows information to be displayed on the next line.
2.3.3 Regular Expressions
The regular expression is an expression that describes a set of strings. It consists of common
characters (such as letters from "a" to "z") and particular characters (also named metacharacters).
The regular expression is a template according to which you can search for the required string.
Users can use regular expressions to filter output information to rapidly locate desired
information.
A regular expression can provide the following functions:
l
Searching for and obtaining a sub-string that matches a rule in the string.
l
Substituting a string according to a certain matching rule.
Formal Language Theory of the Regular Expression
The regular expression consists of common characters and particular characters.
l
Common characters
Common characters are used to match themselves in a string, including all upper-case and
lower-case letters, digits, punctuation, and special symbols. For example, a matches the
letter "a" in "abc", 202 matches the digit "202" in "202.113.25.155", and @ matches the
symbol "@" in "[email protected]".
l
Particular characters
Particular characters are used together with common characters to match the complex or
particular string combination. Table 2-5 describes particular characters and their syntax.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
15
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Table 2-5 Description of particular characters
Particul
ar
characte
r
Syntax
Example
\
Defines an escape character, which
is used to mark the next character
(common or particular) as the
common character.
\* matches "*".
^
Matches the starting position of the
string.
^10 matches "10.10.10.1" instead of
"20.10.10.1".
$
Matches the ending position of the
string.
1$ matches "10.10.10.1" instead of
"10.10.10.2".
*
Matches the preceding element zero
or more times.
10* matches "1", "10", "100", and
"1000".
(10)* matches "null", "10", "1010",
and "101010".
+
Matches the preceding element one
or more times
10+ matches "10", "100", and
"1000".
(10)+ matches "10", "1010", and
"101010".
?
.
Matches the preceding element zero
or one time.
10? matches "1" and "10".
Matches any single character.
0.0 matches "0x0" and "020".
(10)? matches "null" and "10".
.oo matches "book", "look", and
"tool".
()
Defines a subexpression, which can
be null. Both the expression and the
subexpression should be matched.
100(200)+ matches "100200" and
"100200200".
x|y
Matches x or y.
100|200 matches "100" or "200".
1(2|3)4 matches "124" or "134",
instead of "1234", "14", "1224", and
"1334".
Issue 02 (2011-09-10)
[xyz]
Matches any single character in the
regular expression.
[123] matches the character 2 in
"255".
[^xyz]
Matches any character that is not
contained within the brackets.
[^123] matches any character except
for "1", "2", and "3".
[a-z]
Matches any character within the
specified range.
[0-9] matches any character ranging
from 0 to 9.
[^a-z]
Matches any character beyond the
specified range.
[^0-9] matches all non-numeric
characters.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
16
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Particul
ar
characte
r
Syntax
Example
_
Matches a comma "," left brace "{",
right brace "}", left parenthesis "(",
and right parenthesis ")".
_2008_ matches "2008", "space
2008 space", "space 2008", "2008
space", ",2008,", "{2008}",
"(2008)", "{2008", and "(2008}".
Matches the starting position of the
input string.
Matches the ending position of the
input string.
Matches a space.
NOTE
Unless otherwise specified, all characters in the preceding table are displayed on the screen.
l
Degeneration of particular characters
Certain particular characters, when being placed at the following positions in the regular
expression, degenerate to common characters.
– The particular characters following "\" is transferred to match particular characters
themselves.
– The particular characters "*", "+", and "?" placed at the starting position of the regular
expression. For example, +45 matches "+45" and abc(*def) matches "abc*def".
– The particular character "^" placed at any position except for the start of the regular
expression. For example, abc^ matches "abc^".
– The particular character "$" placed at any position except for the end of the regular
expression. For example, 12$2 matches "12$2".
– The right bracket such as ")" or "]" being not paired with its corresponding left bracket
"(" or "[". For example, abc) matches "abc)" and 0-9] matches "0-9]".
NOTE
Unless otherwise specified, degeneration rules are applicable when preceding regular expressions
serve as subexpressions within parentheses.
l
Combination of common and particular characters
In actual application, a regular expression combines multiple common and particular
characters to match certain strings.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
17
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Specifying a Filtering Mode in Command
CAUTION
The HUAWEI NetEngine80E/40E uses a regular expression to implement the filtering function
of the pipe character. A display command supports the pipe character only when there is
excessive output information.
When the output information is queried according to the filtering conditions, the first line of the
command output starts with the information containing the regular expression.
The command can carry the parameter | count to display the number of matching entries. The
parameter | count can be used together with other parameters.
For the commands supporting regular expressions, the three filtering methods are as follows:
l
| begin regular-expression: displays the information that begins with the line that matches
regular expression.
l
| exclude regular-expression: displays the information that excludes the lines that match
regular expression.
l
| include regular-expression: displays the information that includes the lines that match
regular expression.
NOTE
The value of regular-expression is a string of 1 to 255 characters.
Specify a Filtering Mode when Information is Displayed
When a lot of information is displayed, you can specify a filtering mode in the prompt "---- More
----".
l
/regular-expression: displays the information that begins with the line that matches regular
expression.
l
-regular-expression: displays the information that excludes lines that match regular
expression.
l
+regular-expression: displays the information that includes lines that match regular
expression.
2.3.4 Previously-Used Commands
The CLI provides a function similar to DosKey to automatically save commands used previously
on the device. If you need to run a command that has been executed, you can call the command
from those have been used previously on the device. This facilitates user operation.
By default, the system saves a maximum of 10 previously-used commands for each user. You
can run the history-command max-size size-value command in the user view to set the number
of previously-used commands saved in the system. A maximum of 256 previously-used
commands can be saved in the system.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
18
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
NOTE
Setting the number of saved previously-used commands to a proper value is recommended. If a large
number of previously-used commands are saved, it will take a long time to locate a needed previouslyused command, affecting efficiency.
The operations are shown in Table 2-6
Table 2-6 Access the previously-used commands
Action
Key or Command
Result
Display
previouslyused
commands.
display historycommand
Display previously-used commands entered by
users.
Access the last
previouslyused
command.
Up cursor key (↑) or Display the last previously-used command if there
is an earlier previously-used command. Otherwise,
Ctrl_P
an alarm is generated.
Access the next
previouslyused
command.
Down cursor key
(↓) or Ctrl_N
Display the next previously-used command if there
is a later previously-used command. Otherwise, the
command is cleared and an alarm is generated.
NOTE
On the HyperTerminal of Windows 9X, cursor key ↑ is invalid as the HyperTerminals of Windows 9X
define the keys differently. In this case, you can replace the cursor key ↑ with Ctrl_P.
When you use previously-used commands, note the following points:
l
The saved previously-used commands are the same as that those entered by users. For
example, if the user enters an incomplete command, the saved command also is incomplete.
l
If the user runs the same command several times, the earliest command is saved. If the
command is entered in different forms, they are considered as different commands.
For example, if the display ip routing-table command is run several times, only one
previously-used command is saved. If the disp ip routing command and the display ip
routing-table command are run, two previously-used commands are saved.
2.3.5 Batch Command Execution
If multiple commands are frequently used consecutively, you can edit these commands to be
executed in batches. This simplifies command input and improves efficiency.
Procedure
Step 1 In the user view, run:
batch-cmd edit
Commands are edited to be executed in batches.
The batch-cmd edit command can be used by only one user at a time.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
19
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
The maximum length of a command (including the incomplete command) to be entered is 512
characters.
When editing commands, press Enter to complete the editing of each command.
NOTE
l After the batch-cmd edit command is run successfully to edit the commands to be executed in batches,
the system deletes the original commands to be run in batches.
l The commands that are already edited are saved in memory and are deleted for ever when the system
is restarted.
Step 2 After all commands are edited, you can press the shortcut buttons Ctrl_Z to exit the editing state
and return to the user view.
Step 3 In the user view, run:
batch-cmd execute
The commands are executed in batches.
The batch-cmd execute command can be used by only one user at a time.
The sequence of running commands is the same as the sequence of editing commands. You can
view the execution of these commands on the CLI. After the execution is complete, the user
view is displayed.
NOTE
If the batch-cmd edit or batch-cmd execute command is among the commands to be executed in batches,
the system displays an error when executing the batch-cmd edit or batch-cmd execute command and
continues to execute the following commands.
----End
2.4 Shortcut Keys
Using the system or user-defined shortcut keys makes it easier to enter commands.
2.4.1 Classifying Shortcut Keys
There are two types of shortcut keys, namely, system shortcut keys and user-defined shortcut
keys. Familiarize yourself with shortcut keys so as to use them accurately.
The shortcut keys in the system are classified into the following types:
l
User-defined shortcut keys: CTRL_G, CTRL_L, CTRL_O, and CTRL_U. The user can
correlate these shortcut keys with any commands. When the shortcut keys are pressed, the
system automatically runs the corresponding command. For details of defining the shortcut
keys, see 2.4.2 Defining Shortcut Keys.
l
System-defined shortcut keys: These shortcut keys with fixed functions are defined by the
system. Table 2-7 lists the system-defined shortcut keys.
NOTE
Different terminal software defines these keys differently. Therefore, the shortcut keys on the terminal may
be different from those listed in this section.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
20
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
Table 2-7 System-defined shortcut keys
Issue 02 (2011-09-10)
Key
Function
CTRL_A
The cursor moves to the beginning of the current line.
CTRL_B
The cursor moves to the left by the space of a character.
CTRL_C
Terminates the running function.
CTRL_D
Deletes the character where the cursor lies.
CTRL_E
The cursor moves to the end of the current line.
CTRL_F
The cursor moves to the right by the space of a character.
CTRL_H
Deletes one character on the left of the cursor.
CTRL_K
Stops the creation of the outbound connection.
CTRL_N
Displays the next command in the previously-used command
buffer.
CTRL_P
Displays the previous command in the previously-used
command buffer.
CTRL_R
Repeats the display of the information of the current line.
CTRL_T
Terminates the outbound connection.
CTRL_V
Pastes the contents on the clipboard.
CTRL_W
Deletes a character string or character on the left of the cursor.
CTRL_X
Deletes all the characters on the left of the cursor.
CTRL_Y
Deletes all the characters on the place of the cursor and the right
of the cursor.
CTRL_Z
Returns to the user view.
CTRL_]
Terminates the inbound or redirection connections.
ESC_B
The cursor moves to the left by the space of a word.
ESC_D
Deletes a word on the right of the cursor.
ESC_F
The cursor moves to the right to the end of next word.
ESC_N
The cursor moves downward to the next line.
ESC_P
The cursor moves upward to the previous line.
ESC_SHIFT_<
Sets the position of the cursor to the beginning of the clipboard.
ESC_SHIFT_>
Sets the position of the cursor to the end of the clipboard.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
21
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2.4.2 Defining Shortcut Keys
If one or multiple commands are frequently used, you can correlate these commands with
shortcut keys. This facilitates user operation and improves efficiency. Only management-level
users have the rights to define shortcut keys.
Configure as follows in the system view.
Action
Command
Define shortcut keys
hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U }
command-text
NOTE
When defining the shortcut keys, use double quotation marks to define the command if this command
contains several commands words, that is, if spaces exist in the command.
By default, CTRL_G, CTRL_L and CTRL_O correspond to the following commands
respectively:
l
CTRL_G: display current-configuration
l
CTRL_L: display ip routing-table
l
CTRL_O: undo debugging all
By default, CTRL_U is not correlated with any command.
2.4.3 Use of Shortcut Keys
You can use the shortcut key at any position that allows a command to be entered. The system
executes an entered shortcut key and displays the corresponding command on the screen in the
same way as you enter a complete command.
l
If you have typed part of a command and have not pressed Enter, you can press the shortcut
keys to clear the entered command and display the full corresponding command. This
operation has the same effect as that of deleting all commands and then re-entering the
complete command.
l
The shortcut keys are run as the commands, the syntax is recorded to the command buffer
and log for fault location and querying.
NOTE
The terminal in use may affect the functions of the shortcut keys. For example, if the customized shortcut
keys of the terminal conflict with those of the router, the input shortcut keys are captured by the terminal
program and hence the shortcut keys do not function.
Run the following command in any view to display the use of shortcut keys.
Issue 02 (2011-09-10)
Action
Command
Check the usage of shortcut keys.
display hotkey
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
22
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
2.5 Configuration Examples
This section provides several examples for using command lines.
2.5.1 Example for Running Commands in Batches
This part provides an example for running commands in batches. In this example, by editing the
commands to be run in batches, you can configure the system to automatically run the commands
in batches.
Context
If commands are frequently used consecutively, especially a large number of commands, you
can run the commands in batches to improve efficiency.
For example, during the preventive maintenance inspection (PMI), you can run commands in
batches. That is, enter all PMI commands once and then send all the command output information
to the PMI tool, which can improve the PMI efficiency.
Log in to the router and do as follows:
Procedure
Step 1 Edit the display users, display startup, and display clock commands to be run in batches.
<HUAWEI> batch-cmd edit
Info: Begin editing batch commands. Press "Ctrl+Z" to abort this session.
display users
display startup
display clock
<HUAWEI>
Step 2 Run the commands in batches.
<HUAWEI> batch-cmd execute
<HUAWEI>batch-cmd execute command: display users
User-Intf
Delay
Type
Network Address
AuthenStatus
35 VTY 1
00:00:00 TEL
190.120.2.19
Username : Unspecified
<HUAWEI>batch-cmd execute command: display startup
MainBoard:
Configured startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
<HUAWEI>
batch-cmd execute command: display clock
AuthorcmdFlag
no
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/vrp.cfg
cfcard:/vrp.cfg
default
default
default
default
NULL
NULL
2011-01-27 01:25:24
Thursday
Time Zone(DefaultZoneName) : UTC
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
23
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
<HUAWEI>
batch-cmd execute finished.
----End
2.5.2 Example for Using Tab
This example shows how to use the Tab key. After inputting an incomplete keyword, you can
press Tab and obtain all related keywords or verify the correctness of the input keyword.
Context
Usually, you do not need to input complete keywords. Instead, you can just input one or a few
beginning characters of a keyword and press Tab to complete the keyword. The Tab key helps
search for and use commands.
Procedure
l
Tab can be used in three ways as shown in the following example.
– The matching key word is unique after the incomplete key word is input.
1.
Input the incomplete key word.
[HUAWEI] info-
2.
Press Tab.
The system replaces the input one with the complete key word and displays it in a
new line with the cursor leaving a space behind.
[HUAWEI] info-center
– There are several matches or no match after the incomplete key word is input.
# info-center can be followed by three key words.
[HUAWEI] info-center log?
logbuffer
logfile
loghost
1.
Input the incomplete key word.
[HUAWEI] info-center l
2.
Press Tab.
The system displays the prefix first. The prefix in this example is "log".
[HUAWEI] info-center log
Continue to press Tab. The cursor is closely following the end of the word.
[HUAWEI] info-center loghost
[HUAWEI] info-center logbuffer
[HUAWEI] info-center logfile
Stop pressing Tab after the key word logfile that you need is displayed.
3.
Input a space to enter the next word channel.
[HUAWEI] info-center logfile channel
– Input an incorrect keyword and press Tab to check the correctness of the keyword.
1.
Input a wrong keyword loglog.
[HUAWEI] info-center loglog
2.
Press Tab.
[HUAWEI] info-center loglog
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
24
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
The system displays information in a new line, but the keyword loglog remains
unchanged and there is no space between the cursor and the keyword, indicating
that this keyword is inexistent.
----End
2.5.3 Example for Using Shortcut Keys
This example shows how to use shortcut keys. In this example, frequently-used commands are
correlated with shortcut keys. You can press the shortcut keys instead of inputting the commands.
This facilitates user operation and improves efficiency.
Context
If the login router is defined with shortcut keys, the shortcut keys can be used by any user
regardless of the user level.
Procedure
Step 1 Correlate Ctrl_U with the display ip routing-table command and run the shortcut keys.
<HUAWEI> system-view
[HUAWEI] hotkey ctrl_u "display ip routing-table"
NOTE
When defining shortcut keys for a command, use double quotation marks to quote the command if the
command consisting of multiple words, which are separated by spaces. No double quotation marks are
required for single-word commands.
Step 2 Press Ctrl_U when the prompt [HUAWEI] appears.
[HUAWEI] display ip routing-table
Route Flags: R - relay, D - download to fib
-----------------------------------------------------------------------------Routing Tables: Public
Destinations : 8
Routes : 8
Destination/Mask
Proto Pre Cost
Flags NextHop
Interface
51.51.51.9/32 Direct 0
0
D 127.0.0.1
InLoopBack0
100.2.0.0/16 Direct 0
0
D 100.2.150.51
GigabitEthernet0/
0/0
100.2.150.51/32 Direct 0
0
D 127.0.0.1
InLoopBack0
100.2.255.255/32 Direct 0
0
D 127.0.0.1
InLoopBack0
127.0.0.0/8
Direct 0
0
D 127.0.0.1
InLoopBack0
127.0.0.1/32 Direct 0
0
D 127.0.0.1
InLoopBack0
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
---------------------------------------------------------------------
----End
2.5.4 Example for Copying Commands Using Shortcut Keys
This example shows how to copy commands by using shortcut keys. In this example, after a
specified command is copied by using shortcut keys, you can use the shortcut keys
Ctrl_Shift_V to paste the command.
Context
If you need to repeatedly run a command, you can use shortcut keys to copy the command.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
25
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2 CLI Overview
The copied command is saved on the clipboard and is available for only the current logged-in
user. After the user logs out of the router, the clipboard is cleared.
You can use shortcut keys to copy a command in any view.
Procedure
Step 1 Move the cursor to the beginning of the command and press Esc_Shift_<. Move the cursor to
the end and press Esc_Shift_>.
<HUAWEI> display ip routing-table
Step 2 Run the display clipboard command to view the contents on the clipboard.
<HUAWEI> display clipboard
---------------- CLIPBOARD----------------display ip routing-table
Step 3 Enter the command in any view, and press Ctrl_Shift_V to paste the contents of clipboard.
<HUAWEI> display ip routing-table
NOTE
If you press shortcut keys to copy a new command, you can paste only the new command by using shortcut
keys.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
26
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
3
Basic Configuration
About This Chapter
This chapter describes how to configure the router to follow your using habits and the actual
environment requirements after logging in to the router.
3.1 Configuring the Basic System Environment
This section describes how to configure the basic system environment.
3.2 Displaying System Status Messages
This section describes how to use display commands to check basic configurations of the current
system.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
27
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
3.1 Configuring the Basic System Environment
This section describes how to configure the basic system environment.
3.1.1 Establishing the Configuration Task
Before configuring the basic system environment, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
Before configuring services, you need to configure the basic system environment (such as the
language mode, time, device name, login information, and command level) to meet the
environment requirement.
Pre-configuration Tasks
Before configuring the basic system environment, complete the following task:
l
Powering on the router
Data Preparation
To configure the basic system environment, you need the following data.
No.
Data
1
Language mode
2
System time
3
Host name
4
Login information
5
Command level
3.1.2 Switching the Language Mode
You can switch between the Chinese mode and the English mode as needed.
Context
After the language mode is switched, the system displays prompts and outputs of command lines
in the specified language.
Language information (Chinese and English) has been stored in the system software and does
not need to be loaded.
Do as follows in the user view:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
28
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
Procedure
l
Run:
language-mode { chinese | english }
The language mode is switched.
By default, the English mode is used.
The help information on the router can be in English or in Chinese. The language mode is
stored in the system software and does not need to be loaded.
----End
3.1.3 Configuring the Equipment Name
When multiple devices on the network need to be managed, you can identify them by setting an
equipment name for each device.
Context
The new equipment name takes effect immediately.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
sysname host-name
The equipment name is set.
By default, the equipment name of the router is HUAWEI.
You can change the name of the router that appears in the command prompt.
----End
3.1.4 Setting the System Clock
You need to set the system time properly to ensure the cooperation between the NE80E/40E and
other devices.
Context
The system clock displays the current time and date of the system, time zone to which the system
belongs, and daylight saving time. The NE80E/40E supports the configurations of the time zone
and the daylight saving time.
Do as follows in the user view:
Procedure
Step 1 Run:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
29
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
clock datetime [ utc ] HH:MM:SS YYYY-MM-DD
The current date and time is set.
Step 2 Run:
clock timezone time-zone-name { add | minus } offset
The time zone is set.
l If add is configured, the current time is the UTC time plus the time offset. That is, the default
UTC time plus offset is equal to the time of time-zone-name.
l If minus is configured, the current time is the UTC time minus the time offset. That is, the
default UTC time minus offset is equal to the time of time-zone-name.
NOTE
UTC stands for the Universal Time Coordinated.
Step 3 Run:
clock daylight-saving-time time-zone-name one-year start-time start-date end-time
end-date offset
or
clock daylight-saving-time time-zone-name repeating start-time { { first | second
| third | fourth | last } weekday month | start-date } end-time { { first |
second | third | fourth | last } weekday month | end-date } offset [ start-year
[ end-year ] ]
The daylight saving time is set.
By default, the daylight saving time is not set.
During the configuration of the daylight saving time, you can configure the starting time and
ending time in one of the following modes: date+date, week+week, date+week, and week+date.
For details, see clock daylight-saving-time.
CAUTION
When the device is upgraded from an earlier version to the V600R003C00 version, the
configured daylight saving time does not take effect and needs to be reconfigured.
----End
3.1.5 Configuring a Header
If you need to provide information for users logging in, you can configure a header that the
system displays during or after login.
Context
A header text is a message displayed by the system when and after a user is logging in to the
router.
If you need to provide information for login users, you can configure a header that the system
displays during login or after login.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
30
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
header login { information text | file file-name }
The header displayed during login is set.
Step 3 Run:
header shell { information text | file file-name }
The header displayed after login is set.
To display the header when the terminal connection has been activated but the user is not being
authenticated, configure the parameter login.
To display the header after the user logs in successfully, configure the parameter shell.
If the user can log in to the router without authentication, the system directly displays the header
after the login.
CAUTION
l The header text starts and ends with the same character. After a character is input and
Enter is pressed, an interactive interface is displayed. You can input the required information
ended with the first character. The system then exits from the interactive interface.
l If a user logs in to the router by using SSH1.X, the login header is not displayed during login,
but the shell header is displayed after login.
l If a user logs in to the router by using SSH2.0, both login and shell headers are displayed.
----End
3.1.6 Configuring Command Levels
This section describes how to configure command levels to ensure device security or allow lowlevel users to run high-level commands. By default, commands are registered in the sequence
of Level 0 to Level 3. If refined rights management is required, you can divide commands in to
16 levels, that is, from Level 0 to Level 15.
Context
If the user does not adjust a command level separately, after the command level is updated, all
originally-registered command lines adjust automatically according to the following rules:
l
The commands of Level 0 and Level 1 remain unchanged.
l
The commands of Level 2 are updated to Level 10 and the commands of Level 3 are updated
to Level 15.
l
No command lines exist in Level 2 to Level 9 and Level 11 to Level 14. The user can adjust
the command lines to these levels separately to refine the management of privilege.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
31
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
CAUTION
Changing the default level of a command is not recommended. If the default level of a command
is changed, some users may be unable to use the command any longer.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
command-privilege level rearrange
Update the command level in batches.
When no password is configured for a Level 15 user, the system prompts the user to set a superpassword for the level 15 user. At the same time, the system asks if the user wants to continue
with the update of command line level. Then, just select "N" to set a password. If you select "Y",
the command level can be updated in batches directly. This results in the user not logging in
through the Console port and failing to update the level.
Step 3 Run:
command-privilege level level view view-name command-key
The command level is configured. With the command, you can specify the level and view
multiple commands at one time (command-key).
All commands have default command views and levels. You do not need to reconfigure them.
----End
3.1.7 Configuring the Undo Command to Match in the Previous
View Automatically
You can run the undo command in the current view and thus the system automatically matches
the previous view.
Context
If the user allows the undo command to automatically match the previous view and the user
runs the undo command that is not registered in the current view, the system searches the
undo command in the previous view.
CAUTION
The undo command has disadvantages due to automatically matching. For example, when the
user runs the undo ospf command in the interface view where the command is not registered,
the system searches in system view automatically. This may lead to global deletion of the OSPF
feature.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
32
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
matched upper-view
The undo command is configured to match the upper level view.
By default, the undo command does not match the previous view automatically.
NOTE
l The matched upper-view command is valid for current login users who run this command.
l It is not recommended that you configure the undo command to automatically match the upper level
view, unless necessary.
----End
3.2 Displaying System Status Messages
This section describes how to use display commands to check basic configurations of the current
system.
Context
You can use the display commands to collect information about the system status. The display
commands are classified according to the following functions:
l
Displays system configurations.
l
Displays the running status of the system.
l
Displays the diagnostic information about a system.
l
Displays the restart information about the main control board.
See the related sections for display commands for protocols and interfaces. The following part
only shows the system-level display commands.
Run the following commands in any view.
3.2.1 Displaying System Configuration
This section describes how to check the system version, system time, original configuration, and
current configuration by using command lines.
Prerequisite
Basic configuration are complete.
Procedure
l
Run the display version command to display the system version.
l
Run the display clock [ utc ] command to display the system time.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
33
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3 Basic Configuration
l
Run the display calendar command to display system calendar.
l
Run the display saved-configuration command to display the original configuration.
l
Run the display current-configuration command to display the current configuration.
NOTE
l The display version command can be used to display the software version of the system, the
chassis type, and the information about the main control board and interface board.
l The original configuration refers to information about configuration files used by the device when
the device has been powered on and is being initialized. The current configuration refers to the
configuration files taking effect during the device operation. For details, see the chapter
"Configuring System Startup" in the NE80E/40E Basic-Configuration.
----End
3.2.2 Displaying System Status
This section describes how to check the system operating status (the configuration of the current
view) by using command lines.
Prerequisite
Basic configurations are complete.
Procedure
l
Run the display this command to display the configuration of the current view.
----End
3.2.3 Collecting System Diagnostic Information
This section describes how to collect information about all modules in the system.
Context
When the system fails to perform routine maintenance, you need to collect a lot of information
to locate faults. Then, you have to run different display commands to collect all information. In
this case, you can use the display diagnostic-information command to collect all information
about the current running modules in the system.
Procedure
l
Run:
display diagnostic-information [ file-name ]
The system diagnosis information is displayed.
The display diagnostic-information command collects all information collected by
running the following commands, including display clock, display version, display cpuusage, display interface, display current-configuration, display saved-configuration,
display history-command, and so on.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
34
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4
4 Configuring User Interface
Configuring User Interface
About This Chapter
A user can log in to the router by using a console port or an AUX port, or by means of Telnet
or SSH (STelnet). For users logging in to router in different modes, the system uses different
user interfaces to manage the sessions between the router and the users.
4.1 User Interface Overview
The system supports console, AUX, and VTY user interfaces.
4.2 Configuring the Console User Interface
When a user logs in to the router by using a console port for local maintenance, you can configure
attributes for the corresponding console user interface are needed.
4.3 Configuring the AUX User Interface
When a user logs in to the router for local or remote configuration by using an AUX port,
configuring attributes in the corresponding AUX user interface is needed.
4.4 Configuring VTY User Interface
If you need to log in to the router for local or remote maintenance by using Telnet or SSH, you
can configure the corresponding VTY user interface as needed.
4.5 Configuration Examples
This section provides examples for configuring console, AUX, and VTY user interfaces. These
configuration examples explain networking requirements, configuration roadmap, and
configuration notes.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
35
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.1 User Interface Overview
The system supports console, AUX, and VTY user interfaces.
Each user interface has a corresponding user interface view. A user interface view is a command
line view provided by the system. It is used to configure and manage all the physical and logical
interfaces in asynchronous mode.
User Interfaces Supported by the System
l
Console port (CON)
The console port is a serial port provided by the main control board of the router.
The main control board provides one EIA/TIA-232 DCE console port for local
configuration by directly connecting a terminal to a router.
l
Auxiliary port (AUX)
It is a linear port provided by the main control board of the router and supports the dialup
by using a modem.
Each main control board provides one AUX port with the type of EIA/TIA-232 DTE. A
terminal can remotely access the router through the modem on the AUX port.
l
Virtual type terminal (VTY)
It is a logical terminal line. A VTY connection is set up when a router connects to a terminal
by means of Telnet. It is used for local or remote access to a router. A maximum of 16 users
can log in to the router by using the VTY user interface.
Numbering of a User Interface
After a user logs in to the router, the system assigns an idle user interface of the smallest number
to the user according to the user's login mode. You can number a user interface in the following
manners:
l
Relative numbering
The relative numbering is in the format of user interface type + number.
The relative numbering is available for interfaces of a specific type. It is used only to specify
one or a group of user interfaces of a specified type. Relative numbering must comply with
the following rules:
– Number of the console port: CON 0
– Number of the auxiliary port: AUX 0
– Number of the VTY: VTY 0 for the first line, VTY 1 for the second line, and so on
l
Absolute numbering
The absolute numbering is used to uniquely specify a user interface or a group of user
interfaces.
The number starts with 0. The ports are numbered in the sequence of CON → AUX →
VTY. There is only one console port and one AUX port and 0-15 VTY interfaces. You can
use the user-interface maximum-vty command to set the maximum number of user
interfaces. The default number is five.
By default, the system supports three types of user interfaces: CON, AUX, and VTY.
Table 4-1 shows the absolute numbers of the user interfaces in this system.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
36
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Table 4-1 Example for the absolute numbering
Absolute number
User-interface
0
CON0
33
AUX0
34
The first virtual interface (VTY0)
35
The second virtual interface (VTY1)
36
The third virtual interface (VTY2)
37
The fourth virtual interface (VTY3)
38
The fifth virtual interface (VTY4)
NOTE
The absolute numbers allocated for AUX and VTY interfaces are device-specific.
The numbers from 1 to 32 are reserved for the TTY user interfaces.
Run the display user-interface command to view the absolute number of user interfaces.
Authentication of a User Interface
After a user is configured, the system authenticates the user during user login.
There are three user authentication modes: non-authentication, password authentication, and
AAA.
l
Non-authentication: In this mode, users can log in to the router without entering usernames
or passwords. For security, this mode is not recommended.
l
Password authentication: In this mode, users need to enter passwords, not usernames,
during the login process.
l
AAA authentication: In this mode, users need to enter passwords and usernames during the
login process. Telnet users are usually authenticated in this mode.
Priority of a User Interface
Users that log in to the router are managed according to their levels.
Similar to command levels, users are classified into 16 levels numbered 0 to 15. The greater the
number, the higher the user level.
The level of the command that a user can run is determined by the level of this user.
l
In the case of non-authentication or password authentication, the level of the command that
the user can run is determined by the level of the user interface.
l
In the case of AAA authentication, the command that the user can run is determined by the
level of the local user specified in the AAA configuration.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
37
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.2 Configuring the Console User Interface
When a user logs in to the router by using a console port for local maintenance, you can configure
attributes for the corresponding console user interface are needed.
4.2.1 Establishing the Configuration Task
Before configuring the console user interface, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
If you need to log in to the router for local maintenance by using a console port, you can configure
the corresponding console user interface, including the physical attributes, terminal attributes,
user priority, and user authentication mode. The preceding parameters have default values on
the router and additional configuration is not needed. You can configure these parameters as
needed.
Pre-configuration Tasks
Before configuring a console user interface, complete the following tasks:
l
Logging in to the router by using a terminal
Data Preparation
To configure a console user interface, you need the following data.
No.
Data
1
Baud rate, flow-control mode, parity, stop bit, and data bit
2
Idle timeout period, number of lines displayed in a terminal screen, and the size of
history command buffer
3
User priority
4
User authentication method, user name, and password
NOTE
All the default values (excluding the password and username) are stored on the router and do not need
additional configuration.
4.2.2 Setting Physical Attributes of Console User Interface
You can configure the rate, flow control mode, parity mode, stop bit, and data bit for the console
port.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
38
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Context
Physical attributes of a console port have default values on the router and no additional
configuration is needed.
NOTE
When a user logs in to a router through a console port, the physical attributes set for the console port on
the HyperTerminal should be consistent with the attributes of the console user interface on the router.
Otherwise, the user cannot log in to the router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface console interface-number
The console user interface view is displayed.
Step 3 Run:
speed speed-value
The baud rate is set.
By default, the baud rate is 9600 bit/s.
Step 4 Run:
flow-control { hardware | none | software }
The flow control mode is set. By default, the flow-control mode is none.
Step 5 Run:
parity { even | mark | none | odd | space }
The parity mode is set.
By default, the value is none.
Step 6 Run:
stopbits { 1.5 | 1 | 2 }
The stop bit is set.
By default, the value is 1 bit.
Step 7 Run:
databits { 5 | 6 | 7 | 8 }
The data bit is set.
By default, the data bit is 8.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
39
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.2.3 Setting Terminal Attributes of Console User Interface
This section describes how to set terminal attributes of the console user interface, including the
user timeout disconnection function, number of lines displayed in a terminal screen, and size of
the history command buffer.
Context
Terminal attributes of the console user interface have default values on the router and you can
set them as needed.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface console interface-number
The console user interface view is displayed.
Step 3 Run:
shell
The terminal service is started.
Step 4 Run:
idle-timeout minutes [ seconds ]
The idle timeout period is set.
If the connection keeps idle within the timeout period, the system automatically terminates the
connection.
By default, the idle timeout period on the user interface is 10 minutes.
Step 5 Run:
screen-length screen-length [temporary]
The length of a terminal screen is set.
The parameter temporary is used to display the number of lines to be temporarily displayed on
a terminal screen.
By default, the length of a terminal screen is 24 lines.
Step 6 Run:
history-command max-size size-value
The history command buffer is set.
By default, the size of history command buffer on a user interface is 10 entries.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
40
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.2.4 Configuring User Priority of Console User Interface
This section describes how to control users' authority of logging in to the router and improve
the security of managing the router by configuring the user priority.
Context
l
Similar to command levels, users are classified into 16 levels numbered 0 to 15. The greater
the number, the higher the user level.
l
This process is to set the priority for a user who logs in through the console port. A user
can only use the commands with the level corresponding to the user level.
For details about command levels, see "Command Level" in the chapter "CLI Overview" of
the Configuration Guide - Basic Configuration.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface console interface-number
The console user interface view is displayed.
Step 3 Run:
user privilege level level
The priority of the user is set.
NOTE
l By default, users logging in through the console user interface can use commands at level 3, and users
logging in through other user interfaces can use commands at level 0.
l If the command level is inconsistent with the user level, the user level takes precedence.
----End
4.2.5 Configuring the User Authentication Mode of the Console
User Interface
The system provides three authentication modes: AAA, password authentication, and nonauthentication. Configuring the user authentication mode can improve the security of the
router.
Context
By default, the user authentication mode of the console user interface is non-authentication.
Procedure
l
Configuring AAA Authentication
1.
Run:
system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
41
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
The system view is displayed.
2.
Run:
user-interface console interface-number
The console user interface view is displayed.
3.
Run:
authentication-mode aaa
The authentication mode is set to AAA.
4.
Run:
quit
Exit from the console user interface view.
5.
Run:
aaa
The AAA view is displayed.
6.
Run:
local-user user-name password { simple | cipher } password
Name and password of the local user are created.
l
Configuring Password Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface console interface-number
The console user interface view is displayed.
3.
Run:
authentication-mode password
You can set the authentication mode as password authentication.
4.
Run:
set authentication password { cipher | simple } password
A password for authentication is set.
l
Configuring Non-Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface console interface-number
The console user interface view is displayed.
3.
Run:
authentication-mode none
The authentication mode is set to non-authentication.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
42
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.2.6 Checking the Configuration
After configuring the console user interface, you can view information about the user interface,
physical attributes and configurations of the user interface, local user list, and online users.
Prerequisite
The configurations of the user management function are complete.
Procedure
l
Run the display users [ all ] command to check information about the user interface.
l
Run the display user-interface console ui-number1 [ summary ] command to check
physical attributes and configurations of the user interface.
l
Run the display local-user command to check the local user list.
l
Run the display access-user command to check the local user list.
----End
Example
Run the display users command, and you can view information about the current user interface.
<HUAWEI> display users
User-Intf
Delay
0
CON 0
00:00:44
Username : Unspecified
Type
Network Address
AuthenStatus
pass
AuthorcmdFlag
no
Run the display user-interface console ui-number1 [ summary ] command, and you can view
the physical attributes and configurations of the user interface.
<HUAWEI> display user-interface console 0
Idx Type
Tx/Rx
Modem Privi ActualPrivi Auth
0
CON 0
9600
3
N
+
: Current UI is active.
F
: Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
Int
-
Run the display local-user command, and you can view the local user list.
<HUAWEI> display local-user
---------------------------------------------------------------------------Username
State Type
CAR Access-limit Online
---------------------------------------------------------------------------user123
Active All
Dft
No
0
ll
Active F
Dft
No
0
user1
Active F
Dft
No
0
---------------------------------------------------------------------------Total 3,3 printed
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
43
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.3 Configuring the AUX User Interface
When a user logs in to the router for local or remote configuration by using an AUX port,
configuring attributes in the corresponding AUX user interface is needed.
4.3.1 Establishing the Configuration Task
Before configuring the AUX user interface, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
If you need to log in to the router for remote maintenance by using an AUX port, you can
configure the corresponding AUX user interface as needed by setting the physical attributes,
terminal attributes, user priority, and user authentication mode. The preceding parameters have
default values on the router and additional configuration is not needed.
Pre-configuration Tasks
Before configuring an AUX user interface, complete the following tasks:
l
Logging in to the router by using a terminal
Data Preparation
Before configuring an AUX user interface, you need the following data.
No.
Data
1
Baud rate, flow-control mode, parity, stop bit, and data bit
2
Idle timeout period, number of lines displayed in a terminal screen, and the size of
history command buffer
3
User priority
4
Modem attributes
5
(Optional) Auto-execute commands
6
User authentication method, user name, and password
NOTE
All the default values (excluding the auto-run commands, password, and username) are stored on the
router and do not need additional configuration.
4.3.2 Setting Physical Attributes of AUX User Interface
Physical attributes of the AUX user interface include the transmission rate, flow control mode,
parity mode, stop bit, and data bit of the AUX port.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
44
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Context
Physical attributes of the AUX user interface have default values on the router and no additional
configuration is needed.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux interface-number
The AUX user interface view is displayed.
Step 3 Run:
speed speed-value
The transmission rate is set.
By default, the baud rate is 9600 bit/s.
Step 4 Run:
flow-control { hardware | none | software }
The flow control mode is set.
By default, the flow-control mode is none.
Step 5 Run:
parity { even | mark | none | odd | space }
The parity mode is set.
By default, the value is none.
Step 6 Run:
stopbits { 1.5 | 1 | 2 }
The stop bit is set.
By default, the value is 1 bit.
Step 7 Run:
databits { 5 | 6 | 7 | 8 }
The data bit is set.
By default, the value is 8.
NOTE
When the user logs in to a router through an AUX port, the configured attributes for the console port on
the HyperTerminal should be in accordance with the attributes of the AUX user interface on the router.
Otherwise, the user cannot log in to the router.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
45
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.3.3 Setting Terminal Attributes of AUX User Interface
This section describes how to configure terminal attributes of the AUX user interface, including
the user idle timeout, number of lines displayed in a terminal screen, and size of the history
command buffer.
Context
Terminal attributes of the AUX user interface have default values on the router and you can
configure them as needed.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux interface-number
The AUX user interface view is displayed.
Step 3 Run:
shell
AUX terminal service is enabled.
Step 4 Run:
idle-timeout minutes [ seconds ]
User idle timeout is enabled.
If the connection keeps idle within the timeout period, the system automatically terminates the
connection.
By default, idle timeout period on the interface is 10 minutes.
Step 5 Run:
screen-length screen-length [temporary]
The length of a terminal screen is set.
The parameter temporary is used to display the number of lines to be temporarily displayed on
a terminal screen.
By default, the length of a terminal screen is 24 lines.
Step 6 Run:
history-command max-size size-value
The size of the history command buffer is configured.
By default, the size of history command buffer on user interface is 10 entries.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
46
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
4.3.4 Setting User Priority of AUX User Interface
This section describes how to control users' authority of logging in to the router and improve
the security of managing the router by configuring the user priority.
Context
l
Similar to command levels, users are classified into 16 levels numbered 0 to 15. The greater
the number, the higher the user level.
l
This process is to set the priority for a user who logs in through the console port. A user
can only use the commands with the level corresponding to the user level.
For details about command levels, see "Command Level" in the chapter "CLI Overview" of
the Configuration Guide - Basic Configuration.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux interface-number
The AUX user interface view is displayed.
Step 3 Run:
user privilege level level
The user priority is set.
NOTE
l By default, users logging in by using the AUX user interface can use commands at level 0.
l If the authority to use commands is inconsistent with the user level, the user level takes precedence.
----End
4.3.5 Setting Modem Attributes of AUX User Interface
You can set the time period from picking up the signal to detecting the carrier when a call is
established, modem for only incoming calls or for both incoming and outgoing calls, and
automatic answer.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux interface-number
The AUX user interface view is displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
47
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Step 3 Run:
modem timer answer seconds
The period between the system receiving the ring signal and the system waiting for the CD_UP
is set. That is the time that elapses between picking up the signal to detecting the carrier, since
the call is established.
By default, the waiting time is 30 seconds.
Step 4 Run:
modem [ both | call-in ]
The switch of incoming call or outgoing call is set.
By default, incoming and outgoing calls are prohibited.
Step 5 Run:
modem auto-answer
Automatic answer is enabled.
By default, manual answering is enabled.
----End
4.3.6 (Optional) Configuring Auto-Execute Commands of AUX User
Interface
You can set a command to be an auto-executed command.
Context
CAUTION
After the auto-execute command command is run, you cannot perform general configuration
in the system through a terminal.
Before configuring the auto-execute command command and the save command to save the
existing configurations, ensure that you can log in to the system using other methods to delete
the configurations.
Do as follows on the router that the user logs in to:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux 0
The AUX user interface view is displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
48
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Step 3 Run:
auto-execute command command
A command is specified as an auto-execute command.
Generally, the auto-execute command command is run to configure Telnet on a terminal. After
the configuration, the user can automatically connect to a designated host.
----End
4.3.7 Setting User Authentication Mode of AUX User Interface
The system provides three authentication modes: AAA, password authentication, and nonauthentication. Configuring the user authentication mode can improve the security of the
router.
Context
By default, the user authentication mode of the AUX user interface is non-authentication.
Procedure
l
Configuring AAA Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface aux interface-number
The AUX user interface view is displayed.
3.
Run:
authentication-mode aaa
The authentication mode is set to AAA.
4.
Run:
quit
Exit from the AUX user interface view.
5.
Run:
aaa
The AAA view is displayed.
6.
Run:
local-user user-name password { simple | cipher } password
Local user and password are configured.
l
Configuring Password Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface aux interface-number
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
49
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
The AUX user interface view is displayed.
3.
Run:
authentication-mode password
The authentication mode is set to password.
4.
Run:
set authentication password { cipher | simple } password
A password is set.
l
Configuring Non-Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface aux interface-number
The AUX user interface view is displayed.
3.
Run:
authentication-mode none
The authentication mode is set to non-authentication.
----End
4.3.8 Checking the Configuration
After configuring the AUX user interface, you can view the usage information of the user
interface, physical attributes and configurations of the user interface, local user list, and online
users.
Prerequisite
Configurations of the AUX user interface are complete.
Procedure
l
Run the display users [ all ] command to check usage information about the AUX user
interface.
l
Run the display user-interface aux interface-number [ summary ] command to check
physical attributes and configurations of the user interface.
l
Run the display local-user command to check the local user list.
l
Run the display access-user command to check the local user list.
----End
Example
Run the display users command, and you can view information about the current user interface.
<HUAWEI> display users
User-Intf
Delay
33 AUX 0
00:00:44
Username : Unspecified
Issue 02 (2011-09-10)
Type
Network Address
AuthenStatus
pass
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
AuthorcmdFlag
no
50
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Run the display user-interface aux ui-number1 [ summary ] command, and you can view the
physical attributes and configurations of the user interface.
<HUAWEI> display user-interface aux 0
Idx Type
Tx/Rx
Modem Privi ActualPrivi Auth
33
AUX 0
9600
0
N
+
: Current UI is active.
F
: Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
Int
-
Run the display local-user command, and you can view the local user list.
<HUAWEI> display local-user
---------------------------------------------------------------------------Username
State Type
CAR Access-limit Online
---------------------------------------------------------------------------user123
Active All
Dft
No
0
ll
Active F
Dft
No
0
user1
Active F
Dft
No
0
---------------------------------------------------------------------------Total 3,3 printed
4.4 Configuring VTY User Interface
If you need to log in to the router for local or remote maintenance by using Telnet or SSH, you
can configure the corresponding VTY user interface as needed.
4.4.1 Establishing the Configuration Task
Before configuring the VTY user interface, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Applicable Environment
If you need to log in to the router for local or remote maintenance by using Telnet or SSH, you
can configure the corresponding VTY user interface, including the maximum number of VTY
user interfaces, limit of incoming and outgoing calls, user priority, and user authentication mode.
The preceding parameters have default values on the router. You can also set these parameters
as needed.
Pre-configuration Tasks
Before configuring VTY user interface, complete the following tasks:
l
Logging in to the router by using a terminal
Data Preparation
To configure a VTY user interface, you need the following data.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
51
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
No.
Data
1
Maximum VTY user interfaces
2
(Optional) ACL code to limit VTY user interface to call in and out
3
Idle timeout period, number of characters in each line displayed in a terminal screen
4
User priority
5
User authentication method, user name, and password
NOTE
All the preceding parameters (excluding the ACL for limiting incoming and outgoing calls in VTY user
interfaces, password, and user name) have default values on the router, and no additional configuration is
needed.
4.4.2 Configuring Maximum VTY User Interfaces
This section describes how to limit the number of users logging in to the router by configuring
the maximum number of VTY user interfaces.
Context
The maximum number of VTY user interfaces is the total number of users logging in to the
router by using Telnet and SSH.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface maximum-vty number
The maximum VTY user interfaces that can log in to the router is set.
NOTE
When the maximum number of VTY user interfaces is set to zero, any user (including the NMS user) cannot
log in to the router by using a VTY user interface.
If the maximum number of VTY user interfaces to be configured is smaller than the maximum
number of current interfaces, current online users will not be affected and no addition
configuration is needed.
If the maximum number of VTY user interfaces to be configured is larger than the maximum
number of current interfaces, the authentication mode and password need to be configured for
newly added user interfaces.
For newly added user interfaces, the system defaults to password authentication.
For example, a maximum of five users are allowed online. To allow 15 VTY users online at the
same time, you need to run the authentication-mode command and the set authentication
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
52
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
password command to configure authentication modes and passwords for user interfaces from
VTY 5 to VTY 14. The command is run as follows:
<HUAWEI> system-view
[HUAWEI] user-interface maximum-vty 15
[HUAWEI] user-interface vty 5 14
[HUAWEI-ui-vty5-14] authentication-mode password
[HUAWEI-ui-vty5-14] set authentication password cipher huawei
----End
4.4.3 (Optional)Setting Limit on Incoming and Outgoing Calls of
VTY User Interfaces
This section describes how to configure an ACL to limit incoming and outgoing calls of the
VTY user interface.
Context
Before setting the limit on incoming and outgoing calls of the VTY user interface, run the acl
command in the system view to create an ACL and enter the ACL view. Then, run the rule
command to add rules to the ACL.
NOTE
The user interface supports the basic ACL ranging from 2000 to 2999 and the advanced ACL ranging from
3000 to 3999.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
Step 3 Run:
acl acl-number { inbound | outbound }
The limits to calling in/out of VTY are configured.
l When you need to prevent a user of certain address or segment address from logging in to
the router, use the inbound command.
l When you need to prevent a user who logs in to a router from accessing other routers, use
the outbound command.
----End
4.4.4 Setting Terminal Attributes of the VTY User Interface
This section describes how to configure terminal attributes of the VTY user interface, including
user idle timeout, number of lines displayed in a terminal screen, and size of the history command
buffer.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
53
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Context
Terminal attributes of the VTY user interface have default values on the router and you can set
them as needed.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface vty number1 [ number2 ]
The VTY user interface view is displayed.
Step 3 Run:
shell
VTY terminal service is enabled.
Step 4 Run:
idle-timeout minutes [ seconds ]
User idle timeout is enabled.
If the connection keeps idle within the timeout period, the system automatically terminates the
connection.
By default, the timeout period is 10 minutes.
Step 5 Run:
screen-length screen-length [temporary]
The length of a terminal screen is set.
The parameter temporary is used to display the number of lines to be temporarily displayed on
a terminal screen.
By default, the length of a terminal screen is 24 lines.
Step 6 Run:
history-command max-size size-value
Set the size of the history command buffer.
By default, a maximum number of 10 commands can be cached in the history command buffer.
----End
4.4.5 Setting User Priority of VTY User Interface
This section describes how to control users' authority of logging in to the router and improve
the security of managing the router by configuring the user priority.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
54
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Context
l
Similar to command levels, users are classified into 16 levels numbered 0 to 15. The greater
the number, the higher the user level.
l
This process is to set the priority for a user who logs in through the console port. A user
can only use the commands with the level corresponding to the user level.
For details about command levels, see "Command Level" in the chapter "CLI Overview" of
the Configuration Guide - Basic Configuration.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface vty interface-number
The VTY user interface view is displayed.
Step 3 Run:
user privilege level level
The user priority is set.
By default, users logging in through the VTY user interface can use commands at level 0.
NOTE
If the command level configured in the VTY user interface view is inconsistent with the user priority, the
user priority takes effect.
----End
4.4.6 Setting User Authentication Mode of the VTY User Interface
The system provides three authentication modes: AAA, password authentication, and nonauthentication. Configuring the user authentication mode can improve the security of the
router.
Context
By default, the user authentication mode of the VTY user interface is password authentication.
Procedure
l
Configuring AAA Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface vty number1 [ number2 ]
The VTY user interface view is displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
55
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3.
4 Configuring User Interface
Run:
authentication-mode aaa
The authentication mode is set to AAA.
4.
Run:
quit
Exit from the VTY user interface view.
5.
Run:
aaa
The AAA view is displayed.
6.
Run:
local-user user-name password { simple | cipher } password
Name and password of the local user are created.
l
Configuring Password Authentication
1.
Run:
system-view
The system view is displayed.
2.
Run:
user-interface vty number1 [ number2 ]
The VTY user interface view is displayed.
3.
Run:
authentication-mode password
Set the authentication mode as password.
4.
Run:
set authentication password { cipher | simple } password
A password for this authentication mode is set.
l
Configuring Non-Authentication
1.
Do as follows on the router, run:
system-view
The system view is displayed.
2.
Run:
user-interface vty number1 [ number2 ]
The VTY user interface view is displayed.
3.
Run:
authentication-mode none
The authentication mode is set to none.
----End
4.4.7 (Optional) Configuring NMS Users to Log In Through VTY
User Interfaces
Network Management System (NMS) users can log in to a device through VTY user interfaces
to set parameters about the device.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
56
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Context
NMS users can log in to the router through VTY user interfaces to set parameters about the
router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
aaa
The AAA view is displayed.
Step 3 Run:
local-user user-name password { simple | cipher } password
A local user is created.
Step 4 Run:
local-user user-name user-type netmanager
The local user is set as an NM user.
Step 5 Run:
quit
The system view is displayed.
Step 6 Run:
user-interface vty first-ui-number [ last-ui-number ]
The user interface view is displayed.
Step 7 Run:
authentication-mode aaa
An authentication mode used to log in to the user interface is configured.
NOTE
The system reserves five VTYs (VTY 16-VTY 20) for an NMS user. The five VTYs are used as special
channels of the network management. The channels do not support the RSA authentication mode but
support the password authentication.
Step 8 Run:
quit
The system view is displayed.
Step 9 Run:
mmi-mode enable
The system is switched to the machine-to-machine mode.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
57
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
NOTE
l This command is invisible to terminals and cannot be obtained by using the online help. In man-tomachine mode, exercise caution when using this command.
l In the VTY machine-to-machine mode, the system reserves five user interfaces to which an NMS user
can log in through VTYs. A common user cannot log in through Telnet but can log in by using the five
reserved user interfaces.
l In the machine-to-machine mode, the system does not output logs, alarms, and debugging information
to the screen.
l In the machine-to-machine mode, the save and reboot commands can be used directly.
l In the machine-to-machine mode, a maximum of 512 lines are displayed by default. The value can be
adjusted by using the screen-length command. In addition, you can run the screen-length
temporary command to adjust the number of lines temporarily displayed on the screen.
----End
4.4.8 Checking the Configuration
After configuring the VTY user interface, you can view information about user interfaces, the
maximum number of VTY user interfaces, and physical attributes and configurations of user
interfaces.
Prerequisite
The configurations of the VTY user interface are complete.
Procedure
l
Run the display users [ all ] command to check information about user interfaces.
l
Run the display user-interface maximum-vty command to check the maximum number
of VTY user interfaces.
l
Run the display user-interface [ [ ui-type ] ui-number1 | ui-number ] [ summary ]
command to check the physical attributes and configurations of user interfaces.
l
Run the display local-user command to check the local user list.
l
Run the display vty mode command to check the VTY mode.
----End
Example
Run the display users command, and you can view information about the current user interfaces.
<HUAWEI> display users
User-Intf
Delay
Type
34 VTY 0
00:00:12 TEL
Username : Unspecified
+ 35 VTY 1
00:00:00 TEL
Username : Unspecified
Network Address
10.138.77.38
AuthenStatus
10.138.77.57
AuthorcmdFlag
no
no
Run the display user-interface maximum-vty command, and you can view the maximum
number of VTY user interfaces.
<HUAWEI> display user-interface maximum-vty
Maximum of VTY user:15
Run the display user-interface vty [ ui-number1 | ui-number ] [ summary ] command to check
the physical attributes and configurations of user interfaces.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
58
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
<HUAWEI> display user-interface vty 0
Idx Type
Tx/Rx
Modem Privi ActualPrivi Auth
+ 34
VTY 0
14
14
N
+
: Current UI is active.
F
: Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
4 Configuring User Interface
Int
-
Run the display local-user command, and you can view the local user list.
<HUAWEI> display local-user
---------------------------------------------------------------------------Username
State Type
CAR Access-limit Online
---------------------------------------------------------------------------user123
Active All
Dft
No
0
ll
Active F
Dft
No
0
user1
Active F
Dft
No
0
---------------------------------------------------------------------------Total 3,3 printed
Run the display vty mode command, and you can view the prompt message indicating that the
machine-to-machine interface is enabled. For example:
<HUAWEI> display vty mode
current VTY mode is Machine-Machine interface
4.5 Configuration Examples
This section provides examples for configuring console, AUX, and VTY user interfaces. These
configuration examples explain networking requirements, configuration roadmap, and
configuration notes.
4.5.1 Example for Configuring Console User Interface
This part provides an example describing how to configure the console user interface. In this
configuration example, to allow a user in password authentication mode to log in to the router
by using a console user interface, multiple attributes of the console user interface are set,
including physical attributes, terminal attributes, user priority, user authentication mode, and
password.
Networking Requirements
To initialize configurations of the router or locally maintain the router, a user can log in to the
router through a console user interface. To allow the user to log in, you can set attributes of the
console user interface as needed (for security reasons, for example).
In the console user interface view, the user priority is set to 15, and the password authentication
mode is set (the password is huawei).
After a user logs in, if the user takes no action on the router for more than 30 minutes, the
connection between the user and the router is torn down.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
59
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enter the interface view and set physical attributes of the console user interface.
2.
Set terminal attributes of the console user interface.
3.
Set the user priority of the console user interface.
4.
Set the user authentication mode and password of the console user interface.
Data Preparation
To complete the configuration, you need the following data:
l
Transmission rate of the console user interface: 4800 bit/s
l
Flow control mode of the console user interface: None
l
Parity of the console user interface: even
l
Stop bit of the console user interface: 2
l
Data bit of the console user interface: 6
l
Timeout period for disconnecting from the console user interface: 30 minutes
l
Number of lines that a terminal screen displays: 30
l
Size of the history command buffer: 20
l
User priority: 15
l
User authentication mode: password (password: huawei)
Procedure
Step 1 Set physical attributes of the console user interface.
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] speed 4800
[HUAWEI-ui-console0] flow-control none
[HUAWEI-ui-console0] parity even
[HUAWEI-ui-console0] stopbits 2
[HUAWEI-ui-console0] databits 6
Step 2 Set terminal attributes of the console user interface.
[HUAWEI-ui-console0]
[HUAWEI-ui-console0]
[HUAWEI-ui-console0]
[HUAWEI-ui-console0]
shell
idle-timeout 30
screen-length 30
history-command max-size 20
Step 3 Set the user priority of the console user interface.
[HUAWEI-ui-console0] user privilege level 15
Step 4 Set the user authentication mode in the console user interface to password.
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password simple huawei
[HUAWEI-ui-console0] quit
After the console user interface is configured, a user in password authentication mode can log
in to the router through a console port, implementing local maintenance of the router. For details
on how a user logs in to the router, see the 5 Configuring User Login.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
60
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
Configuration Files
#
sysname HUAWEI
#
user-interface con 0
authentication-mode password
user privilege level 15
set authentication password simple huawei
history-command max-size 20
idle-timeout 30 0
screen-length 30
databits 6
parity even
stopbits 2
speed 4800
screen-length 30
#
return
4.5.2 Example for Configuring AUX User Interface
This part provides an example describing how to configure the AUX user interface. In the
configuration example, to allow a user in AAA authentication mode to log in to the router by
using an AUX user interface, multiple attributes of the console user interface are set, including
physical attributes, terminal attributes, user priority, user authentication mode, and password.
Networking Requirements
To maintain the router locally or remotely, a user can log in to the router through an AUX user
interface.
To allow the user login, an operator can set attributes of the AUX user interface as needed (for
security reasons, for example).
In the AUX user interface, the user priority is set to 15, and the authentication mode is set to
AAA, with the user name of user123 and the password of huawei.
After a user logs in, if the user takes no action on the router for more than 30 minutes, the
connection between the user and the router is torn down.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enter the interface view and set physical attributes of the AUX user interface.
2.
Set terminal attributes of the AUX user interface.
3.
Set the user priority of the AUX user interface.
4.
Set modem attributes of the AUX user interface.
5.
Set the authentication mode and password in the AUX user interface.
Data Preparation
To complete the configuration, you need the following data:
l
Transmission rate of the AUX user interface: 9600 bit/s
l
Flow control mode of the AUX user interface: None
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
61
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
l
Parity of the AUX user interface: None
l
Stop bit of the AUX user interface: 1
l
Data bit of the AUX user interface: 8
l
Timeout period for disconnecting from the AUX user interface: 30 minutes
l
Number of lines that a terminal screen displays: 30
l
Size of the history command buffer: 20
l
User priority: 15
l
Modem attributes: idle timeout from off-hook to carrier detection (45 seconds), call-in
permission, and automatic response
l
User authentication mode and password in the AUX user interface
Procedure
Step 1 Set physical attributes of the AUX user interface.
<HUAWEI> system-view
[HUAWEI] user-interface aux 0
[HUAWEI-ui-aux0] speed 9600
[HUAWEI-ui-aux0] flow-control none
[HUAWEI-ui-aux0] parity none
[HUAWEI-ui-aux0] stopbits 1
[HUAWEI-ui-aux0] databits 8
All the preceding physical attributes of the AUX user interface are set with default values. In
fact, if a user chooses to use the default values, the user does not need to set them. The preceding
settings only mean to provide the configuration method.
Step 2 Set terminal attributes of the AUX user interface.
[HUAWEI-ui-aux0]
[HUAWEI-ui-aux0]
[HUAWEI-ui-aux0]
[HUAWEI-ui-aux0]
shell
idle-timeout 30
screen-length 30
history-command max-size 20
Step 3 Set the user priority of the AUX user interface.
[HUAWEI-ui-aux0] user privilege level 15
Step 4 Set modem attributes of the AUX user interface.
[HUAWEI-ui-aux0] modem timer answer 45
[HUAWEI-ui-aux0] modem call-in
[HUAWEI-ui-aux0] modem auto-answer
Step 5 Set the authentication mode of the AUX user interface to AAA.
[HUAWEI-ui-aux0] authentication-mode aaa
[HUAWEI-ui-aux0] quit
[HUAWEI] aaa
[HUAWEI-aaa] local-user user123 password simple huawei
[HUAWEI-aaa] quit
After the AUX user interface is configured, a user in AAA authentication mode can log in to
the router through an AUX port, implementing maintenance of the router. For details on how a
user logs in to the router, refer to the 5 Configuring User Login.
----End
Configuration Files
#
sysname HUAWEI
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
62
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
#
user-interface aux 0
authentication-mode aaa
user privilege level 15
history-command max-size 20
idle-timeout 30 0
modem call-in
modem auto-answer
modem timer answer 45
screen-length 30
#
return
4.5.3 Example for Configuring VTY User Interface
This part provides an example describing how to configure the VTY user interface. In this
configuration example, to allow a user in password authentication mode to log in to the router
by using Telnet or SSH (Stelnet), multiple attributes of the VTY user interface are set, including
the maximum number of VTY user interfaces, call-in and call-out limit, terminal attributes,
authentication mode, and password.
Networking Requirements
A user logs in to the router through a VTY channel by using Telnet or SSH. To allow the user
login, an operator can set attributes of the VTY user interface as needed (for security reasons,
for example).
In the VTY user interface, the user priority is set to 15, the authentication mode is set to password,
with the password of "huawei", and the user with the IP address of 10.1.1.1 is prohibitted from
logging in to the router.
After logging in, if the user takes no action on the router for more than 30 minutes, the connection
between the user and the router is torn down.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enter the interface view and set the maximum number of VTY user interfaces to 15.
2.
Set the call-in and call-out limit of the VTY user interface, limiting the access of an IP
address or an IP address segment to the router.
3.
Set terminal attributes of the VTY user interface.
4.
Set the user priority in the VTY user interface.
5.
Set the authentication mode and password in the VTY user interface.
Data Preparation
To complete the configuration, you need the following data:
l
Maximum number of VTY user interfaces: 15
l
ACL applied to limit call-in in the VTY user interface: 2000
l
Timeout period for disconnecting from the VTY user interface: 30 minutes
l
Number of lines that a terminal screen displays: 30
l
Size of the history command buffer: 20
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
63
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
4 Configuring User Interface
l
User priority: 15
l
User authentication mode: password, password: huawei
Procedure
Step 1 Set the maximum number of VTY user interfaces.
<HUAWEI> system-view
[HUAWEI] user-interface maximum-vty 15
Step 2 Set the limit on call-in and call-out in the VTY user interface.
[HUAWEI] acl 2000
[HUAWEI-acl-basic-2000]
[HUAWEI-acl-basic-2000]
[HUAWEI] user-interface
[HUAWEI-ui-vty0-14] acl
rule deny source 10.1.1.1 0
quit
vty 0 14
2000 inbound
Step 3 Set terminal attributes of the VTY user interface.
[HUAWEI-ui-vty0-14]
[HUAWEI-ui-vty0-14]
[HUAWEI-ui-vty0-14]
[HUAWEI-ui-vty0-14]
shell
idle-timeout 30
screen-length 30
history-command max-size 20
Step 4 Set the user priority in the VTY user interface.
[HUAWEI-ui-vty0-14] user privilege level 15
Step 5 Set the authentication mode and password in the VTY user interface.
[HUAWEI-ui-vty0-14] authentication-mode password
[HUAWEI-ui-vty0-14] set authentication password simple huawei
[HUAWEI-ui-vty0-14] quit
After the VTY user interface is configured, a user authenticated in password mode can log in to
the router by using Telnet or SSH (Stelnet), implementing local or remote maintenance of the
router. For details on how a user logs in to the router, see the 5 Configuring User Login.
----End
Configuration Files
#
sysname HUAWEI
#
acl number 2000
rule 5 deny source 10.1.1.1 0
rule permit source any
#
user-interface maximum-vty 15
user-interface vty 0 14
acl 2000 inbound
user privilege level 15
set authentication password simple huawei
history-command max-size 20
idle-timeout 30 0
screen-length 30
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
64
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5
Configuring User Login
About This Chapter
A user can log in to the router through a console port, an AUX port, or by using Telnet or SSH
(STelnet). After the login, the user can maintain the router locally or remotely.
5.1 Overview of User Login
Users can manage and maintain the router only after logging in to the router. Users can log in
to the router by using the AUX port, console port, Telnet, or STelnet (SSH Telnet).
5.2 Logging in to the Devices Through the Console Port
When a user needs to configure the router that is powered on for the first time or locally maintain
the router, the user can log in to the router through a console port.
5.3 Logging in to the Devices Through the AUX Port
When a user terminal and the router have no reachable route between each other, the user can
remotely configure and manage or locally maintain the router by logging in to the router through
an AUX port.
5.4 Logging in to the Devices by Using Telnet
If multiple routers need to be configured and managed, you do not need to connect the routers
and maintain them locally one by one. Instead, you can log in to the routers from a terminal by
using Telnet. This implements remote maintenance of the router and greatly facilitates device
management.
5.5 Logging in to the Devices by Using STelnet
STelnet provides secured remote access over an insecure network. After the client/server
negotiation is complete and a secured connection is established, a user can log in to the router
in a similar way as Telnet.
5.6 Common Operations After Login
After logging in to the router, you can perform following operations as needed, such as user
priority switching and terminal window locking.
5.7 Configuration Examples
This section provides several examples describing how to configure user login by using a console
port, Telnet, or STelnet. You can understand the configuration procedures by referring to the
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
65
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
configuration flowchart. The configuration examples provide information about the networking
requirements, configuration notes, and configuration roadmap.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
66
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.1 Overview of User Login
Users can manage and maintain the router only after logging in to the router. Users can log in
to the router by using the AUX port, console port, Telnet, or STelnet (SSH Telnet).
To configure, monitor, and maintain the local or remote network devices running NE80E/40E,
you need to configure the user interface, the user management, and the terminal service.
The user interface provides a login plane. The user management guarantees the login security
and the terminal service provides related processes of login protocol.
The NE80E/40E supports the following login methods:
l
Login through the console port
l
Local or remote login through the AUX port
l
Local or remote login through Telnet or STelnet
Table 5-1 User login modes
Login Mode
Application
Console port
Users log in to the router through the console port to configure the router
locally. Login through the console port is required when the router is
powered on for the first time.
Telnet
Users log in to the router by using Telnet for local and remote maintenance.
Telnet helps users maintain remote devices but brings security threats.
AUX port
Users log in to the router through the AUX port to maintain the router locally
when there is no available route and Telnet is unsuitable.
SSH (STelnet)
SSH (STelnet) provides security protection for users logging in to the
router to maintain the router locally or remotely.
NOTE
Logins by using Telnet bring security risks because no secure authentication mechanism is available and
data is transmitted by using TCP in plain text mode. Unlike Telnet, SSH guarantees secure data transmission
on a conventional insecure network by authenticating the client and encrypting data in both directions. SSH
supports security Telnet (STelnet).
For detailed information about SSH, see the NE80E/40E Feature Description - Basic Configurations.
5.2 Logging in to the Devices Through the Console Port
When a user needs to configure the router that is powered on for the first time or locally maintain
the router, the user can log in to the router through a console port.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
67
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.2.1 Establishing the Configuration Task
Before configuring user login through a console port, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This will help
you complete the configuration task quickly and accurately.
Applicable Environment
A user can log in to the router locally through a console port. If the router is powered on for the
first time, the user has to log in through a console port.
Pre-configuration Tasks
Before configuring user login through a console port, complete the following tasks:
l
Configuring the PC/terminal (including the serial port and RS-232 cable)
l
Installing the terminal emulator (such as HyperTerminal of Windows XP) to the PC
Data Preparation
To configure user login through a console port, you need the following data.
No.
Data
1
l Transmission rate, flow control mode, parity mode, stop bit, data bit
l Number of lines displayed in a terminal screen, size of the history command buffer
l User priority
l User authentication mode, user name, and password
5.2.2 Configuring Console User Interface
To allow users to log in to the router through a console port, configure attributes of the console
user interface.
Context
Attributes of an console user interface have default values on the router, and generally need no
additional settings. To meet specific application requirements or ensure network security, you
can set attributes of the console user interface, such as terminal attributes and user authentication
mode.
For detailed settings, see Configuring Console User Interface.
5.2.3 Logging in to the router Through a Console Port
A user can log in to the router by connecting a terminal with the router through a console port.
Context
For details, see Login Through the Console Portrouter.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
68
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
NOTE
l Communication parameters of the user terminal must be consistent with the physical attribute
parameters of the console user interface on the router.
l If a user authentication mode is specified in the console user interface, a user can log in to the router
only after passing the authentication. This enhances network security.
5.2.4 Checking the Configuration
After a user logs in through a console port, the user can view information on the console user
interface, such as use information, physical attributes and configurations, local user list, and
online users.
Prerequisite
Configurations of user login through a console port are complete.
Procedure
l
Run the display users [ all ] command to check information about the user interface.
l
Run the display user-interface console ui-number1 [ summary ] command to check
physical attributes and configurations of the user interface.
l
Run the display local-user command to check the local user list.
l
Run the display access-user command to check the local user list.
----End
Example
Run the display users command, and you can view information about the current user interface.
<HUAWEI> display users
User-Intf
Delay
0
CON 0
00:00:44
Username : Unspecified
Type
Network Address
AuthenStatus
pass
AuthorcmdFlag
no
Run the display user-interface console ui-number1 [ summary ] command, and you can view
the physical attributes and configurations of the user interface.
<HUAWEI> display user-interface console 0
Idx Type
Tx/Rx
Modem Privi ActualPrivi Auth
0
CON 0
9600
3
N
+
: Current UI is active.
F
: Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
Int
-
Run the display local-user command, and you can view the local user list.
<HUAWEI> display local-user
---------------------------------------------------------------------------Username
State Type
CAR Access-limit Online
---------------------------------------------------------------------------user123
Active All
Dft
No
0
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
69
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
ll
Active F
Dft
No
0
user1
Active F
Dft
No
0
---------------------------------------------------------------------------Total 3,3 printed
5.3 Logging in to the Devices Through the AUX Port
When a user terminal and the router have no reachable route between each other, the user can
remotely configure and manage or locally maintain the router by logging in to the router through
an AUX port.
5.3.1 Establishing the Configuration Task
Before configuring user login through an AUX port, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This will help
you complete the configuration task quickly and accurately.
Applicable Environment
You can configure and maintain the router locally or remotely through an AUX port.
In local configuration of the router, the AUX login method is similar to the console login method.
The only difference between the two login methods lies in the default user priority: The default
user priority of the console user interface is 3, whereas that of the AUX user interface is 0.
Therefore, Logging in by using the console login method is recommended in the local
configuration. The following part mainly describes remote login of the router through an AUX
port.
NOTE
To manage and maintain the router through an AUX port, firstly modify the user priority of the AUX user
interface.
When there is no reachable route between a PC and the router, you can connect the serial port
of the PC to the AUX port of the router by using a modem. In this manner, you can use the PSTN
to configure and maintain the router remotely.
As shown in Figure 5-1, The COM interface of the PC is connected to the modem that is
connected to the PSTN. The AUX port of the router is connected to another modem that is
connected to the PSTN.
Figure 5-1 Networking diagram of remote login through an AUX port
PSTN
PC
Modem
Modem
Router
Pre-configuration Tasks
Before configuring user login through an AUX port, complete the following tasks:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
70
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
l
Connecting the PC to the router through modems
l
Configuring the modem
l
Installing a terminal emulator (such as HyperTerminal of Windows XP) in the PC
Data Preparation
To configure user login through an AUX port, you need the following data.
No.
Data
1
l Transmission rate, flow control mode, parity, stop bit, data bit
l Number of lines displayed in a terminal screen, size of the history command buffer
l user priority
l modem attributes
l (Optional) Auto-run commands
l User authentication mode, user name, password
2
Telephone number of the modem at the remote router side.
5.3.2 Configuring AUX User Interface
To allow users to log in to the router through an AUX port, configure attributes of the AUX user
interface.
Context
Attributes of an AUX user interface have default values on the router, and generally need no
additional settings. To meet specific application requirements or ensure network security, you
can also set attributes of the AUX user interface, such as terminal attributes and user
authentication mode.
For detailed settings, see Configuring AUX User Interface.
5.3.3 Logging in to the routerThrough an AUX Port
You can establish a connection between a terminal and the router through an AUX port.
Procedure
Step 1 Start a terminal emulator (such as HyperTerminal of Windows XP) in the PC to establish a
connection with the router, as shown in Figure 5-2.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
71
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Figure 5-2 Connection creating
Step 2 Set dialing information, as shown in Figure 5-3.
Figure 5-3 Dialing information setting
Step 3 Establish a connection with the router, as shown in Figure 5-4.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
72
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Figure 5-4 Remote connection with the router
If certain communication parameters need to be modified, press Modify in the Figure 5-4, as
shown in Figure 5-5, and then press Set, as shown in Figure 5-6.
Figure 5-5 Connection attribute modification
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
73
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Figure 5-6 Communications parameters setting
Step 4 Press Dialing. If user authentication is needed, input the corresponding authentication
information, and wait till the command line prompt of the user view appears, such as
<HUAWEI>. This indicates that the user view is entered and relevant configurations can be
input.
----End
5.3.4 Checking the Configuration
After a user log in through an AUX port, the user can view information on the console user
interface, such as use information, physical attributes and configurations, local user list, and
online users.
Prerequisite
Configurations of user login through the AUX port are complete.
Procedure
l
Run the display users [ all ] command to check usage information about the AUX user
interface.
l
Run the display user-interface aux interface-number [ summary ] command to check
physical attributes and configurations of the user interface.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
74
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
l
Run the display local-user command to check the local user list.
l
Run the display access-user command to check the local user list.
----End
Example
Run the display users command, and you can view information about the current user interface.
<HUAWEI> display users
User-Intf
Delay
33 AUX 0
00:00:44
Username : Unspecified
Type
Network Address
AuthenStatus
pass
AuthorcmdFlag
no
Run the display user-interface aux ui-number1 [ summary ] command, and you can view the
physical attributes and configurations of the user interface.
<HUAWEI> display user-interface aux 0
Idx Type
Tx/Rx
Modem Privi ActualPrivi Auth
33
AUX 0
9600
0
N
+
: Current UI is active.
F
: Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
Int
-
Run the display local-user command, and you can view the local user list.
<HUAWEI> display local-user
---------------------------------------------------------------------------Username
State Type
CAR Access-limit Online
---------------------------------------------------------------------------user123
Active All
Dft
No
0
ll
Active F
Dft
No
0
user1
Active F
Dft
No
0
---------------------------------------------------------------------------Total 3,3 printed
5.4 Logging in to the Devices by Using Telnet
If multiple routers need to be configured and managed, you do not need to connect the routers
and maintain them locally one by one. Instead, you can log in to the routers from a terminal by
using Telnet. This implements remote maintenance of the router and greatly facilitates device
management.
5.4.1 Establishing the Configuration Task
Before configuring user login by using Telnet, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This will help
you complete the configuration task quickly and accurately.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
75
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Applicable Environment
If you have known the IP address of the router to be accessed, you can log in to the router from
a terminal by using Telnet, and remotely maintain the device. This allows you to maintain
multiple routers on the same terminal, greatly facilitating device management.
Note that IP addresses of the routers need to be preset through console ports.
Pre-configuration Tasks
Before configuring user login in Telnet mode, complete the following tasks:
l
Configuring reachable routes between the terminal and the device
Data Preparation
Before configuring user login in Telnet mode, you need the following data.
No.
Data
1
l Maximum number of VTY user interfaces
l (Optional) ACL for limiting call-in and call-out in VTY user interfaces
l Connection timeout period of terminal users, number of lines displayed in a
terminal screen, size of the history command buffer
l User priority
l User authentication mode, user name, password
2
TCP port number for the remote router to provide Telnet services, VPN instance name
3
IPv4/IPv6 address or host name of the router
5.4.2 Configuring VTY User Interface
To log in to the router by using Telnet, configure attributes of the VTY user interface.
Context
By default, the user authentication mode in the VTY user interface is password. Therefore, before
a user logs in to the router by using Telnet, the user authentication mode in the VTY user interface
must be set. Otherwise, the user cannot log in to the router.
You can log in to the router through a console port to set the user authentication mode in the
VTY user interface.
Other attributes of the VTY user interface in the router, such as terminal attributes and user
priorities, can also be set as needed. These attributes, however, generally do not need to be set
because they have default values.
For detailed settings, see Configuring VTY User Interface.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
76
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.4.3 (Optional) Configuring Local Telnet Users
If the user authentication mode is AAA in the VTY user interface, the access type of local users
needs to be specified. Local users with the access type of Telnet are Telnet users.
Context
If the user authentication mode of the VTY user interface is non-authentication or password
authentication, the following configurations are not needed.
By default, a local user can apply for any access type. You can specify an access type to allow
only users configured with the specified access type to log in to the router.
Do as follows on the router that functions as a Telnet server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
aaa
The AAA view is displayed.
Step 3 Run:
local-user user-name password { simple | cipher } password
The local user name and password are set.
Step 4 Run:
local-user user-name service-type telnet
The access type of the local user is set to Telnet.
----End
5.4.4 Enabling the Telnet Service
Before a terminal establishes a Telnet connection with the router, enable the Telnet server
function on the router.
Context
By default, the function of the Telnet server is enabled.
Do as follows on the router that serves as an Telnet server.
Select and perform one of the following two steps for IPv4 or IPv6.
Procedure
l
For the IPv4 network
1.
Run:
system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
77
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
The system view is displayed.
2.
Run:
telnet server enable
The Telnet service is enabled.
l
For the IPv6 network
1.
Run:
system-view
The system view is displayed.
2.
Run:
telnet ipv6 server enable
The Telnet service is enabled.
NOTE
l If the undo telnet [ipv6] server enable command is run when a user logs in by using
Telnet, the command does not take effect.
l After the Telnet server function is disabled, you can log in to the device only using SSH
or an asynchronous serial port rather than using Telnet.
----End
5.4.5 (Optional) Configuring Listening Port Number for Telnet
Server
A user can configure or change the listening port number of a Telnet server. Changing the
listening port number ensures network security, because only the user that knows the current
listening port number can log in to the router.
Context
By default, the listening port number of a Telnet server is 23. Users can directly log in to the
router using the default listening port number. Attackers may access the default listening port,
consuming bandwidth, deteriorating server performance, and causing authorized users unable
to access the server. After the listening port number of the Telnet server is changed, attackers
do not know the new listening port number. This effectively prevents attackers from accessing
the listening port.
Do as follows on the router that functions as a Telnet server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
telnet server port port-number
The listening port number of the Telnet server is set.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
78
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
If a new listening port number is set, the Telnet server terminates all established Telnet
connections, and then uses the new port number to listen to new requests for Telnet connections.
----End
5.4.6 Logging in to the router by Using Telnet
After the router is configured, you can log in to the router from a terminal by using Telnet,
implementing remote maintenance of the router.
Context
If you need to log in to the router by using Telnet, you can use either windows command lines
or a third-party software in the terminal. In this part, the windows command line prompt is used.
Do as follows on the user terminal:
Procedure
Step 1 Use the windows command line.
Step 2 Run the telnet ip-address command to telnet the router.
1.
Input the IP address of the Telnet server.
2.
Press "Enter" to display the command line prompt of the system view, such as
<HUAWEI>. This indicates that you have accessed the Telnet server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
79
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
----End
5.4.7 Checking the Configuration
After users log in to the system by using Telnet, you can view the connection status of the current
user interface, connection status of each user interface, and status of all established TCP
connections.
Prerequisite
Configurations of logins by using Telnet are complete.
Procedure
l
Run the display users [ all ] command to check information about logged-in users on user
interfaces.
l
Run the display tcp status command to check TCP connections.
l
Run the display telnet server status command to check the configuration and status of the
Telnet server.
----End
Example
Run the display users command to view information about the currently-used user interface.
<HUAWEI> display users
User-Intf
Delay
34 VTY 0
00:00:12
Username : Unspecified
+ 35 VTY 1
00:00:00
Username : Unspecified
Type
TEL
Network Address
10.138.77.38
TEL
10.138.77.57
AuthenStatus
AuthorcmdFlag
no
no
Run the display tcp status command to view TCP connections. In the command output,
Established indicates that a TCP connection has been established.
<HUAWEI> display tcp status
TCPCB
Tid/Soid
Local Add:port
State
39952df8
36 /1509
0.0.0.0:0
Closed
32af9074
59 /1
0.0.0.0:21
Listening
34042c80
73 /17
10.164.39.99:23
Established
Foreign Add:port
VPNID
0.0.0.0:0
0
0.0.0.0:0
14849
10.164.6.13:1147
0
Run the display telnet server status command to view the configuration and status of the Telnet
server.
<HUAWEI> display telnet server status
Telnet IPV4 server
Telnet IPV6 server
Telnet server port
Issue 02 (2011-09-10)
:Enable
:Enable
:23
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
80
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.5 Logging in to the Devices by Using STelnet
STelnet provides secured remote access over an insecure network. After the client/server
negotiation is complete and a secured connection is established, a user can log in to the router
in a similar way as Telnet.
5.5.1 Establishing the Configuration Task
Before configuring users to log in by using STelnet, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This will help
you complete the configuration task quickly and accurately.
Applicable Environment
Logins by using Telnet bring security risks because no secure authentication mechanism is
available and data is transmitted by using TCP in plain text mode. Unlike Telnet, SSH guarantees
secure data transmission on a conventional insecure network by authenticating the client and
encrypting data in both directions.
STelnet is a secure Telnet protocol. The SSH user can use the STelnet service in the same manner
as using the Telnet service.
Pre-configuration Tasks
Before configuring users to log in by using STelnet, complete the following task:
l
Configuring reachable routes between the terminal and the device
Data Preparation
To configure users to log in by using STelnet, you need the following data:
Issue 02 (2011-09-10)
No.
Data
1
Maximum number of VTY user interfaces, (optional) ACL for limiting call-in and
call-out in VTY user interfaces, connection timeout period of terminal users, number
of rows displayed in a terminal screen, size of the history command buffer, user
authentication mode, user name, and password
2
User name, password, authentication mode, and service type of an SSH user and
remote public RSA key pair allocated to the SSH user
3
(Optional) Name of an SSH server, number of the port monitored by the SSH server,
preferred encryption algorithm from the STelnet client to the SSH server, preferred
encrypted algorithm from the SSH server to the STelnet client, preferred HMAC
algorithm from the STelnet client to the SSH server, preferred HMAC algorithm from
the SSH server to the STelnet client, preferred algorithm of key exchange, name of
the outgoing interface, and source address
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
81
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.5.2 Configuring VTY User Interface
To allow a user to log in to the router by using STelnet, configure attributes of the VTY user
interface.
Context
By default, the user authentication mode in the VTY user interface is password. Therefore, before
a user logs in to the router by using STelnet, the user authentication mode in the VTY user
interface must be set. Otherwise, the user cannot log in to the router.
You can log in to the router through a console port to set the user authentication mode in the
VTY user interface.
Other attributes of the VTY user interface in the router, such as terminal attributes and user
priorities, can also be set as needed. These attributes, however, generally do not need to be set
because they have default values.
For detailed settings, see Configuring VTY User Interface.
5.5.3 Configuring SSH for the VTY User Interface
To allow users to log in to the router by using STelnet, you need to configure VTY user interfaces
to support SSH.
Context
By default, user interfaces support Telnet. If no user interface is configured to support SSH,
users cannot log in to the router by using STelnet.
Do as follows on the router that serves as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface [ vty ] first-ui-number [ last-ui-number ]
The VTY user interface is displayed.
Step 3 Run:
authentication-mode aaa
The AAA authentication mode is configured.
Step 4 Run:
protocol inbound ssh
The VTY user interface is configured to support SSH.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
82
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
NOTE
If a VTY user interface is configured to support SSH, the VTY user interface must be configured with
AAA authentication. Otherwise, the protocol inbound ssh command cannot be configured.
----End
5.5.4 Configuring an SSH User and Specifying STelnet as One of
Service Types
To allow a user to log in to the router by using STelnet, you must configure an SSH user,
configure the router to generate a local RSA key pair, configure a user authentication mode, and
specify a service type for the SSH user.
Context
l
SSH users can be authenticated in four modes: RSA, password, password-RSA, and all.
Password authentication depends on Authentication, Authorization and Accounting
(AAA). Before a user logs in to the router in password or password-RSA authentication
mode, you must create a local user with the specified user name in the AAA view.
l
Configuring the router to generate a local RSA key pair is a key step for SSH login. If an
SSH user logs in to an SSH server in password authentication mode, configure the server
to generate a local RSA key pair. If an SSH user logs in to an SSH server in RSA
authentication mode, configure both the server and the client to generate local RSA key
pairs.
NOTE
Password-RSA authentication requires success of both password authentication and RSA authentication.
The all authentication mode requires success of either password authentication or RSA authentication.
Do as follows on the router that functions as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ssh user user-name
1.
Run:
aaa
The AAA view is displayed.
2.
Run:
local-user user-name password { simple | cipher } password
Name and password of the local user are created.
Step 3 Run:
rsa local-key-pair create
A local RSA key pair is generated.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
83
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
NOTE
l Before performing the other SSH configurations, you must configure the rsa local-key-pair create
command to generate a local key pair.
l After generating the local key pair,you can perform the display rsa local-key-pair public command
to view the public key in the local key pair.
Step 4 Run:
ssh user user-name authentication-type { password | rsa | password-rsa | all }
The authentication mode for SSH users is configured.
Perform the following as required:
l Authenticate the SSH user through the password.
– Run:
ssh user user-name authentication-type password
The password authentication is configured for the SSH user.
– Run:
ssh authentication-type default password
The default password authentication is configured for the SSH user.
For the local authentication or HWTACACS authentication, if the number of SSH users
is small, you can adopt the former command; if the number of SSH users is large, adopt
the later command to simplify the configuration.
l Authenticate the SSH user through RSA.
1.
Run:
ssh user user-name authentication-type rsa
The RSA authentication is configured for the SSH user.
2.
Run:
rsa peer-public-key key-name
The public key view is displayed.
3.
Run:
public-key-code begin
The public key editing view is displayed.
4.
Run:
hex-data
The public key is edited.
NOTE
l In the public key view, only hexadecimal strings complying with the public key format can be
typed in. Each string is randomly generated on an SSH client. For detailed operations, see manuals
for SSH client software.
l After the public key editing view is displayed, the RSA public key generated on the client can
be sent to the server. Copy the RSA public key to the router that serves as the SSH server.
5.
Run:
public-key-code end
Quit the public key editing view.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
84
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
l If the specified hex-data is invalid, the public key cannot be generated after the peerpublic-key end command is run.
l If the specified key-name is deleted in other views, the system prompts that the key does
not exist after the peer-public-key end command is run and the system view is
displayed.
6.
Run:
peer-public-key end
Return to the system view from the public key view.
7.
Run:
ssh user user-name assign rsa-key key-name
The public key is assigned to the SSH user.
Step 5 (Optional) Configuring the Basic Authentication Information for SSH Users
1.
Run:
ssh server rekey-interval interval
The interval for updating the server key pair is configured.
By default, the interval for updating the key pair of the SSH server is 0 that indicates no
updating.
2.
Run:
ssh server timeout seconds
The timeout period of the SSH authentication is set.
By default, the timeout period is 60 seconds.
3.
Run:
ssh server authentication-retries times
The number of retry times of the SSH authentication is set.
By default, the retry times is 3.
Step 6 (Optional) Authorizing SSH Users Through the Command Line
SSH users can be authenticated in four modes: password, RSA, password-RSA, and all. In RSA
authentication mode, you can configure SSH users to be authorized based on command levels.
Run:
ssh user user-name authorization-cmd aaa
The command line authorization is configured for the specified SSH user.
After configuring the authorization through command lines for the SSH user to perform RSA
authentication, you have to configure the AAA authorization. Otherwise, the command line
authorization for the SSH user does not take effect.
Step 7 Run:
ssh user username service-type { stelnet | all }
The service type for the SSH user is configured.
By default, the service type of the SSH user is not configured.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
85
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.5.5 Enabling the STelnet Server Function
To allow users to log in to the router by using STelnet, you must enable the STelnet server
function on the router.
Context
By default, no router is enabled with the STelnet server function. Users can establish connections
to the router by using STelnet only after the router is enabled with the STelnet server function.
Do as follows on the router that serves as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
stelnet server enable
The STelnet server function is enabled.
By default, the STelnet server function is disabled.
----End
5.5.6 (Optional) Configuring the STelnet Server Parameters
You can configure a device to be compatible with the SSH protocol of earlier versions, configure
or change the listening port number of an SSH server, and set an interval at which the key pair
of the SSH server is updated.
Context
Table 5-2 lists server parameters.
Table 5-2 Server parameters
Issue 02 (2011-09-10)
Server
Parameter
Description
Earlier SSH
version
compatibility
SSH has two versions: SSH1.X (earlier than SSH2.0) and SSH2.0. Compared
with SSH1.X, SSH2.0 is extended in structure and supports more
authentication modes and key exchange methods. SSH2.0 also supports more
advanced services such as SFTP. The HUAWEI NetEngine80E/40E
supports SSH versions ranging from 1.3 to 2.0.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
86
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Server
Parameter
Description
Listening port
number of an
SSH server
The default listening port number of an SSH server is 22. Users can log in to
the device by using the default listening port number. Attackers may access
the default listening port, consuming bandwidth, deteriorating server
performance, and causing authorized users unable to access the server. After
the listening port number of the SSH server is changed, attackers do not know
the new port number. This effectively prevents attackers from accessing the
listening port and improves security.
Interval at
which the key
pair of the
SSH server is
updated
After the interval is set, the key pair of the SSH server is updated periodically
to improve security.
Do as follows on the router that serves as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Perform one or more operations shown in Table 5-3 as needed.
Table 5-3 Configurations of server parameters
Server
Parameter
Operation
Earlier SSH
version
compatibility
Run the ssh server compatible-ssh1x enable command.
By default, an SSH server running SSH2.0 is compatible with SSH1.X. To
prevent clients running SSH1.3 to SSH1.99 to log in, run the undo ssh server
compatible-ssh1x enable command to disable the system from supporting
earlier SSH protocol versions.
Listening port
number of the
SSH server
Run the ssh server port port-number command.
Interval at
which the key
pair of the
SSH server is
updated
Run the ssh server rekey-interval hours command.
If a new listening port is set, the SSH server cuts off all established STelnet
and SFTP connections, and uses the new port number to listen to connection
requests. By default, the listening port number is 22.
By default, the interval is 0, indicating that the key pair will never be updated.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
87
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.5.7 Logging in to the router by Using STelnet
After the router is configured, a user can log in to the router from a terminal by using STelnet,
implementing remote maintenance of the router.
Context
In STelnet login mode, a third-party software can be used in the terminal. In this part, the thirdparty software OpenSSH and windows command line are used.
After installing OpenSSH in the user terminal, do as follows on the user terminal:
NOTE
For details on how to install OpenSSH, refer to the installation guide of the software.
For details on how to use OpenSSH commands to log in to the router, refer to the help document of the
software.
Procedure
Step 1 Use the windows command line.
Step 2 Run relevant OpenSSH commands to log in to the router in STelnet mode.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
88
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.5.8 Checking the Configuration
After configuring users to log in by using STelnet, you can view the SSH server configuration.
Prerequisite
Configurations of logins by using STelnet are complete.
Procedure
l
Run the display ssh user-information username command on the SSH server to check
information about SSH users.
l
Run the display ssh server status command on the SSH server to check its configurations.
l
Run the display ssh server session command on the SSH server to check sessions for SSH
users.
----End
Example
Run the display ssh user-information username command to view information about a
specified SSH user.
<HUAWEI> display ssh user-information client001
User Name
: client001
Authentication-type
: password
User-public-key-name
: Sftp-directory
: Service-type
: stelnet
Authorization-cmd
: No
If no SSH user is specified, information about all SSH users logging in to an SSH server will be
displayed.
Run the display ssh server status command to view configurations of an SSH server.
<HUAWEI> display ssh server status
SSH version
SSH connection timeout
SSH server key generating interval
SSH Authentication retries
SFTP server
Stelnet server
:1.99
:60 seconds
:0 hours
:3 times
:Disable
:Enable
Run the display ssh server session command. The command output shows that the session
information between SSH server and client.
<HUAWEI> display ssh server
Session 1:
Conn
Version
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
Issue 02 (2011-09-10)
session
:
:
:
:
:
:
:
:
:
:
:
:
VTY 3
2.0
started
client001
1
aes128-cbc
aes128-cbc
hmac-md5
hmac-md5
diffie-hellman-group-exchange-sha1
stelnet
password
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
89
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
5.6 Common Operations After Login
After logging in to the router, you can perform following operations as needed, such as user
priority switching and terminal window locking.
5.6.1 Establishing the Configuration Task
Before performing operations after login, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Applicable Environment
To ensure that the operator manages routers safely, you need to configure the switching of user
levels, enable message sending between user interfaces, and clear designated users.
Pre-configuration Tasks
Before performing operations after login, complete the following tasks:
l
Connecting the terminal to the router
Data Preparations
Before performing operations after login, you need the following data:
No.
Data
1
Password used for switching user levels
2
Type and number of the user interface
3
Contents of the message to be sent
5.6.2 Switching User Levels
If a user wants to upgrade from a lower level to a higher level after logging in to the router, a
password is required. The password needs to be configured in advance.
Context
To prevent an unauthorized user from using high-level commands, a password is required to
increase the user level.
When configuring the switchover of user levels on the router, users can perform HWTACACS
Authentication. For detailed configurations, refer to the HUAWEI NetEngine80E/40E router
Configuration Guide - Security.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
90
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
super password [ level user-level ] { simple | cipher } password
The password for switching user levels is configured.
By default, the password for the user is set to Level 3.
CAUTION
If simple is configured, the password is saved in the configuration file in plain text. This means
that low-level login users can easily obtain and change the password by checking the
configuration file, compromising the network security. Therefore, selecting cipher to save the
password in the cipher text is recommended.
If cipher is used to set the password, the password cannot be obtained from the system. Save
the password to avoid oblivion or missing.
Step 3 Run:
quit
Return to the user view.
Step 4 Run:
super [ level ]
User levels are switched.
By default, the level is 3.
Step 5 Follow the prompt and enter a password.
If the password entered is correct, the user can switch to a higher level. If the user enters a
password incorrectly for three consecutive times, the user remains at the current login level and
returns to the user view.
NOTE
When the login user of lower level is switched to the user of higher level through the super command, the
system automatically sends trap messages and records the switchover in a log. When the switched level
is lower than that of the current level, the system only records the switchover in a log.
----End
5.6.3 Locking User Interfaces
When you leave the operation terminals for a moment, you can lock the user interface to prevent
unauthorized users from operating the interface.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
91
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Context
The user interface can be classified into the Console user interface, AUX user interface, and
VTY user interface.
Procedure
Step 1 Run:
lock
The user interface is locked.
Step 2 Follow the system prompt and input an unlock password, and then confirm the input.
<HUAWEI> lock
Enter Password:
Confirm Password:
If the locking is successful, the system prompts that the user interface is locked.
You must enter a correct password to unlock the user interface.
----End
5.6.4 Sending Messages to Other User Interfaces
Messages can be exchanged between the current user interface and other user interfaces.
Context
Users logging in to the router can send messages from the current user interface to users in other
user interfaces as needed.
Procedure
Step 1 Run:
send { all | ui-type ui-number | ui-number1 }
You can enable message sending between user interfaces.
Step 2 Following the prompt, you can view the message to be sent. You can press Ctrl_Z or Enter to
end the display, and press Ctrl_C to abort the display.
----End
5.6.5 Displaying Logged-in Users
After users log in, you can query information about logged-in users.
Context
User information includes the user name, address, and authentication and authorization
information.
Procedure
l
Issue 02 (2011-09-10)
Run the display users [ all ] command to view information about logged-in users.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
92
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
If all is configured, information about logged-in users on all user interfaces is displayed.
----End
5.6.6 Clearing Logged-in Users
If you want to force a logged-in user to log out of the router, you can tear down the connection
between the router and the user.
Context
You can run the display users command to view users logging in to the router.
Procedure
Step 1 Run:
kill user-interface { ui-number | ui-type ui-number1 }
Online users are cleared.
Step 2 Based on displayed information, you can confirm whether specified logged-in users have been
cleared.
----End
5.6.7 Configuring Configuration Locking
When multiple users log in to the router to configure the device, configuration conflict may
occur. To prevent configuration conflict from affecting services, you can enable the function of
configuration locking. This allows only one user to configure the device at a time.
Context
Before configuring configuration locking, check whether the configuration set is locked by
another user. If no user locks the configuration set, you can exclusively lock the configuration.
Procedure
Step 1 Run:
configuration exclusive
The user obtains exclusive configuration access.
After enabling the configuration locking function, you can exclusively enjoy the configuration
authority in an explicit manner.
NOTE
This command can be run in any view.
You can run the display configuration-occupied user command to check information about the user who
locks the configuration set at the moment.
If the configuration set is already locked, an prompt message is displayed after this command is run.
Step 2 Run:
system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
93
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
The system view is displayed.
Step 3 Run:
configuration-occupied timeout timeout-value
The timeout period for automatically unlocking the configuration set is set.
After the timeout period expires, the configuration set is automatically unlocked, allowing other
users to configure the device.
By default, the timeout period is 30s.
NOTE
l When a user without exclusive configuration access runs this command, the system prompts an error
message.
l If the configuration set is locked by another user, this command cannot be configured, and the system
prompts an error message.
l If the configuration set is locked by the current user, the current user can run this command.
----End
5.7 Configuration Examples
This section provides several examples describing how to configure user login by using a console
port, Telnet, or STelnet. You can understand the configuration procedures by referring to the
configuration flowchart. The configuration examples provide information about the networking
requirements, configuration notes, and configuration roadmap.
5.7.1 Example for Configuring User Login Through a Console Port
This part provides an configuration example describing how to configure user login through a
console port. In this configuration example, certain login settings are performed on the PC,
enabling the access to the router through a console port.
Networking Requirements
If a user modifies default values of certain parameters in the console user interface, the user
needs to reset corresponding parameters in the PC when logging in to the router through the
console port next time.
Figure 5-7 Networking diagram of user login through a console port
PC
Router
Configuration Roadmap
1.
Connect a PC to the router through a console port.
2.
Perform login settings on the PC.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
94
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3.
5 Configuring User Login
Log in to the router.
Data Preparation
Communication parameters of the PC (baud rate: 4800 bps, data bit: 6, parity: even, stop bit: 2,
flow control mode: none)
Procedure
Step 1 Establish the configuration environment by connecting the serial port of the PC to the console
port of the router through standard RS-232 cable.
Step 2 Start a terminal emulator on the PC, and set the communication parameters of the PC, as shown
in Figure 5-8 to Figure 5-10.
Figure 5-8 Connection creation
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
95
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Figure 5-9 Interface setting
Figure 5-10 Communication parameter setting
Step 3 Power on the router and wait for the completion of the self-check. After the router starts normally
and finishes the self-check, the system prompts you to press Enter.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
96
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Wait till the prompt (mostly the <HUAWEI>) appears, and then you can use a command to view
the running status of the router or configure the router.
----End
5.7.2 Example for Logging In Through the AUX Port
In this example, you can configure terminal and modem communication parameters so as to log
in to the router through the AUX port.
Networking Requirements
If you cannot configure the router by local login and no router is reachable to other routers,
connect the serial port of the PC with the AUX port of the router through the modem. The detailed
configuration environment is shown in Figure 5-11.
Figure 5-11 Networking diagram of logging in through the AUX port
Modem
Modem
PSTN
Router
COM
PC
Configuration Roadmap
The configuration roadmap is as follows:
1.
Establish the physical connection.
2.
Configure the name, authentication mode, and password of a user that logs in.
3.
Configure the AUX port to support the modem dialup.
4.
Configure modem parameters.
Data Preparation
To complete the configuration, you need the following data:
l
Type of terminals
l
Terminal communication parameters
l
User name, password, and authentication mode used for user login, which are huawei,
hello, and password respectively.
l
Modem communication parameters
Procedure
Step 1 Establish the physical connection, as shown in Figure 5-11.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
97
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Step 2 Configure the AUX port to support the modem dialup.
<HUAWEI> system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user huawei password cipher hello
[HUAWEI-aaa] local-user huawei service-type terminal
[HUAWEI-aaa] local-user huawei level 3
[HUAWEI-aaa] quit
[HUAWEI] user-interface aux 0
[HUAWEI-ui-aux0] authentication-mode aaa
[HUAWEI-ui-aux0] modem both
Step 3 Configure modem parameters.
# Run the PC emulation terminal, see Logging in to the router Through an AUX Port
Press Enter on the PC emulation terminal or terminal until a command line prompt of the modem
such as ">" appears.
Configure the modem to meet the requirements of AUX communication.
For details, see modem descriptions.
Step 4 Log in to the router.
Enter the user name and password in the remote terminal emulation program.
After authentication succeeds, a command line prompt such as <HUAWEI> appears.
Enter the command to check the running status of the router or configure the router.
Enter "?" for help.
----End
5.7.3 Example for Configuring User Login by Using Telnet
This part provides an example describing how to configure user login by using Telnet. In this
configuration example, a user logs in to the router after setting the VTY user interface and user
login parameters.
Networking Requirements
A user can log in to the router on another network segment from a PC to remotely maintain the
router.
Figure 5-12 Networking diagram of user login by using Telnet
GE1/0/1
10.137.217.221/16
NetWork
PC
Router
After a Telnet user logs in to the router in AAA authentication mode, the Telnet user is prohibited
from logging in to another router through the router.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
98
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Configuration Roadmap
1.
Establish a physical connection.
2.
Assign IP addresses to interfaces on the router.
3.
Set parameters of the VTY user interface, including limit on call-in and call-out.
4.
Set user login parameters.
5.
Log in to the router.
Data Preparation
To complete the configuration, you need the following data:
l
IP address of the PC
l
IP address of the Ethernet interface on the router: 10.137.217.221
l
Maximum number of VTY user interfaces: 10
l
Number of the ACL that is used to prohibit users from logging into another router: 3001
l
Timeout period for disconnecting from the VTY user interface: 20 minutes
l
Number of lines that a terminal screen displays: 30
l
Size of the history command buffer: 20
l
Telnet user information (authentication mode: AAA, user name: huawei, password: hello)
Procedure
Step 1 Respectively connection the PC and the router to the network.
Step 2 Configure a login address.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] undo shutdown
[HUAWEI-GigabitEthernet1/0/1] ip address 10.137.217.221 255.255.0.0
[HUAWEI-GigabitEthernet1/0/1] quit
Step 3 Configure the VTY user interface on the router.
# Set the maximum number of VTY user interfaces.
[HUAWEI] user-interface maximum-vty 10
# Configure an ACL that is used to prohibit users from logging into another router.
[HUAWEI]acl 3001
[HUAWEI-acl-adv-3001]rule deny tcp source any destination-port eq telnet
[HUAWEI-acl-adv-3001]quit
[HUAWEI] user-interface vty 0 9
[HUAWEI-ui-vty0-9] acl 3001 outbound
# Set terminal attributes of the VTY user interface.
[HUAWEI-ui-vty0-9]
[HUAWEI-ui-vty0-9]
[HUAWEI-ui-vty0-9]
[HUAWEI-ui-vty0-9]
shell
idle-timeout 20
screen-length 30
history-command max-size 20
# Set the user authentication mode of the VTY user interface.
[HUAWEI-ui-vty0-9] authentication-mode aaa
[HUAWEI-ui-vty0-9] quit
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
99
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Step 4 Set parameters of the login user on the router.
# Specify the user authentication mode.
[HUAWEI] aaa
[HUAWEI-aaa]
[HUAWEI-aaa]
[HUAWEI-aaa]
[HUAWEI-aaa]
local-user huawei password cipher hello
local-user huawei service-type telnet
local-user huawei level 3
quit
Step 5 # Configure user login.
Use the windows command line to telnet the router. The Telnet login window is shown in the
following figure.
Figure 5-13 Telnet login window on the PC
Press Enter, and then input the user name and password in the login window. If user
authentication succeeds, a command line prompt of the system view is displayed. It indicates
that you have entered the user view.
Figure 5-14 Window after login of the router
Click Yes and then input the user name and password in the login window. If user authentication
succeeds, a command line prompt such as HUAWEI is displayed.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
100
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
Configuration Files
Configuration file of the Router
#
sysname HUAWEI
#
acl number 3001
rule 5 deny tcp destination-port eq telnet
#
aaa
local-user huawei password cipher 3MQ*TZ,O3KCQ=^Q`MAF4<1!!
local-user huawei service-type telnet
local-user huawei level 3
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.137.217.221 255.255.0.0
#
user-interface maximum-vty 10
user-interface con 0
user-interface vty 0 9
acl 3001 outbound
authentication-mode aaa
history-command max-size 20
idle-timeout 20 0
screen-length 30
#
return
5.7.4 Example for Configuring User Login by Using STelnet
This part provides an example describing how to configure user login by using STelnet.. In this
example, after generating the local key pair on the SSH server, configuring the name and
password of the SSH user on the SSH server, and enabling the STelnet service on the SSH server,
you can connect the Stelnet client to the SSH server.
Networking Requirements
As shown in Figure 5-15, after the STelnet service is enabled on the SSH server, the STelnet
client can log in to the SSH server with the password, RSA, password-rsa, or all authentication
mode.
In this configuration example, the password authentication mode is used.
Figure 5-15 Networking diagram of configuring user login by using STelnet
Network
GE1/0/1
10.137.217.225/16
SSH Server
PC
Configuration Roadmap
The configuration roadmap is as follows:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
101
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
1.
Configure a local key pair on the SSH server for secure data exchange between the STelnet
client and the SSH server.
2.
Configure the VTY user interface on the SSH server.
3.
Configure an SSH client, which involves the setting of the user authentication mode, user
name, and password.
4.
Enable the STelnet server function on the SSH server and configure a user service type.
Data Preparation
To complete the configuration, you need the following data:
l
SSH user authentication mode: password, user name: client001, password: huawei
l
User level of client001: 3
l
IP address of the SSH server: 10.164.39.210
Procedure
Step 1 Generate a local key pair on the server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: HUAWEI_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
..........++++++++++++
...................................++++++++
......++++++++
Step 2 Configure the VTY user interface.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
NOTE
If SSH is configured as the login protocol, the NE80E/40E automatically disables Telnet.
Step 3 Configure the password of the SSH user Client001 to huawei.
[SSH
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa]
Server-aaa]
Server-aaa]
Server-aaa]
local-user client001 password cipher huawei
local-user client001 level 3
local-user client001 service-type ssh
quit
Step 4 Enable the STelnet service on the SSH server.
[SSH Server] stelnet server enable
[SSH Server] ssh authentication-type default password
[SSH Server] quit
Step 5 Verify the configuration.
# Log in to the device through the software putty, and specify the IP address of the device being
10.164.39.210 and the login protocol being SSH.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
102
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
# Log in to the device through the software putty, and enter the user name client001 and the
password huawei.
----End
Configuration Files
l
Configuration file of the SSH server
#
sysname SSH Server
#
aaa
local-user client001 password cipher huawei
local-user client001 level 3
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
103
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
5 Configuring User Login
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.137.217.225 255.255.255.0
#
stelnet server enable
ssh user client001 authentication-type password
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
104
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6
Managing File System
About This Chapter
The file system manages the files and directories in the storage devices on the router. It can move
and delete a file or directory and display the contents of the file.
6.1 File System Overview
The router effectively manages all files by means of the file system.
6.2 Performing File Operations by Means of the File System
Users can perform file operations by means of the file system, including managing storage
devices, directories, and files.
6.3 Performing File Operations by Means of FTP
FTP can transmit files between local and remote hosts, and is widely used for version upgrade,
log downloading, file transmission, and configuration saving.
6.4 Performing File Operations by Means of SFTP
SFTP enables users to log in to the router securely from the remote device to manage files. This
improves the security of data transmission for the remote end to update its system.
6.5 Performing File Operations by Means of Xmodem
This section describes how to transfer files through XModem.
6.6 Configuration Examples
This section provides an example for performing files by accessing the system and using FTP
or SFTP.These configuration examples explain networking requirements, configuration
roadmap, and configuration notes.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
105
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.1 File System Overview
The router effectively manages all files by means of the file system.
6.1.1 File System
The file system manages the files and directories in the storage devices. It can create, delete,
modify, and rename a file or directory and display the contents of the file.
The file system has two functions: managing the storage devices and managing the files that are
stored in those storage devices.
6.1.2 Methods of File Management
You can manage files by means of the file system, FTP or SFTP.
Performing File Operations by Means of the File System
l
Storage Devices
Storage devices are hardware devices for storing messages.
At present, the router supports the storage devices CF card.
l
Files
The file is a mechanism with which the system stores and manages messages.
l
Directories
The directory is a mechanism with which the system integrates and organizes the file,
serving as a logical container of the file.
Performing File Operations by Means of FTP
You can configure the router as the FTP server, and log in to the router from the user terminal
to transmit files and manage directories on the FTP server.
Performing File Operations by Means of SFTP
SSH supports Secure File Transfer Protocol (SFTP), which enables users to remotely and
securely log in to the router to manage files. SSH guarantees secure data transmission on a
conventional insecure network by authenticating the client and encrypting data in both
directions.
Performing File Operations by Means of Xmodem
XModem is a file transfer protocol and is mainly applied to the AUX port.XModem does not
support simultaneous operations of multiple users.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
106
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Table 6-1 File management methods
File Management Method
Implementation
Logging in to the system
You can log in to the system through the
Console or AUX port or by using Telnet or
STelnet to manage files.
FTP
The router needs to be enabled with FTP.
Most terminals support the FTP client
function.
SFTP
l SFTP provides secure file transfer
services based on SSH, irrelevant to the
standard FTP protocol.
l The router needs to be enabled with SFTP.
Terminals need to be installed with the
SFTP client software.
6.2 Performing File Operations by Means of the File System
Users can perform file operations by means of the file system, including managing storage
devices, directories, and files.
6.2.1 Establishing the Configuration Task
Before performing file operations by means of the file system, familiarize yourself with the
applicable environment, complete the pre-configuration tasks, and obtain the required data. This
can help you complete the configuration tasks quickly and accurately.
Applicable Environment
When the router fails to save or obtain data, you can log in to the file system to repair the faulty
storage devices or manage files or directories on the router. You can especially manage storage
devices by logging in to the file system.
Pre-configuration Tasks
Before performing file operations by logging in to the file system, complete the following tasks:
l
Connecting the client with the server correctly
Data Preparation
To perform file operations by logging in to the file system, you need the following data:
Issue 02 (2011-09-10)
No.
Data
1
Storage device name
2
Directory name
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
107
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
No.
Data
3
File name
6 Managing File System
6.2.2 Managing Storage Devices
When the file system of the storage devices on the router functions abnormally, you need to
repair and format the file system before managing the storage devices.
Context
When the file system on a storage device fails, the terminal of the router prompts you to rectify
the fault.
You can format a storage device when you fail to repair the file system or you do not need any
data saved on the storage device.
CAUTION
Formatting storage devices may lead to data loss. Therefore, exercise caution when perform this
operation.
Procedure
l
Run:
fixdisk device-name
The storage devices with file system troubles is repaired.
NOTE
After this command is run, if the prompt that the system should be repaired is still received, it indicates
that the physical medium may be damaged.
l
Run:
format device-name
The storage device is formatted.
NOTE
If the storage device cannot work after running the format device-name command, a fault may occur
to the hardware.
----End
6.2.3 Managing the Directory
You can manage directories to logically store files in hierarchy.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
108
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Context
You can manage directories by changing and displaying directories, displaying files in
directories and sub-directories, and creating and deleting directories.
Procedure
l
Run:
cd directory
A directory is specified.
l
Run:
pwd
The current directory is displayed.
l
Run:
dir [ /all ] [ filename ]
The file and sub-directory list in the directory is displayed.
Either the absolute path or relative path is applicable.
l
Run:
mkdir directory
The directory is created.
l
Run:
rmdir directory
The directory is deleted.
----End
6.2.4 Managing Files
You can log in to the file system to view, delete, or rename the files on the router.
Context
l
Managing files include: displaying contents, copying, moving, renaming, compressing,
deleting, undeleting, deleting files in the recycle bin, running files in batch and configuring
prompt modes.
l
You can run the cd directory command to enter the required directory from the current
directory.
l
Run:
Procedure
more filename [ offset | all ]
The content of the file is displayed.
By specifying parameters in the more command, you can view files flexibly:
– By running the more file-name command, you can view the file named file-name.
Contents of a text file are displayed screen after screen. If you hold and press the
spacebar on the current terminal, all contents of the current file can be displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
109
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
There are two preconditions if you want to display the contents of a text file screen after
screen:
– The value configured by screen-length screen-length temporary command must
be larger than 0.
– The total lines of the file must be larger than the value configured by screenlength command.
– By running the more file-name offset command, you can view the file named filename. Contents of a text file are displayed from the line specified by offset screen after
screen. If you hold and press the spacebar on the current terminal, all contents of the
current file can be displayed.
There are two preconditions if you want to display the contents of a text file screen after
screen:
– The value configured by screen-length screen-length command must be larger than
0.
– The result of the number of file characters subtracted by the value of offset must be
larger than the value configured by screen-length command.
– By running the more file-name all command, you can view the file named file-name.
Contents of a text file are completely displayed without pausing after each screenful of
information.
l
Run:
copy source-filename destination-filename
The file is copied.
NOTE
The file to be copied must be larger than 0 bytes. Otherwise, the operation fails.
l
Run:
move source-filename destination-filename
The file is moved.
l
Run:
rename source-filename destination-filename
The file is renamed.
l
Run:
zip source-filename destination-filename
The file is compressed.
l
Run:
delete [ /unreserved ] [ /quiet ] { filename | device-name }
The file is deleted.
If you use the parameter [ /unreserved ] in the delete command, the file cannot be restored
after being deleted.
l
Run:
undelete filename
The deleted file is recovered.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
110
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
NOTE
If the current directory is not the parent directory, you must operate the file by using the absolute
path.
l
Run:
reset recycle-bin [ filename ]
The file is deleted.
You can permanently delete files in the recycle bin.
l
Running Files in Batch
You can upload the files and then process the files in batches. The edited batch files need
to be saved in the storage devices on the router.
When the batch file is created, you can run the batch file to implement routine tasks
automatically.
1.
Run:
system-view
The system view is displayed.
2.
Run:
execute filename
The batched file is executed.
l
Configuring Prompt Modes
The system displays prompts or warning messages when you operate the device (especially
the operations leading to data loss). If you need to change the prompt mode for file
operations, you can configure the prompt mode of the file system.
1.
Run:
system-view
The system view is displayed.
2.
Run:
file prompt { alert | quiet }
The prompt mode of the file system is configured.
By default, the prompt mode is alert.
CAUTION
If the prompt is in the quiet mode, no prompt appears for data lossdue to maloperation.
----End
6.3 Performing File Operations by Means of FTP
FTP can transmit files between local and remote hosts, and is widely used for version upgrade,
log downloading, file transmission, and configuration saving.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
111
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.3.1 Establishing the Configuration Task
Before performing file operations by means of FTP, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
When the router serves as the FTP server, after the client logs in to the router through FTP, the
user can transfer files between the client and the server.
Pre-configuration Tasks
Before performing file operations by means of FTP, complete the following task:
l
Connecting the FTP client to the server
Data Preparation
To perform file operations by means of FTP, you need the following data:
NOTE
For FTP secure server connection, perform step 2.
No.
Data
1
FTP user name and password, File directory authorized to the FTP user
2
(Optional) Listening port number specified on the FTP server
3
(Optional) Source IP address or source interface of the FTP server
(Optional) Timeout period of the disconnection from the FTP server
4
IP address or host name of the FTP server
6.3.2 Configuring a Local FTP User
You can configure the authorization mode and authorization directory for FTP users. In this
case, unauthorized users cannot access the specific directory, which guarantees the security.
Context
To perform file operations by means of FTP, you need to configure a local user name and a
password on the router and specify the service type and the directories that can be accessed.
Otherwise, you cannot access the router by using FTP.
Do as follows on the router that serves as the FTP server:
Procedure
Step 1 Run:
system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
112
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
The system view is displayed.
Step 2 Run:
set default ftp-directory directory
The default FTP working directory is configured.
NOTE
The configuration in this step is valid for only TACACS users.
Step 3 Run:
aaa
The AAA view is displayed.
Step 4 Run:
local-user user-name password { simple | cipher } password
The local user name and the password are configured.
Step 5 Run:
local-user user-name service-type ftp
The FTP service type is configured.
Step 6 Run:
local-user user-name ftp-directory directory
The authorization directory about the FTP user is configured.
----End
6.3.3 (Optional) Specifying a Port Number for the FTP Server
You can configure or change the monitoring port number of the FTP server. After the port
number is changed, only the user knows the current port number, which guarantees the security.
Context
By default, the listening port number of an FTP server is 21. Users can directly log in to the
router by using the default listening port number. Attackers probably access the default listening
port, reducing available bandwidth, affecting performance of the server, and causing valid users
unable to access the server. After the listening port number of the FTP server is changed, attackers
do not know the new listening port number. This effectively prevents attackers from accessing
the listening port.
NOTE
If the FTP is not enabled, change the FTP port as required.
If the FTP service is enabled, run the undo ftp server command to disable the FTP service, and then change
the FTP port.
Do as follows on the router that serves as the FTP server:
Procedure
Step 1 Run:
system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
113
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
The system view is displayed.
Step 2 Run:
ftp [ ipv6 ] server port port-number
The port number of the FTP server is configured.
If a new number of a monitored port is configured, the FTP server interrupts all the FTP
connections and monitors the port of the new number.
----End
6.3.4 Enabling the FTP Server
Before using FTP to perform file operations, you need to enable the FTP sever on the router.
Context
By default, the FTP server is disabled on the router. Therefore, you must enable the FTP server
before using FTP.
Do as follows on the router that serves as the FTP server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ftp [ ipv6 ] server enable
The FTP server is enabled.
NOTE
When the file operation between clients and the router ends, run the undo ftp [ ipv6 ] server command to
disable the FTP server function. This ensures the security of the router.
----End
6.3.5 (Optional) Configuring the FTP Server Parameters
The FTP server parameters include the source address of the FTP server and the timeout period
for FTP connection.
Context
l
You can configure a source IP address for the FTP server. This limits the destination address
that the client can access and therefore guarantee the security.
l
You can configure the timeout period for FTP connections on the FTP server. When the
timeout period of an FTP connection expires, the system breaks the connection to release
resources.
Do as follows on the router that serves as the FTP server:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
114
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ftp server-source { -a ip-address | -i
interface-type interface-number }
The source IP address and source interface of an FTP server is configured.
To log in to the FTP server, you must specify the same source IP address in the ftp command.
Otherwise, you cannot log in to the FTP server.
Step 3 Run:
ftp [ ipv6 ] timeout minutes
The timeout period of the FTP server is configured.
If the client is idle for the configured time, the connection is removed from the FTP server.
By default, the timeout value is 30 minutes.
----End
6.3.6 (Optional) Configuring an FTP ACL
After an FTP ACL is configured, only the specified clients can access the devicerouter.
Context
When the routerdevice functions as an FTP server, you can configure an ACL to allow the clients
that meet the matching rules to access the FTP server.
Do as follows on the router that serves as the FTP server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
acl acl-number
The ACL view is displayed.
Step 3 Run:
rule [ rule-id ] { deny | permit } [ fragment | logging | source { source-ip-address
source-wildcard | any } | time-range time-name | vpn-instance vpn-instance-name ] *
The ACL rule is configured.
NOTE
FTP supports only the basic ACL (2000 to 2999).
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
115
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Step 4 Run:
quit
Return the system view.
Step 5 Run:
ftp [ ipv6 ] acl acl-number
The basic FTP ACL is configured.
----End
6.3.7 Accessing the System by Using FTP
After the FTP server is configured, you can access the router from the PC by using FTP to manage
the files on the router.
Context
If you need to log in to the router by using FTP, you can use either windows command line
prompt or a third-party software. Here uses the windows command line prompt as an example.
Do as follows on the PC:
Procedure
Step 1 Use the windows command line.
Step 2 Run the ftp ip-address command to log in to the router by using FTP.
Enter the user name and password at the prompt, and press Enter. When the windows command
line prompts are displayed in the FTP client view, such as ftp>, you have entered the working
directory of the FTP server.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
116
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.3.8 Performing File Operations by Using FTP Commands
After logging in to the router that functions as an FTP server by using FTP, you can upload files
to or download files from the router, and manage the directories on the router.
Context
After logging in to the FTP server, you can perform the following operations:
l
Configuring data type for the file
l
Uploading or downloading files
l
Creating directories on or deleting directories from the FTP server
l
Displaying information about a specified remote directory or a file of the FTP server, or
deleting a specified file from the FTP server
After logging in to the FTP server and entering the FTP client view, you can perform the
following one or more operations:
Procedure
l
Configuring data type and transmission mode for the file.
– Run:
ascii or binary
The data type of the file to be transmitted is ascii or binary mode.
NOTE
FTP supports the ASCII type and the binary type. Their differences are as follows:
l In ASCII transmission mode, ASCII characters are used to separate carriage returned from
line feeds.
l In binary transmission mode, characters can be transferred without format conversion or
formatting.
The selection of the FTP transmission mode is client-customized. The system defaults to the
ASCII transmission mode. The client can use a mode switch command to switch between the
ASCII mode and the binary mode. The ASCII mode is used to transmit .txt files and the binary
mode is used to transmit binary files.
l
Upload or download files.
– Upload or download a file.
– Run:
put local-filename [ remote-filename ]
The local file is uploaded to the remote FTP server.
– Run:
get remote-filename [ local-filename ]
The FTP file is downloaded from the FTP server and saved to the local file.
– Upload or download multiple files.
– Run the mput local-filenames command to upload multiple local files
synchronously to the remote FTP server.
– Run the mget remote-filenames command to download multiple files from the FTP
server and save them locally.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
117
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
NOTE
l When you are uploading or downloading files, and the prompt command is run in the FTP client
view to enable the file transmission prompt function, the system will prompt you to confirm the
uploading or downloading operation.
l If the prompt command is run again in the FTP client view, the file transmission prompt function
will be disabled.
l
Run one or more commands in the following order to manage directories.
– Run:
cd pathname
The working path of the remote FTP server is specified.
– Run:
pwd
The specified directory of the FTP server is displayed.
– Run:
lcd [ local-directory ]
The directory of the FTP client is displayed or changed.
– Run:
mkdir remote-directory
A directory is created on the FTP server.
– Run:
rmdir remote-directory
A directory is removed from the FTP server.
l
Run one or more commands in the following to manage files.
– Run:
ls [ remote-filename ] [ local-filename ]
The specified directory or file on the remote FTP server is displayed.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
– Run:
dir [ remote-filename ] [ local-filename ]
The specified directory or file on the local FTP server is displayed.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
– Run:
delete remote-filename
The specified file on the FTP server is deleted.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
When local-filename is set, related information about the file can be downloaded locally.
NOTE
If you need other FTP operations,you can perform the help [ command ] command to get help in the
Windows command line.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
118
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.3.9 Checking the Configuration
After the configuration is complete, you can view the configuration and status of the FTP server
as well as information about login FTP users.
Prerequisite
All configurations for operating files by using FTP are complete.
Procedure
l
Run the display [ ipv6 ] ftp-server command to check the configuration of the FTP server.
l
Run the display ftp-users command to check how many users are currently logged in FTP
server.
----End
Example
Run the display [ ipv6 ] ftp-server to view the FTP server is working.
<HUAWEI> display ftp-server
FTP server is running
Max user number
User count
Timeout value(in minute)
Listening Port
Acl number
FTP server's source address
5
1
30
1080
0
1.1.1.1
Run the display ftp-users command to view the user name, port number, authorization directory
of the FTP user configured presently.
<HUAWEI> display ftp-users
username host
zll
100.2.150.226
port
1383
idle
3
topdir
cfcard:
6.4 Performing File Operations by Means of SFTP
SFTP enables users to log in to the router securely from the remote device to manage files. This
improves the security of data transmission for the remote end to update its system.
6.4.1 Establishing the Configuration Task
Before performing file operations by using SFTP, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
SSH guarantees secure data transmission on a conventional insecure network by authenticating
the client and encrypting data in both directions. SSH supports SFTP.
SFTP is a secure FTP service and enables users to log in to the FTP server for data transmission.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
119
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Pre-configuration Tasks
Before performing file operations by using SFTP, complete the following task:
l
Configuring reachable routes between the terminal and the device
Data Preparation
Before performing file operations by using SFTP, you need the following data.
No.
Data
1
Maximum number of VTY user interfaces, (optional) ACL for limiting call-in and
call-out in VTY user interfaces, connection timeout period of terminal users, number
of rows displayed in a terminal screen, size of the history command buffer, user
authentication mode, user name, and password
2
User name, password, authentication mode, and service type of an SSH user and
remote public RSA key pair allocated to the SSH user, SFTP working directory of
the SSH user
3
(Option) Number of the port monitored by the SSH server
(Option) The interval for updating the key pair on the SSH server
4
Name of the SSH server,Number of the port monitored by the SSH server,Preferred
encrypted algorithm from the SFTP client to the SSH server,Preferred encrypted
algorithm from the SSH server to the SFTP client,Preferred HMAC algorithm from
the SFTP client to the SSH server,Preferred HMAC algorithm from the SSH server
to the SFTP client,Preferred algorithm of key exchange,Name of the outgoing
interface,Source address
5
Directory name and File name
6.4.2 Configuring VTY User Interface
To allow a user to log in to the router by using SFTP, you need to configure attributes of the
VTY user interface.
Context
By default, the user authentication mode in the VTY user interface is password. Therefore, before
a user logs in to the router by using SFTP, the user authentication mode in the VTY user interface
must be set. Otherwise, the user cannot log in to the router.
Other attributes of the VTY user interface in the router, such as terminal attributes and user
priorities, can also be set as needed. These attributes, however, generally do not need to be set
because they have default values.
For detailed settings, see Configuring VTY User Interface.
6.4.3 Configuring SSH for the VTY User Interface
To allow users to log in to the router by using SFTP, you need to configure VTY user interfaces
to support SSH.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
120
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Context
By default, user interfaces support Telnet. If no user interface is configured to support SSH,
users cannot log in to the router by using SFTP.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface [ vty ] first-ui-number [ last-ui-number ]
The VTY user interface is displayed.
Step 3 Run:
authentication-mode aaa
The AAA authentication mode is configured.
Step 4 Run:
protocol inbound ssh
The VTY user interface is configured to support SSH.
NOTE
If a VTY user interface is configured to support SSH, the VTY user interface must be configured with
AAA authentication. Otherwise, the protocol inbound ssh command cannot be configured.
----End
6.4.4 Configuring an SSH User and Specifying SFTP as One of
Service Types
To allow a user to log in to the router by using SFTP, you must configure an SSH user, configure
the router to generate a local RSA key pair, configure a user authentication mode, specify a
service type and authorized directory for the SSH user.
Context
l
SSH users can be authenticated in four modes: RSA, password, password-RSA, and all.
Password authentication depends on Authentication, Authorization and Accounting
(AAA). Before a user logs in to the router in password or password-RSA authentication
mode, you must create a local user with the specified user name in the AAA view.
l
Configuring the router to generate a local RSA key pair is a key step for SSH login. If an
SSH user logs in to an SSH server in password authentication mode, configure the server
to generate a local RSA key pair. If an SSH user logs in to an SSH server in RSA
authentication mode, configure both the server and the client to generate local RSA key
pairs.
NOTE
Password-RSA authentication requires success of both password authentication and RSA authentication.
The all authentication mode requires success of either password authentication or RSA authentication.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
121
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Do as follows on the router that functions as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ssh user user-name
1.
Run:
aaa
The AAA view is displayed.
2.
Run:
local-user user-name password { simple | cipher } password
Name and password of the local user are created.
Step 3 Run:
rsa local-key-pair create
A local RSA key pair is generated.
NOTE
l Before performing the other SSH configurations, you must configure the rsa local-key-pair create
command to generate a local key pair.
l After generating the local key pair,you can perform the display rsa local-key-pair public command
to view the public key in the local key pair.
Step 4 Run:
ssh user user-name authentication-type { password | rsa | password-rsa | all }
The authentication mode for SSH users is configured.
Perform the following as required:
l Authenticate the SSH user through the password.
– Run:
ssh user user-name authentication-type password
The password authentication is configured for the SSH user.
– Run:
ssh authentication-type default password
The default password authentication is configured for the SSH user.
For the local authentication or HWTACACS authentication, if the number of SSH users
is small, you can adopt the former command; if the number of SSH users is large, adopt
the later command to simplify the configuration.
l Authenticate the SSH user through RSA.
1.
Run:
ssh user user-name authentication-type rsa
The RSA authentication is configured for the SSH user.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
122
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
2.
6 Managing File System
Run:
rsa peer-public-key key-name
The public key view is displayed.
3.
Run:
public-key-code begin
The public key editing view is displayed.
4.
Run:
hex-data
The public key is edited.
NOTE
l In the public key view, only hexadecimal strings complying with the public key format can be
typed in. Each string is randomly generated on an SSH client. For detailed operations, see manuals
for SSH client software.
l After the public key editing view is displayed, the RSA public key generated on the client can
be sent to the server. Copy the RSA public key to the router that serves as the SSH server.
5.
Run:
public-key-code end
Quit the public key editing view.
l If the specified hex-data is invalid, the public key cannot be generated after the peerpublic-key end command is run.
l If the specified key-name is deleted in other views, the system prompts that the key does
not exist after the peer-public-key end command is run and the system view is
displayed.
6.
Run:
peer-public-key end
Return to the system view from the public key view.
7.
Run:
ssh user user-name assign rsa-key key-name
The public key is assigned to the SSH user.
Step 5 (Optional) Configuring the Basic Authentication Information for SSH Users
1.
Run:
ssh server rekey-interval interval
The interval for updating the server key pair is configured.
By default, the interval for updating the key pair of the SSH server is 0 that indicates no
updating.
2.
Run:
ssh server timeout seconds
The timeout period of the SSH authentication is set.
By default, the timeout period is 60 seconds.
3.
Run:
ssh server authentication-retries times
The number of retry times of the SSH authentication is set.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
123
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
By default, the retry times is 3.
Step 6 (Optional) Authorizing SSH Users Through the Command Line
SSH users can be authenticated in four modes: password, RSA, password-RSA, and all. In RSA
authentication mode, you can configure SSH users to be authorized based on command levels.
Run:
ssh user user-name authorization-cmd aaa
The command line authorization is configured for the specified SSH user.
After configuring the authorization through command lines for the SSH user to perform RSA
authentication, you have to configure the AAA authorization. Otherwise, the command line
authorization for the SSH user does not take effect.
Step 7 Run:
ssh user username service-type { SFTP | all }
The service type of an SSH user is set to SFTP or all.
By default, the service type of the SSH user is not configured.
Step 8 Run:
ssh user username sftp-directory directoryname
The authorized directory of the SFTP service for SSH users is configured.
By default, the authorized directory of the SFTP service for SSH users is cfcard:.
----End
6.4.5 Enabling the SFTP Service
Before enjoying the STelnet service, you need to enable it.
Context
By default, the router is not enabled with the SFTP server function. Users can establish
connections with the router by using SFTP only after the router is enabled with the SFTP server
function.
Do as follows on the router that serves as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
sftp server enable
The SFTP service is enabled.
By default, the SFTP service is disabled.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
124
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.4.6 (Optional) Configuring the STelnet Server Parameters
You can configure a device to be compatible with the SSH protocol of earlier versions, configure
or change the listening port number of an SSH server, and set an interval at which the key pair
of the SSH server is updated.
Context
Table 6-2 lists server parameters.
Table 6-2 Server parameters
Server
Parameter
Description
Earlier SSH
version
compatibility
SSH has two versions: SSH1.X (earlier than SSH2.0) and SSH2.0. Compared
with SSH1.X, SSH2.0 is extended in structure and supports more
authentication modes and key exchange methods. SSH2.0 also supports more
advanced services such as SFTP. The HUAWEI NetEngine80E/40E
supports SSH versions ranging from 1.3 to 2.0.
Listening port
number of an
SSH server
The default listening port number of an SSH server is 22. Users can log in to
the device by using the default listening port number. Attackers may access
the default listening port, consuming bandwidth, deteriorating server
performance, and causing authorized users unable to access the server. After
the listening port number of the SSH server is changed, attackers do not know
the new port number. This effectively prevents attackers from accessing the
listening port and improves security.
Interval at
which the key
pair of the
SSH server is
updated
After the interval is set, the key pair of the SSH server is updated periodically
to improve security.
Do as follows on the router that serves as an SSH server:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Perform one or more operations shown in Table 6-3 as needed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
125
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Table 6-3 Configurations of server parameters
Server
Parameter
Operation
Earlier SSH
version
compatibility
Run the ssh server compatible-ssh1x enable command.
By default, an SSH server running SSH2.0 is compatible with SSH1.X. To
prevent clients running SSH1.3 to SSH1.99 to log in, run the undo ssh server
compatible-ssh1x enable command to disable the system from supporting
earlier SSH protocol versions.
Listening port
number of the
SSH server
Run the ssh server port port-number command.
Interval at
which the key
pair of the
SSH server is
updated
Run the ssh server rekey-interval hours command.
If a new listening port is set, the SSH server cuts off all established STelnet
and SFTP connections, and uses the new port number to listen to connection
requests. By default, the listening port number is 22.
By default, the interval is 0, indicating that the key pair will never be updated.
----End
6.4.7 Accessing the System by Using SFTP
After the configuration is complete, users can log in to the router from the user terminal by using
SFTP to manage files on the router.
Context
The third-party software can be used to access the router from the user terminal by using SFTP.
Here uses the third-party software OpenSSH and windows command line as an example.
After installing OpenSSH on the user terminal, do as follows on the user terminal:
NOTE
For details on how to install OpenSSH, see the installation guide of the software.
For details on how to use OpenSSH commands to log in to the router, see the help document of the software.
Procedure
Step 1 Use the windows command line.
Step 2 Run relevant OpenSSH commands to log in to the router in SFTP mode.
When the command line prompt is displayed in the SFTP client view, such as sftp>, users have
entered the working directory of the SFTP server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
126
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
----End
6.4.8 Performing File Operations by Using SFTP
On the SFTP client, you can log in to the SSH server to create or delete directories on the SSH
server.
Context
After logging in to the SFTP server, you can perform the following operations:
l
Displaying the SFTP client command help
l
Managing the directory on the SFTP server
l
Managing the directory on the SFTP server
After logging in to the SFTP server and entering the SFTP client view, you can perform the
following one or more operations.
Procedure
l
Run:
help [ all | command-name ]
The SFTP client command help is displayed.
l
Issue 02 (2011-09-10)
You can perform one or multiple of the following operations as required.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
127
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
– Run:
cd [ remote-directory ]
The current operating directory of users is changed.
– Run:
pwd
The current operating directory of users is displayed.
– Run:
dir/ls [ path ]
The file list in the specified directory is displayed.
– Run:
rmdir remote-directory &<1-10>
– The directory on the server is deleted.
– Run:
mkdir remote-directory
A directory is created on the server.
l
You can perform one or multiple of the following operations as required.
– Run:
rename old-name new-name
The name of the specified file on the server is changed.
– Run:
get remote-filename [ local-filename ]
The file on the remote server is downloaded.
– Run:
put local-filename [ remote-filename ]
The local file is uploaded to the remote server.
– Run:
rmdir remote-directory &<1-10>
The file on the server is removed.
----End
6.4.9 Checking the Configuration
After performing file operations by using SFTP, you can view SSH user information and global
configurations of the SSH server.
Prerequisite
The configuration of SSH Users are complete.
Procedure
l
Run the display ssh user-information username command to check the information about
the SSH client on the SSH server.
l
Run the display ssh server status command on the SSH server to check its global
configurations.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
128
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
6 Managing File System
Run the display ssh server session command on the SSH server to check information about
connection sessions with SSH clients.
----End
Example
Run the display ssh user-information username command. It shows that the SSH user named
clinet001 is authenticated by password.
[HUAWEI] display ssh user-information client001
User Name
: client001
Authentication-type
: password
User-public-key-name
: Sftp-directory
: Service-type
: sftp
Authorization-cmd
: No
If no SSH user is specified, information about all SSH users logging in to an SSH server will be
displayed.
Run the display ssh server status command to view global configurations of an SSH server.
<HUAWEI> display ssh server status
SSH version
SSH connection timeout
SSH server key generating interval
SSH Authentication retries
SFTP server
Stelnet server
SSH server port
:
:
:
:
:
1.99
60 seconds
2 hours
5 times
Enable
: Enable
: 55535
NOTE
If the default interception port is in use, information about the current interception port is not displayed.
Run the display ssh server session command to view information about sessions between the
SSH server and SSH clients.
<HUAWEI> display ssh server
Session 2:
Conn
Version
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
session
:
:
:
:
:
:
:
:
:
:
:
:
VTY 4
2.0
started
client002
1
aes128-cbc
aes128-cbc
hmac-md5
hmac-md5
diffie-hellman-group-exchange-sha1
sftp
password
6.5 Performing File Operations by Means of Xmodem
This section describes how to transfer files through XModem.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
129
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
6.5.1 Establishing the Configuration Task
Before configuring XModem, familiarize yourself with the applicable environment, complete
the pre-configuration tasks, and obtain the required data. This can help you complete the
configuration task quickly and accurately.
Applicable Environment
Configure XModem to transfer files through serial interfaces.
Pre-configuration Tasks
Before configuring XModem, complete the following tasks:
l
Powering on the router
l
Connecting the router and the PC through an AUX port or a console port
l
Logging in to the router through the terminal emulation program and specifying a file path
in the terminal emulation program
Data Preparation
To configure XModem, you need the following data.
No.
Data
1
Name of a specific file
2
Absolute path of the file
6.5.2 Getting a File Through Xmodem
Using XModem, you can download files to a router through the AUX port.
Context
XModem file transfer consists of receiving program and sending program.
l
The receiving program first sends the negotiation character to negotiate the check mode.
l
After the negotiation is successful, the sending program begins to send packets.
l
When the receiving program receives a complete packet, it checks the packet in the
negotiated mode.
l
If the check is successful, the receiving program sends the acknowledgement character and
then the sending program sends the next packet.
l
If the check fails, the receiving program sends the denial character and the sending program
retransmits the packet.
NE80E/40E provides the function of XModem receiving program, which is applied to the AUX
port and supports 128-byte packets and CRC. The function of XModem sending program is
automatically included in the HyperTerminal.
Do as follows on the router:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
130
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Procedure
l
Run:
xmodem get { filename | devicename }
XModem is used to get the file.
NOTE
l Before getting the file, confirm the path and the name of the file that are to be sent.
l For the filename, an absolute path name is required.
l If the filename is similar to an existing one, the system sends a prompt asking you whether to
overwrite the file or not.
----End
6.6 Configuration Examples
This section provides an example for performing files by accessing the system and using FTP
or SFTP.These configuration examples explain networking requirements, configuration
roadmap, and configuration notes.
6.6.1 Example for Performing File Operations by Means of the File
System
This section describes how to perform file operations by means of the file system. In this
example, you can log in to the router to view and copy directories.
Networking Requirements
You can log in to the router through the Console interface, AUX interface, Telnet, or STelnet
to perform file operations on the router.
The file path in the storage device must be correct. If the user does not specify a target file name,
the source file name is the name of the target file by default.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Check the files under a certain directory.
2.
Copy a file to this directory.
3.
Check this directory and view that the file is copied successfully to the specified directory.
Data Preparation
To complete the configuration, you need the following data:
l
Source file name and target file name
l
Source file path and target file path
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
131
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Procedure
Step 1 Display the file information in the current directory, cfcard:/ is the flash memory identifier.
<HUAWEI> dir cfcard:/
Directory of cfcard:/
Idx
Attr
Size(Byte)
0
-rw64
1
-rw418
2
-rw38017
3
-rw2292
4
-rw7041
5
-rw117013076
V600R003C00SPC300.cc
500192 KB total (347760 KB free)
Nov
Jul
Aug
Aug
Aug
Jul
Date
15 2006
26 2007
01 2007
21 2006
02 2007
13 2007
Time
13:07:44
19:52:14
11:02:00
15:35:50
11:02:00
10:40:44
FileName
patchnpstate.dat
vrpcfg.zip
paf.txt
vrp.zip
license.txt
Step 2 Copy files from hda1:/sample.txt to flash:/sample.txt
<HUAWEI> copy hda1:/sample.txt flash:/sample1.txt
Copy hda1:/sample.txt to flash:/sample1.txt?[Y/N]:y
100% complete
Info:Copied file hda1:/sample.txt to flash:/sample1.txt...Done
Copy files from cfcard2:/sample.txt to cfcard:/sample.txt
<HUAWEI> copy cfcard2:/sample.txt cfcard:/sample1.txt
Copy cfcard2:/sample.txt to cfcard:/sample1.txt?[Y/N]:y
100% complete
Info:Copied file cfcard2:/sample.txt to cfcard:/sample1.txt...Done
Step 3 Display the file information about the current directory, and you can view that the file is copied
to the specified directory.
<HUAWEI> dir cfcard:/
Directory of cfcard:/
Idx
Attr
Size(Byte)
0
-rw64
1
-rw418
2
-rw38017
3
-rw2292
4
-rw7041
5
-rw117013076
V600R003C00SPC300.cc
6
-rw1605
500192 KB total (346155 KB free)
Nov
Jul
Aug
Aug
Aug
Jul
Date
15 2006
26 2007
01 2007
21 2006
02 2007
13 2007
Time
13:07:44
19:52:14
11:02:00
15:35:50
11:02:00
10:40:44
Nov 18 2007 05:30:11
FileName
patchnpstate.dat
vrpcfg.zip
paf.txt
vrp.zip
license.txt
sample1.txt
----End
6.6.2 Example for Performing File Operations by Means of FTP
This section provides an example for operating files by means of FTP.In this example, a PC
connected to a router logs in to the FTP server by entering the correct user name and password
through FTP, and then downloads files to the memory of the FTP client.
Networking Requirements
As shown in Figure 6-1, after the FTP server is enabled on the router, you can log in to the FTP
server from the HyperTerminal to upload or download files.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
132
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Figure 6-1 Networking for performing file operations by using FTP
Network
GE1/0/1
10.137.217.221/16
PC
FTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the IP address of the FTP server.
2.
Enable the FTP server.
3.
Configure the authentication information, authorization mode, and directories to be
accessed for an FTP user.
4.
Log in to the FTP server by using the correct user name and password.
5.
Upload files to or download files from the FTP server.
Data Preparation
To complete the configuration, you need the following data:
l
IP address of the FTP server, that is, 10.137.217.221
l
Timeout period for the FTP connection, that is, 30 minutes
l
FTP username as huawei and password as huawei on the server
l
The destination file name and its position in the FTP client
Procedure
Step 1 Configure the IP address of the FTP server.
[server] interface gigabitethernet1/0/1
[server-GigabitEthernet1/0/1] undo shutdown
[server-GigabitEthernet1/0/1] ip address 10.137.217.221 255.255.0.0
[server-GigabitEthernet1/0/1] quit
Step 2 Enable the FTP server.
<HUAWEI>
[HUAWEI]
[server]
[server]
system-view
sysname server
ftp server enable
ftp timeout 30
Step 3 Configure the authentication information, authorization mode, and authorized directories for an
FTP user on the FTP server.
[server] aaa
[server-aaa]
[server-aaa]
[server-aaa]
[server-aaa]
local-user huawei password simple huawei
local-user huawei service-type ftp
local-user huawei ftp-directory cfcard:
quit
Step 4 Run the FTP commands at the windows command line prompt, and enter the correct user name
and password to set tup an FTP connection with the FTP server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
133
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Figure 6-2 Logging in to the FTP Server
Step 5 Upload and download files, as shown in the following figure.
Figure 6-3 Performing file operations by means of FTP
NOTE
You can run the dir command before downloading a file or after uploading a file to view the detailed
information of the file.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
134
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Configuration Files
l
Configuration file of the FTP server.
#
sysname Server
#
FTP server enable
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.137.217.221 255.255.0.0
#
aaa
local-user huawei password simple Huawei
local-user huawei service-type ftp
local-user huawei ftp-directory cfcard:
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
return
6.6.3 Example for Performing File Operations by Means of SFTP
This section provides an example for operating files by using SFTP. In this example, a local key
pair is configured on the SSH server, and a user name and a password are configured on the
server for an SSH user. After SFTP services are enabled on the server and the SFTP client is
connected to the server, you can operate files between the client and the server.
Networking Requirements
As shown in Figure 6-4, after SFTP services are enabled on the router functioning as an SSH
server, you can log in to the server in password, RSA, password-rsa, or all authentication mode
from a PC on the SFTP client.
Configure a user to log in to the SSH server in password authentication mode.
Figure 6-4 Networking diagram for operating files by using SFTP
Network
GE1/0/1
10.137.217.225/16
SSH Server
PC
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure a local key pair on the SSH server to securely exchange data between the SFTP
client and the SSH server.
2.
Configure VTY user interfaces on the SSH server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
135
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
3.
Configure an SSH user, including user authentication mode, user name, password, and
authorization directory.
4.
Enable SFTP services on the SSH server and configure a user service type.
Data Preparation
To complete the configuration, you need the following data:
l
SSH user authentication mode: password, user name: client001, password: huawei
l
User level of client001: 3
l
IP address of the SSH server: 10.137.217.225
Procedure
Step 1 Configure a local key pair on the SSH server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: HUAWEI_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
..........++++++++++++
...................................++++++++
......++++++++
Step 2 Configure VTY user interfaces on the SSH server.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
Step 3 Configure the SSH user name and password on the SSH server.
[SSH
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa]
Server-aaa]
Server-aaa]
Server-aaa]
local-user client001 password cipher huawei
local-user client001 level 3
local-user client001 service-type ssh
quit
Step 4 Enable SFTP and configure the user service type to be SFTP.
[SSH Server] sftp server enable
[SSH Server] ssh user client001 authentication-type password
Step 5 Configure the authorization directory for the SSH user.
[SSH Server] ssh user client001 service-type sftp
Step 6 Verify the configurations.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
136
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Figure 6-5 Accessing Interface
----End
Configuration Files
l
Configuration file of the SSH server
#
sysname SSH Server
#
aaa
local-user client001 password cipher huawei
local-user client001 level 3
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.137.217.225 255.255.255.0
#
sftp server enable
ssh user client001 authentication-type password
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
return
6.6.4 Example for Performing File Operations by Means of Xmodem
In this example, you run the HyperTerminal on a PC and then log in to a router to download
files through the AUX port.
Networking Requirements
The router is connected to PC through the AUX port. Log in to the router through the AUX port,
to receive files from the AUX port and save the received files to the cfcard.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
137
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Configuration Roadmap
The configuration roadmap is as follows:
1.
Run the HyperTerminal on the PC and log in to the router.
2.
Use the xmodem get command to download files on the router, and specify the file path
on the HyperTerminal.
Data Preparation
To complete the configuration, you need the following data:
l
Files that are copied to the PC
l
The path of the file in the PC
Procedure
Step 1 Log in to the router through the AUX port.
Refer to Chapter 2 "Logging in to the Devices Through the AUX Port" in the NE80E/
40EConfiguration Guide - Basic Configuration.
Step 2 Use the XModem protocol to receive the file form the AUX port.
The received file is saved on the cfcard memory of the router and the file name is paf.txt.
<HUAWEI> xmodem get cfcard:/paf.txt
**** WARNING ****
xmodem is a slow transfer protocol limited to the current speed
settings of the auxiliary ports.
During the course of the download no exec input/output will be
available!
---- ******* ---Proceed?[Y/N]y
Destination filename [cfcard:/ paf.txt]?
Before press ENTER you must choose 'YES' or 'NO'[Y/N]:y
Download with XMODEM protocol....
Step 3 Specify the file to be sent on the HyperTerminal.
Figure 6-6 Specifying the file to be sent
After the configuration, press Send to send the file.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
138
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
6 Managing File System
Step 4 The system prompts that the file is sent successfully. Then, you can view the directory of the
filed named cfcard.
<HUAWEI>
Download successful!
<HUAWEI> dir
Directory of cfcard:/
Idx Attr Size(Byte) Date
0
-rw- 10014764 Jun 20
1
-rw98776 Jul 27
2
-rw28 Jul 27
3
-rw480 May 10
4
-rw- 10103172 Jul 22
5
-rw1515 Jul 19
6
-rw3844 Jul 14
7
-rw8628372 Jun 01
8
-rw45 Jul 27
2005
2005
2005
2003
2005
2005
2004
2005
2005
Time
15:00:28
09:36:12
09:34:39
11:25:18
16:40:37
17:39:55
11:51:45
10:14:34
10:51:26
FileName
ne20-vrp5.10-c01b070.bin
matnlog.dat
private-data.txt
vrpcfg.zip
ne20-vrp5.10-c01db90.bin
vrpcfg.cfg
exception.dat
ne20-vrp330-0521.01.bin
paf.txt
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
139
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7
7 Configuring System Startup
Configuring System Startup
About This Chapter
When the router starts, system software is started and configuration files are loaded. To ensure
smooth running of the router, you need to efficiently manage system software and configuration
files.
7.1 System Startup Overview
When the router starts, system software is started and configuration files are loaded.
7.2 Managing Configuration Files
You can manage the configuration files for the current and next startup operations on the
router.
7.3 Specifying a File for System Startup
You can specify a file for system startup by specifying the system software and configuration
file for the next startup of the router.
7.4 Configuration Examples
This section provides an example for configuring system startup.These configuration examples
explain networking requirements, configuration roadmap, and configuration notes.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
140
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
7.1 System Startup Overview
When the router starts, system software is started and configuration files are loaded.
7.1.1 System Software
System software is the operation system of the router, and is the basis for the router to run
properly and provide various services.
The extension name of the system software file is .cc. The file must be saved in the root directory
of the storage device.
7.1.2 Configuration Files
The configuration file is the add-in configuration item when restarting the router this time or
next time.
The configuration file is a text file in the following formats:
l
It is saved in the command format.
l
To save space, default parameters are not saved.
l
Commands are organized on the basis of the command view. All commands of the identical
command view are grouped into a section. Every two command sections are separated by
one or several blank lines or comment lines (beginning with "#").
l
The sequence of command sections is global configuration, physical interface
configuration, logic interface configuration, routing protocol configuration and so on.
l
The filename extension of the configuration file must be .cfg or .zip, and must be stored in
the root directory of a storage device.
NOTE
l The system can run the command with the maximum length of 512 characters, including the command
in an incomplete form.
l If the configuration is in the incomplete form, the command is saved in complete form. Therefore, the
command length in the configuration file may exceed 512 characters. When the system restarts, these
commands cannot be restored.
7.1.3 Configuration Files and Current Configurations
During the running of the router, configuration files and current configurations are differently
defined.
The concepts of configuration files and current configurations are as follows:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
141
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
Concept
Identifying Method
Configuration Files
Current Configurations
Initial configurations: On
powering on, the router
retrieves the configuration
files from a default save path
to initiate itself. If
configuration files do not
exist in the default save path,
the router uses the default
parameters.
l Run the display startup
command to view the
configuration files for the
current and next startup
operations on the router.
Current configurations:
indicates the effective
configurations of the
currently running router.
Run the display currentconfiguration command to
view the current
configurations on the router.
l Run the display savedconfiguration command
to view the configuration
file for the next startup
operation on the router.
Users can modify the current configurations of the router through the command line interface.
Use the save command to save the current configuration to the configuration file of the default
storage devices, and the current configuration becomes the initial configuration of the router
when the router is powered on next time.
7.2 Managing Configuration Files
You can manage the configuration files for the current and next startup operations on the
router.
7.2.1 Establishing the Configuration Task
Before managing configuration files, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Applicable Environment
You can manage configuration files by saving, clearing, and comparing configuration files. To
upgrade the router, take preventive measures, repair configuration files, and view configurations
after the router starts, you need to manage configuration files.
Pre-configuration Tasks
Before managing configuration files, complete the following task:
l
Installing the router and starting it properly
Data Preparation
To manage configuration files, you need the following data.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
142
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
No.
Data
1
Configuration file and its name
2
Saving configuration files interval and delay interval
3
The number of the start line from which the comparison of the configuration files
begins
7.2.2 Saving Configuration Files
The configurations completed by using command lines are valid for only the current operation
on the router. To allow the configurations to be valid for the next startup operation, you need to
save the current configurations to configuration files before restarting the router.
Context
The system can save the configuration files periodically or in real time to prevent data loss when
the router is powered off or accidentally restarted.
Run one of the following commands to save configuration files.
Procedure
l
Run:
CAUTION
When the automatic saving function is enabled and the LPU is not properly installed,
corresponding configurations may be lost.
1.
system-view
The system view is displayed.
2.
set save-configuration [ interval interval | cpu-limit cpu-usage |delay
delay-interval ] *
The configuration file is saved at intervals.
After the parameter interval interval is specified, the device saves the configuration
file at specified intervals regardless of whether the configuration file is changed.
– If the set save-configuration command is not run, the system does not
automatically save configurations.
– If the set save-configuration command without specified interval is run, the
system automatically saves configurations at 30-minute intervals.
When you configure the automatic saving function, to prevent that function from
affecting system performance, you can set the upper limit of the CPU usage for the
system during automatic saving. When automatic saving is triggered by the expiry of
the timer, the CPU usage is checked. If the CPU usage is higher than the set upper
limit, automatic saving will be canceled.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
143
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
After delay delay-interval is specified, if the configuration is changed, the device
automatically saves the configuration after the specified delay.
After automatic saving of configurations is configured, the system automatically saves
the changed configurations to the configuration file for the next startup and
configuration files are changed accordingly with the saved configurations.
Before configuring the automatic configure file saving on the server, you need to run
the set save-configuration backup-to-server server server-ip [ transport-type
{ ftp | sftp } ] user user-name password password [ path folder ] or set saveconfiguration backup-to-server server server-ip transport-type tftp [ path
folder ] command to configure the server, including the IP address, user name,
password of the server, destination path, and mode of transporting the configuration
file to the server.
NOTE
If TFTP is used, run the tftp client-source command to configure a loopback interface address as a
client source IP address on the router, improving security.
l
Run:
save [ all ] [ configuration-file ]
The current configurations are saved.
The filename extension of the configuration file must be .cfg or .zip. The system startup
configuration file must be saved in the root directory of a storage device.
The user can modify the current configuration through the command line interface. To set
the current configuration as initial configuration when the router starts next time, you can
use the save command to save the current configuration in the cfcard memory.
You can use the save all command to save all the current configurations, including the
configurations of the boards that are not inserted, to the default directory.
NOTE
When saving the configuration file for the first time, if you do not specify the optional parameter
configuration-file, the router asks you whether to save the file as "vrpcfg.zip" or not. "vrpcfg.zip" is
the default configuration file and initially contains no configuration.
----End
7.2.3 Clearing a Configuration File
You can clear the configuration file that has been loaded to a device, or clear the inactive
configurations of the boards that are not installed in slots.
Context
The configuration file stored in cfcard memory needs to be cleared in the following cases:
l
The system software does not match the configuration file after the router has been
upgraded.
l
The configuration file is destroyed or an incorrect configuration file has been loaded.
Do as follows to clear the contents of a configuration file:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
144
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
Procedure
l
Clear the currently loaded configuration file.
Run the reset saved-configuration command to clear the currently loaded configuration
file.
– If the configuration file of the router used for the current startup is the same as that used
for the next startup, running the reset saved-configuration command will clear both
the configuration files. The router will uses the default configuration file for the next
startup.
– If the configuration file of the router used for the current startup is different from that
used at the next startup, running the reset saved-configuration command will clear the
configuration file used for the current startup.
– If the configuration file of the router used for the current startup is empty, the system
will prompt you that the configuration file does not exist after you run the reset savedconfiguration command.
CAUTION
l After the contents of a configuration file are cleared, the empty configuration file with
the original file name is left.
l If you do not run the startup saved-configuration configuration-file command to
specify a new correct configuration file, or do not run the save command to save the
configuration file after the configuration file is cleared, the router will use the default
configuration file at the next startup.
l Exercise caution when running this command. If necessary, do it under the guidance of
Huawei technical support personnel.
l
Clear the inactive configurations of the boards that are not installed in slots.
1.
Run the system-view command to enter the system view.
2.
Run the clear inactive-configuration slot command to clear the inactive
configurations of the boards that are not installed in slots.
----End
7.2.4 Comparing Configuration Files
You can determine whether the current configuration file is the same as the one for the next
startup operation or a specified one on the router by comparing them.
Context
You can determine whether to specify the current configuration file as the one for the next startup
operation by comparing the current configuration file with the one for the next startup operation.
Procedure
l
Run:
compare configuration [ configuration-file ] [ current-line-number save-linenumber ]
The current configuration is compared with the configuration file for next startup.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
145
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
– If configuration-file is configured, the system checks whether the current configuration
file is the same as the specified configuration file.
– If no parameter is set, the comparison begins with the first lines of configuration files.
current-line-number and save-line-number are used to continue the comparison by
ignoring the differences between the configuration files.
When comparing differences between the configuration files, the system displays the
contents of the current configuration file and saved configuration file from the first different
line. By default, 150 characters are displayed for each configuration file. If the number of
characters from the first different line to the end is less than 150, the contents after the first
different line are all displayed.
NOTE
In comparing the current configurations with the configuration file for next startup, if the
configuration file for next startup is unavailable or its contents are null, the system prompts that
reading files fails.
----End
7.2.5 Checking the Configuration
After managing configuration files, you can view the current configuration files and files in the
storage device.
Prerequisite
The configuration of Managing Configuration Files are complete.
Procedure
l
Run the display current-configuration [ configuration [ configuration-type
[ configuration-instance ] ] | controller | interface [ interface-type [ interface-number ] ] ]
[ feature feature-name [ filter filter-expression ] | filter filter-expression ] or display
current-configuration [ all | inactive ]command to check current configurations.
l
Run the display startup command to check files for startup.
l
Run the dir [ /all ] [ filename ] command to check files saved in the storage device.
l
Run the display saved-configuration configuration command to view configurations of
the autosave function, including the status of the autosave function, time for autosave check,
threshold for the CPU usage, and period during which configurations are unchanged (when
the period expires, configurations are automatically saved).
l
Run the display changed-configuration time command to check the time of the last
configuration change.
----End
Example
Run the display startup command to check files for startup.
<HUAWEI> display startup
MainBoard:
Configured startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Issue 02 (2011-09-10)
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/vrp.cfg
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
146
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
7 Configuring System Startup
cfcard:/vrp.cfg
default
default
default
default
NULL
NULL
7.3 Specifying a File for System Startup
You can specify a file for system startup by specifying the system software and configuration
file for the next startup of the router.
7.3.1 Establishing the Configuration Task
Before specifying a file for system startup, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Applicable Environment
To enable the router to provide user-defined configurations during the next startup, you need to
correctly specify the system software and configuration file for the next startup.
Pre-configuration Tasks
Before specifying a file for the system startup, complete the following task:
l
Installing the router and powering it on properly
Data Preparation
To specify a file for system startup, you need the following data.
No.
Data
1
System software and its file name on the NE80E/40E
2
Configuration file and its file name on the NE80E/40E
7.3.2 Configuring System Software for a router to Load for the Next
Startup
To upgrade the system software of a router, you can specify the NE80E/40E system software to
be loaded for the next startup.
Context
If no system software is specified for the next startup operation of the router, the system software
loaded this time will be started during the next startup operation. To change system software for
the next startup operation, you need to specify the required one.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
147
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
The filename extension of the system software must be .cc and must be stored in the root directory
of a storage device.
Procedure
Step 1 Run:
startup system-software system-file [ slave-board ]
The NE80E/40E system software for the router to load next time when it starts is configured.
You can specify the system-file and use the system software for the next startup that is saved on
the device.
slave-board is valid only on the router with dual main control boards.
----End
7.3.3 Configuring the Configuration File for Router to Load for the
Next Startup
Before restarting a router, you can specify the configuration files that are loaded for the next
startup.
Context
You can run the display startup command on the router to check whether the configuration file
to be loaded during the next startup operation is specified. If no configuration file is specified,
the default configuration file is loaded during the next startup operation.
The filename extension of the configuration file must be .cfg or .zip, and must be stored in the
root directory of a storage device.
When the router turns on, it initiates by reading the configuration file from the cfcard memory
by default. Thus, the configuration in this configuration file is called initial configuration. If no
configuration file is saved in the cfcard, the router initiates with default parameters.
Procedure
l
Run:
startup saved-configuration configuration-file
Configuration file is saved for the router to load next time on startup.
----End
7.3.4 Checking the Configuration
After specifying a file for system startup, you can check the contents of the configuration file to
be loaded and the information about the file to be used during the next startup on the router.
Prerequisite
The file has been specified for system startup.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
148
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
Procedure
l
Run the display current-configuration [ configuration [ configuration-type
[ configuration-instance ] ] | controller | interface [ interface-type [ interface-number ] ] ]
[ feature feature-name [ filterfilter-expression ] | filterfilter-expression ] command to
check current configurations.
l
Run the display saved-configuration [ last | time | configuration ] command to check the
contents of the configuration file to be loaded during the next startup.
l
Run the display startup command to check information about the files to be used during
the next startup.
l
Run the display current-configuration slave command to check the configuration of the
slave board.
----End
Example
Run the display startup command to check information about the files to be used during the
next startup.
<HUAWEI> display startup
MainBoard:
Configured startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/vrp.cfg
cfcard:/vrp.cfg
default
default
default
default
NULL
NULL
7.4 Configuration Examples
This section provides an example for configuring system startup.These configuration examples
explain networking requirements, configuration roadmap, and configuration notes.
7.4.1 Example for Configuring System Startup
This section provides an example for configuring system startup. In this example, the
configuration file is saved and the system software and configuration file to be loaded during
the next startup are specified so that the router can start in a required manner.
Networking Requirements
The router is installed with double main control boards. After the router is configured, new
configurations take effect after the system restarts.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Issue 02 (2011-09-10)
Save the current configuration.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
149
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
7 Configuring System Startup
2.
Specify the configuration file to be loaded during the next startup of the router.
3.
Specify the system software to be loaded during the next startup of the router.
Data Preparation
To complete the configuration, you need the following data:
l
Name of the configuration file
l
File name of the system software
Procedure
Step 1 Check the configuration file and system software that are used during the current startup.
<HUAWEI> display startup
MainBoard:
Configured startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/vrp.cfg
cfcard:/vrp.cfg
default
default
default
default
NULL
NULL
Step 2 Save the current configuration to the specified file.
<HUAWEI> save vrpcfg.cfg
The system prompts you whether to save the current configuration to the file named vrpcfg.cfg
on the master and slave main control boards. After entering y at the prompt, you save the
configuration successfully.
Step 3 Specify the configuration file to be loaded during the next startup of the router.
<HUAWEI> startup saved-configuration vrpcfg.cfg
Step 4 Specify the system software to be loaded during the next startup of the router.
Specify the system software to be loaded during the next startup of the master main control
board.
<HUAWEI> startup system-software V600R003C00SPC300.cc
Specify the system software to be loaded during the next startup of the slave main control board.
<HUAWEI> startup system-software V600R003C00SPC300.cc slave-board
NOTE
l The slave main control board automatically synchronizes with the master main control board after the
configuration file to be loaded during the next startup is specified for the master main control board.
l Ensure that the system software to be loaded during the next startup of the router is saved on the master
and slave main control boards of the router. Configure the system software to be loaded during the next
startup of the master and slave main control boards respectively.
Step 5 Verify the configuration.
After the configuration is complete, run the following command to check the configuration file
and system software to be loaded during the next startup of the router.
<HUAWEI> display startup
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
150
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
MainBoard:
Configured startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
7 Configuring System Startup
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/vrp.cfg
cfcard:/vrpcfg.cfg
default
default
default
default
NULL
NULL
----End
Configuration Files
None.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
151
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8
Accessing Another Device
About This Chapter
To manage configurations or operate files of another device, you can access the device by using
Telnet, STelnet, TFTP, FTP, or SFTP from the device that you have logged in to.
8.1 Accessing Another Device
This section describes how to access another device on the network by using Telnet, FTP, TFTP,
or SSH.
8.2 Logging in to Other Devices by Using Telnet
On the network, a large number of routers need to be managed and maintained. Not all routers,
however, can be connected to terminal PCs. In addition, there are not reachable routes between
some routers and terminal PCs. To manage and maintain routers remotely, you can log in to
them by using Telnet from a device that you have logged in to.
8.3 Connecting to Another Device by Using the Telnet Redirection Function
If the client is not connected to the remote device on an IP network, you can manage the device
by using the Telnet redirection function on the router.
8.4 Logging in to Another Device by Using STelnet
STelnet ensures secure Telnet services. You can log in to another router from the router that you
have logged in to by using STelnet, and thus to manage the device remotely.
8.5 Accessing Files on Another Device by Using TFTP
You can configure the router as a TFTP client, and log in to the TFTP server to upload and
download files.
8.6 Accessing Files on Another Device by Using FTP
This section describes how to configure the router as an FTP client to log in to the FTP server,
and to upload files to or download files from the server.
8.7 Accessing Files on Another Device by Using SFTP
SFTP is a secure FTP service. After the router is configured as an SFTP client. The SFTP server
authenticates the client and encrypts data in both directions to provide secure data transmission.
8.8 Configuration Examples
This section describes examples for access another device. The examples explain networking
requirements, configuration notes, and configuration roadmap.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
152
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.1 Accessing Another Device
This section describes how to access another device on the network by using Telnet, FTP, TFTP,
or SSH.
Figure 8-1 Networking diagram for accessing another device from the router
Network
Server
Network
Client
PC
As shown in Figure 8-1, when you run the terminal emulation program or Telnet program on a
PC to connect to the router successfully, the router can still function as a client to access another
device on the network by using the following one or more methods.
8.1.1 Telnet Method
To configure and manage remote device on the network, you can use the router that you have
logged in to as a client to log in to the device, or use the redirection terminal service on
therouter to log in to the device.
Telnet is an application layer protocol in the TCP/IP protocol suite. It provides remote login and
a virtual terminal service through the network.
The NE80E/40E provides the following Telnet services:
l
Telnet server: You can run the Telnet client program on a PC to log in to the router,
configure and manage it. The router acts as a Telnet server.
l
Telnet client: You can run the terminal emulation program or the Telnet client program on
a PC to connect with the router. With the telnet command, you can log in to other routers
to configure and manage them. As shown in Figure 8-2,Router A serves as both the Telnet
server and the Telnet client.
Figure 8-2 Telnet client services
Telnet Session2
Telnet Session 1
Telnet Server
PC
l
Issue 02 (2011-09-10)
RouterA
RouterB
Redirection terminal services: You can run the Telnet client program on a PC to log in to
the router through a specified port number. Then connect with the serial interface devices
that are connected with the asynchronous interface of the router, as shown in Figure 8-3.
The typical application is to connect the asynchronous interface of the router with multiple
devices for their remote configuration and maintenance.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
153
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Figure 8-3 Telnet redirection services
PC
Ethernet
Router
Async0
Async3
Async1
Router1
Async2
Modem
Switch
Router2
NOTE
Only the devices that provide the asynchronous interface support the Telnet redirection service.
l
Interruption of Telnet services
In Telnet connection, you can use two types of shortcut keys to interrupt the connection.
As shown in Figure 8-4, Router A logs in to Router B through Telnet, and Router B logs
in to Router C through Telnet. Thus, a cascade network is formed. In this case, Router A
is the client of Router B and Router B is the client of Router C. Figure 8-4 illustrates the
usage of the two types of shortcut keys.
Figure 8-4 Usage of Telnet shortcut keys
Telnet Session 1
Telnet Session2
Telnet
Client
Telnet
Server
RouterA
RouterB
RouterC
<Ctrl_]>: The server interrupts the connection.
If the network connection is normal, when you press Ctrl_], the Telnet server interrupts
the current Telnet connection actively. For example:
<RouterC>
Press <Ctrl_]> to return to the prompt of Router B.
Info: The max number of VTY users is 10, and the current number
of VTY users on line is 1.
Info: The connection was closed by the remote host.
<RouterB>
Press <Ctrl_]> to return to the prompt of Router A.
Info: The max number of VTY users is 10, and the current number
of VTY users on line is 1.
Info: The connection was closed by the remote host.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
154
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
<RouterA>
NOTE
If the network disconnects, the shortcut keys become invalid. The instruction cannot be sent to the
server.
<Ctrl_T>: The client interrupts the connection.
When the server fails and the client is unaware of the failure, the server does not respond
to the input of the client. In this case, if you press Ctrl_T, the Telnet client interrupts the
connection actively and quits the Telnet connection.
For example:
<RouterC>
Press <Ctrl_T> to directly interrupt the connection and quit Telnet connection.
<RouterA>
CAUTION
When the number of remote login users reaches to the maximum number of VTY user
interfaces, the system prompts that all user interfaces are in use and you cannot use Telnet
to log in.
8.1.2 FTP Method
To access files on a remote FTP server, you can establish a connection between the router that
you have logged in to and the remote FTP server by using FTP.
FTP can transmit files between hosts, and provide users with common FTP commands to simply
manage file system. To be specific, through the FTP client program outside the router, users can
upload or download the files and access the directories on the router; through the FTP client
program inside the router, users can transfer files to the FTP servers of other devices.
FTP can transmit files between local and remote hosts, and is widely used for version upgrade,
log downloading, file transmission, and configuration saving.
8.1.3 TFTP Method
On the network, if a client communicates with a server in a comparatively simple interaction
environment, you can enable TFTP services on the router that functions as a client to access files
on the TFTP server.
Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol.
Compared with FTP, TFTP does not have a complex interactive access interface and
authentication control. TFTP is applicable in an environment where there is no complex
interaction between the client and the server. For example, TFTP is used to obtain the memory
image of the system when the system starts up.
TFTP is implemented based on the User Datagram Protocol (UDP).
The client initiates the TFTP transfer. To download files, the client sends a read request packet
to the TFTP server, receives packets from the server, and sends acknowledgement to the server.
To upload files, the client sends a write request packet to the TFTP server, sends packets to the
server, and receives acknowledgement from the server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
155
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
TFTP transfers the files in two formats:
l
The binary format: transfers program files.
l
The ASCII format: transfers text files.
At present, the NE80E/40E serves only as the TFTP client and transfers files in the binary format.
8.1.4 SSH Method
To securely access another device on the network, you can log in to it by using SSH (including
STelnet,SFTP) from the router that you have logged in to.
SSH Overview
When users on an insecure network log in to the router through Telnet, the Secure Shell (SSH)
feature ensures information security and authentication. It protects the router from attacks such
as IP address spoofing and interception of plain text password.
The SSH client function allows users to establish SSH connections with router serving as SSH
server or with UNIX hosts.
SSH Client Function
The NE80E/40E supports the STelnet client function ,the SFTP client function.
l
STelnet client
The Telnet protocol does not provide secure authentication. The TCP transmits data in plain
text. This leads to security problems. The system also faces serious threats from DOS
(Denial of Service) attacks, the host IP address spoofing, and routing spoofing. Telnet
services are prone to network attacks.
SSH implements secure remote access on insecure networks and it has the following
advantages compared with Telnet:
– SSH supports Remote Subscriber Access (RSA) authentication. In RSA authentication,
SSH generates and exchanges public and private keys compliant with asymmetric
encipherment system to ensure the session security.
– SSH supports Data Encryption Standard (DES), 3DES, and AES authentications.
– The user name and the password are both encrypted in the communication between the
SSH client and the SSH server. This prevents password interception.
– SSH encrypts the transmitted data.
When the STelnet server or the connection to the client is faulty, the client must detect the
fault in time and release the connection voluntarily. To implement this, when logging in to
the server through Stelnet, the client must be configured with the interval for sending the
keepalive packet and the number of times for no reply restriction on the server if no packet
is received by the client. If a client does not receive any packet within specified period, the
client sends a keepalive packet to the server. If the number of times of no reply restriction
exceeds the specified number, the client releases the connection voluntarily.
l
SFTP client
SFTP is short for Secure FTP. You can log in to a device from the secure remote end to
manage files. This improves the security of data transmission when the remote system is
updated. Meanwhile, the client function enables you to log in to the remote device through
SFTP for secure file transmission.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
156
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
When the SFTP server or the connection between it and the client is faulty, the client must
detect the fault in time and releases the connection voluntarily. To implement this, when
logging in to the server through SFTP, the client must be configured with the period of
sending the keepalive packet and the number of times for no reply restriction on the server
if no packet is received by the client. If a client does not receive any packet within specified
period, the client sends a keepalive packet to the server. If the number of times of no reply
restriction exceeds the specified number, the client takes the initiative to release the
connection.
8.2 Logging in to Other Devices by Using Telnet
On the network, a large number of routers need to be managed and maintained. Not all routers,
however, can be connected to terminal PCs. In addition, there are not reachable routes between
some routers and terminal PCs. To manage and maintain routers remotely, you can log in to
them by using Telnet from a device that you have logged in to.
8.2.1 Establishing the Configuration Task
Before establishing the configuration task of logging in to another router from the router that
you have logged in to, familiarize yourself with the applicable environment, complete the preconfiguration tasks, and obtain the required data. This can help you complete the configuration
task quickly and accurately.
Applicable Environment
Figure 8-5 Networking diagram for accessing another device from the router that you have
logged in to
Network
PC
Network
RouterA
RouterB
As shown in Figure 8-5, you can log in to Router A from a PC by using Telnet, but cannot
manage Router B remotely. This is because there is no reachable route between the PC and
Router B. To manage Router B remotely, you can log in to it from Router A by using Telnet.
In this situation, Router A functions as a Telnet client, and Router B that you attempt to log in
to functions as a server.
Pre-configuration Tasks
Before logging in to another device on the network by using Telnet, complete the following
tasks:
l
Issue 02 (2011-09-10)
Ensuring that the router that you attempt to log in to works properly, and enabling Telnet
services on the device
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
157
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
8 Accessing Another Device
Ensuring that there is a reachable route between the router that you have logged into and
the router that you attempt to log in to
Data Preparation
To log in to another device by using Telnet, you need the following data:
No.
Data
1
IP address or host name of RouterB
2
Number of the TCP port used by the RouterB to provide Telnet services
8.2.2 (Optional) Configuring a Source IP Address for an Telnet
Client
You can configure a source IP address for an Telnet client. Then, you can set up an Telnet
connection from the Telnet client to the server through a specific route by using this source IP
address.
Context
An IP address is configured for an interface on the router and functions as the source IP address
of an telnet connection. In this manner, security checks can be implemented.
The source address of a client can be configured as a source interface or a source IP address.
Do as follows on a router that functions as an Telnet client.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
telnet client-source { -a source-ip-address | -i interface-type interface-number }
A source IP address of an Telnet client is configured.
After the configuration, the source IP address of the Telnet client displayed on the Telnet server
must be the same as the configured one.
----End
8.2.3 Logging in to Another Device by Using Telnet
You can log in to another router and manage it by using Telnet.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
158
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Context
Telnet provides an interactive CLI for users to log in to a remote server. Users can log in to a
host, and then remotely log in to another host by using Telnet to configure and manage the remote
host. In this manner, not each host is required to connect to a hardware terminal.
Do as follows on the router that serves as a Telnet client:
Procedure
l
Select and perform one of the following two steps for IPv4 or IPv6.
– Run:
telnet [ vpn-instance vpn-instance-name ] [-a source-ip-address ] hostname [ port-number ]
Log in to the router and manage other routers.
– Run:
telnet ipv6 [ -a source-ip-address ] [ vpn-instance vpn-instance-name ]
host-name [ -i interface-type interface-number ] [ port-number ]
Log in to the router and manage other routers.
----End
8.2.4 Checking the Configuration
When you log in to another router successfully from the router that you have logged in to, you
can check information about the established TCP connection.
Prerequisite
All configurations for logging in to another device are complete.
Procedure
l
Run the display tcp status command to check the status of all TCP connections.
----End
Example
Run the display tcp status command to view the status of TCP connections. The Established
status indicates that a TCP connection has been established.
<HUAWEI> display tcp status
TCPCB
Tid/Soid
Local Add:port
39952df8
36 /1509
0.0.0.0:0
Closed
32af9074
59 /1
0.0.0.0:21
Listening
34042c80
73 /17
10.164.39.99:23
Established
Issue 02 (2011-09-10)
Foreign Add:port
0.0.0.0:0
VPNID
0
0.0.0.0:0
14849
10.164.6.13:1147
0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
State
159
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.3 Connecting to Another Device by Using the Telnet
Redirection Function
If the client is not connected to the remote device on an IP network, you can manage the device
by using the Telnet redirection function on the router.
8.3.1 Establishing the Configuration Task
Before establishing the configuration task of redirecting the client login to another device,
familiarize yourself with the applicable environment, complete the pre-configuration tasks, and
obtain the required data. This can help you complete the configuration task quickly and
accurately.
Applicable Environment
If a remote device needs to be managed and maintained but is not connected with the terminal
PC on the IP network, such as a new device on the network, you can log in to the remote device
from a router by using the Telnet redirection function.
The remote device can be a device that supports serial interfaces, such as a router, a switch, or
a modem.
Figure 8-6 Schematic diagram of redirecting the client login to another device by using Telnet
Session
Network
Aux Console
RouterA
PC
RouterB
As shown in Figure 8-6, remote Router B is not connected with the client over the IP network.
If Router B needs to be managed remotely, you can use the Telnet redirection function of
Router A. That is, connect the asynchronous serial interface of Router A to the serial interface
of Router B. This allows you to run the Telnet client program on the PC to log in to Router B
by using a specified interface, and thus to manage and maintain the device remotely.
Router B in the diagram above has been configured with serial interfaces. Router A is directly
connected with Router B.
Pre-configuration Tasks
Before redirecting the client to another device by using Telnet, complete the following tasks:
l
Configuring a reachable route between the client and Router A
l
Powering on the remote device
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
160
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
8 Accessing Another Device
routeris directly connected with the remote device by configuring cable
Data Preparation
To log in to another device by using the Telnet redirection function, you need the following data:
No.
Data
1
IP address of routerRouter A
8.3.2 Enabling the Telnet Redirection Function
After the redirection function is enabled on the router that functions as a Telnet client, you can
log in to a remote device from a specified interface of the client to manage and maintain the
remote device.
Context
The Telnet redirection function is supported by the products whose AUX ports or TTY interfaces
can be configured with this function.
Perform the following steps on the router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
user-interface aux 0
The AUX0 user interface is displayed.
Step 3 Run:
undo shell
Terminal services are disabled on the AUX0 user interface.
Step 4 Run:
redirect
The Telnet redirection function is enabled on the AUX0 user interface.
NOTE
l After the Telnet redirection function is enabled, the interface number used for redirection will be
assigned. AUX0 is numbered as 33, and the interface number is therefore 2033.
l You can log in to the remote device that needs to be managed and maintained from the Telnet client
by using the specified interface.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
161
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.3.3 Connecting Another Device by Using the Telnet Redirection
Function
You can log in to a device to be managed from the router functioning as a Telnet client by using
the Telnet redirection function.
Context
Users attempt to log in to another device by using a specified interface of the client.
Perform the following step on the client:
Procedure
l
Run:
telnet host-name port-number
Logging in to the remote device succeeds.
The host-name parameter specifies the IP address or host name of the router that has enabled
the redirection function.
----End
8.3.4 Checking the Configuration
After logging in to another device remotely by using Telnet, you can check status information
about the current TCP connection.
Prerequisite
The configurations for logging in to another device by using the Telnet redirection function are
complete.
Context
l
Run the display tcp status command to check status information about the established TCP
connection.
Example
Run the display tcp status command to view status information about the established TCP
connection.
<HUAWEI> display tcp status
TCPCB
Tid/Soid
Local Add:port
348d3c50
6 /1
0.0.0.0:21
Listening
3b558554
128/1
0.0.0.0:23
Listening
31cf1978
128/4
0.0.0.0:2033
Listening
31cf1bb0
128/6
0.0.0.0:4033
Listening
11a22ad8
128/3
10.137.217.225:23
Established
Issue 02 (2011-09-10)
Foreign Add:port
0.0.0.0:0
0.0.0.0:0
0.0.0.0:0
VPNID
23553
23553
23553
0.0.0.0:0
23553
10.138.77.38:3670
0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
State
162
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.4 Logging in to Another Device by Using STelnet
STelnet ensures secure Telnet services. You can log in to another router from the router that you
have logged in to by using STelnet, and thus to manage the device remotely.
8.4.1 Establishing the Configuration Task
Before establishing the configuration task of logging in to another device by using Stelnet,
familiarize yourself with the applicable environment, complete the pre-configuration tasks, and
obtain the required data. This can help you complete the configuration task quickly and
accurately.
Applicable Environment
Logins by using Telnet bring security risks because no secure authentication mechanism is
available and data is transmitted by using TCP in plain text mode.
STelnet is short for SSH Telnet that is a secure Telnet protocol. STelnet is on the basis of SSH.
SSH users can use STelnet services as Telnet services.
In this configuration, the Router that you have logged in to functions as a Telnet client, and
theRouter that you attempt to log in to functions as an SSH server.
Pre-configuration Tasks
Before logging in to another device by using STelnet, complete the following tasks:
l
Configuring a reachable route between the client and SSH server
Data Preparation
To log in to another device by using STelnet, you need the following data:
No.
Data
1
Name of the SSH server,Public key that is assigned by the client to the SSH server
2
IPv4 or IPv6 address or host name of the SSH server,Number of the port monitored
by the SSH server,Preferred encrypted algorithm from the SFTP client to the SSH
server,Preferred encrypted algorithm from the SSH server to the SFTP
client,Preferred HMAC algorithm from the SFTP client to the SSH server,Preferred
HMAC algorithm from the SSH server to the SFTP client,Preferred algorithm of key
exchange
The user information for logging in to the SSH server
8.4.2 Configuring the First Successful Login to Another Device
(Enabling the First-Time Authentication on the SSH Client)
After the first-time authentication on the SSH client is enabled, the STelnet client does not check
the validity of the RSA public key when logging in to the SSH server for the first time.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
163
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Context
If the first-time authentication on the SSH client is enabled, the STelnet client does not check
the validity of the RSA public key when logging in to the SSH server for the first time. After
the login, the system automatically allocates the RSA public key and saves it for authentication
in next login.
Do as follows on the router that serves as an SSH client:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ssh client first-time enable
The first-time authentication on the SSH client is enabled.
By default, the first-time authentication on the SSH client is disabled.
NOTE
l The purpose of enabling the first-time authentication on the SSH client is to skip checking the validity
of the RSA public key of the SSH server when the STelnet client logs in to the SSH server for the first
time. The check is skipped because the STelnet server has not saved the RSA public key of the SSH
server.
l If the first-time authentication is not enabled on the SSH client, when the STelnet client logs in to the
SSH server for the first time, the STelnet client fails to pass the check on the RSA public key validity
and cannot log in to the server.
TIP
To ensure that the STelnet client can log in to the SSH server at the first attempt, you can assign the RSA
public key in advance to the SSH server on the SSH client in addition to enabling the first-time
authentication on the SSH client.
----End
8.4.3 Configuring the First Successful Login to Another Device
(Allocating an RSA Public Key to the SSH Server)
To configure the first successful login to another device on the SSH client, you need to allocate
an RSA public key to the SSH server before the login.
Context
If the first-time authentication is not enabled on the SSH client, when the STelnet client logs in
to the SSH server for the first time, the STelnet client fails to pass the check on the RSA public
key validity and cannot log in to the server.So you need to allocate an RSA public key to the
SSH server before the STelnet client logs in to the SSH server.
Do as follows on the router that serves as an SSH client:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
164
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rsa peer-public-key key-name
The public key view is displayed.
Step 3 Run:
public-key-code begin
The public key editing view is displayed.
Step 4 Run:
hex-data
The public key is edited.
The public key must be a string of hexadecimal alphanumeric characters. It is automatically
generated by an SSH client. You can run the display rsa local-key-pair public command to
view a generated public key.
NOTE
Before being assigned to the SSH server, the assigned peer RSA public key must be obtained from the SSH
server and must be configured on the SSH client. Then, the STelnet client client can successfully undergo
the validity check on the RSA public key of the SSH server.
Step 5 Run:
public-key-code end
Quit the public key editing view.
l If the specified hex-data is invalid, the public key cannot be generated after the peer-publickey end command is run.
l If the specified key-name is deleted in other views, the system prompts that the key does not
exist after the peer-public-key end command is run and the system view is displayed.
Step 6 Run:
peer-public-key end
Return to the system view from the public key view.
Step 7 Run:
ssh client servername assign rsa-key keyname
The RSA public key is assigned to the SSH server.
NOTE
If the RSA public key stored on the SSH client becomes invalid, run the undo ssh client servername
assign rsa-key command to cancel the association between the SSH client and the SSH server. Then, run
the ssh client servername assign rsa-key keyname command to allocate a new RSA public key to the SSH
server.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
165
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.4.4 Logging in to Another Device by Using STelnet
You can log in to the SSH server from the SSH client by using STelnet.
Context
When accessing an SSH server, the STelnet client can carry the source address and the VPN
instance name and choose the key exchange algorithm, encryption algorithm, or HMAC
algorithm, and configure the keepalive function.
Do as follows on the router that serves as an SSH client:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 According to the address type of the SSH server, select and run one of the following two
commands.
l For IPv4 addresses,
Run the stelnet [ -a source-address ] host-ipv4 [ port ] [ [ -vpn-instance vpn-instancename ] | [ prefer_kex { dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher
{ des | 3des | aes128 } ] | [ prefer_stoc_cipher { des | 3des | aes128 } ] |
[ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] | [ prefer_stoc_hmac { sha1 |
sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ] command. You
can log in to the SSH server through STelnet.
l For IPv6 addresses,
Run the stelnet ipv6 [ -a source-address ] host-ipv6 [ -i interface-type interface-number ]
[ port ] [ [ prefer_kex { dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher
{ des | 3des | aes128 } ] | [ prefer_stoc_cipher { des | 3des | aes128 } ] |
[ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] | [ prefer_stoc_hmac { sha1 |
sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ] command. You
can log in to the SSH server through STelnet.
----End
8.4.5 Checking the configuration
After the configuration task of logging in to another device by using STelnet is established, you
can check the mappings between all SSH servers of the STelnet client and the RSA public keys
on the client, the global configurations of the SSH servers, and the sessions between the SSH
servers and the STelnet client.
Prerequisite
The configurations for logging in to another device by using STelnet are complete.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
166
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
l
Run the display ssh server-info command to check the mappings between all SSH servers
of the SSH client and the RSA public keys on the client.
----End
Example
Run the display ssh server-info to view the mappings between all servers of the SSH client and
the RSA public keys on the SSH client.
<HUAWEI> display ssh server-info
Server Name(IP)
Server public key name
________________________________________________________________________
1000::1
1000::1
10.164.39.223
10.164.39.223
11.11.11.23
11.11.11.23
10.164.39.204
10.164.39.204
10.164.39.222
10.164.39.222
8.5 Accessing Files on Another Device by Using TFTP
You can configure the router as a TFTP client, and log in to the TFTP server to upload and
download files.
8.5.1 Establishing the Configuration Task
Before accessing another device by using TFTP, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
You can transfer files through TFTP between the server and the client in a simple interaction
environment.
The current Router functions as a TFTP client, and theRouter to be accessed functions as a TFTP
server.
Pre-configuration Tasks
Before accessing another device by using TFTP, complete the following tasks:
l
Configuring a reachable route between the client and TFTP server
Data Preparation
To access another device by using TFTP, you need the following data.
Issue 02 (2011-09-10)
No.
Data
1
(Optional) Source address or source interface of the router that functions as a TFTP
client
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
167
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
No.
Data
2
IP address or host name of the TFTP server
3
Name of the specific file in the TFTP server and the file directory
8.5.2 (Optional) Configuring a Source IP Address for a TFTP Client
You can configure a source IP address for a TFTP client. Then, you can set up a TFTP connection
from the TFTP client to the server through a specific route by using this source IP address.
Context
An IP address is configured for an interface on the router and functions as the source IP address
of a TFTP connection. In this manner, security checks can be implemented.
The source address of a client can be configured as a source interface or a source IP address.
Do as follows on a router that functions as a TFTP client.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
tftp client-source { -a source-ip-address | -i interface-type interface-number }
A source IP address of a TFTP client is configured.
After the configuration, the source IP address of the TFTP client displayed on the TFTP server
must be the same as the configured one.
----End
8.5.3 (Optional) Configuring TFTP Access Authority
This section describes how to use an ACL rule to authorize the users to specify the TFTP servers
that can be accessed by using TFTP from the router that you have logged in to.
Context
An Access Control List (ACL) is a set of sequential rules. These rules are described based on
the source address, destination address, and port number of a packet. Routers use the ACL rules
to filter packets. With the rule applied to the interface on a router, the router permits or denies
the packets.
Each ACL can define multiple rules. ACL rules are classified into the interface ACL, basic ACL,
and advanced ACL based on the functions of ACL rules.
NOTE
TFTP supports only the basic ACL (whose number ranges from 2000 to 2999).
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
168
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Do as follows on the router that serves as the TFTP client:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
acl acl-number
The ACL view is displayed.
Step 3 Run:
rule [ rule-id ] { deny | permit } [ fragment | logging | source { source-ip-address
source-wildcard | any } | time-range time-name | vpn-instance vpn-instance-name ] *
The ACL rule is configured.
Step 4 Run:
quit
The system view is displayed.
Step 5 Run:
tftp-server acl acl-number
The ACL can be used to limit the access to the TFTP server.
----End
8.5.4 Downloading Files by Using TFTP
You can download files from the TFTP server to the TFTP client.
Do as follows on the router that serves as the TFTP client:
Procedure
l
Run the following commands according to the type of the server IP addresses.
– The IP address of the server is IPv4 address, run:
tftp [ -a source-ip-address | -i interface-type interface-number ] tftpserver [ public-net | vpn-instance vpn-instance-name ] get source-filename
[ destination-filename ]
The router is configured to download files through TFTP.
– The IP address of the server is IPv6 address, run:
tftp ipv6 [ -a source-ip-address ] tftp-server-ipv6 [ -i interface-type
interface-number ] get source-filename [ destination-filename ]
The router is configured to download files through TFTP.
----End
8.5.5 Uploading Files by Using TFTP
You can upload files from the TFTP client to the TFTP server.
Do as follows on the router that serves as the TFTP client:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
169
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
l
Run the following commands according to the type of the server IP addresses.
– The IP address of the server is IPv4 address, run:
tftp [ -a source-ip-address | -i interface-type interface-number ] tftpserver [ public-net | vpn-instance vpn-instance-name ] put source-filename
[ destination-filename ]
The router is configured to upload files through TFTP.
– The IP address of the server is IPv6 address, run:
tftp ipv6 [ -a source-ip-address ] tftp-server-ipv6 [ -i interface-type
interface-number ] put source-filename [ destination-filename ]
The router is configured to upload files through TFTP.
----End
8.5.6 Checking the Configuration
When a device is configured to be a TFTP client, you can check the source address of the client
and the configured ACl rule.
Prerequisite
Configurations of using the device as a TFTP client are complete.
Procedure
l
Run the display tftp-client command to check the device address that is set to the source
address of the TFTP client.
l
Run the display acl { name acl-name | acl-number | all } command to check the ACL rule
that is configured on the TFTP client.
----End
Example
Run the display tftp-client command to view the source address of the TFTP client.
<HUAWEI> display tftp-client
The source address of TFTP client is 1.1.1.1.
Run the display acl{ name acl-name | acl-number | all } to view the ACL rule that is configured
on the TFTP client.
<HUAWEI> display acl 2001
Basic acl 2001, 2 rules,
Acl's step is 5
rule 5 permit
rule 10 permit source 1.1.1.1 0
8.6 Accessing Files on Another Device by Using FTP
This section describes how to configure the router as an FTP client to log in to the FTP server,
and to upload files to or download files from the server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
170
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.6.1 Establishing the Configuration Task
Before establishing the configuration task of accessing files on another device by using FTP,
familiarize yourself with the applicable environment, complete the pre-configuration tasks, and
obtain the required data. This can help you complete the configuration task quickly and
accurately.
Applicable Environment
Before transmitting files between a client and a remote FTP server, or managing directories of
the server, you can configure the router that you have logged in to as an FTP client. Then, you
can access the FTP server by using FTP for file transmission or directory management.
Pre-configuration Tasks
Before establishing the configuration task of accessing files on another device by using FTP,
complete the following tasks:
l
Configuring a reachable route between the router and the FTP server
Data Preparation
To establish the configuration task of accessing files on another device by using FTP, you need
the following data:
No.
Data
1
(Optional) Source IP address or source interface of the router functioning as an FTP
client
2
Host name or IP address of the FTP server, port number of connecting FTP, login
username and password
3
Local file name and file name on the remote FTP server,working directory name of
the remote FTP server, local working directory of the FTP client, or directory name
of the remote FTP server
8.6.2 (Optional) Configuring Source IP Address and Interface of the
FTP Client
This section describes how to configure the source IP address and interface of FTP client to
establish the connection with FTP server.
Prerequisite
An IP address is configured for an interface on the router and functions as the source IP address
of an FTP connection. In this manner, security checks can be implemented.
The source address of a client can be configured as a source interface or a source IP address.
The interface configuration is possible, only if the system has a loopback interface.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
171
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ftp client-source { -a ip-address }
The source IP address of the FTP client is configured.
or
ftp client-source { -i interface-type interface-number }
The loopback addresses of the FTP client is configured.
NOTE
Then, run the display ftp-client command on the router to view the current configuration of the FTP client.
----End
8.6.3 Connecting to Other Devices by Using FTP Commands
You can run FTP commands to log in to other devices from the router that functions as the FTP
client.
Context
You can log in to the FTP server in the user view or the FTP view.
Do as follows on the router that serves as the client:
Procedure
Step 1 Run the following commands according to types of the server IP address.
l If the IP address of the server is an IPv4 address, do as follows:
– In the user view, establish a connection to the FTP server.
Run:
ftp [ -a source-ip-address | -i interface-type interface-number ] host [ portnumber ] [ public-net | vpn-instance vpn-instace-name ]
The router is connected to the FTP server.
– In the FTP view, establish a connection to the FTP server.
1.
In the user view,Run:
ftp
The FTP view is displayed.
2.
Run:
open [-a source-ip-address | -i interface-type interface-number ] host
[ port-number ] [ vpn-instance vpn-instance-name ]
The router is connected to the FTP server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
172
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
NOTE
Before logging in to the FTP server, you can run the set net-manager vpn-instance
command to configure a default VPN instance. After that, the default VPN instance is used
in the FTP operation.
l If the IP address of the server is an IPv6 address, do as follows:
– In the user view, establish a connection to the FTP server.
Run:
ftp ipv6 host [ port-number ]
The router is connected to the FTP server.
– In the FTP view, establish a connection to the FTP server.
1.
In the user view,Run:
ftp
The FTP view is displayed.
2.
Run:
open ipv6 host-ipv6-address [ port-number ]
The router is connected to the FTP server.
----End
8.6.4 Operating Files by Using FTP Commands
After logging in to a FTP server, you can operate files by using FTP commands. File operations
include configuring a file transmission method, checking online help about FTP commands,
uploading or downloading files, and managing directories and files.
Context
After logging in to the FTP server, you can perform the following operations:
l
Configure a data type for transmission files and a file transmission method.
l
Check the online help about FTP commands in the FTP client view.
l
Upload local files to the remote FTP server, or download files from the FTP server and
save them locally.
l
Create directories on or delete directories from the FTP server.
l
Display information about a specified remote directory or a file of the FTP server, or delete
a specified file from the FTP server.
After logging in to the router that functions as a client and entering the FTP client view, you can
perform the following steps:
Procedure
l
Configuring data type and transmission mode for the file.
– Run:
ascii | binary
The data type of the file to be transmitted is ascii or binary mode.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
173
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
NOTE
FTP supports the ASCII type and the binary type. Their differences are as follows:
l In ASCII transmission mode, ASCII characters are used to separate carriage returned from
line feeds.
l In binary transmission mode, characters can be transferred without format conversion or
formatting.
The selection of the FTP transmission mode is client-customized. The system defaults to the
ASCII transmission mode. The client can use a mode switch command to switch between the
ASCII mode and the binary mode. The ASCII mode is used to transmit .txt files and the binary
mode is used to transmit binary files.
– Run:
passive
The passive file transfer mode is configured.
– Run:
verbose
The verbose mode for FTP is enabled.
When verbose is enabled, all FTP responses are displayed. After file transmission, the
statistics about transmission efficiency will be displayed.
l
Viewing online help of the FTP command.
remotehelp [ command ]
The online help of the FTP command is displayed.
l
Upload or download files.
– Upload or download a file.
– Run:
put local-filename [ remote-filename ]
The local file is uploaded to the remote FTP server.
– Run:
get remote-filename [ local-filename ]
The FTP file is downloaded from the FTP server and saved to the local file.
– Upload or download multiple files.
– Run the mput local-filenames command to upload multiple local files
synchronously to the remote FTP server.
– Run the mget remote-filenames command to download multiple files from the FTP
server and save them locally.
NOTE
l When you are uploading or downloading files, and the prompt command is run in the FTP client
view to enable the file transmission prompt function, the system will prompt you to confirm the
uploading or downloading operation.
l If the prompt command is run again in the FTP client view, the file transmission prompt function
will be disabled.
l
Run one or more commands in the following order to manage directories.
– Run:
cd pathname
The working path of the remote FTP server is specified.
– Run:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
174
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
cdup
The working path of the FTP server is switched to the upper-level directory.
– Run:
pwd
The specified directory of the FTP server is displayed.
– Run:
lcd [ local-directory ]
The directory of the FTP client is displayed or changed.
– Run:
mkdir remote-directory
A directory is created on the FTP server.
– Run:
rmdir remote-directory
A directory is removed from the FTP server.
NOTE
l The directory to be created can comprise letters and digits, but not special characters such as
<, >, ?, \ and :.
l When running the mkdir /abc command, you create a sub-directory named "abc".
l
Run one or more commands in the following to manage files.
– Run:
ls [ remote-filename ] [ local-filename ]
The specified directory or file on the remote FTP server is displayed.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
– Run:
dir [ remote-filename ] [ local-filename ]
The specified directory or file on the local FTP server is displayed.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
– Run:
delete remote-filename
The specified file on the FTP server is deleted.
If the directory name is not specified when a specific remote file is selected, the system
searches the working directory for the specific file.
When local-filename is set, related information about the file can be downloaded locally.
----End
8.6.5 Changing Login Users
After logging in to an FTP server, you can change the username on the client and re-log in to
the server with the new username.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
175
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Context
From the NE80E/40E (an FTP client) that you have logged in to, you can log in to the FTP server
by using another username without logging out of the FTP client view. The established FTP
connection is identical with that established by running the ftp command.
Perform the following steps on the router that functions as a client:
Procedure
l
Run:
user user-name [ password ]
The user that have logged in to the FTP server is changed and the new user logs in to the
server.
When the username that is used to log in to the FTP server is changed, the original
connection between the user and the FTP server is interrupted.
----End
8.6.6 Disconnecting from the FTP Server
You can terminate the connection with the FTP server and return to the user view or FTP view.
Context
You can select different commands to terminate the connection with the FTP server in the FTP
client view.
Do as follows on the router that serves as the client.
Procedure
l
Run the following commands according to different configurations.
– Run:
bye
Or,
quit
The client router is disconnected from the FTP server.
Return to the user view.
– Run:
close
Or,
disconnect
The client router is disconnected from the FTP server.
Return to the FTP view.
----End
8.6.7 Checking the Configuration
After the configurations of accessing other devices by using FTP are complete, you can view
the source parameters configured on the FTP client.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
176
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Prerequisite
The configurations of accessing other devices by using FTP are complete.
Procedure
l
Run the display ftp-client command to view the source parameters of the FTP client.
----End
Example
Run the display ftp-client command to view the source parameters of the FTP client.
<HUAWEI> display ftp-client
The source address of FTP client is 1.1.1.1.
8.7 Accessing Files on Another Device by Using SFTP
SFTP is a secure FTP service. After the router is configured as an SFTP client. The SFTP server
authenticates the client and encrypts data in both directions to provide secure data transmission.
8.7.1 Establishing the Configuration Task
Before establishing the configuration task of accessing files on another device by using SFTP,
familiarize yourself with the applicable environment, complete the pre-configuration tasks, and
obtain the required data. This can help you complete the configuration task quickly and
accurately.
Applicable Environment
SFTP is short for SSH FTP that is a secure FTP protocol. SFTP is on the basis of SSH. It ensures
that users can log in to a remote device securely for file management and transmission, and
enhances the security in data transmission. In addition, you can log in to a remote SSH server
from the router that functions as an SFTP client.
Pre-configuration Tasks
Before establishing the configuration task of accessing files on another device by using SFTP,
complete the following tasks:
l
Configuring a reachable route between the client and SSH server
Data Preparation
To access files on another device by using SFTP, you need the following data:
Issue 02 (2011-09-10)
No.
Data
1
(Optional) Source address of the device that functions as the SFTP client
2
(Optional) Name of the SSH server
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
177
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
No.
Data
3
(Optional) Public key that is assigned by the client to the SSH server
4
IPv4 or IPv6 address or host name of the SSH server
5
Number of the port monitored by the SSH server,Preferred encrypted algorithm from
the SFTP client to the SSH server,Preferred encrypted algorithm from the SSH server
to the SFTP client,Preferred HMAC algorithm from the SFTP client to the SSH
server,Preferred HMAC algorithm from the SSH server to the SFTP client,Preferred
algorithm of key exchange,Name of the outgoing interface,Source address
The user information for logging in to the SSH server
6
Name and directory of a specified file on the SSH server
8.7.2 (Optional) Configuring a Source IP Address for an SFTP Client
You can configure a source IP address for an SFTP client. Then, you can set up an SFTP
connection from the SFTP client to the server through a specific route by using this source IP
address.
Context
An IP address is configured for an interface on the router and functions as the source IP address
of an FTP connection. In this manner, security checks can be implemented.
The source address of a client can be configured as a source interface or a source IP address.
Do as follows on a router that functions as an SFTP client.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
sftp client-source { -a source-ip-address | -i interface-type interface-number }
A source IP address is configured for an SFTP client.
----End
8.7.3 Configuring the First Successful Login to Another Device
(Enabling the First-Time Authentication on the SSH Client)
After the first-time authentication on the SSH client is enabled, the SFTP client does not check
the validity of the RSA public key when logging in to the SSH server for the first time.
Context
If the first-time authentication on the SSH client is enabled, the SFTP client does not check the
validity of the RSA public key when logging in to the SSH server for the first time. After the
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
178
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
login, the system automatically allocates the RSA public key and saves it for authentication in
next login.
Do as follows on the router that serves as an SSH client:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ssh client first-time enable
The first-time authentication on the SSH client is enabled.
By default, the first-time authentication on the SSH client is disabled.
NOTE
l The purpose of enabling the first-time authentication on the SSH client is to skip checking the validity
of the RSA public key of the SSH server when the STelnet client logs in to the SSH server for the first
time. The check is skipped because the STelnet server has not saved the RSA public key of the SSH
server.
l If the first-time authentication is not enabled on the SSH client, when the STelnet client logs in to the
SSH server for the first time, the STelnet client fails to pass the check on the RSA public key validity
and cannot log in to the server.
TIP
To ensure that the STelnet client can log in to the SSH server at the first attempt, you can assign the RSA
public key in advance to the SSH server on the SSH client in addition to enabling the first-time
authentication on the SSH client.
----End
8.7.4 Configuring the First Successful Login to Another Device
(Allocating an RSA Public Key to the SSH Server)
To configure the first successful login to another device on the SSH client, you need to allocate
an RSA public key to the SSH server before the login.
Context
If the first-time authentication is not enabled on the SSH client, when the SFTP client logs in to
the SSH server for the first time, the SFTP client fails to pass the check on the RSA public key
validity and cannot log in to the server.
Do as follows on the router functioning as an SSH client:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
179
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
rsa peer-public-key key-name
The public key view is displayed.
Step 3 Run:
public-key-code begin
The public key editing view is displayed.
Step 4 Run:
hex-data
The public key is edited.
The public key must be a string of hexadecimal alphanumeric characters. It is automatically
generated by an SSH client. You can run the display rsa local-key-pair public command to
view a generated public key.
NOTE
Before being assigned to the SSH server, the assigned peer RSA public key must be obtained from the SSH
server and must be configured on the SSH client. Then, the STelnet client client can successfully undergo
the validity check on the RSA public key of the SSH server.
Step 5 Run:
public-key-code end
Quit the public key editing view.
l If the specified hex-data is invalid, the public key cannot be generated after the peer-publickey end command is run.
l If the specified key-name is deleted in other views, the system prompts that the key does not
exist after the peer-public-key end command is run and the system view is displayed.
Step 6 Run:
peer-public-key end
Return to the system view from the public key view.
Step 7 Run:
ssh client servername assign rsa-key keyname
The RSA public key is assigned to the SSH server.
NOTE
If the RSA public key stored on the SSH client becomes invalid, run the undo ssh client servername
assign rsa-key command to cancel the association between the SSH client and the SSH server. Then, run
the ssh client servername assign rsa-key keyname command to allocate a new RSA public key to the SSH
server.
----End
8.7.5 Connecting to Other Devices by Using SFTP
You can log in to the SSH server from the SSH client through SFTP.
Context
The command of enabling the SFTP client is similar to that of the STelnet. When accessing the
SSH server, the SFTP can carry the source address and the name of the VPN instance and choose
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
180
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
the key exchange algorithm, encrypted algorithm and HMAC algorithm, and configure the
keepalive function.
Do as follows on the router that serves as an SSH client.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 According to the address type of the SSH server, select and perform one of the two configurations
below.
l For IPv4 addresses,
Run:
sftp [ -a source-address | -i interface-type interface-number ] host-ipv4
[ port ] [ [ public-net | -vpn-instance vpn-instance-name ] | [ prefer_kex
{ dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher { des | 3des |
aes128 } ] | [ prefer_stoc_cipher { des | 3des | aes128 } ] |
[ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] | [ prefer_stoc_hmac
{ sha1 | sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval [ -kc
alivecountmax ] ]
You can log in to the SSH server through SFTP.
l For IPv6 addresses,
Run:
sftp ipv6 [ -a source-address ] host-ipv6 [ -i interface-type interfacenumber ] [ port ] [ [ prefer_kex { dh_group1 | dh_exchange_group } ] |
[ prefer_ctos_cipher { des | 3des | aes128 } ] | [ prefer_stoc_cipher { des |
3des | aes128 } ] | [ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] |
[ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval
[ -kc alivecountmax ] ]
----End
8.7.6 Operating Files by Using SFTP Commands
You can manage directories and files on the SSH server from the SFTP client, and check the
command help on the SFTP client.
Context
After logging in to the SSH server from the SFTP client, you can perform the following
operations on the SFTP client:
l
Create or delete a directory on the SSH server, and display the current working directory,
the specified directory and information about the file in the specified directory.
l
Change a file name, delete a file, display a file list, and upload or download a file.
l
Displaying the SFTP client command help.
After logging in to the router that functions as an SSH client and entering the SFTP client view,
you can perform the following steps:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
181
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
l
Managing the directory
Perform the following as required:
– Run:
cd [ remote-directory ]
The current operating directory of users is changed.
– Run:
cdup
The operating directory of users is switched to the upper-level directory.
– Run:
pwd
The current operating directory of users is displayed.
– Run:
dir / ls [ remote-directory ]
The file list in the specified directory is displayed.
– Run:
rmdir remote-directory & <1-10>
– The directory on the server is deleted.
– Run:
mkdir remote-directory
A directory is created on the server.
l
Managing the file
Perform the following as required:
– Run:
rename old-name new-name
The name of the specified file on the server is changed.
– Run:
get remote-filename [local-filename]
The file on the remote server is downloaded.
– Run:
put local-filename [remote-filename]
The local file is uploaded to the remote server.
– Run:
remove remote-filename
The file on the server is removed.
l
Displaying the SFTP client command help
help [all | command-name ]
The SFTP client command help is displayed.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
182
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.7.7 Checking the Configuration
After logging in to another device by using SFTP, you can view the source address of the SSH
client, the mappings between all SSH servers and the RSA public keys on the client, the global
configurations of the SSH servers, and the sessions between the SSH servers and the client.
Prerequisite
The configuration of accessing files on another device by using SFTP is complete.
Procedure
l
Run the display sftp-client command to check the source IP address of the SFTP client on
the SSH client.
l
Run the display ssh server-info command to check the mapping between the SSH server
and the RSA public key on the SSH client.
----End
Example
Run the display sftp-client command on the client to view the source parameters of the device
functioning as an SFTP client.
<HUAWEI> display sftp-client
The source address of SFTP client is 1.1.1.1
Run the display ssh server-info command to view the mappings between all servers and the
RSA public keys on the SSH client.
<HUAWEI> display ssh server-info
Server Name(IP)
Server public key name
________________________________________________________________________
1000::1
1000::1
10.164.39.223
10.164.39.223
11.11.11.23
11.11.11.23
10.164.39.204
10.164.39.204
10.164.39.222
10.164.39.222
8.8 Configuration Examples
This section describes examples for access another device. The examples explain networking
requirements, configuration notes, and configuration roadmap.
8.8.1 Example for Logging in to Another Device by Using Telnet
This section provides an example for logging in to another device by using Telnet.In this
example, the authentication mode and password are configured for users to log in through Telnet.
Networking Requirements
As shown in Figure 8-7, users can telnet Router A but cannot telnet Router B. The route between
Router A and Router B is reachable. In this case, users can telnet Router B from Router A to
remotely configure and manage Router B.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
183
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Figure 8-7 Networking diagram for logging in to another device by using Telnet
Session
Network
Session
GE1/0/1
1.1.1.1/24
Network
GE1/0/1
2.1.1.1/24
RouterA
PC
RouterB
Configuration Roadmap
The configuration roadmap is as follows:
1.
On Router B, configure the authentication mode and password for users on Router A to log
in to Router B..
2.
Configure a Telnet server port number on Router B to ensure that users log in through this
port only.
Data Preparation
To complete the configuration, you need the following data:
l
Host address of Router B is 2.1.1.1
l
Password hello for users' login
l
Telnet server port number is 1028
Procedure
Step 1 Configure the authentication mode and password for Telnet services on Router B.
<HUAWEI> system-view
[HUAWEI] sysname RouterB
[RouterB] user-interface vty 0 4
[RouterB-ui-vty0-4] authentication-mode password
[RouterB-ui-vty0-4] set authentication password simple hello
[RouterB-ui-vty0-4] quit
To configure an ACL for Telnetting another device, run the following commands on Router B.
[RouterB] acl 2000
[RouterB-acl-basic-2000] rule permit source 1.1.1.1 0
[RouterB-acl-basic-2000] quit
[RouterB] user-interface vty 0 4
[RouterB-ui-vty0-4] acl 2000 inbound
[RouterB-ui-vty0-4] quit
NOTE
It is optional to configure an ACL for Telnet services.
Step 2 Log in to Router B from Router A through Telnet.
<HUAWEI> system-view
[HUAWEI] sysname RouterA
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
184
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[RouterA] quit
<RouterA> telnet 2.1.1.1
Trying 2.1.1.1 ...
Press CTRL+K to abort
Connected to 2.1.1.1 ...
Login authentication
Password:
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
The current login time is 2010-02-22 14:31:01.
<RouterB>
Step 3 Configure a Telnet server port number on Router B.
<RouterB> system-view
[RouterB] telnet server port 1028
Warning: This operation will cause all the online Telnet users to be offline. Co
ntinue?[Y/N]: y
Info: Succeeded in changing the listening port of telnet server.
Step 4 Use the port number 1028 to log in to Router B from Router A through Telnet.
<RouterA> telnet 2.1.1.1 1028
Trying 2.1.1.1 ...
Press CTRL+K to abort
Connected to 2.1.1.1 ...
Login authentication
Password:
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
The current login time is 2010-02-22 14:33:48.
<RouterB>
----End
Configuration Files
l
Configuration file of Router A
#
sysname RouterA
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 1.1.1.1 255.255.255.0
#
return
l
Configuration file of Router B
#
sysname RouterB
#
acl number 2000
rule 5 permit source 1.1.1.1 0
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 2.1.1.1 255.255.255.0
#
user-interface con 0
user-interface vty 0 4
acl 2000 inbound
set authentication password simple hello
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
185
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.8.2 Example for Logging in to Another Device by Using the Telnet
Redirection Function
This section describes an example for logging in to another device on the network by using the
Telnet redirection function. This allows users to manage the device remotely.
Networking Requirements
As shown in Figure 8-8, there is a reachable route between the PC and Router A, and Router A
is not connected with Router B on the IP network. To manage Router B remotely, you can enable
the Telnet redirection function on Router A, and connect the asynchronous serial interface of
Router A to the serial interface of Router B. Then, you can log in toRouter B remotely from the
terminal PC by using the specified port number of Router A to manage Router B.
Figure 8-8 Networking of logging in to another device by using the Telnet redirection function
Session
Network
GE1/0/1
10.1.1.1/24
Aux Console
RouterA
PC
RouterB
Configuration Roadmap
The configuration roadmap is as follows:
1.
Use the AUX interface of Router A to connect withRouter B.
2.
Enable the Telnet redirection function on Router A.
Data Preparation
To complete the configuration, you need the following data:
l
IP address of Router A: 10.1.1.1
Procedure
Step 1 Open the AUX interface of Router A.
<HUAWEI> system-view
[HUAWEI] sysname RouterA
[RouterA] interface Aux 0/0/1
[RouterA-Aux0/0/1] undo shutdown
[RouterA-Aux0/0/1] quit
Step 2 Enable the redirection function on Router A.
[RouterA] user-interface aux 0
[RouterA-ui-aux0] undo shell
[RouterA-ui-aux0] redirect
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
186
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Step 3 View the port number.
<RouterA> display tcp status
TCPCB
Tid/Soid Local Add:port
37b26538 6 /1
0.0.0.0:21
37b20808 135/4
0.0.0.0:22
15b8a270 135/1
0.0.0.0:23
32fa2744 135/15
0.0.0.0:2033
32facdac 135/17
0.0.0.0:4033
32f9e4b4 88 /1
0.0.0.0:6000
2ff6bbcc 135/9
10.137.217.226:23
Foreign Add:port
0.0.0.0:0
0.0.0.0:0
0.0.0.0:0
0.0.0.0:0
0.0.0.0:0
0.0.0.0:0
10.138.77.21:2993
VPNID State
23553 Listening
23553 Listening
23553 Listening
23553 Listening
23553 Listening
23553 Listening
0
Established
Step 4 Verify the configuration.
Run the telnet 10.1.1.1 2033(or 4033) command on the PC to log in to Router B.
----End
Configuration Files
l
Configuration file of Router A
#
sysname RouterA
#
interface Aux0/0/1
undo shutdown
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.1.1.1 255.255.255.0
#
user-interface con 0
user-interface aux 0
undo shell
redirect
#
return
8.8.3 Example for Logging in to Another Device by Using Telnet on
a VPN
This section provides an example for logging in to another device by using Telnet on a VPN.In
this example, the authentication mode and password are configured for users on a VPN so as to
log in to the router through Telnet.
Networking Requirements
As shown in Figure 8-9, Router A and Router B can ping through each other. Users can log in
to Router A from Router B through Telnet.
Figure 8-9 Networking diagram for logging in to another device by using Telnet on a VPN
GE1/0/0
1.1.1.1 24
IP Network
RouterA
Issue 02 (2011-09-10)
GE1/0/0
1.1.1.2 24
VPN tt
RouterB
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
187
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure a VPN on Router B.
2.
Configure the authentication mode and the password of the user interface VTY0 to VTY4
on Router B.
3.
Set the user to enter the password to log in to Router B from Router A in Telnet mode.
Data Preparation
To complete the configuration, you need the following data:
l
Host IP address of Router B
l
Authentication mode and password
l
VPN instance
Procedure
Step 1 Configure the VPN instance and IP address.
# Configure Router A.
<HUAWEI> system-view
[HUAWEI] sysname RouterA
[RouterA] interface gigabitethernet1/0/0
[RouterA-GigabitEthernet1/0/0] undo shutdown
[RouterA-GigabitEthernet1/0/0] ip address 1.1.1.1 24
# Configure Router B.
<HUAWEI> system-view
[HUAWEI] sysname RouterB
[RouterB] ip vpn-instance tt
[RouterB-vpn-instance-tt] route-distinguisher 1000:1
[RouterB-vpn-instance-tt] quit
[RouterB] interface gigabitethernet1/0/0
[RouterB-GigabitEthernet1/0/0] undo shutdown
[RouterB-GigabitEthernet1/0/0] ip binding vpn-instance tt
[RouterB-GigabitEthernet1/0/0] ip address 1.1.1.2 24
[RouterB-GigabitEthernet1/0/0] quit
[RouterB] quit
Step 2 Configure the Telnet authentication mode and password on Router B.
<RouterB> system-view
[RouterB] user-interface vty 0 4
[RouterB-ui-vty0-4] authentication-mode password
[RouterB-ui-vty0-4] set authentication password simple hello
[RouterB-ui-vty0-4] quit
To configure Telnet terminal services based on the ACL, do as follows on Router B.
[RouterB] acl 2000
[RouterB-acl-basic-2000] rule permit vpn-instance tt source 1.1.1.1 0
[RouterB-acl-basic-2000] quit
[RouterB] user-interface vty 0 4
[RouterB-ui-vty0-4] acl 2000 inbound
NOTE
Configuring Telnet terminal services based on the ACL is optional.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
188
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Step 3 Verify the configuration.
After the configuration is complete, you can log in to Router B from Router A through Telnet.
<RouterA> telnet 1.1.1.2
Trying 1.1.1.2 ...
Press CTRL+K to abort
Connected to 1.1.1.2 ...
Login authentication
Password:
Note: The max number of VTY users is 10, and the current number
of VTY users on line is 1.
<RouterB>
----End
Configuration Files
l
Configuration file of Router A
#
sysname RouterA
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 1.1.1.1 255.255.255.0
#
return
l
Configuration file of Router B
#
sysname RouterB
#
ip vpn-instance tt
route-distinguisher 1000:1
#
acl number 2000
rule 5 permit vpn-instance tt source 1.1.1.1 0
#
interface GigabitEthernet1/0/0
undo shutdown
ip binding vpn-instance tt
ip address 1.1.1.2 255.255.255.0
#
user-interface con 0
user-interface vty 0 4
acl 2000 inbound
set authentication password simple hello
#
return
8.8.4 Example for Configuring the Device as the STelnet Client to
Connect to the SSH Server
This section provides an example for logging in to another device by using STelnet.In this
example, the local key pairs are generated on the STelnet client and the SSH server; the public
RSA key is generated on the SSH server and then bound to the STelnet client. In this manner,
the STelnet client can connect to the SSH server.
Networking Requirements
As shown in Figure 8-10, after the STelnet service is enabled on the SSH server, the STelnet
client can log in to the SSH server with the password, RSA, password-rsa, or all authentication
mode. In this example, the Huawei router functions as an SSH server.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
189
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Two users client001 and client002 are configured to log in to the SSH server in the authentication
mode of password and RSA respectively.
Figure 8-10 Networking diagram for logging in to another device by Using STelnet
SSH Server
GE1/0/1
10.10.1.1/16
GE1/0/1
10.10.2.2/16
GE1/0/1
10.10.3.3/16
Client 001
Client 002
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure Client001 and Client002 to log in to the SSH server in different authentication
modes.
2.
Create a local RSA key pair on the STelnet client Client002 and the SSH server, and bind
the client client002 to an RSA key to authenticate the client when the client attempts to log
in to the server.
3.
Enable STelnet service on the SSH server.
4.
Set the service type of Client001 and Client002 to STelnet.
5.
Enable first-time authentication on the SSH client.
6.
Users Client001 and Client002 log in to the SSH server through STelnet.
Data Preparation
To complete the configuration, you need the following data:
l
Client001 with the password as huawei and adopt the password authentication.
l
Client002, adopt the RSA authentication and assign the public key RsaKey001 to
Client002.
l
IP address of the SSH server is 10.10.1.1.
Procedure
Step 1 Generate a local key pair on the server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: SSH Server_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
..........++++++++++++
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
190
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
...................................++++++++
......++++++++
Step 2 Create an SSH user on the server.
NOTE
The SSH user can be authenticated in four modes: password, RSA, password-rsa, and all.
l When the SSH adopts the password or password-rsa authentication mode, configure a local user with
the same name.
l When the SSH user adopts the RSA, password-rsa, or all authentication modes, the server should save
the RSA public key for the SSH client.
# Configure the VTY user interface.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
l Create SSH user Client001.
# Configure the password authentication for the SSH user Client001.
[SSH Server] ssh user client001
[SSH Server] ssh user client001 authentication-type password
# Configure the password of the SSH user Client001 to huawei.
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa] local-user client001 password cipher huawei
Server-aaa] local-user client001 service-type ssh
Server-aaa] quit
l Create SSH user Client002.
# Configure the RSA authentication for the SSH user Client002.
[SSH Server] ssh user client002
[SSH Server] ssh user client002 authentication-type rsa
Step 3 Configure the RSA public key on the server.
# Generate a local key pair on the client.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] rsa local-key-pair create
# View the RSA public key generated on the client.
[client002] display rsa local-key-pair public
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
1D7E3E1B
0203
010001
Host public key for PEM format code:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7
yP3y98tnTlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b
---- END SSH2 PUBLIC KEY ---Public key code for pasting into OpenSSH authorized_keys file :
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
191
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7yP3y98tn
TlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b rsa-key
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
BCFAC085 49A2E70E 1284F901 937D7B63 D7A077AB
D2797280 4BCA86C0 4CD18B70 5DFAC9D3 9A3F3E74
9B2AF4CB 69FA6483 E87DA590 7B47721A 16391E27
1C76ABAB 743C568B 1B35EC7A 8572A096 BCA9DF0E
BC89D3DB 5A83698C 9063DB39 A279DD89
0203
010001
[client002]
# Send the RSA public key generated on the client software to the server.
[SSH Server]rsa peer-public-key RsaKey001
Enter "RSA public key" view, return system view with "peer-public-key end".
[SSH Server-rsa-public-key]public-key-code begin
Enter "RSA key code" view, return last view with "public-key-code end".
[SSH Server-rsa-key-code]3047
[SSH Server-rsa-key-code]0240
[SSH Server-rsa-key-code] BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
[SSH Server-rsa-key-code] 203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
[SSH Server-rsa-key-code] EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
[SSH Server-rsa-key-code] 1D7E3E1B
[SSH Server-rsa-key-code]0203
[SSH Server-rsa-key-code]010001
[SSH Server-rsa-key-code]public-key-code end
[SSH Server-rsa-public-key]peer-public-key end
Step 4 Bind the SSH user Client002 to the RSA public key of the SSH client.
[SSH Server] ssh user client002 assign rsa-key RsaKey001
Step 5 Enable the STelnet service on the SSH server.
# Enable the STelnet service.
[SSH Server] stelnet server enable
Step 6 Configure the STelnet service for the SSH users Client001 and Client002.
[SSH Server] ssh user client001 service-type stelnet
[SSH Server] ssh user client002 service-type stelnet
Step 7 Connect the STelnet client to the SSH server.
# For the first login, you need to enable the first authentication on SSH client.
Enabling the first authentication on Client001.
<HUAWEI> system-view
[HUAWEI] sysname client001
[client001] ssh client first-time enable
Enabling the first authentication on Client002.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] ssh client first-time enable
# Client001 of the STelnet connects to SSH server with the password authentication mode . Enter
the user name and password.
<client001> system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
192
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[client001] stelnet 10.10.1.1
Please input the username:client001
Trying 10.10.1.1 ...
Press CTRL+K to abort
Connected to 10.10.1.1 ...
The server is not authenticated. Continue to access it?(Y/N):y
Save the server's public key?(Y/N):y
The server's public key will be saved with the name 10.10.1.1. Please wait...
Enter password:
Enter the password huawei. It shows that the login is successful, as follows:
Info: The max number of VTY users is 20, and the number
of current VTY users on line is 6.
The current login time is 2010-09-06 11:42:42.
<SSH Server>
# Connect the STelnet client Client002 to the SSH server with the RSA authentication mode.
<client002> system-view
[client002] stelnet 10.10.1.1
Please input the username: client002
Trying 10.10.1.1 ...
Press CTRL+K to abort
Connected to 10.10.1.1 ...
The server is not authenticated. Continue to access it?(Y/N):y
Save the server's public key?(Y/N):y
The server's public key will be saved with the name 10.10.1.1. Please wait...
Info: The max number of VTY users is 20, and the number
of current VTY users on line is 6.
The current login time is 2010-09-06 11:42:42.
<SSH Server>
Step 8 Verify the configuration.
After the configuration, run the display ssh server status and display ssh server session
commands. You can view that the STelnet service is enabled and the STelnet client is connected
to the SSH server successfully.
# Display the SSH status.
[SSH Server] display ssh server status
SSH version
: 1.99
SSH connection timeout
: 60 seconds
SSH server key generating interval : 0 hours
SSH Authentication retries
: 3 times
SFTP server
: Disable
Stelnet server
: Enable
# Display the connection of the SSH server.
[SSH Server] display ssh server session
Session 1:
Conn
: VTY 3
Version
: 2.0
State
: started
Username
: client001
Retry
: 1
CTOS Cipher
: aes128-cbc
STOC Cipher
: aes128-cbc
CTOS Hmac
: hmac-sha1-96
STOC Hmac
: hmac-sha1-96
Kex
: diffie-hellman-group1-sha1
Service Type
: stelnet
Authentication Type : password
Session 2:
Conn
: VTY 4
Version
: 2.0
State
: started
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
193
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
8 Accessing Another Device
:
:
:
:
:
:
:
:
:
client002
1
aes128-cbc
aes128-cbc
hmac-sha1-96
hmac-sha1-96
diffie-hellman-group1-sha1
stelnet
rsa
# Display the information about the SSH user.
[SSH Server] display ssh user-information
User 1:
User Name
: client001
Authentication-type : password
User-public-key-name : Sftp-directory
: Service-type
: stelnet
Authorization-cmd
: No
User 2:
User Name
: client002
Authentication-type : rsa
User-public-key-name : RsaKey001
Sftp-directory
: Service-type
: stelnet
Authorization-cmd
: No
----End
Configuration Files
l
Configuration file of the SSH server
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
3047
0240
BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB 203C8FCB BBC8FDF2 F7CB674E
519E8419 0F6B97A8 EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43 1D7E3E1B
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password cipher huawei
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.10.1.1 255.255.0.0
#
stelnet server enable
ssh user client001
ssh user client002
ssh user client001 authentication-type password
ssh user client002 authentication-type rsa
ssh user client002 assign rsa-key RsaKey001
ssh user client001 service-type stelnet
ssh user client002 service-type stelnet
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
194
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
return
l
Configuration file of Client001 on SSH client
#
sysname client001
#
interface GigabitEthernet1/0/1
ip address 10.10.2.2 255.255.0.0
#
ssh client first-time enable
#
return
l
Configuration file of Client002 on SSH client
#
sysname client002
#
interface GigabitEthernet1/0/1
ip address 10.10.3.3 255.255.0.0
#
ssh client first-time enable
#
return
8.8.5 Example for Accessing Files on Another Device by Using TFTP
In this example, the TFTP application is run on the TFTP server and the location of the source
file on the server is set. After that, you can upload and download files.
Networking Requirements
As shown in Figure 8-11, the IP address of the TFTP server is 10.111.16.160/24.
Log in to the router from the HyperTerminal and then download the file
V600R003C00SPC300.cc from the TFTP server.
Figure 8-11 Networking diagram for accessing files on another device by using TFTP
10.111.16.160/24
PC
TFTP Client
TFTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1.
Run the TFTP application on the TFTP server, and set the location of the file on the server.
2.
Use the TFTP command on the router to download the file.
3.
Use the TFTP command on the router to upload the file.
Data Preparation
To complete the configuration, you need the following data:
l
Issue 02 (2011-09-10)
The TFTP application installed on the TFTP server
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
195
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
l
The path of the file on the TFTP server
l
The destination file name and its path on the router
Procedure
Step 1 Start the TFTP server, and set its Current Directory as the directory where the
V600R003C00SPC300.cc file resides. Figure 8-12 shows the interface.
Figure 8-12 Setting the Base Directory of the TFTP server
NOTE
The display may be different depending on different TFTP server applications run in the computer.
Step 2 Log in to the router from the computer HyperTerminal and enter the following command to
download the file.
<HUAWEI>tftp 10.111.16.160 get V600R003C00SPC300.cc cfcard:/V600R003C00SPC300.cc
Info: Transfer file in binary mode.
Downloading the file from the remote TFTP server. Please wait...|
TFTP: Downloading the file successfully.
15805100 bytes received in 42734
second.
Step 3 Run the dir command to check whether the downloaded file is saved in the specified directory
on the router.
<HUAWEI> dir cfcard:
Directory of cfcard:/
Idx Attr Size(Byte)
1
-rw40
2
-rw396
3
-rw540
4
-rw2718
5
-rw14343
6
-rw1004
7
-rw6247
8
-rw14343
9
-rw- 86235884
Issue 02 (2011-09-10)
Date
Jun 24
May 19
May 19
Jun 21
May 19
Feb 05
May 19
May 16
Feb 05
2006
2006
2006
2006
2006
2001
2006
2006
2001
Time
09:30:40
15:00:10
15:00:10
17:46:46
15:00:10
09:51:22
15:00:10
14:13:42
10:23:46
FileName
private-data.txt
rsahostkey.dat
rsaserverkey.dat
1.cfg
paf.txt
vrp1.zip
license.txt
paf.txt.bak
V600R003C00SPC300.cc
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
196
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Step 4 Log in to the router from the computer HyperTerminal and enter the following command to
upload the file.
<HUAWEI> tftp 10.111.16.160 put cfcard:/vrpcfg.zip
Info: Transfer file in binary mode.
Uploading the file to the remote TFTP server. Please wait.../
TFTP: Uploading the file successfully.
1217 bytes send in 1 second.
----End
8.8.6 Example for Configuring the Access of the TFTP Server on the
Public Network When the Management VPN Instance Is Used
This part provides an example for configuring the access of the TFTP server on the public
network when the management VPN instance is used. In this example, after logging in to the
router that is configured with the management VPN instance, you can download files from the
TFTP server on the public network.
Networking Requirements
As shown in Figure 8-13, a management VPN instance is configured on the router. Users use
the VPN instance to access the FTP server from the router. To enable the client to access the
TFTP server on the public network, you need to connect the router to the TFTP server on the
public network.
Log in to the router from the HyperTerminal and then download the file
V600R003C00SPC300.cc from the TFTP server.
Figure 8-13 Networking diagram of configuring the access of the TFTP server on the public
network when the management VPN instance is used
TFTP Server
10.111.16.160/24
Network
PC
TFTP Client
Configuration Roadmap
The configuration roadmap is as follows:
1.
Run the TFTP application on the TFTP server, and set the location of the file on the server.
2.
Use the TFTP command on the router to download the file.
3.
Use the TFTP command on the router to upload the file.
Data Preparation
To complete the configuration, you need the following data:
l
Issue 02 (2011-09-10)
The TFTP application installed on the TFTP server
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
197
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
l
The path of the file on the TFTP server
l
The destination file name and its path on the router
Procedure
Step 1 Start the TFTP server, and set its Current Directory as the directory where the
V600R003C00SPC300.cc file resides. Figure 8-14 shows the interface.
Figure 8-14 Setting the Base Directory of the TFTP server
NOTE
The display may be different depending on different TFTP server applications run in the computer.
Step 2 Log in to the router from the computer HyperTerminal and enter the following command to
download the file.
<HUAWEI>tftp 10.111.16.160 public-net get V600R003C00SPC300.cc cfcard:/
V600R003C00SPC300.cc
Info: Transfer file in binary mode.
Downloading the file from the remote TFTP server. Please wait...|
TFTP: Downloading the file successfully.
15805100 bytes received in 42734
second.
Step 3 Run the dir command to check whether the downloaded file is saved in the specified directory
on the router.
<HUAWEI> dir cfcard:
Directory of cfcard:/
Idx Attr Size(Byte)
1
-rw40
2
-rw396
3
-rw540
4
-rw2718
5
-rw14343
6
-rw1004
7
-rw6247
8
-rw14343
Issue 02 (2011-09-10)
Date
Jun 24
May 19
May 19
Jun 21
May 19
Feb 05
May 19
May 16
2006
2006
2006
2006
2006
2001
2006
2006
Time
09:30:40
15:00:10
15:00:10
17:46:46
15:00:10
09:51:22
15:00:10
14:13:42
FileName
private-data.txt
rsahostkey.dat
rsaserverkey.dat
1.cfg
paf.txt
vrp1.zip
license.txt
paf.txt.bak
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
198
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9
-rw-
86235884
8 Accessing Another Device
Feb 05 2001 10:23:46
V600R003C00SPC300.cc
Step 4 Log in to the router from the computer HyperTerminal and enter the following command to
upload the file.
<HUAWEI> tftp 10.111.16.160 public-net put cfcard:/vrpcfg.zip
Info: Transfer file in binary mode.
Uploading the file to the remote TFTP server. Please wait.../
TFTP: Uploading the file successfully.
1217 bytes send in 1 second.
----End
Configuration Files
None.
8.8.7 Example for Accessing Files on Another Device by Using FTP
This section provides an example for accessing files on another device by using FTP. In this
example, a user logs in to the FTP server from the router to download system software and
configuration software from the FTP server.
Networking Requirements
As shown in Figure 8-15, the route between Router A that functions as the FTP client and the
FTP server is reachable. A user needs to download system software and configuration software
from the FTP server. The Huawei router functions as an FTP server.
Figure 8-15 Networking diagram for accessing files on another device by using FTP
GE1/0/1
2.1.1.1/24
Network
GE1/0/1
1.1.1.1/24
RouterA
FTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the user name and password for an FTP user to log in to the FTP server.
2.
Enable the FTP server on the router.
3.
Run certain login commands to log in to the FTP server.
4.
Configure the file transmission mode and directories for the client before downloading
required files from the FTP server.
Data Preparation
To complete the configuration, you need the following data:
l
User name huawei and password 123 for a user's login
l
IP address of the FTP server, that is, 1.1.1.1
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
199
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
8 Accessing Another Device
Target file and its location on Router A
Procedure
Step 1 Configure an FTP user on the FTP server.
<HUAWEI> system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user huawei password simple 123
[HUAWEI-aaa] local-user huawei service-type ftp
[HUAWEI-aaa] local-user huawei ftp-directory cfcard:
[HUAWEI-aaa] quit
Step 2 Enable the FTP server.
[HUAWEI] ftp server enable
Step 3 Log in to the FTP server from Router A.
<HUAWEI> ftp 1.1.1.1
Trying 1.1.1.1 ...
Press CTRL+K to abort
Connected to 1.1.1.1.
220 FTP service ready.
User(1.1.1.1:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[ftp]
Step 4 On Router A, configure the binary format as the file transfer mode and flash:/ as the working
directory.
[ftp] binary
200 Type set to I.
[ftp] lcd cfcard:/
Info: Local directory now cfcard:.
Step 5 On Router A, download the latest system software from the remote FTP server.
[ftp] get V600R003C00SPC300.cc
200 Port command okay.
150 Opening ASCII mode data connection for V600R003C00SPC300.cc.
226 Transfer complete.
FTP: 1127 byte(s) received in 0.156 second(s) 7.22Kbyte(s)/sec.
[ftp] quit
You can run the dir command to check whether the required file is downloaded to the client.
----End
Configuration Files
l
Configuration file on the FTP server
#
FTP server enable
#
aaa
local-user huawei password simple 123
local-user huawei service-type ftp
local-user huawei ftp-directory cfcard:
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 1.1.1.1 255.255.255.0
Return
l
Configuration file on the FTP client
#
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
200
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
interface GigabitEthernet1/0/1
undo shutdown
ip address 2.1.1.1 255.255.255.0
Return
8.8.8 Example for Configuring the Access of the FTP Server on the
Public Network When the Management VPN Instance Is Used
This part provides an example for configuring the access of the FTP server on the public network
when the management VPN instance is used. In this example, after logging in to the router that
is configured with the management VPN instance, you can download files from the FTP server
on the public network.
Networking Requirements
As shown in Figure 8-16, a management VPN instance is configured on Router A. Users use
the VPN instance to access the FTP server. To enable Router A to access the FTP server on the
public network, you need to connect the router to the FTP server on the public network.
The route between router that functions as the FTP client and the FTP server is reachable. A
user needs to download system software and configuration software from the FTP server on the
public network.
Figure 8-16 Networking diagram of configuring the access of the FTP server on the public
network when the management VPN instance is used
GE1/0/1
2.1.1.1/24
Network
GE1/0/1
1.1.1.1/24
RouterA
FTP Server
Configuration Roadmap
1.
Log in to the FTP server from the FTP client on the Public Network.
2.
Download the system files form the server to the storage devices on the client side.
Data Preparation
To complete the configuration, you need the following data:
l
IP address of the FTP server is 1.1.1.1
l
User name huawei and password huawei
l
The destination file name and its position in the router
Procedure
Step 1 Log in to the FTP server from the router.
<HUAWEI> ftp 1.1.1.1 public-net
Trying 1.1.1.1
Press CTRL+K to abort
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
201
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Connected to 1.1.1.1
220 FTP service ready.
User(ftp 1.1.1.1:(none)):huawei
331 Password required for huawei
Password:
230 User logged in.
Step 2 Configure the transmission mode to the binary format and configure the directory of the cfcard
memory on the router..
[ftp] binary
200 Type set to I.
[ftp] lcd cfcard:/
Info: Local directory now cfcard:.
Step 3 Download the newest system software from the remote FTP server on the router.
[ftp] get V600R003C00SPC300.cc
200 Port command okay.
150 Opening ASCII mode data connection for V600R003C00SPC300.cc.
226 Transfer complete.
FTP: 1127 byte(s) received in 0.156 second(s) 7.22Kbyte(s)/sec.
[ftp] quit
----End
Configuration Files
None.
8.8.9 Example for Accessing Files on Another Device by Using SFTP
In this example, the local key pairs are generated on the SFTP client and the SSH server
respectively; the public RSA key is generated on the SSH server and bind the RSA public key
to the SFTP client. In this manner, the SFTP client can connect to the SSH server.
Networking Requirements
As shown in Figure 8-17, after the SFTP service is enabled on the SSH server, the SFTP Client
can log in to the SSH server with the password, RSA, password-rsa, or all authentication. In this
example, the Huawei router functions as an SSH server.
Two users client001 and client002 are configured to log in to the SSH server in the authentication
mode of password and RSA respectively.
Figure 8-17 Networking diagram for accessing files on another device by using SFTP
SSH Server
GE1/0/1
10.10.1.1/16
GE1/0/1
10.10.2.2/16
GE1/0/1
10.10.3.3/16
Client 001
Issue 02 (2011-09-10)
Client 002
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
202
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure Client001 and Client002 to log in to the SSH server in different authentication
modes.
2.
Create a local RSA key pair on the STelnet client Client002 and the SSH server, and bind
the client client002 to an RSA key to authenticate the client when the client attempts to log
in to the server.
3.
Enable the SFTP service on the SSH server.
4.
Configure the service mode and authorization directory for the SSH user.
5.
Client001 and Client002 log in to the SSH server by using SFTP to access files on the
server.
Data Preparation
To complete the configuration, you need the following data:
l
Client001 with the password as huawei and adopt the password authentication.
l
Client002, adopt the RSA authentication and assign the public key RsaKey001 to
Client002.
l
IP address of the SSH server is 10.10.1.1.
Procedure
Step 1 Generate a local key pair on the server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: SSH Server_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.........++++++++
......................++++++++
......................+++++++++
.....+++++++++
Step 2 Create an SSH user on the server.
NOTE
The SSH user can be authenticated in four modes: password, RSA, password-rsa, and all.
l When the SSH adopts the password or password-rsa authentication, configure a local user with the
same name.
l When the SSH user adopts the RSA, password-rsa, or all authentication, the server should save the
RSA public key for the SSH client.
# Configure the VTY user Interface.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
l Create Client001 for the SSH user.
# Create an SSH user with the name Client001. The authentication mode is password.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
203
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[SSH Server] ssh user client001
[SSH Server] ssh user client001 authentication-type password
# Set huawei as the password for the Client001 of the SSH user.
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa] local-user client001 password simple huawei
Server-aaa] local-user client001 service-type ssh
Server-aaa] quit
l Create Client002 for the SSH user.
# Create an SSH user with user name Client002 and RSA authentication.
[SSH Server] ssh user client002
[SSH Server] ssh user client002 authentication-type rsa
Step 3 Configure the RSA public key of the server.
# Generate a local key pair on the client.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] rsa local-key-pair create
# View the RSA public key generated on the client.
[client002] display rsa local-key-pair public
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
1D7E3E1B
0203
010001
Host public key for PEM format code:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7
yP3y98tnTlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b
---- END SSH2 PUBLIC KEY ---Public key code for pasting into OpenSSH authorized_keys file :
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7yP3y98tn
TlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b rsa-key
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
BCFAC085 49A2E70E 1284F901 937D7B63 D7A077AB
D2797280 4BCA86C0 4CD18B70 5DFAC9D3 9A3F3E74
9B2AF4CB 69FA6483 E87DA590 7B47721A 16391E27
1C76ABAB 743C568B 1B35EC7A 8572A096 BCA9DF0E
BC89D3DB 5A83698C 9063DB39 A279DD89
0203
010001
[client]
# Send the RSA public key generated on the client to the server.
[SSH Server] rsa peer-public-key RsaKey001
Enter "RSA public key" view, return system view with "peer-public-key end".
[SSH Server-rsa-public-key] public-key-code begin
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
204
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Enter "RSA key code" view, return last view with "public-key-code end".
[SSH Server-rsa-key-code] 3047
[SSH Server-rsa-key-code] 0240
[SSH Server-rsa-key-code] BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
[SSH Server-rsa-key-code] 203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
[SSH Server-rsa-key-code] EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
[SSH Server-rsa-key-code] 1D7E3E1B
[SSH Server-rsa-key-code] 0203
[SSH Server-rsa-key-code] 010001
[SSH Server-rsa-key-code] public-key-code end
[SSH Server-rsa-public-key] peer-public-key end
Step 4 Bind the RSA public key of SSH client to Client002 of the SSH user.
[SSH Server] ssh user client002 assign rsa-key RsaKey001
Step 5 Enable the STelnet service on the SSH server.
# Enable the STelnet service.
[SSH Server] sftp server enable
Step 6 Configure the service type and authorized directory of the SSH user.
Two SSH users are configured on the SSH server, namely, Client001 and Client002. The
password authentication mode is configured for Client001 and the RSA authentication mode is
configured for Client002.
[SSH
[SSH
[SSH
[SSH
Server]
Server]
Server]
Server]
ssh
ssh
ssh
ssh
user
user
user
user
client001
client001
client002
client002
service-type sftp
sftp-directory cfcard:
service-type sftp
sftp-directory cfcard:
Step 7 Connect the STelnet client to the SSH server.
# For the first login, you need to enable the first authentication on the SSH client.
Enabling the first authentication on Client001.
<HUAWEI> system-view
[HUAWEI] sysname client001
[client001] ssh client first-time enable
Enabling the first authentication on Client002.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] ssh client first-time enable
# Connect the STelnet client Client001 to the SSH server with the password authentication mode.
<client001> system-view
[client001] sftp 10.10.1.1
Please input the username:client001
Trying 10.10.1.1 ...
Press CTRL+K to abort
The server is not authenticated. Continue to access it? [Y/N] :y
Save the server's public key? [Y/N] : y
The server's public key will be saved with the name 10.10.1.1. Please wait.
..
Enter password:
sftp-client>
# Connect the STelnet client Client002 to the SSH server with the RSA authentication mode.
<client002> system-view
[client002] sftp 10.10.1.1
Please input the username: client002
Trying 10.10.1.1 ...
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
205
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Press CTRL+K to abort
The server is not authenticated. Continue to access it? [Y/N] :y
Save the server's public key? [Y/N] :y
The server's public key will be saved with the name 10.10.1.1. Please wait.
..
sftp-client>
Step 8 Verify the configuration.
After the configuration, run the display ssh server status and display ssh server session
commands. You can view that the STelnet service is enabled and the SFTP client is connected
to the SSH server successfully.
# Display the SSH status.
[SSH Server] display ssh server status
SSH version : 1.99
SSH connection timeout : 60 seconds
SSH server key generating interval : 0 hours
SSH Authentication retries : 3 times
SFTP server: Enable
Stelnet server: Disable
# Display the connection of the SSH server.
[SSH Server] display ssh server session
Session 1:
Conn
: VTY 3
Version
: 2.0
State
: started
Username
: client001
Retry
: 1
CTOS Cipher
: aes128-cbc
STOC Cipher
: aes128-cbc
CTOS Hmac
: hmac-sha1-96
STOC Hmac
: hmac-sha1-96
Kex
: diffie-hellman-group1-sha1
Service Type
: sftp
Authentication Type : password
Session 2:
Conn
: VTY 4
Version
: 2.0
State
: started
Username
: client002
Retry
: 1
CTOS Cipher
: aes128-cbc
STOC Cipher
: aes128-cbc
CTOS Hmac
: hmac-sha1-96
STOC Hmac
: hmac-sha1-96
Kex
: diffie-hellman-group1-sha1
Service Type
: sftp
Authentication Type : rsa
# Display information about the SSH user.
[SSH Server]display ssh user-information
User 1:
User Name
: client001
Authentication-type : password
User-public-key-name : Sftp-directory
: cfcard:
Service-type
: sftp
Authorization-cmd
: No
User 2:
User Name
: client002
Authentication-type : rsa
User-public-key-name : RsaKey001
Sftp-directory
: cfcard:
Service-type
: sftp
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
206
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Authorization-cmd
8 Accessing Another Device
: No
----End
Configuration Files
l
Configuration file of the SSH server.
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
3047
0240
C4989BF0 416DA8F2 2675910D 7F2997E8 5573A35D 0163FD4A FAC39A6E 0F45F325
A4E3AA1D 54692B04 C6A28D3D C58DE2E8 E0D58D65 7A25CF92 A74D21F9 E917182B
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password simple huawei
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.10.1.1 255.255.0.0
#
sftp server enable
ssh user client001
ssh user client002
ssh user client001 authentication-type password
ssh user client002 authentication-type rsa
ssh user client002 assign rsa-key RsaKey001
ssh user client001 service-type sftp
ssh user client002 service-type sftp
ssh user client001 sftp-directory cfcard:.
ssh user client002 sftp-directory cfcard:.
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
Return
l
Configuration file of Client001 on the SSH client
#
sysname client001
#
interface GigabitEthernet1/0/1
ip address 10.10.2.2 255.255.0.0
#
ssh client first-time enable
#
return
l
Configuration file of Client002 on the SSH client
#
sysname client002
#
interface GigabitEthernet1/0/1
ip address 10.10.3.3 255.255.0.0
#
ssh client first-time enable
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
207
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
8.8.10 Example for Configuring the Access of the SFTP Server on
the Public Network When the Management VPN Instance Is Used
This part provides an example for configuring the access of the SFTP server on the public
network when the management VPN instance is used. In this example, after generating the local
key pair on the SFTP client and SSH server, generating the RSA public key on the SSH server,
and binding the RSA public key to the client, you can connect the SFTP client to the SFTP server
on the public network when using the management VPN instance.
Networking Requirements
As shown in Figure 8-18, a management VPN instance is configured for Client001 and
Client002. Users use the VPN instance to access the FTP server. To enable the client to access
the SFTP server on the public network, you need to connect the router to the SFTP server on the
public network.
The Huawei router functions as an SSH server. Two users client001 and client002 are configured
to access the SSH server in the authentication mode of password and RSA respectively.
Figure 8-18 Networking diagram of configuring the access of the SFTP server on the public
network when the management VPN instance is used
SSH Server
GE1/0/1
10.10.1.1/16
GE1/0/1
10.10.2.2/16
GE1/0/1
10.10.3.3/16
Client 001
Client 002
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure Client001 and Client002 to log in to the SSH server in different authentication
modes..
2.
Create a local RSA key pair on the STelnet client Client002 and the SSH server, and bind
the client client002 to an RSA key to authenticate the client when the client attempts to log
in to the server.
3.
Enable the SFTP service on the SSH server.
4.
Configure the service mode and authorization directory for the SSH user.
5.
Configure Client001 and Client002 to log in to the SSH server on the Public Network
through SFTP..
Data Preparation
To complete the configuration, you need the following data:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
208
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
l
Client001 with the password as huawei and adopt the password authentication.
l
Client002, adopt the RSA authentication and assign the public key RsaKey001 to
Client002.
l
IP address of the SSH server is 10.10.1.1.
Procedure
Step 1 Generate a local key pair on the server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: HUAWEI_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.........++++++++
......................++++++++
......................+++++++++
.....+++++++++
Step 2 Create an SSH user on the server.
NOTE
The SSH user can be authenticated in four modes: password, RSA, password-rsa, and all.
l When the SSH adopts the password or password-rsa authentication, configure a local user with the
same name.
l When the SSH user adopts the RSA, password-rsa, or all authentication, the server should save the
RSA public key for the SSH client.
# Configure the VTY user Interface.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
l Create Client001 for the SSH user.
# Create an SSH user with the name Client001. The authentication mode is password.
[SSH Server] ssh user client001
[SSH Server] ssh user client001 authentication-type password
# Set huawei as the password for the Client001 of the SSH user.
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa] local-user client001 password simple huawei
Server-aaa] local-user client001 service-type ssh
Server-aaa] quit
l Create Client002 for the SSH user.
# Create an SSH user with user name Client002 and RSA authentication.
[SSH Server] ssh user client002
[SSH Server] ssh user client002 authentication-type rsa
Step 3 Configure the RSA public key of the server.
# Generate a local key pair on the client.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] rsa local-key-pair create
# View the RSA public key generated on the client.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
209
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[client002] display rsa local-key-pair public
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
1D7E3E1B
0203
010001
Host public key for PEM format code:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7
yP3y98tnTlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b
---- END SSH2 PUBLIC KEY ---Public key code for pasting into OpenSSH authorized_keys file :
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7yP3y98tn
TlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b rsa-key
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
BCFAC085 49A2E70E 1284F901 937D7B63 D7A077AB
D2797280 4BCA86C0 4CD18B70 5DFAC9D3 9A3F3E74
9B2AF4CB 69FA6483 E87DA590 7B47721A 16391E27
1C76ABAB 743C568B 1B35EC7A 8572A096 BCA9DF0E
BC89D3DB 5A83698C 9063DB39 A279DD89
0203
010001
[client]
# Send the RSA public key generated on the client to the server.
[SSH Server] rsa peer-public-key RsaKey001
Enter "RSA public key" view, return system view with "peer-public-key end".
[SSH Server-rsa-public-key] public-key-code begin
Enter "RSA key code" view, return last view with "public-key-code end".
[SSH Server-rsa-key-code] 3047
[SSH Server-rsa-key-code] 0240
[SSH Server-rsa-key-code] BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
[SSH Server-rsa-key-code] 203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
[SSH Server-rsa-key-code] EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
[SSH Server-rsa-key-code] 1D7E3E1B
[SSH Server-rsa-key-code] 0203
[SSH Server-rsa-key-code] 010001
[SSH Server-rsa-key-code] public-key-code end
[SSH Server-rsa-public-key] peer-public-key end
Step 4 Bind the RSA public key of SSH client to Client002 of the SSH user.
[SSH Server] ssh user client002 assign rsa-key RsaKey001
Step 5 Enable the STelnet service on the SSH server.
# Enable the STelnet service.
[SSH Server] sftp server enable
Step 6 Configure the service type and authorized directory of the SSH user.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
210
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Two SSH users are configured on the SSH server, namely, Client001 and Client002. The
password authentication mode is configured for Client001 and the RSA authentication mode is
configured for Client002.
[SSH
[SSH
[SSH
[SSH
Server]
Server]
Server]
Server]
ssh
ssh
ssh
ssh
user
user
user
user
client001
client001
client002
client002
service-type sftp
sftp-directory cfcard:
service-type sftp
sftp-directory cfcard:
Step 7 Connect the STelnet client to the SSH server.
# For the first login, you need to enable the first authentication on the SSH client.
Enabling the first authentication on Client001.
<HUAWEI> system-view
[HUAWEI] sysname client001
[client001] ssh client first-time enable
Enabling the first authentication on Client002.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] ssh client first-time enable
# Connect the STelnet client Client001to the SSH server with the password authentication mode.
<client001> system-view
[client001] sftp 10.10.1.1 public-net
Please input the username:client001
Trying 10.10.1.1 ...
Press CTRL+K to abort
Connected to 10.10.1.1 ...
Enter password:
sftp-client>
# Connect the STelnet client Client002 to the SSH server with the RSA authentication mode.
<client002> system-view
[client002] sftp 10.10.1.1 public-net
Please input the username: client002
Trying 10.10.1.1 ...
Press CTRL+K to abort
Connected to 10.10.1.1 ...
sftp-client>
Step 8 Verify the configuration.
After the configuration, run the display ssh server status and display ssh server session
commands. You can view that the STelnet service is enabled and the SFTP client is connected
to the SSH server successfully.
# Display the SSH status.
[SSH Server] display ssh server status
SSH version : 1.99
SSH connection timeout : 60 seconds
SSH server key generating interval : 0 hours
SSH Authentication retries : 3 times
SFTP server: Enable
STELNET server: Disable
# Display the connection of the SSH server.
[SSH Server] display ssh server session
Session 1:
Conn
: VTY 3
Version
: 2.0
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
211
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
Session 2:
Conn
Version
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
8 Accessing Another Device
:
:
:
:
:
:
:
:
:
:
started
client001
1
aes128-cbc
aes128-cbc
hmac-sha1-96
hmac-sha1-96
diffie-hellman-group1-sha1
sftp
password
:
:
:
:
:
:
:
:
:
:
:
:
VTY 4
2.0
started
client002
1
aes128-cbc
aes128-cbc
hmac-sha1-96
hmac-sha1-96
diffie-hellman-group1-sha1
sftp
rsa
# Display information about the SSH user.
[SSH Server] display ssh user-information
User 1:
User Name
: client001
Authentication-type : password
User-public-key-name : Sftp-directory
: cfcard:
Service-type
: sftp
Authorization-cmd
: No
User 2:
User Name
: client002
Authentication-type : rsa
User-public-key-name : RsaKey001
Sftp-directory
: cfcard:
Service-type
: sftp
Authorization-cmd
: No
----End
Configuration Files
l
Configuration file of the SSH server.
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
3047
0240
C4989BF0 416DA8F2 2675910D 7F2997E8 5573A35D 0163FD4A FAC39A6E 0F45F325
A4E3AA1D 54692B04 C6A28D3D C58DE2E8 E0D58D65 7A25CF92 A74D21F9 E917182B
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password simple huawei
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.10.1.1 255.255.0.0
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
212
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
#
sftp server enable
ssh user client001
ssh user client002
ssh user client001 authentication-type password
ssh user client002 authentication-type rsa
ssh user client002 assign rsa-key RsaKey001
ssh user client001 service-type sftp
ssh user client002 service-type sftp
ssh user client001 sftp-directory cfcard:.
ssh user client002 sftp-directory cfcard:.
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
Return
l
Configuration file of Client001 on the SSH client
#
sysname client001
#
interface GigabitEthernet1/0/1
ip address 10.10.2.2 255.255.0.0
#
ssh client first-time enable
#
return
l
Configuration file of Client002 on the SSH client
#
sysname client002
#
interface GigabitEthernet1/0/1
ip address 10.10.3.3 255.255.0.0
#
ssh client first-time enable
#
return
8.8.11 Example for Accessing the SSH Server Through Other Port
Numbers
This section provides an example for accessing the SSH server through other port numbers.In
this example, the monitoring port number of the SSH server is set to a port number other than
the standard monitoring port number so that only valid users can set up connections with the
SSH server.
Networking Requirements
The standard monitored port number of the SSH protocol is 22. The frequent malicious accesses
to the standard port consume bandwidth and affect the performance of the server, and other users
cannot access the standard port.
After the number of the port monitored by the SSH server is set to other port numbers, the attacker
does not know the change of the number of the monitored port and keeps sending socket
connection requests with the standard port 22. After detecting that the port number inthe
connection requests is not the number of the monitored port, the SSH does not set up the socket
connection.
Thus, only the valid user can set up the socket connection through the non-standard monitored
port set by the SSH server, and follow the procedure of negotiating the SSH version number,
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
213
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
negotiating the algorithm, generating the session key, authenticating, sending session request,
and performing the interactive session.
The Huawei router functions as an SSH server. The client client001 is configured to log in to
the SSH server by using STelnet in the authentication mode of password; the client client002 is
configured to log in to the SSH server by using SFTP in the authentication mode of RSA.
Figure 8-19 Networking diagram of accessing the SSH server through other port numbers
SSH Server
GE1/0/1
10.10.1.1/16
GE1/0/1
10.10.2.2/16
GE1/0/1
10.10.3.3/16
Client 001
Client 002
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure Client001 and Client002 to log in to the SSH server in different authentication
modes..
2.
Create a local RSA key pair on the STelnet client Client002 and the SSH server, and bind
the client client002 to an RSA key to authenticate the client when the client attempts to log
in to the server.
3.
Enable the STelnet and SFTP service on the SSH server.
4.
Configure the service mode and authorization directory of the SSH user.
5.
Configure the interception port number for the SSH server so that the client can access the
server through other port numbers.
6.
Client001 and Client002 log in to the SSH server through STelnet and SFTP respectively.
Data Preparation
To complete the configuration, you need the following data:
l
Client001 with the password as huawei and adopt the password authentication.
l
Client002, adopt the RSA authentication and assign the public key RsaKey001 to
Client002.
l
IP address of the SSH server is 10.10.1.1.
l
Number of the port monitored by the SSH server is 1025.
Procedure
Step 1 Generate a local key pair on the server.
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
214
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
The key name will be: SSH Server_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
..........++++++++++++
...................................++++++++
......++++++++
Step 2 Configure the RSA public key of the server.
# Generate a local key pair of client on the client.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] rsa local-key-pair create
# View the RSA public key generated on the client.
[client002] display rsa local-key-pair public
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
1D7E3E1B
0203
010001
Host public key for PEM format code:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7
yP3y98tnTlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b
---- END SSH2 PUBLIC KEY ---Public key code for pasting into OpenSSH authorized_keys file :
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQC/815LxhvXhvkHtd59Z3DD5f0XqyA8j8u7yP3y98tn
TlGehBkPa5eo6pH8S7nhiDZedL/VTGh3Z6ica0Mdfj4b rsa-key
=====================================================
Time of Key pair created: 16:38:51 2007/5/25
Key name: client002_Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
BCFAC085 49A2E70E 1284F901 937D7B63 D7A077AB
D2797280 4BCA86C0 4CD18B70 5DFAC9D3 9A3F3E74
9B2AF4CB 69FA6483 E87DA590 7B47721A 16391E27
1C76ABAB 743C568B 1B35EC7A 8572A096 BCA9DF0E
BC89D3DB 5A83698C 9063DB39 A279DD89
0203
010001
# Send the RSA public key generated on the client to the server.
[SSH Server] rsa peer-public-key RsaKey001
Enter "RSA public key" view, return system view with "peer-public-key end".
[SSH Server-rsa-public-key] public-key-code begin
Enter "RSA key code" view, return last view with "public-key-code end".
[SSH Server-rsa-key-code] 3047
[SSH Server-rsa-key-code] 0240
[SSH Server-rsa-key-code] BFF35E4B C61BD786 F907B5DE 7D6770C3 E5FD17AB
[SSH Server-rsa-key-code] 203C8FCB BBC8FDF2 F7CB674E 519E8419 0F6B97A8
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
215
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
[SSH
[SSH
[SSH
[SSH
[SSH
[SSH
8 Accessing Another Device
Server-rsa-key-code] EA91FC4B B9E18836 5E74BFD5 4C687767 A89C6B43
Server-rsa-key-code] 1D7E3E1B
Server-rsa-key-code] 0203
Server-rsa-key-code] 010001
Server-rsa-key-code] public-key-code end
Server-rsa-public-key] peer-public-key end
Step 3 Create an SSH user on the server.
NOTE
The SSH user can be authenticated in four modes: password, RSA, password-rsa, and all.
l When the SSH adopts the password or password-rsa authentication mode, configure a local user at the
same name.
l When the SSH user adopts the RSA, password-rsa, or all authentication modes, the server should save
the RSA public key for the SSH client.
# Configure the VTY user Interface.
[SSH
[SSH
[SSH
[SSH
Server] user-interface vty 0 4
Server-ui-vty0-4] authentication-mode aaa
Server-ui-vty0-4] protocol inbound ssh
Server-ui-vty0-4] quit
l Create Client001 for the SSH user.
# Create an SSH user with the name Client001. The authentication mode is password.
[SSH Server] ssh user client001
[SSH Server] ssh user client001 authentication-type password
# Set huawei as the password toSSH user Client001.
[SSH
[SSH
[SSH
[SSH
Server] aaa
Server-aaa] local-user client001 password simple huawei
Server-aaa] local-user client001 service-type ssh
Server-aaa] quit
# Configure Client001 with service type of STelnet.
[SSH Server] ssh user client001 service-type stelnet
l Create Client002 for the SSH user.
Create an SSH user with the name of Client002 and RSA authentication, bound to RSA public
key of the SSH client.
[SSH Server] ssh user client002
[SSH Server] ssh user client002 authentication-type rsa
[SSH Server] ssh user client002 assign rsa-key RsaKey001
# Configure the service type of Client002 as SFTP and the authorization directory.
[SSH Server] ssh user client002 service-type sftp
[SSH Server] ssh user client002 sftp-directory cfcard:
Step 4 Enable the STelnet service and the SFTP service on the SSH server.
# Enable the STelnet service and the SFTP service.
[SSH Server] stelnet server enable
[SSH Server] sftp server enable
Step 5 Configure a new number of the port monitored by the SSH server.
[SSH Server] ssh server port 1025
Step 6 Connect the STelnet client to the SSH server.
# For the first login, you need to enable the first authentication on SSH client.
Enabling the first authentication on Client001.
<HUAWEI> system-view
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
216
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[HUAWEI] sysname client001
[client001] ssh client first-time enable
Enabling the first authentication on Client002.
<HUAWEI> system-view
[HUAWEI] sysname client002
[client002] ssh client first-time enable
# Connect the STelnet client to the SSH server through the new port number.
[client001] stelnet 10.10.1.1 1025
Please input the username:client001
Trying 10.10.1.1 ...
Press CTRL+K to abort
Connected to 10.10.1.1 ...
he server is not authenticated. Continue to access it?(Y/N):y
Save the server's public key?(Y/N):y
he server's public key will be saved with the name 10.10.1.1. Please wait...
Enter password:
Enter the password Huawei and view as follows:
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
<SSH Server>
# Connect the SFTP client to the SSH server through the new port number.
[client002] sftp 10.10.1.1 1025
Please input the username:client002
Trying 10.10.1.1 ...
Press CTRL+K to abort
The server is not authenticated. Continue to access it?(Y/N):y
Save the server's public key?(Y/N):y
The server's public key will be saved with the name 10.10.1.1. Please wait.
..
sftp-client>
Step 7 Verify the configuration.
The attacker fails to access the SSH server through port 22.
[client002] sftp 10.10.1.1
Please input the username:client002
Trying 10.10.1.1 ...
Press CTRL+K to abort
Error: Failed to connect to the server.
After the configuration, run the display ssh server status and display ssh server session
commands. You can view the number of the port monitored by the SSH server and that the
STelnet client or SFTP client is connected to the SSH server successfully.
# Display the SSH status.
[SSH Server] display ssh server status
SSH version : 1.99
SSH connection timeout : 60 seconds
SSH server key generating interval : 0 hours
SSH Authentication retries : 3 times
SFTP server: Enable
STELNET server: Enable
SSH server port: 1025
# Display the connection of the SSH server.
[SSH Server] display ssh server session
Session 1:
Conn
: VTY 3
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
217
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Version
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
Session 2:
Conn
Version
State
Username
Retry
CTOS Cipher
STOC Cipher
CTOS Hmac
STOC Hmac
Kex
Service Type
Authentication Type
8 Accessing Another Device
:
:
:
:
:
:
:
:
:
:
:
2.0
started
client001
1
aes128-cbc
aes128-cbc
hmac-sha1-96
hmac-sha1-96
diffie-hellman-group1-sha1
stelnet
password
:
:
:
:
:
:
:
:
:
:
:
:
VTY 4
2.0
started
client002
1
aes128-cbc
aes128-cbc
hmac-sha1-96
hmac-sha1-96
diffie-hellman-group1-sha1
sftp
rsa
----End
Configuration Files
l
Configuration file of the SSH server.
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
3047
0240
C4989BF0 416DA8F2 2675910D 7F2997E8 5573A35D 0163FD4A FAC39A6E 0F45F325
A4E3AA1D 54692B04 C6A28D3D C58DE2E8 E0D58D65 7A25CF92 A74D21F9 E917182B
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password simple huawei
local-user client001 service-type ssh
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.10.1.1 255.255.0.0
#
sftp server enable
stelnet server enable
ssh server port 1025
ssh user client001
ssh user client002
ssh user client001 authentication-type password
ssh user client002 authentication-type RSA
ssh user client002 assign rsa-key RsaKey001
ssh user client001 service-type stelnet
ssh user client002 service-type sftp
ssh user client002 sftp-directory cfcard:.
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
218
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
return
l
Configuration file of Client001 on the SSH client
#
sysname client001
#
interface GigabitEthernet1/0/1
ip address 10.10.2.2 255.255.0.0
#
ssh client first-time enable
#
return
l
Configuration file of Client002 on the SSH client
#
sysname client002
#
interface GigabitEthernet1/0/1
ip address 10.10.3.3 255.255.0.0
#
ssh client first-time enable
#
return
8.8.12 Example for an SSH Client in the Public Network to Access
an SSH Server in the Private Network
In this example, SSH attributes of users on the public network are configured so as to access the
SSH server on the private network through STelnet or SFTP.
Networking Requirements
As shown in Figure 8-20, PE1 as an SSH client resides on an MPLS backbone network, and
CE1 as an SSH server is located at a private network of AS 65410. The users in the public
network can safely access and manage CE1 on the private network through PE1.
The Huawei router functions as an SSH server. The client client001 is configured to log in to
the SSH server by using STelnet in the authentication mode of password; the client client002 is
configured to log in to the SSH server by using SFTP in the authentication mode of RSA.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
219
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Figure 8-20 Networking diagram of configuring the SSH client in public network accessing the
SSH server in the private network
MPLS Backbone
AS:100
Loopback1
1.1.1.9/32
PE1
(SSH
Client)
CE1
(SSH
server)
Loopback1
2.2.2.9/32
POS1/0/1
100.1.1.1/30
POS1/0/1
100.1.1.2/30
GE1/0/1
10.1.1.2/24
Loopback1
3.3.3.9/32
POS1/0/1
200.1.1.2/30
P
GE1/0/1
10.1.1.1/24
POS1/0/2
200.1.1.1/30
PE2
GE1/0/1
10.1.2.2/24
GE1/0/1
10.1.2.1/24
CE2
VPN Site
VPN Site
Configuration Roadmap
The roadmap for configuring SSH supporting access from the private network as follows:
1.
Configure a VPN instance on the PE functioning as an SSH client so that the CE can access
the PE.
2.
Set up EBGP peer relationships between PEs and CEs and import VPN routes.
3.
Create a local RSA key pair on the STelnet client Client002 and the SSH server, and bind
the client client002 to an RSA key to authenticate the client when the client attempts to log
in to the server.
4.
Enable the STelnet and SFTP service on the SSH server.
5.
Users in the public network access devices in the private network through STelent and
SFTP.
Data Preparation
To complete the configuration, you need the following data.
l
Name of vpn-instance vpn1 on PE
l
VPN-target on PE is 111:1
l
IP address 10.1.1.2 of PE1; IP address 10.1.2.2 of PE2
l
Client001 with the password as huawei and adopt the password authentication
l
Client002, adopt the RSA authentication and assign the public key RsaKey001 to Client002
l
IP address of the SSH server CE1 on the private network, that is, 10.1.1.1
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
220
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Procedure
Step 1 Configure the MPLS backbone network
With IGP configured on the MPLS backbone network, the PE on the backbone network can
communicate with P; configure the MPLS basic capability and MPLS LDP, and create LDP
LSPs.
The detailed configurations are not mentioned here. For more information, refer to the
configuration file of this example.
Step 2 Configure the VPN instance. Configure VPN on PE and connect CE to PE.
# Configure PE1.
[PE1] ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] route-distinguisher 100:1
[PE1-vpn-instance-vpn1] vpn-target 111:1 both
[PE1-vpn-instance-vpn1] quit
[PE1] interface gigabitethernet 1/0/1
[PE1-GigabitEthernet1/0/1] ip binding vpn-instance vpn1
[PE1-GigabitEthernet1/0/1] ip address 10.1.1.2 24
[PE1-GigabitEthernet1/0/1] quit
# Configure PE2.
[PE2] ip vpn-instance vpn1
[PE2-vpn-instance-vpn1] route-distinguisher 200:1
[PE2-vpn-instance-vpn1] vpn-target 111:1 both
[PE2-vpn-instance-vpn1] quit
[PE2] interface gigabitethernet 1/0/1
[PE2-GigabitEthernet1/0/1] ip binding vpn-instance vpn1
[PE2-GigabitEthernet1/0/1] undo shutdown
[PE2-GigabitEthernet1/0/1] ip address 10.1.2.2 24
[PE2-GigabitEthernet1/0/1] quit
# Configure IP addresses of interfaces on CEs as shown in Figure 8-20. The detailed
configurations are not mentioned here.
After the configuration, run the display ip vpn-instance verbose command on PE. You can
view the configuration of VPN. Each PE can ping through the accessed CE.
NOTE
In case of several VPN interfaces bound with PE, you have to run the ping -vpn-instance vpn-instancename -a source-ip-address dest-ip-address command to ping the CE that connects to the peer PE. The
source IP address must be specified. Otherwise, it may fail to ping through.
Take PE1 and CE1 for example:
[PE1] display ip vpn-instance verbose
Total VPN-Instances configured : 1
VPN-Instance Name and ID : vpn1, 1
Create date : 2007/06/08 11:42:58
Up time : 0 days, 00 hours, 03 minutes and 27 seconds
Route Distinguisher : 100:1
Export VPN Targets : 111:1
Import VPN Targets : 111:1
Label policy : label per route
The diffserv-mode Information is :
uniform
The ttl-mode Information is :
uniform
Interfaces : GigabitEthernet2/0/0
[PE1] ping -vpn-instance vpn1 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=260 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=70 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=60 ms
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
221
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=90 ms
--- 10.1.1.1 ping statistics --5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/108/260 ms
Step 3 Establish EBGP peer relationship between PEs and CEs and import VPN router.
# Configure CE1.
[CE1] bgp
[CE1-bgp]
[CE1-bgp]
[CE1-bgp]
65410
peer 10.1.1.2 as-number 100
import-route direct
quit
# Configure PE1.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] peer 10.1.1.1 as-number 65410
[PE1-bgp-vpn1] import-route direct
[PE1-bgp-vpn1] quit
[PE1-bgp] quit
# Configure CE2.
[CE2] bgp
[CE2-bgp]
[CE2-bgp]
[CE2-bgp]
65420
peer 10.1.2.2 as-number 100
import-route direct
quit
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1] peer 10.1.2.1 as-number 65420
[PE2-bgp-vpn1] import-route direct
[PE2-bgp-vpn1] quit
[PE2-bgp] quit
After configuration, run the display bgp vpnv4 vpn-instance peer command on PE. You can
view that the BGP peer relationship between PE and CE is created and in the established state.
Take the peer relationship between PE 1 and CE 1 as an example.
[PE1] display bgp vpnv4 vpn-instance vpn1 peer
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers : 1
Peers in established state : 1
Peer
V
AS MsgRcvd MsgSent OutQ
Up/Down
State
10.1.1.1
4
65410
3
3
0 00:00:37 Established
PrefRcv
1
# Establish MP-BGP peer relationship between PEs.
The detailed configurations are not mentioned here. For more information, refer to the
configuration file of this example.
Step 4 Generate a local key pair on the server.
[CE1] rsa local-key-pair create
The key name will be: CE1_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
222
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
..........++++++++++++
...................................++++++++
......++++++++
Step 5 Configure the RSA public key of the server.
# Generate a local key pair of client on the client.
[PE1] rsa local-key-pair create
The key name will be: PE1_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]: 768
Generating keys...
.......++++++++++++
..........++++++++++++
...................................++++++++
......++++++++
# View the RSA public key generated on the client.
[PE1] display rsa local-key-pair public
=====================================================
Time of Key pair created: 12:02:09 2007/6/8
Key name: PE1_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
BC011055 8BCCB887 384E5A14 1EF982A8 CA44A376
87787138 3BDB1FF0 D21F05D8 41BECF56 B2FA0695
8F76F1B2 5D3E2F35 A8051CE1 E0234274 9D8BB20D
E2EE8EB5
0203
010001
Host public key for PEM format code:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1yc2EAAAADAQABAAAAQQC8ARBVi8y4hzhOWhQe+YKoykSjdod4cTg7
2x/w0h8F2EG+z1ay+gaVj3bxsl0+LzWoBRzh4CNCdJ2Lsg3i7o61
---- END SSH2 PUBLIC KEY ---Public key code for pasting into OpenSSH authorized_keys file :
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQC8ARBVi8y4hzhOWhQe+YKoykSjdod4cTg72x/w0h8F
2EG+z1ay+gaVj3bxsl0+LzWoBRzh4CNCdJ2Lsg3i7o61 rsa-key
=====================================================
Time of Key pair created: 12:02:09 2007/6/8
Key name: PE1_Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
9E6EDDE7 AEFF3F9F 5090ECA5 11DE117E 6660707F
23AC8DE2 BDB58E1E D46856B5 419CAEDF 3A33DD40
278C6403 24ADC2E6 B110A8ED B6CC644F 055C5437
D720D3D8 9A3F9DE5 4FE062DF F2DC443E 9092A0F4
970B8CC9 C8684678 CF0682F3 6301F5F3
0203
010001
# Send the RSA public key generated on the client to the server.
[CE1] rsa peer-public-key RsaKey001
Enter "RSA public key" view, return system view with "peer-public-key end".
[CE1-rsa-public-key] public-key-code begin
Enter "RSA key code" view, return last view with "public-key-code end".
[CE1-rsa-key-code] 3067
[CE1-rsa-key-code] 0240
[CE1-rsa-key-code] BC011055 8BCCB887 384E5A14 1EF982A8 CA44A376
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
223
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
[CE1-rsa-key-code] 87787138 3BDB1FF0 D21F05D8 41BECF56 B2FA0695
[CE1-rsa-key-code] 8F76F1B2 5D3E2F35 A8051CE1 E0234274 9D8BB20D
[CE1-rsa-key-code] E2EE8EB5
[CE1-rsa-key-code] 0203
[CE1-rsa-key-code] 010001
[CE1-rsa-key-code] public-key-code end
[CE1-rsa-public-key] peer-public-key end
[CE1-rsa-public-key] quit
Step 6 Create an SSH user on the server.
NOTE
The SSH user can be authenticated in four modes namely, password, RSA, password-rsa, and all.
l When the SSH adopts the password or password-rsa authentication, a local user must be configured
with the same name.
l When the SSH user adopts the RSA, password-rsa, or all authentication, the server should save the
RSA public key for the SSH client.
# Configure the VTY user interface.
[CE1] user-interface vty 0 4
[CE1-ui-vty0-4] authentication-mode aaa
[CE1-ui-vty0-4] protocol inbound ssh
[CE1-ui-vty0-4] quit
l Create Client001 for the SSH user.
# Create an SSH user with the name Client001. The authentication mode is password.
[CE1] ssh user client001
[CE1] ssh user client001 authentication-type password
# Set huawei as the password for the Client001 of the SSH user.
[CE1] aaa
[CE1-aaa] local-user client001 password simple huawei
[CE1-aaa] local-user client001 service-type ssh
[CE1-aaa] quit
# Configure service type of Client001 as STelnet.
[CE1] ssh user client001 service-type stelnet
l Create an SSH user with the name of Client002 and RSA authentication, bound to RSA public
key of the SSH client.
[CE1] ssh user client002
[CE1] ssh user client002 authentication-type rsa
[CE1] ssh user client002 assign rsa-key RsaKey001
# Configure the service type of Client002 as SFTP and the authorization directory.
[CE1] ssh user client002 service-type sftp
[CE1] ssh user client002 sftp-directory cfcard:
Step 7 Enable STelnet and SFTP services on the SSH server.
[CE1] stelnet server enable
[CE1] sftp server enable
Step 8 PE logs in to CE as the SSH client.
# For the first login, you need to enable the first authentication on SSH client.
[PE1] ssh client first-time enable
# Log in to the SSH server through STelnet.
[PE1] stelnet 10.1.1.1 -vpn-instance vpn1
Please input the username:client001
Trying 10.1.1.1 ...
Press CTRL+K to abort
Connected to 10.1.1.1 ...
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
224
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
The server is not authenticated. Do you continue to access it?(Y/N):y
Do you want to save the server's public key?(Y/N):y
The server's public key will be saved with the name:10.1.1.1. Please wait...
Enter password:
Enter the password huawei. The following information is displayed:
Info: The max number of VTY users is 10, and the current number
of VTY users on line is 1.
<CE1>
# Log in to the SSH server by SFTP.
[PE1] sftp 10.1.1.1 -vpn-instance vpn1
Please input the username:client002
Trying 10.1.1.1 ...
Press CTRL+K to abort
The server is not authenticated. Do you continue to access it?(Y/N):y
Do you want to save the server's public key?(Y/N):y
The server's public key will be saved with the name:10.1.1.1. Please wait...
After successful login, the following information is displayed, and then you can continue.
sftp-client>
Step 9 Check the Configuration
When running the display this command in the PE interface view, you can view that the
configuration of the VPN instance is successful; when running the display ssh server session
command on CE, you can view that the STelnet client or SFTP client is connected to the SSH
server successfully.
# View information about SSH server connection.
[PE1] display ssh server session
Session 1:
Conn
: VTY 0
Version
: 2.0
State
: started
Username
: client001
Retry
: 1
CTOS Cipher
: aes128-cbc
STOC Cipher
: aes128-cbc
CTOS Hmac
: hmac-sha1-96
STOC Hmac
: hmac-sha1-96
Kex
: diffie-hellman-group1-sha1
Service Type
: stelnet
Authentication Type : password
----End
Configuration Files
l
Configuration file of CE1
#
sysname CE1
#
rsa peer-public-key RsaKey001
public-key-code begin
3067
0260
9E6EDDE7 AEFF3F9F 5090ECA5 11DE117E 6660707F 23AC8DE2 BDB58E1E D46856B5
419CAEDF 3A33DD40 278C6403 24ADC2E6 B110A8ED B6CC644F 055C5437 D720D3D8
9A3F9DE5 4FE062DF F2DC443E 9092A0F4 970B8CC9 C8684678 CF0682F3 6301F5F3
0203
010001
public-key-code end
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
225
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
peer-public-key end
#
interface GigabitEthernet1/0/1
ip address 10.1.1.1 255.255.255.0
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
aaa
local-user client001 password simple huawei
local-user client001 service-type ssh
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
sftp server enable
stelnet server enable
ssh user client001
ssh user client002
ssh user client001 authentication-type password
ssh user client002 authentication-type RSA
ssh user client002 assign rsa-key RsaKey001
ssh user client001 service-type stelnet
ssh user client002 service-type sftp
ssh user client002 sftp-directory cfcard
#
user-interface con 0
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user-interface vty 16 20
#
return
l
Configuration file of PE1
#
sysname PE1
#
ip vpn-instance vpn1
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/1
ip binding vpn-instance vpn1
ip address 10.1.1.2 255.255.255.0
#
interface Pos1/0/1
link-protocol ppp
ip address 100.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
226
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpn1
import-route direct
peer 10.1.1.1 as-number 65410
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 100.1.1.0 0.0.0.255
#
ssh client first-time enable
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
l
Configuration file of P
#
sysname P
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Pos1/0/1
link-protocol ppp
ip address 100.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Pos1/0/2
link-protocol ppp
ip address 200.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 100.1.1.0 0.0.0.255
network 200.1.1.0 0.0.0.255
#
return
l
Configuration file of PE2
#
sysname PE2
#
ip vpn-instance vpn1
ipv4-family
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
227
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
8 Accessing Another Device
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/1
ip binding vpn-instance vpn1
ip address 10.1.2.2 255.255.255.0
#
interface Pos1/0/1
link-protocol ppp
ip address 200.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
#
ipv4-family vpn-instance vpn1
import-route direct
peer 10.1.2.1 as-number 65420
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 200.1.1.0 0.0.0.255
#
return
l
Configuration file of CE2
#
sysname CE2
#
interface GigabitEthernet1/0/1
ip address 10.1.2.1 255.255.255.0
#
bgp 65420
peer 10.1.2.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.2.2 enable
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
228
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9
9 Clock Synchronization Configuration
Clock Synchronization Configuration
About This Chapter
Clock synchronization is used to keep differences in clock frequency and phase among network
elements within a tolerable range. Effective clock synchronization improves the transmission
performance of a network.
9.1 Introduction of Clock Synchronization Configuration
Clock synchronization ensures that digital pulse signals are sent and received in a specific
timeslot.
9.2 Setting Basic Configurations for Clock Synchronization
This section describes how to set basic configurations for clock synchronization.
9.3 Configuring an External BITS Clock Source
You can run commands on the routerto configure the device to trace different types of external
BITS clock sources.
9.4 Configuring a Clock Reference Source Manually or Forcibly
This section describes how to manually or forcibly configure a clock reference source.
9.5 Configuring Clock Protection Switching Based on SSM Levels
The higher its SSM level, the more accurate a clock is. By default, a clock board uses the most
accurate clock source available.
9.6 Configuring Clock Protection Switching Based on Priorities
If clock sources are configured with different priorities, then the clock source with the second
highest priority becomes effective immediately after the clock source with the highest priority
fails.
9.7 Configuring Ethernet Clock Synchronization
Ethernet clock synchronization implements clock synchronization among devices on an IP
bearer network.
9.8 Configuration Examples of Clock Synchronization
This section provides examples for configuring clock protection switching and for configuring
Ethernet clock synchronization.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
229
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
9.1 Introduction of Clock Synchronization Configuration
Clock synchronization ensures that digital pulse signals are sent and received in a specific
timeslot.
9.1.1 Overview of Clock Synchronization Configuration
Clock synchronization ensures that digital pulse signals are sent and received in a specific
timeslot.
Definition
Synchronization must be maintained on Data Communications Networks (DCN). The sending
end places a pulse in a specified timeslot at the end of the digital pulse signal. The receiving end
extracts the pulse in the specified timeslot, so that normal communications between sending and
receiving ends are guaranteed. A clock ensures that signals are sent in a certain timeslot and then
received and extracted from that timeslot.
Purpose
Clock synchronization is used to keep differences in clock frequency and phase among network
elements on a digital network within a specific range. If the differences exceed the specified
range, bit errors and jitter occur and transmission performance is degraded.
9.1.2 Clock Synchronization Supported by the NE80E/40E
Clock Transmission
The clock signals can be transmitted on the Ethernet network, Asynchronous Transfer Mode
(ATM) network, and Synchronous Digital Hierarchy (SDH) network.
Tracing BITS Clock
For the Building Integrated Timing Supply System (BITS) clock source, the clock module
extracts Synchronization Status Messages (SSMs) from the 2.048 Mbit/s stream signals, or the
Main Processing Unit (MPU) sets a preset SSM level for the 2.048 MHz clock signals.
Stratum-3 Clock Source
The device that provides the clock signals for the local device is called the clock source. The
local device may have multiple clock sources. Include BITS0, BITS1, BITS2 and PTP.
9.2 Setting Basic Configurations for Clock Synchronization
This section describes how to set basic configurations for clock synchronization.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
230
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
9.2.1 Establishing the Configuration Task
Applicable Environment
Before configuring clock synchronization, you must set basic configurations.
Pre-configuration Tasks
None.
Data Preparation
None.
9.2.2 Setting Basic Configurations for Clock Synchronization
Context
Do as follows on every router on the clock synchronization network.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock ethernet-synchronization enable
The Ethernet clock synchronization function is enabled.
Step 3 Run:
clock source { bits0 | bits1 | bits2 | ptp } synchronization enable
The clock synchronization function is enabled.
Step 4 Run:
interface interface-type interface-number
or
controller { e1 | cpos } controller-number
The interface view is displayed.
Step 5 Run:
clock synchronization enable
The clock synchronization function is enabled on a port.
Step 6 Run:
quit
Return to the system view from the interface view.
Step 7 (Optional) Run:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
231
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
clock ssm-control { on | off }
SSM control is enabled.
By default, SSM control is enabled.
Step 8 (Optional) Run:
clock run-mode
The running mode of the Ethernet Equipment Clock (EEC) is set. By default, an EEC works in
normal mode.
Step 9 (Optional) Run:
clock switch { revertive | non-revertive }
The recovery mode for a clock is configured. By default, a clock is revertive.
Step 10 (Optional) Run:
clock wtr
The Wait to Recovery (WTR) time is configured.
By default, the WTR time is five minutes.
Step 11 (Optional) Run:
clock source-lost holdoff-time
The holdoff time is set for a clock when the timing signal is invalid.
By default, the holdoff time is 1000 ms.
Step 12 (Optional) Run:
clock max-out-ssm
The max out ssm value of the interface clock source is configured.
Step 13 (Optional) Run:
clock freq-deviation-detect enable
Clock frequency offset detection is enabled. By default, clock frequency offset detection is
disabled.
----End
9.2.3 Checking the Configuration
Procedure
l
Run:
display clock config
Check whether basic configurations for clock synchronization take effect.
----End
9.3 Configuring an External BITS Clock Source
You can run commands on the routerto configure the device to trace different types of external
BITS clock sources.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
232
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
9.3.1 Establishing the Configuration Task
Before configuring the router to trace an external BITS clock source, familiarize yourself with
the applicable environment, complete the pre-configuration tasks, and obtain the data required
the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
On a synchronous Ethernet network, if the site where the router is located has a BITS clock, the
router must be set to trace the BITS clock. The router serves as the primary clock to provide a
clock source for the entire synchronous Ethernet network.
There are four types of BITS clocks: 2.048 MHz, 2.048 Mbit/s, 1 pps, and DCLS. You can use
commands to specify the type of external BITS clock source on the clock board.
Pre-configuration Tasks
None.
Data Preparation
None.
9.3.2 Configuring the Lower Threshold of the Clock Signals Output
by the BITS Clock
Context
Do as follows on all routers on the clock synchronization network.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock bits output-threshold
The lower threshold (the lowest quality level) of clock signals output by the BITS clock is
configured.
----End
9.3.3 Configuring an External Clock Source and Its Signal Type on
the router
The router supports four types of signals (2mhz, 2mbps, dcls, and 1pps).
Context
Do as follows on every routers on the clock synchronization network.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
233
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock bits-type
An external BITS clock source and its signal type are configured.
For information about clock source IDs and signal types, refer to the HUAWEI NetEngine80E/
40E Router - Command Reference.
----End
9.3.4 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Procedure
l
Run the display clock source command to check the status and attributes of the clock
reference source.
l
Run the display clock config command to check the configuration informations of the
clock reference source.
----End
9.4 Configuring a Clock Reference Source Manually or
Forcibly
This section describes how to manually or forcibly configure a clock reference source.
9.4.1 Establishing the Configuration Task
Applicable Environment
Manually configuring the clock reference source and forcibly configuring the clock reference
source differ in the following aspects:
l
The clock reference source cannot be configured manually in the following situations:
– The clock reference source is not enabled with the clock synchronization enable
command.
– The clock reference source is in the Abnormal state.
– The quality level of the clock reference source is QL-DNU or is not the highest.
l
The clock reference source cannot be configured forcibly in the following situations:
– The clock reference source is not enabled with the clock synchronization enable
command.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
234
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
– The clock reference source is in the Abnormal state.
– The QL of the clock reference source is QL-DNU.
– The clock works in hold mode.
You can switch the mode of configuring the clock reference source from manual to forcible
through command lines.
The clock reference source should be specified on the master clock, as shown in Figure 9-1. On
Router A, the external clock interface, bits0, on the master clock board is connected to BITS0,
one reference clock source; the external clock interface, bits0, on the slave clock board is
connected to BITS1, another reference clock source. The output clock signals of BITS0 and
BITS1 are same.
Router A is manually or forcibly configured to trace the clock signal input through bits0. In
normal situations, Router A traces the BITS0 clock reference source. When the master clock
board fails, a switchover of the clock boards is performed. After that, Router A traces the BITS1
clock reference source.
Figure 9-1 Diagram of configuring the clock reference source manually
BITS0
CLK-IN
ETH
Router A
CLK-IN
ETH
Router B
Router C
BITS1
Pre-configuration Tasks
Before configuring the clock reference source manually, complete the following tasks:
Configuring an External Clock Reference Source and Its Signal Type on the device.
l
Configuring an external clock reference source
l
Configuring signal type of the external clock reference source
Data Preparation
None.
9.4.2 Configuring a Clock Reference Source
Context
Do as follows on all routers on the clock synchronization network.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
235
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Procedure
l
Configure a clock reference source manually.
1.
Run:
system-view
The system view is displayed.
2.
(Optional) Run:
clock clear [ 2msync-1 | 2msync-2 ]
Forcible specification of a clock reference source is cancelled.
If forcible specification of a clock reference source has been configured, you need to
run the clock clear command to cancel the configuration before configuring manual
specification of a clock reference source.
3.
Run:
clock manual { 2msync-1 | 2msync-2 } source interface interface-type
interface-number
or
clock manual source { bits0 | bits1 | bits2 | ptp | interface interfacetype interface-number}
A clock reference source is manually configured.
l
Configure a clock reference source forcibly.
1.
Run:
system-view
The system view is displayed.
2.
Run:
clock force { 2msync-1 | 2msync-2 } source interface interface-type
interface-number
or
clock force source { bits0 | bits1 | bits2 | ptp | interface interfacetype interface-number}
A clock reference source is forcibly configured.
----End
9.4.3 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Procedure
Step 1 Run:
display clock { config | source }
View the information about the clock source attributes.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
236
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
9.5 Configuring Clock Protection Switching Based on SSM
Levels
The higher its SSM level, the more accurate a clock is. By default, a clock board uses the most
accurate clock source available.
9.5.1 Establishing the Configuration Task
Applicable Environment
Synchronous Ethernet signals can be used to carry SSM messages. The system then selects one
clock source based on the SSM levels of all the available clock sources. If clock sources are
configured with SSM levels, the configured SSM levels are used; if clock sources are not
configured with SSM levels, the SSM levels carried in the SSM messages are extracted for use.
The SSM levels include Primary Reference Clock (PRC), primary level SSU (SSU-A), second
level SSU (SSU-B), SDH Equipment Clock (SEC), Do Not Use for synchronization (DNU),
and UNK in the descending order. If the SSM level of a clock source is DNU and SSM is enabled,
the clock source is not selected during protection switchover.
The BITS clock has two types of signal. When the BITS clock signal is 2.048 Mbit/s, the clock
board extracts the SSM from the signal. When the BITS clock signal is 2.048 MHz, set the SSM
level manually.
Pre-configuration Tasks
Before configuring protection switchover of clock sources based on SSM levels, complete the
following tasks:
l
Configuring an external clock reference source and its signal type on the device.
Data Preparation
To configure protection switchover of clock sources based on SSM levels, you need SSM levels
of clock sources.
9.5.2 Configuring the Router to Automatically Select Clock Sources
Context
Do as follows on all routers in the clock synchronization network:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock clear [ 2msync-1 | 2msync-2 ]
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
237
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
The router is configured to automatically select clock sources.
NOTE
If the clock sources are manually or forcibly specified, you need to run the clock clear command to enable
the system to automatically select clock sources. By default, the router automatically selects clock sources.
Step 3 Run:
clock run-mode normal
The Ethernet Equipment Clock (EEC) is configured to work in normal mode.
By default, the EEC works in normal mode.
----End
9.5.3 Enabling SSM
SSM must be enabled for the system to perform clock protection switching based on SSM levels.
Context
Do as follows on every router on the clock synchronization network:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock ssm-control on
SSM is enabled.
----End
9.5.4 Configuring the SSM Level of the Clock Reference Source
Context
Do as follows on the router that are connected with external clock sources:
Procedure
l
Configuring the SSM level of the clock reference source
1.
Run:
system-view
The system view is displayed.
2.
Run:
clock source { bits0 | bits1 | bits2 | ptp } ssm { prc | ssua | ssub |
sec | dnu | unk }
The SSM level of the external clock reference source is configured.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
238
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
9 Clock Synchronization Configuration
Configuring the SSM level of the clock reference source on the interface
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
or
controller { e1 | cpos } controller-number
The interface view is displayed.
3.
Run:
clock ssm { dnu | prc | sec | ssua | ssub | unk }
The SSM level of the clock reference source on the interface is configured.
----End
9.5.5 Setting a Timeslot of the 2.048 Mbit/s BITS Clock Signal to
Carry SSMs
Context
Do as follows on the router that are connected with external BITS clock sources:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock sa-bit { sa4 | sa5 | sa6 | sa7 | sa8 } source { bits0 | bits1 | bits2 }
The setting timeslot of the 2.048 Mbit/s BITS clock signal is set to carry SSMs.
----End
9.5.6 Setting the Modes of Extracting SSM Levels
Context
SSM levels can be configured in one of the following modes:
l
Forcibly configuring an SSM level
l
Extracting the SSM level from the interface
By default, the SSM level is extracted from the interface. If the SSM level is forcibly set, the
forcibly-set SSM level takes effect.
Do as follows on all routers in the clock synchronization network:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
239
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Procedure
l
Forcibly configuring the SSM levels of clock reference sources
1.
Run:
system-view
The system view is displayed.
2.
Run:
clock source { bits0 | bits1 | bits2 | ptp }ssm { dnu | prc | sec | ssua
| ssub | unk }
The SSM level of the clock reference source is configured.
NOTE
Repeat Step 2 to configure SSM levels for multiple clock reference sources.
To forcibly configure the SSM level of a clock reference source on the interface, you can
first enter the corresponding interface view and run the clock ssm { dnu | prc | sec | ssua
| ssub | unk } commands. This can achieve the same effect as that of Step 2.
l
Extracting the SSM level of the clock reference source from the interface
1.
Run:
system-view
The system view is displayed.
2.
Run:
undo clock source { bits0 | bits1 | bits2 | ptp }ssm { dnu | prc | sec |
ssua | ssub | unk }
Forcibly configuring the SSM level of a clock reference source is disabled.
To extract the SSM level of a clock reference source from the interface, you can first enter
the corresponding interface view and run the undo clock ssm command. This can achieve
the same effect as that of Step 2.
NOTE
The current version only supports extracting the SSM level of a clock reference source from the
Ethernet interface, GigabitEthernet interface and CE1 interface.
To extract the SSM level of a clock reference source from the CE1 interface , you need to configure
the frame format as crc4.
----End
9.5.7 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Procedure
l
Run:
display clock { config | source }
View the information about the clock source attributes.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
240
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
9.6 Configuring Clock Protection Switching Based on
Priorities
If clock sources are configured with different priorities, then the clock source with the second
highest priority becomes effective immediately after the clock source with the highest priority
fails.
9.6.1 Establishing the Configuration Task
Applicable Environment
When you configure protection switchover of clock sources based on priorities, you need to run
the command clock ssm-control off to disable SSM.
When there are multiple clock sources, you can set different priorities for them. Normally, the
clock uses the clock source with the highest priority. When the clock source with the highest
priority is faulty, the clock uses the clock source with the second highest priority. By default the
priority of a clock reference source is not set, it indicates that this clock reference source does
not participate in selecting the clock source.
Pre-configuration Tasks
Before configuring protection switchover of clock sources based on priorities, complete the
following tasks:
l
Configuring an external clock reference source and its signal type on the device.
Data Preparation
To configure protection switchover of clock sources based on priorities, you need the priorities
of different clock sources.
9.6.2 Configuring the Router to Automatically Select Clock Sources
Context
Do as follows on all router in the clock synchronization network:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock clear [ 2msync-1 | 2msync-2 ]
The router is configured to automatically select clock sources.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
241
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
NOTE
If the clock sources are manually or forcibly specified, you need to run the clock clear [ 2msync-1 |
2msync-2 ] command to enable the system to automatically select clock sources. By default, the router
automatically selects clock sources.
Step 3 Run:
clock run-mode normal
Set the Ethernet Equipment Clock (EEC) to work in normal mode.
By default, the EEC work in normal mode.
----End
9.6.3 Disabling SSM
Context
Do as follows on all router in the clock synchronization network:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock ssm-control off
SSM is disabled.
NOTE
When SSM is disabled, the router selects a clock source based on priorities.
----End
9.6.4 Setting Priorities of Clock Reference Sources
Context
Do as follows on all routers in the clock synchronization network.
Procedure
l
Setting priorities for the clock reference sources BITS and 1588
1.
Run:
system-view
The system view is displayed.
2.
Run:
clock source { bits0 | bits1 | bits2 | ptp } priority priority-value
Priorities are set for the clock reference sources BITS and 1588.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
242
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
– Repeat the preceding step to configure priorities for multiple clock reference
sources.
– You can set the same priority for multiple clock reference sources. The clock
reference source is selected according to the priority. In the case of the same
priority, the clock reference source is selected based on the type of the clock
reference source and port number.
l
Setting the priority of a clock reference source on the interface
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
or
controller { e1 | cpos } controller-number
The interface view is displayed.
3.
Run:
clock [ 2msync-1 | 2msync-2 ] priority priority-value
The priority of the clock reference source on the interface is set.
----End
9.6.5 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Procedure
Step 1 Run:
display clock { config | source }
View the information about the clock source attributes.
----End
9.7 Configuring Ethernet Clock Synchronization
Ethernet clock synchronization implements clock synchronization among devices on an IP
bearer network.
9.7.1 Establishing the Configuration Task
Applicable Environment
As shown in Figure 9-2, the IP and Ethernet technology is adopted on the IP bearer network
between the Radio Network Controller (RNC) and the Base Transceiver Station (BTS) in the
application of wireless service. The clock signals sent by the devices on the bearer network are
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
243
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
sent to the data communication devices that connect the BTS after pass through the Ethernet
clock synchronization. The Ethernet clock synchronization can ensure reliable quality of clock
transmission.
Figure 9-2 Networking diagram of applying Ethernet clock synchronization
BTS
FE
RNC
FE
BTS
GE
GE
GE
Router A
FE
GE
Router B
BITS
Router C
BTS
Pre-configuration Tasks
Before configuring the Ethernet clock synchronization, complete the following tasks:
l
Configuring the parameters of the link layer protocols and assign IP addresses to the
interfaces so that the link layer protocol status of the interface is Up.
l
Configuring a static route or the Interior gateway protocol (IGP) protocol to so that there
is reachable IP route between the nodes.
Data Preparation
To configure the Ethernet clock synchronization, you need the following data.
l
Slot number, sub-card number, and port number of the Ethernet clock source
9.7.2 Enabling Ethernet Clock Synchronization
Context
NOTE
Ethernet clock signals can be transmitted only after the Ethernet clock synchronization is enabled on all
the router in an IP bearer network.
Do as follows on all router in the clock synchronization network:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
244
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
clock ethernet-synchronization enable
The Ethernet clock synchronization is enabled.
----End
9.7.3 Configuring Ethernet Clock Source
Context
Do as follows on all router in the clock synchronization network:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
or
controller { e1 | cpos } controller-number
The interface view is displayed.
Step 3 Run:
clock synchronization enable
The Ethernet clock synchronization function is enabled.
Step 4 Run:
clock [ 2msync-1 | 2msync-2 ] priority priority-value
The priority of the clock reference source is configured.
Step 5 Run:
clock ssm { dnu | prc | sec | ssua | ssub | unk }
The SSM level of the clock source is configured.
----End
9.7.4 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
245
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Procedure
l
Run:
display clock { config | source }
View information about the attributes of the clock source.
----End
9.8 Configuration Examples of Clock Synchronization
This section provides examples for configuring clock protection switching and for configuring
Ethernet clock synchronization.
Follow-up Procedure
NOTE
This document takes interface numbers and link types of the NE40E-X8 as an example. In working
situations, the actual interface numbers and link types may be different from those used in this document.
9.8.1 Example for Configuring Protection Switchover of Clock
Sources
Networking Requirements
As shown in Figure 9-3, there are two BITS clock sources on the network, and the master BITS
clock source is used to synchronize the clock of the entire network. If the NEs cannot trace the
clock signal from the master BITS clock source, they change to trace the clock signal from the
slave BITS clock source. As shown in Figure 9-3, Router A to Router F trace the clock signal
from BITS0. The figure shows the direction of clock tracing in normal situations.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
246
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Figure 9-3 Networking diagram of configuring clock source tracing
BITS 0
GE1/0/0
W
GE1/0/0
E
GE2/0/0
E 10.1.1.1
GE2/0/0
W 10.1.1.2
Router A
Router B
Router F
GE2/0/0 W
E GE1/0/0
20.1.1.1
GE2/0/0 E
50.1.1.1
Router C
GE1/0/0 W
40.1.1.2
W GE1/0/0
20.1.1.2
Router E
E GE2/0/0
30.1.1.1
Router D
GE1/0/0 E
40.1.1.1
W GE2/0/0
30.1.1.2
BITS 1
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the external BITS clock signal types of Router A and Router D.
2.
Configure the priorities of all clock sources for the router.
Data Preparation
To complete the configuration, you need the following data:
Table 9-1 Clock sources of all router and the priorities
Issue 02 (2011-09-10)
Router
Current Clock
Source
Available Clock
Sources
Priority
Router A
BITS0
BITS0
1
Router A
BITS0
GE1/0/0
2
Router A
BITS0
Internal clock
3
Router B
GE1/0/0
GE1/0/0
1
Router B
GE1/0/0
GE2/0/0
2
Router B
GE1/0/0
Internal clock
3
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
247
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Router
Current Clock
Source
Available Clock
Sources
Priority
Router C
GE2/0/0
GE2/0/0
1
Router C
GE2/0/0
GE1/0/0
2
Router C
GE2/0/0
Internal clock
3
Router D
GE1/0/0
GE1/0/0
1
Router D
GE1/0/0
BITS1
2
Router D
GE1/0/0
Internal clock
3
Router E
GE1/0/0
GE1/0/0
1
Router E
GE1/0/0
GE2/0/0
2
Router E
GE1/0/0
Internal clock
3
Router F
GE2/0/0
GE2/0/0
1
Router F
GE2/0/0
GE1/0/0
2
Router F
GE2/0/0
Internal clock
3
Procedure
Step 1 Connect the router and the BITS clock sources as shown inFigure 9-3
Step 2 Configure the IP addresses of the interfaces.
The details are not mentioned here.
Step 3 Set the priorities of all clock sources for the router as shown inFigure 9-3.
# Configure Router A
<RouterA> system-view
[RouterA] clock ethernet-synchronization enable
[RouterA] clock source bits0 synchronization enable
[RouterA] clock source bits0 ssm prc
[RouterA] clock source bits0 priority 1
[RouterA] interface GigabitEthernet 1/0/0
[RouterA-GigabitEthernet1/0/0] clock synchronization enable
[RouterA-GigabitEthernet1/0/0] clock priority 2
[RouterA-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterA-GigabitEthernet2/0/0] clock synchronization enable
# Configure Router B
<RouterB> system-view
[RouterB] clock ethernet-synchronization enable
[RouterB] interface GigabitEthernet 1/0/0
[RouterB-GigabitEthernet1/0/0] clock synchronization enable
[RouterB-GigabitEthernet1/0/0] clock priority 1
[RouterB-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterB-GigabitEthernet2/0/0] clock synchronization enable
[RouterB-GigabitEthernet2/0/0] clock priority 2
# Configure Router C
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
248
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
<RouterC> system-view
[RouterC] clock ethernet-synchronization enable
[RouterC] interface GigabitEthernet 1/0/0
[RouterC-GigabitEthernet1/0/0] clock synchronization enable
[RouterC-GigabitEthernet1/0/0] clock priority 2
[RouterC-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterC-GigabitEthernet2/0/0] clock synchronization enable
[RouterC-GigabitEthernet2/0/0] clock priority 1
# Configure Router D
<RouterD> system-view
[RouterD] clock ethernet-synchronization enable
[RouterD] clock source bits1 synchronization enable
[RouterD] clock source bits1 ssm ssua
[RouterD] clock source bits1 priority 2
[RouterD] interface GigabitEthernet 1/0/0
[RouterD-GigabitEthernet1/0/0] clock synchronization enable
[RouterD-GigabitEthernet1/0/0] clock priority 1
[RouterD-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterD-GigabitEthernet2/0/0] clock synchronization enable
# Configure Router E
<RouterE> system-view
[RouterE] clock ethernet-synchronization enable
[RouterE] interface GigabitEthernet 1/0/0
[RouterE-GigabitEthernet1/0/0] clock synchronization enable
[RouterE-GigabitEthernet1/0/0] clock priority 1
[RouterE-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterE-GigabitEthernet2/0/0] clock synchronization enable
[RouterE-GigabitEthernet2/0/0] clock priority 2
# Configure Router F
<RouterF> system-view
[RouterF] clock ethernet-synchronization enable
[RouterF] interface GigabitEthernet 1/0/0
[RouterF-GigabitEthernet1/0/0] clock synchronization enable
[RouterF-GigabitEthernet1/0/0] clock priority 2
[RouterF-GigabitEthernet1/0/0] interface GigabitEthernet 2/0/0
[RouterF-GigabitEthernet2/0/0] clock synchronization enable
[RouterF-GigabitEthernet2/0/0] clock priority 1
Step 4 Check the clock source attributes of Router A.
<RouterA> display clock source
System trace source State:
lock mode
into pull-in range
Current system trace source: bits0
Current 2M-1 trace source:
system PLL
Current 2M-2 trace source:
system PLL
Master board
source
Pri(sys/2m-1/2m-2) In-SSM
Out-SSM
State
-------------------------------------------------------------------------bits0
1 /---/--prc
dnu
normal
GigabitEthernet1/0/0
2 /---/--dnu
prc
normal
GigabitEthernet2/0/0
---/---/--dnu
prc
normal
Slave board
source
In-SSM
Out-SSM
State
-------------------------------------------------------------------------bits0
prc
dnu
normal
Step 5 Check the clock source attributes of other router.
# The displayed information about Router B, Router C, Router D, Router E, and Router F is
similar. The following uses Router B as an example.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
249
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
<RouterB> display clock source
System trace source State:
lock
mode
into pull-in
range
Current system trace source:
GigabitEthernet1/0/0
Current 2M-1 trace source:
system
PLL
Current 2M-2 trace source:
system
PLL
Master
board
source
State
Pri(sys/2m-1/2m-2) In-SSM
Out-SSM
-------------------------------------------------------------------------GigabitEthernet1/0/0
normal
GigabitEthernet2/0/0
normal
1
/---/---
prc
dnu
2
/---/---
dnu
prc
Slave
board
source
In-SSM
Out-SSM
State
--------------------------------------------------------------------------
Step 6 Verify the configuration.
When the master BITS clock source fails, all NEs trace the clock signal from the slave BITS
clock source.
The following takes Router A as an example.
# Run the following command on Router A.
<RouterA> display clock source
System trace source State:
lock mode
into pull-in range
Current system trace source:
GigabitEthernet1/0/0
Current 2M-1 trace source:
system PLL
Current 2M-2 trace source:
system PLL
Master board
source
Pri(sys/2m-1/2m-2) In-SSM
Out-SSM
State
-------------------------------------------------------------------------bits0
1 /---/--prc
ssua
abnormal
GigabitEthernet1/0/0
2 /---/--ssua
dnu
normal
GigabitEthernet2/0/0
---/---/--ssua
ssua
normal
Slave board
source
In-SSM
Out-SSM
State
-------------------------------------------------------------------------bits0
prc
ssua
abnormal
# After the connection between the BITS clock source and Router A is closed, all router perform
clock source tracing switchover/
Figure 9-4shows the clock source tracing after the connection between the BITS clock source
and Router A is closed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
250
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
Figure 9-4 Networking diagram of the clock source tracing after the connection between the
BITS clock source and Router A is closed
E
W
Router A
E
Router B
W
Router F
W
E
E
W
Router C
W
Router E
Router D
E
E
W
BITS 1
----End
Configuration Files
l
Router A Configuration Files
#
sysname RouterA
#
clock
clock
clock
clock
ethernet-synchronization enable
source bits0 priority 1
source bits0 ssm prc
source bits0 synchronization enable
#
interface GigabitEthernet1/0/0
undo shutdown
clock priority 2
clock synchronization enable
#
interface GigabitEthernet2/0/0
undo shutdown
clock synchronization enable
#
return
l
Router B Configuration Files
#
sysname RouterB
#
clock ethernet-synchronization enable
#
interface GigabitEthernet1/0/0
undo shutdown
clock priority 1
clock synchronization enable
#
interface GigabitEthernet2/0/0
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
251
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
undo shutdown
clock priority 2
clock synchronization enable
#
return
l
Router C Configuration Files
#
sysname RouterC
#
clock ethernet-synchronization enable
#
interface GigabitEthernet1/0/0
undo shutdown
clock priority 2
clock synchronization enable
#
interface GigabitEthernet2/0/0
undo shutdown
clock priority 1
clock synchronization enable
#
return
l
Router D Configuration Files
#
sysname RouterD
#
clock ethernet-synchronization enable
clock source bits1 priority 2
clock source bits1 ssm ssua
clock source bits1 synchronization enable
#
interface GigabitEthernet1/0/0
undo shutdown
clock priority 1
clock synchronization enable
#
interface GigabitEthernet2/0/0
undo shutdown
clock synchronization enable
#
return
l
Router E Configuration Files
#
sysname RouterE
#
clock ethernet-synchronization enable
#
interface GigabitEthernet1/0/0
undo shutdown
clock priority 1
clock synchronization enable
#
interface GigabitEthernet2/0/0
undo shutdown
clock priority 2
clock synchronization enable
#
return
l
Router F Configuration Files
#
sysname RouterF
#
clock ethernet-synchronization enable
#
interface GigabitEthernet1/0/0
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
252
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9 Clock Synchronization Configuration
undo shutdown
clock priority 2
clock synchronization enable
#
interface GigabitEthernet2/0/0
undo shutdown
clock priority 1
clock synchronization enable
#
return
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
253
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
10
Device Maintenance
About This Chapter
With routine device maintenance, you can detect potential operation threats on devices and then
eradicate the potential threats in time to ensure that the system runs securely, stably, and reliably.
10.1 Introduction of Device Maintenance
Device maintenance involves replacing boards and monitoring the internal environment.
10.2 Powering off the MPU
To ensure non-stop services, you can power off the slave MPU only. If the device has only one
MPU, confirm the action before powering off the MPU.
10.3 Powering off the SFU
When the SFU is faulty or you need to routinely maintain the SFU, you can power off the SFU.
10.4 Powering off the NPU
This section describes how to power off the NPU.
10.5 Powering off the LPU
When the LPU is faulty or you need to routinely maintain the LPU, you can power off the LPU.
10.6 Restoring the Bandwidth of 10GE LAN/WAN Interfaces on an NPU to 10 Gbit/s
To restore the bandwidth of 10GE LAN/WAN interfaces on an NPU to 10 Gbit/s, you need to
bind a valid Global Trotter License (GTL) file to the NPU.
10.7 Switching Between the Operation Modes of the LPUF-10
You can run a command to configure the LPUF-10 to work in either FR or ATM mode.
10.8 Configuring a Working Mode for an LPUF-40 or LPUF-20/21
LPUF-20/21 or LPUF-40 support various service modes, which can be configured using
commands.
10.9 Configuring the CMU
10.10 Configuring a Cleaning Cycle for the Air Filter
This section describes the procedure for configuring a cleaning cycle for the air filter.
10.11 Monitoring the Device Status
Monitoring the device status facilitates fault location and cause analysis.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
254
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
10.12 Board Maintence
Board Maintenance involves resetting a board and clearing the maximum CPU usage.
10.13 Configuring NAP-based Remote Deployment
Using NAP, you can remotely log in to devices with empty configurations to implement remote
deployment.
10.14 Configuration Examples of the Device Maintenance
This section provides examples for powering off different types of boards to describe common
device maintenance operations.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
255
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
10.1 Introduction of Device Maintenance
Device maintenance involves replacing boards and monitoring the internal environment.
10.1.1 Overview of Device Maintenance
Device maintenance involves replacing boards and monitoring the internal environment.
Concept
The stable running of a routerdepends on the mature network planning and the routine
maintenance. In addition, fast location of the hidden hazards is necessary.
The maintenance personnel must check the alarm information in time and deal with the fault
properly to keep the device in normal operation and reduce the failure rate. Thus, the system
runs in a safe, stable, and reliable environment.
Maintenance Operation
Maintenance such as board replacement and internal environment check ensures the normal
operation of the router.
10.1.2 Maintenance Features Supported by the NE80E/40E
The NE80E/40Eboards to be powered off and allows the operation status to be monitored.
Powering off
You can power on or power off the boards through command lines to perform hot plugging
without interrupting the services on the router.
Monitoring
In routine maintenance of the device, you can run the display commands to view the working
status of the router. This can help the maintenance personnel fast locate the fault during the
troubleshooting procedure.
10.2 Powering off the MPU
To ensure non-stop services, you can power off the slave MPU only. If the device has only one
MPU, confirm the action before powering off the MPU.
10.2.1 Establishing the Configuration Task
Before powering off the MPU, familiarize yourself with the applicable environment, complete
the pre-configuration tasks, and obtain the required data. This can help you complete the
configuration task quickly and accurately.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
256
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Applicable Environment
The two Main Processing Units (MPUs) are in 1:1 backup mode. During operation, one MPU
serves as the master MPU and the other as the slave MPU. Remove the MPUs in the following
situations:
l
Maintenance of the MPU such as dust removing
l
Upgrade of the hardware on the MPUs such as memory capacity extending
l
Failure of the MPU
Pre-configuration Tasks
Before powering off the MPU, complete the following tasks:
l
Checking the slot of the MPU to be powered off
l
Running the display device command to check the status of the MPU
If the MPU is the master MPU, perform the master and slave switchover first.
Data Preparation
To power off the MPU, you need the following data.
No.
Data
1
Slot number of the MPU to be powered off
10.2.2 Powering off the Slave MPU
When the MPU is faulty or you need to routinely maintain the MPU, you can power off the
MPU.
Context
WARNING
The router cannot work with a single MPU for a long time. If the single MPU fails, the whole
system breaks down. After powering off the slave MPU, restore the MPU immediately.
Do as follows on the router to be configured:
Procedure
Step 1 Run:
power off slot slot-id
The slave MPU is powered off.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
257
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
NOTE
If there is no terminal on the deployment site, you can power off the slave MPU by using the OFL (offline)
button. The OFL button is in the upper part of the slave MPU. Press the button for six seconds.
If the OFL indicator is on, it means that the slave MPU is powered off successfully.
----End
10.2.3 Checking the Configuration
After the MPU is powered off, you can run the display device command to check whether the
MPU has been powered off.
Context
Run the following commands to check the previous configuration.
Procedure
l
Run:
display device
Check the registration of the SRU/MPU.
----End
Example
After the power-off operation, run the display device command. If the slave SRU/MPU is in
the abnormal state, it means that the operation succeeds. For example:
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
9
12
11
16
17
18
19
20
21
22
23
24
25
26
27
28
LPU
LPU
LPU
LPU
LPU
LPU
MPU
MPU
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Registered
Registered
Registered
Registered
Registered
Registered
Unregistered
NA
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Normal
Normal
Normal
Normal
Normal
Normal
Abnormal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
NA
NA
Slave
Master
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
10.3 Powering off the SFU
When the SFU is faulty or you need to routinely maintain the SFU, you can power off the SFU.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
258
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
NOTE
SFUs are not supported on the X1 and X2 models of the NE80E/40E.
10.3.1 Establishing the Configuration Task
Before powering off the SFU, familiarize yourself with the applicable environment, complete
the pre-configuration tasks, and obtain the required data. This can help you complete the
configuration task quickly and accurately.
Applicable Environment
During normal operation of the device, four Switch and Fabric Units (SFUs) work in 3+1 load
balancing mode. Remove the SFUs in the following situations:
l
Maintenance of the SFU such as dust removing
l
Failure of the SFU and replacement or repair of the SFU
Pre-configuration Tasks
Before powering off the SFU, complete the following tasks:
l
Checking the slot of the SFU to be powered off
Data Preparation
To power off the SFU, you need the following data.
No.
Data
1
Slot number of the SFU to be powered off
10.3.2 Powering off the SFU
You can power off the SFU by using a command or pressing the OFL button.
Context
Do as follows on the router to be configured:
Procedure
Step 1 Run:
power off slot slot-id
The SFU is powered off.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
259
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
NOTE
SFU is not supported on the X1 and X2 models of the NE80E/40E.
If there is no terminal on the deployment site, you can power off the slave SFU by using the OFL button.
The OFL button is in the upper part of the slave SFU. Press the button for six seconds. If the OFL indicator
is on, it means that powering off the SFU succeeds.
----End
10.3.3 Checking the Configuration
After the SFU is powered off, you can run the display device command to check whether the
SFU has been powered off.
Context
Run the following commands to check the previous configuration.
Procedure
Step 1 Run:
display device
Check the registration of the SFU.
----End
Example
After the power-off operation, run the display device command. If the SFU is in the unregistered
state, it means that the operation succeeds. For example:
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
9
12
11
16
17
18
19
20
21
22
23
24
25
26
27
28
LPU
LPU
LPU
LPU
LPU
LPU
MPU
MPU
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Registered
Registered
Registered
Registered
Registered
Registered
Registered
NA
Unregistered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Abnormal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
NA
NA
Slave
Master
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
10.4 Powering off the NPU
This section describes how to power off the NPU.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
260
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
NOTE
NPUs are only supported on the X1 and X2 models of the NE80E/40E.
10.4.1 Establishing the Configuration Task
Applicable Environment
Remove the NPU in the following situations:
l
Maintenance of the NPU such as dust removing
l
Failure of the NPU and replacement or repair of the NPU
Pre-configuration Tasks
Before powering off the NPU, complete the following tasks:
None.
Data Preparation
To power off the NPU, you need the following data.
No.
Data
1
Slot number of the NPU to be powered off
10.4.2 Powering off the NPU
Context
Do as follows on the router to be configured:
Procedure
Step 1 Run:
power off slot slot-id
The NPU is powered off.
NOTE
If there is no terminal on the deployment site, you can power off the slave NPU by using the OFL button.
The OFL button is in the upper part of the slave NPU. Press the button for six seconds. If the OFL indicator
is on, it means that powering off the NPU succeeds.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
261
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
10.4.3 Checking the Configuration
Context
Run the following commands to check the previous configuration.
Procedure
Step 1 Run:
display device
Check the registration of the NPU.
----End
Example
After the power-off operation, run the display device command. If the NPU is in the unregistered
state, it means that the operation succeeds. For example:
<HUAWEI> display device
NE40E-X1's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1
NPU
Present
Unregistered Abnormal
NA
2
PIC
Present
Registered
Normal
NA
3
PIC
Present
Registered
Normal
NA
4
PIC
Present
Registered
Normal
NA
5
PIC
Present
Registered
Normal
NA
7
MPU
Present
NA
Normal
Master
8
PWR
Present
Registered
Normal
NA
10
FAN
Present
Registered
Normal
NA
12
CLK
Present
Registered
Normal
Master
10.5 Powering off the LPU
When the LPU is faulty or you need to routinely maintain the LPU, you can power off the LPU.
10.5.1 Establishing the Configuration Task
Before powering off the LPU, familiarize yourself with the applicable environment, complete
the pre-configuration tasks, and obtain the required data. This can help you complete the
configuration task quickly and accurately.
Applicable Environment
Power off the LPU in the following situations:
l
Maintenance of the LPU such as dust removing
l
Failure of the LPU and replacement of the LPU
Pre-configuration Tasks
Before powering off the LPU, you need finish the following task:
l
Issue 02 (2011-09-10)
prepare a slave LPU.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
262
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Data Preparation
To power off the LPU, you need the following data:
No.
Data
1
The slot number of the LPU to be powered off
2
A slave LPU whose board type and Physical Interface Card (PIC) type are the same
as those of the LPU to be powered off
10.5.2 Powering off the LPU
You can power off the LPU by using a command or pressing the OFL button.
Context
Do as follows on the router to be configured:
Procedure
Step 1 Run:
power off slot slot-id
The LPU is powered off.
NOTE
l To power off the sub-cards of the FPICs, Run:power off slot slot-id card card-idcommand.
l If there is no terminal on the deployment site, you can power off the LPU by using the OFL button.
The OFL button is in the upper part of the LPU. Press the button for six seconds. If the OFL indicator
is on, it means that powering off the LPU succeeds.
----End
10.5.3 Checking the Configuration
After the LPU is powered off, you can run the display device command to check whether the
LPU has been powered off.
Context
Run the following commands to check the previous configuration.
Procedure
l
Run:
display device
Check the registration of the LPU.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
263
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Example
After the power-off operation, run the display device command. If the LPU is in the unregistered
state, it means that the operation succeeds. Take powering off the LPU in slot 5 for example:
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
9
12
11
16
17
18
19
20
21
22
23
24
25
26
27
28
LPU
LPU
LPU
LPU
LPU
LPU
MPU
MPU
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Unregistered
Registered
Registered
Registered
Registered
Registered
Registered
NA
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Abnormal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
NA
NA
Slave
Master
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
10.6 Restoring the Bandwidth of 10GE LAN/WAN
Interfaces on an NPU to 10 Gbit/s
To restore the bandwidth of 10GE LAN/WAN interfaces on an NPU to 10 Gbit/s, you need to
bind a valid Global Trotter License (GTL) file to the NPU.
NOTE
NPUs are only supported on the X1 and X2 models of the NE80E/40E.
10.6.1 Establishing the Configuration Task
Before restoring the bandwidth of 10GE LAN/WAN interfaces on the NPU to 10 Gbit/s ,
familiarize yourself with the applicable environment, complete the pre-configuration tasks, and
obtain the required data. This can help you complete the configuration task quickly and
accurately.
Application Environment
By default, the bandwidth of 10GE LAN/WAN interfaces on an NPU is 10 Mbit/s. To restore
the bandwidth of 10GE LAN/WAN interfaces to 10 Gbit/s, purchase a legitimate GTL file.
Pre-configuration Tasks
None.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
264
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Data Preparation
To restore the bandwidth of 10GE LAN/WAN interfaces to 10 Gbit/s, you need the following
data.
No.
Data
1
GTL file used to restore the bandwidth of 10GE LAN/WAN interfaces to 10 Gbit/s
10.6.2 Restoring the bandwidth of 10GE LAN/WAN interfaces on
an NPU to 10 Gbit/s
To restoring the bandwidth of 10GE LAN/WAN interfaces on an NPU to 10 Gbit/s , you need
to bind a valid Global Trotter License (GTL) file to the NPU.
Context
By default, the bandwidth of 10GE LAN/WAN interfaces on an NPU is 10 Mbit/s. To restore
the bandwidth of 10GE LAN/WAN interfaces to 10 Gbit/s, purchase a legitimate GTL file.
Procedure
Step 1 Run:
license active file-name
The GTL file for enabling 10GE LAN/WAN interfaces is activated.
Step 2 Run:
system-view
The system view is displayed.
Step 3 Run:
slot slot-id
The slot view is displayed.
Step 4 Run:
active 10ge-interface
The GTL file used to restore the bandwidth of 10GE LAN/WAN interfaces to 10 Gbit/s is bound
to the NPU.
NOTE
The active 10ge-interface command takes effect only in the view of the slot where the NPU resides.
After binding the GTL file to the NPU, you are recommended to run the save command to save the
configuration. Otherwise, you need to bind the GTL file again once the device is restarted.
----End
10.6.3 Checking the Configuration
After enabling the 10GE LAN/WAN interface on an NPU, you can check the current PIC cards
on the device.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
265
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Context
Run the following command to check the previous configuration.
Procedure
Step 1 Run the display device pic-status command to view the current PIC cards on the device.
----End
Example
# View the current PIC cards on the device.
<HUAWEI> display device pic-status
Pic-status information in Chassis 1:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SLOT PIC Status
Type
Port_count Init_result
Logic down
7
0
Registered LAN_WAN_2x10GX_V_CARD 2
SUCCESS
SUCCESS
7
6
Registered ETH_8xGF_B_CARD
8
SUCCESS
SUCCESS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10.7 Switching Between the Operation Modes of the
LPUF-10
You can run a command to configure the LPUF-10 to work in either FR or ATM mode.
NOTE
LPUF-10 is not supported on the X1 and X2 models of the NE80E/40E.
10.7.1 Establishing the Configuration Task
Before configuring the operation mode of the LPUF-10, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Application Environment
When configuring FR or ATM services on the LPUF-10, you need to manually switch the
operation mode of the LPUF-10. An LPUF-10 can operate in either of the following modes:
l
support-atm mode
When operating in support-atm mode, the LPUF-10 can support ATM services, instead of
FR services.
l
support-fr mode
When operating in support-fr mode, the LPUF-10 can support FR services, instead of ATM
services.
Pre-configuration Tasks
Before switching the operation mode of the LPUF-10, complete the following task:
l
Issue 02 (2011-09-10)
Identifying the current operation mode of the LPUF-10
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
266
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Data Preparation
To switch the operation mode of the LPUF-10, you need the following data.
No.
Data
1
Slot ID of the LPU and the ID of the subcardwhose operation mode needs to be
switched
10.7.2 Switching Between the Operation Modes of the LPUF-10
FR and ATM services cannot be configured together on the LPUF-10.
Context
Do as follows on the router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
slot slot-id
The slot view is displayed.
Step 3 Run:
switch lpuf work-mode {support-atm | support-fr}
The operation mode of the LPUF-10 is switched.
----End
Follow-up Procedure
NOTE
l FR and ATM services are mutually exclusive on an LPUF-10.
l When the board is switched to a slot where FR is configured for a POS interface, the operation mode
of the LPUF-10 is automatically switched to support-fr. The FR configuration for the POS interface
needs to be deleted if ATM services are required to be configured.
l If the operation mode of the board is not set, the board adopts the support-atm mode by default when
starting.
10.7.3 Checking the Configuration
After the operation mode of the LPUF-10 is configured, you can check the configuration.
Context
Run the following command to check the previous configuration.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
267
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run the display work-mode [slot slot-id] command to view the operation mode of the board.
----End
Example
# View the current operation mode of the board in slot 1.
<HUAWEI> display work-mode slot 1
NE40E-4's
Slot
- - - - 1
current work-mode on lpuf-10:
Type
Current-workmode
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LPUF-10
SUPPORT-ATM
10.8 Configuring a Working Mode for an LPUF-40 or
LPUF-20/21
LPUF-20/21 or LPUF-40 support various service modes, which can be configured using
commands.
NOTE
LPUs are not supported on NE80E/40E-X1s and NE80E/40E-X2s.
10.8.1 Establishing the Configuration Task
Before configuring a service mode for an LPU, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the data required for the
configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
An LPUF-20/21 or LPUF-40 cannot be configured with the 1588v2 ACR server function and
NetStream at the same time. Before configuring either the 1588v2 ACR server function or
NetStream, configure a corresponding service mode for the LPU.
l
netstream-1-mode: When working in this mode, the LPU can be configured with
NetStream, but not the 1588v2 ACR server function.
l
ptp-1-mode: When working in this mode, the LPU can be configured with the 1588v2
ACR server function, but not NetStream.
The LAN_WAN_10G_TM_CARD, ETH_10XGF_TM_CARD, or ETH_6XGF_TM_CARD
subcard can be configured with a service mode to support specified functions. The service modes
and supported service types are as follows:
l
reassemble-mode: When working in this mode, the subcard supports packet fragmentation
and reassembly, but not 1588v2 or the 1588v2 ACR client function.
l
ptp-slave-mode: When working in this mode, the subcard supports 1588v2 and the 1588v2
ACR client function, but not packet reassembly.
Pre-configuration Tasks
Before configuring a service mode for an LPU, complete the following task:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
268
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
10 Device Maintenance
Determining the current service mode of the LPU
Data Preparation
To configure a service mode for an LPU, you need the following data.
No.
Data
1
Slot ID of the LPU whose service mode needs to be configured
2
Card ID of the subcard whose service mode needs to be configured
10.8.2 Configuring a Service Mode for an LPUF-20/21 or LPUF-40
An LPUF-20/21 or LPUF-40 can work in different service modes. You can use the command
to change the service mode.
Context
An LPUF-20/21 or LPUF-40 cannot be configured with the 1588v2 ACR server function and
NetStream at the same time. Before configuring either the 1588v2 ACR server function or
NetStream, configure the service mode for the LPU.
The LAN_WAN_10G_TM_CARD, or ETH_10XGF_TM_CARD subcard can be configured
with a service mode to support specified functions. The service modes and supported service
types are as follows. You can configure a service mode for the subcard based on the required
service type.
l
reassemble-mode: When working in this mode, the subcard supports packet fragmentation
and reassembly, but not 1588v2 or the 1588v2 ACR client function.
l
ptp-slave-mode: When working in this mode, the subcard supports packet fragmentation,
1588v2, and the 1588v2 ACR client function, but not packet reassembly.
Perform the following steps on the router to configure a service mode for the LPU:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
set service-mode slot { slot-id | all } { netstream-1-mode | ptp-1-mode }
A service mode is configured for the LPU to support the 1588v2 ACR server function or
NetStream.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
269
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
CAUTION
This command can take effect on the LPUF-20/21 or LPUF-40.
Step 3 Run:
set service-mode slot { slot-id card card-id | all card all } { reassemble-mode |
ptp-slave-mode }
A service mode is configured for a subcard.
The default service mode of a subcard is reassemble-mode.
The service mode of a subcard is irrelevant to the service mode of the LPU where the subcard
resides.
CAUTION
This command can take effect on a LAN_WAN_10G_TM_CARD or
ETH_10XGF_TM_CARD of the LPUF-21.
To query the type of a subcard, run the display device pic-status command.
----End
10.8.3 Checking the Configuration
After the preceding configuration is complete, you can check the service mode of an LPU or a
subcard.
Context
Run the following command to check the configurations:
Procedure
Step 1 Run the display service-mode slot slot-id command to check the service mode of an LPU or a
subcard.
----End
Example
# Run the display service-mode command in the system view to display the current working
mode of the LPU in slot 1.
[HUAWEI] display service-mode slot 1
The device can work under the following mode:
=======================================================================:
Service-mode
Functions:
NETSTREAM-1-MODE
Support 2047 MPLS OAM sessions.support (2048
3.3ms | 2048 10ms) bfd sessions.can not suppo
rt 1588 ACR serverSupport 4095 Mep,4095 Rmep,
4095 Ma EOAM/MPLS-TP sessions.Support Netstr
eam.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
270
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
PTP-1-MODE
Support 2047 MPLS OAM sessions.support (2048
3.3ms | 2048 10ms) bfd sessions.support 1588
ACR serverSupport 4095 Mep,4095 Rmep,4095 Ma
EOAM/MPLS-TP sessions.Does not Support Netst
ream.
=======================================================================:
The current service-mode is PTP-1-MODE!
10.9 Configuring the CMU
10.9.1 Establishing the Configuration Task
Before Configuring Monitor Items for a CMU, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Application Environment
In remote and unattended equipment rooms, router providing the environment monitoring
function can monitor the working environment in real time. Upon receiving an input signal
indicating that a specific environment variable is abnormal, a router will generate an alarm. Then,
the maintenance personnel can take immediate actions to adjust the environment variable,
without having to wait on site for environment monitoring. This effectively reduces equipment
room maintenance costs for carriers.
The CMU on the AUXQ can be connected to an environment monitoring device. Based on the
received input signals from the environment monitoring device, the CMU generates an alarm
and reports the alarm to the NMS so that the maintenance personnel can be informed of the
problem and come to the site to address the problem.
Pre-configuration Tasks
None.
Data Preparation
None.
10.9.2 Configuring Monitor Items for a CMU
Prerequisite
In remote and unattended equipment rooms, router providing the environment monitoring
function can monitor the working environment in real time. Upon receiving an input signal
indicating that a specific environment variable is abnormal, a router will generate an alarm. Then,
the maintenance personnel can take immediate actions to adjust the environment variable,
without having to wait on site for environment monitoring. This effectively reduces equipment
room maintenance costs for carriers.
The CMU on the AUXQ can be connected to an environment monitoring device. Based on the
received input signals from the environment monitoring device, the CMU generates an alarm
and reports the alarm to the NMS so that the maintenance personnel can be informed of the
problem and come to the site to address the problem.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
271
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
cmu-switch switch-id slot slot-id name { voltage | door | humidity | fog |
temperature } alarm-mode { 0 | 1 }
Monitor items such as objects to be monitored and an alarm mode are configured for a CMU.
NOTE
A router can monitor four types of environment variables at a time. You need to run the cmu-switch
command to configure each environment variable that needs to be monitored and the associated alarm
mode.
----End
10.10 Configuring a Cleaning Cycle for the Air Filter
This section describes the procedure for configuring a cleaning cycle for the air filter.
Context
NOTE
The X1 and X2 models of the NE80E/40E do not have air filter.
10.10.1 Establishing the Configuration Task
Application Environment
You need to clean the air filter after the air filter has been running for a period of time.
Pre-configuration Tasks
None.
Data Preparation
To configure a cleaning cycle for the air filter, you need the following data.
No.
Data
1
Cleaning cycle of the air filter
10.10.2 Configuring a Cleaning Cycle for the Air Filter
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
272
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Context
Do as follows on the router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run
dustproof check-timer day days
The cleaning cycle for the air filtered is configured.
NOTE
The air filter is a component without memory. All the monitored information is saved on the MPU, which
may be inserted, removed, switched, or replaced during usage. Therefore, the monitoring cycle may differ
from the set cycle, but this does not affect the monitoring function.
----End
10.10.3 Remonitoring the Cleaning Cycle of the Air Filter
Context
The system generates an alarm about cleaning the air filter. After ensuring that the air filter is
cleaned or does not need to be cleaned, you need to clear the alarm and remonitor the cleaning
cycle of the air filter.
Do as follows on the router:
Procedure
Step 1 Run:
reset dustproof run-time
The alarm is cleared. The cleaning cycle of the air filter is monitored.
----End
10.10.4 Checking the Configuration
Procedure
Step 1 Run:
display dustproof
Information about the air filter is displayed.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
273
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Example
Run the display dustproof command. You can view information about the cleaning cycle of
the air filter, the last time when the air filter was cleaned (referring to the time on the router),
how many days the router had been run since the previous cleaning, and how long the alarm
about cleaning the air filter exists. For example:
<HUAWEI> display dustproof
Clean Dustproof-Net cycle :
Last clean date
:
Up to last clean days
:
Clean alarm existence days:
365(days)
2009/02/07
1(day)
0(day)
10.11 Monitoring the Device Status
Monitoring the device status facilitates fault location and cause analysis.
10.11.1 Displaying the System Version Information
The system version information includes the system software version and various hardware
versions.
Procedure
Step 1 Run:
display version
The system version information is displayed.
In practice, using this command in any view, you can view the system version information. The
main information is as follows:
l System software version
l Hardware and software version of the MPUs
l Hardware and software version of the SFUs
l Hardware and software version of the LPUs
.
l Hardware and software version of the Fan and Black Plane
.
----End
10.11.2 Displaying Basic Information About the Router
The basic information includes detailed information about the LPU, MPU, SFU, clock board,
power supply, and fan module.
Procedure
Step 1 Run:
display device [ pic-status | slot-id]
Basic information about the router is displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
274
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
In practice, using this command in any view, you can view the basic device information. Enter
slot-id to view information about the board in the specified slot.
l Choose a board in a certain slot. You can view basic information about this board.
l Run:
display device pic-status
Basic information about the PIC card of the LPU is displayed.
----End
10.11.3 Displaying the Electronic Label
The electronic label information includes the type of the board/card, bar code, BOM code,
English description, production date, supplier name, issuing number, Common Language
Equipment Identification (CLEI) code, and sales BOM code.
Procedure
Step 1 Run:
The electronic label is displayed.
In practice, using this command in the user view, you can view information about the electronic
label of the boards. Enter slot-id to view information about the electronic label of the board in
the specified slot.
NOTE
For the range of numbers of the slots on the router, refer to the HUAWEI NetEngine80E/40E Router
Hardware Description.
Information displayed includes the type of the board and PIC card, bar code, BOM, English
description, production date, supplier name, issuing number, CLEI (Common Language
Equipment Identification) code, and sales BOM.
NOTE
You can back up the electronic label of the specified board in the following methods:
l Run the backup elabel filename [ backplane | slot-id ] command to back up the electronic label to the
CF card on the router.
l Run the backup elabel ftp host filename username password [ backplane | slot-id ] command to back
up the electronic label to the specified FTP server.
----End
10.11.4 Displaying the Soft Boot Mode
By default, the soft boot mode function is automatically enabled, which shortens the time spent
on system restart.
Procedure
Step 1 Run the display system soft-bootmode command, you can view the soft boot mode.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
275
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
NOTE
By default, the soft boot mode function is automatically enabled, which shortens the time spent on system
startup during reset. You can run the undo set system soft-bootmode command in the system view to
disable the boot function as required.
----End
10.11.5 Displaying the Threshold of the Memory Usage
By specifying the slot ID, you can check the memory usage of the MPU or of the LPU.
Procedure
Step 1 Run:
display memory-usage [ slave | slot slot-id ]
The threshold of the memory usage of the main MPU and LPU are displayed.
NOTE
To set the threshold of the memory usage in the main MPU and LPU, you can run the set memory-usage
threshold threshold [ slot slot-id ]command.
----End
10.11.6 Displaying the Threshold of CPU Usage
By specifying the slot ID, you can check the CPU usage of the MPU or of the LPU.
Procedure
Step 1 Run:
display cpu-usage entry-number [ offset ] [ verbose ] [ slave | slot slot-id ]
[ history ]
The threshold of the CPU usage of the main MPU and LPU are displayed.
Select the following parameters as required when you run this command:
l entry-number: specifies the number of entries to be displayed.
l offset: specifies the entry with the offset value before the current entry.
l verbose: displays information about each record.
l history: displays history records of the CPU usage.
NOTE
To set the threshold of the CPU usage on the main MPU and LPU, you can run the set cpu-usage
threshold threshold-value [ slave | slot slot-id ] command, and run the [ slave | slot slot-id ] command can
display the current configuration of the CPU usage.
----End
10.11.7 Displaying Alarm Information
The alarm information includes the alarm level, alarm date and time, and alarm description.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
276
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run:
display alarm { slot-id | all }
Information about the alarm is displayed.
In the operation, using this command in any view, you can view current information about the
alarm of the router. Alarm information includes the following:
l Alarm level
l Alarm date and time
l Alarm description
NOTE
After displaying the alarm of the router, you can run the clear alarm index index-id { send-trap | notrap } command to clear the alarm at the specified index-id.
----End
10.11.8 Displaying the Board Temperature
The temperature information includes the temperature status of each board, temperature alarm
thresholds of a board, and actual temperature of a board.
Procedure
Step 1 Run:
display temperature [ lpu | mpu | sfu | slot slot-id ]
The temperature of the specified board is displayed.
NOTE
l Run the display temperature [ lpu slot slot-id [ pic pic-id ] ] command to view the temperature of the
specified subcard in the specified slot.
l Run the display temperature command to view the temperature of each module of all the boards on
the router.
In practice, using this command in any view, you can view the current temperature of the
router.The temperature information includes the following:
l Current temperature status of the board
l Threshold to the alarm temperature of the board
l Actual temperature of the board
----End
10.11.9 Displaying the Board Voltage
The voltage information includes the number of voltage sensors on each board, working voltage
sensor of each board, working status of the voltage sensor on each board, and voltage alarm
thresholds of each board.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
277
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run:
display voltage [ lpu | mpu | sfu | slot slot-id]
The board voltage is displayed.
NOTE
l Run the display voltage [lpu | slot slot-id [pic pic-id]] command to view the voltage of the specified
subcard on the specified LPU.
l Run the display voltage command to view the voltage of all the boards on the router.
In practice, using this command in any view, you can view the voltage of all the boards. The
voltage information includes the following:
l Number of the voltage sensors
l Working voltage sensors
l Working status of the voltage sensors
l Alarm field value of the voltage
l Actual board voltage
l Normal working temperature of the voltage sensors
----End
10.11.10 Displaying the Power Supply Status
The power supply information includes the slot ID of the power supply module, whether the
power supply module is registered, working mode of the power supply module, and cable status
of the power supply module.
Procedure
Step 1 Run:
display power[{environment-info|manufacture-info}slot slot-id|slot[slot-id]]
The power supply status is displayed.
In practice, using this command in any view, you can view the power supply status. The displayed
information includes the following:
l Slot number of the power supply module
l Presence status of the power supply module
l Operation mode of the power supply module
l Cable status of the power supply module
----End
10.11.11 Displaying Current Information About Boards
Context
Do as follows on the router.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
278
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run:
display board-current [ slot slot-id ]
Current information about a specified board is displayed.
----End
10.11.12 Displaying Entironment Information About the Device
You can check environment information about the device that is installed with an environment
monitoring board.
Context
Do as follows on the router:
Procedure
Step 1 Run:
display device [ CMU-slotID ]
Entironment information about the device is displayed.
This command is supported only on the NE40E-X8 and NE40E-X16 on which the entironment
monitoring board is installed and runs normally.
----End
10.11.13 Displaying the Fan Status
The fan status information includes the slot ID of the fan module, whether a fan module is
registered, registration status, working status of the fan module, and speed mode of the fan
module.
Procedure
Step 1 Run:
display fan
The fan status is displayed.
In practice, using this command in any view, you can view the fan status. The information
includes the following:
l Slot number of the fan module
l Presence and registration status of the fan module
l Working status of the fan module
l Fan speed mode of the fan module
----End
10.11.14 Displaying the Sequence Number of the MPU
Each MPU has a globally unique equipment serial number (ESN).
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
279
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Procedure
Step 1 Run:
display esn
The sequence number of the MPU is displayed. In the operation, using this command in any
view, you can view the sequence number of the MPU on the router.
----End
10.11.15 Displaying the Next Start Mode of the Board
A board supports two startup modes, namely, fast startup and normal startup.
Procedure
Step 1 Run:
display bootmode-next
The next start mode of the board is displayed.
In the operation, you can use the command in any view to check the next start mode of each
board on the router, including the MPU, LPU, and SFU. The start modes are as follows:
l The fast start mode
l The normal start mode
----End
10.11.16 Displaying the Number of the Registered SFUs By Default
The number of actually used SFUs must be greater than the number of SFUs that the system
requires for registration by default; otherwise, an alarm will be generated.
Context
NOTE
SFUs are not supported on the X1 and X2 models of the NE80E/40E.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
display least sfuboard
The number of the registered SFUs that the device requires by default is displayed.
In the operation, if the number of the SFUs that is actually used is smaller than the number of
the SFUs that the device requires for registration, the trap is generated. Run the least
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
280
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
sfuboardindex-id command to change the number of the SFUs that the device requires for
registration.
----End
10.12 Board Maintence
Board Maintenance involves resetting a board and clearing the maximum CPU usage.
10.12.1 Resetting a Board
You need to back up important data before resetting a board.
Context
In the case that a board is faulty, you can use the reset slot command to reset the board.
WARNING
Back up important data before resetting the board.
Do as follows on the router:
Procedure
Step 1 Run:
reset slot slot-id [card card-id]
The board is reset.
NOTE
l If this command is run to reset a master MPU and no slave MPU exists, the master MPU is reset with
the CPU being powered on. If a slave MPU exists, this command performs master/slave MPU
switchover.
l If the board is still abnormal after being reset, contact the Huawei technical support personnel.
----End
10.12.2 Clearing the Maximum CPU Usage
To recalculate the maximum CPU usage, you can clear the original statistics.
Context
CAUTION
The maximum CPU usage cannot be restored after you clear it. So, confirm the action before
you use the command.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
281
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
To clear the maximum CPU usage statistics, run the following reset command in the system
view.
Procedure
Step 1 Run the reset cpu-usage record [ slot slot-id | slave ] command to clear the maximum CPU
usage.
----End
10.13 Configuring NAP-based Remote Deployment
Using NAP, you can remotely log in to devices with empty configurations to implement remote
deployment.
Context
CAUTION
After the device with an empty configuration is powered on and started, you must make sure
that its interfaces connected to the devices on the current network are Up and support NAP;
otherwise, the function of NAP-based remote deployment cannot take effect.
10.13.1 Establishing the Configuration Task
Before configuring NAP-based remote deployment, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the required data. This can help
you complete the configuration task quickly and accurately.
Applicable Environment
To deploy devices having empty configurations, you can use NAP to perform remote login to
the devices from a device in the current network. In this manner, you can implement remote
deployment of devices.
Pre-configuration Tasks
Before configuring NAP-based remote deployment, complete the following tasks:
l
Connecting the device having an empty configuration to a device in the current network
via a single hop by using network cables
l
Ensuring that the interfaces connecting the device with an empty configuration and the
device in the current network are both in the Up state, and support NAP.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
282
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Data Preparation
NOTE
l If the IP addresses used for establishing NAP connections are to be manually configured, you need to
prepare the following data before configuring NAP.
l Conversely, if the IP addresses for establishing NAP connections are to be automatically configured,
you can skip this.
To configure NAP-based remote deployment, you need the following data.
No.
Data
1
Two primary IP addresses. The two IP addresses are primary IP addresses for the
master interface and the slave interface respectively, and should be on the same
network segment.
2
Two secondary IP addresses. The two IP addresses are secondary IP addresses for
the master interface and the slave interface respectively, and should be on the same
network segment.
10.13.2 Configuring and Starting the NAP Master Interface
You can assign an IP address to the NAP master interface or use the IP address that is
automatically allocated by the system to start the NAP master interface.
Context
CAUTION
If commands affecting the IP address configuration or IP packet forwarding (such as
configurations and commands related to the VPN, Eth-Trunk, IP-Tunk, or Layer 2 interface)
exist on device of the master interface, NAP enabled on the master interface becomes
unavailable. You are recommended to delete these commands and re-enable NAP.
Do as follows on the router to configure and start the NAP master interface.
In NAP, IP addresses can be allocated either automatically or manually.
Procedure
l
Automatic allocation of IP addresses
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
The interface view is displayed.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
283
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
3.
10 Device Maintenance
Run:
nap port master
The NAP Master interface is configured and started.
l
Manual IP address allocation
Two methods are available for manually allocating IP addresses. You can choose the
method according to actual needs.
You can specify the NAP IP address pool. Then, IP addresses are automatically allocated
to the IP address pool. To use this method, do as follows.
1.
Run:
system-view
The system view is displayed.
2.
Run:
nap ip-pool ip-address mask-length
An IP address pool is configured for NAP.
The default IP address pool for establishing NAP connections is 10.167.253.0/24. You
can run the nap ip-pool ip-address mask-length command to change the IP address
pool.
NOTE
After NAP is started on the master device, the IP address pool cannot be changed.
3.
Run:
interface interface-type interface-number
The interface view is displayed.
4.
Run:
nap port master
The NAP Master interface is configured and started.
You can also specify the NAP IP addresses. To use this method, do as follows.
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
The interface view is displayed.
3.
Run:
nap port master
The NAP master interface is configured and started.
4.
Run:
nap local-ip mast-inter-mast-ip sub-ip mast-inter-sub-ip peer-ip subinter-mast-ip sub-ip sub-inter-sub-ip mask-length
IP addresses are configured for establishing NAP connections.
The default IP address pool for establishing NAP connections is 10.167.253.0/24.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
284
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
When configuring IP addresses, ensure that the primary IP addresses of both the master
and the slave interfaces are on the same network segment, and that the secondary IP
addresses of both the master and the slave interfaces are on the same network segment.
----End
10.13.3 Remote Login
After the neighbor relationship is set up, you can log in to the NAP slave device from the NAP
master device.
Context
Using the display nap interface command, you can view the NAP status of an interface to
ensure that the interface is assigned a correct IP address.
Do as follows on the router where the NAP master interface is configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
nap login neighbor
The login to the slave device from the master device is performed.
l If the slave device has an empty configuration, you can log in to the slave device from the
master device without a user name and a password.
l If, however, the slave device is configured with user name(s) and password(s), you must
enter the correct user name and password to perform a NAP-based remote login to the slave
device.
NOTE
To ensure security for NAP, the slave device having an empty configuration checks the source address of
the Telnet login. If the Telnet source address is the NAP address of the master device that is telnetting to
the slave device, the slave device allows the master device to directly log in without being authenticated.
This is because by default, the user level of the remote login based on the NAP address is the same as the
login through the console interface, which enjoys the highest user level. If the Telnet source address is not
the NAP address of the master device, the remote login fails.
----End
10.13.4 Disabling NAP on the Slave Device
If the NAP function is no longer required, you need to disable NAP on the slave interface of the
slave device.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
285
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Context
The master device has logged in to the slave device through Telnet. The NAP function is no
longer required, and to ensure security of the network, NAP should be globally disabled on the
slave interface of the slave device.
Do as follows on the router that is configured as the NAP slave device.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
undo nap slave enable
NAP is disabled on the slave device.
----End
10.13.5 Checking the Configuration
After configuring NAP-based remote deployment, you can view the NAP status globally or on
a specified interface.
Prerequisite
NAP-based remote deployment has been completed.
Procedure
Step 1 Using the display nap status command, you can view the current NAP status.
Step 2 Using the display nap interface [ interface-type interface-number ] command, you can view
the NAP status of the specified interface.
----End
Example
Run the display nap status command to view the current NAP status.
<HUAWEI> display nap status
Slave port status
: Enable
Nap ip-pool/Mask
: 12.12.12.0/24
Run the display nap interface interface-type interface-number command to view the NAP status
of the specified interface.
<HUAWEI> display nap interface gigabitethernet1/0/1
l
If the interface is not assigned an IP address, the following information is displayed.
-----------------------------------------------------NAP master port list:
Port count
: 2
-----------------------------------------------------Port property
: Master
Current status
: DETECTING
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
286
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Local port
: GigabitEthernet1/0/1
Peer port
: GigabitEthernet1/0/1
Local primary ip
: NULL
Peer primary ip
: NULL
Local secondary ip
: NULL
Peer secondary ip
: NULL
Hello time
: 3s
Linked time
: 00:00:00
-----------------------------------------------------Port property
: Master
Current status
: DETECTING
Local port
: GigabitEthernet1/0/2
Peer port
: GigabitEthernet1/0/2
Local primary ip
: NULL
Peer primary ip
: NULL
Local secondary ip
: NULL
Peer secondary ip
: NULL
Hello time
: 3s
Linked time
: 00:00:00
------------------------------------------------------
l
If the interface is assigned an IP address, the following information is displayed.
-----------------------------------------------------NAP master port list :
Port count
: 2
-----------------------------------------------------Port property
: Master
Current status
: IP-ASSIGNED
Local port
: GigabitEthernet1/0/1
Peer port
: GigabitEthernet1/0/1
Local primary ip
: 12.12.12.5
Peer primary ip
: 12.12.12.6
Local secondary ip
: 12.12.12.9
Peer secondary ip
: 12.12.12.10
Hello time
: 3s
Linked time
: 00:09:12
-----------------------------------------------------Port property
: Master
Current status
: IP-ASSIGNED
Local port
: GigabitEthernet1/0/2
Peer port
: GigabitEthernet1/0/2
Local primary ip
: 10.10.10.5
Peer primary ip
: 10.10.10.6
Local secondary ip
: 10.10.10.9
Peer secondary ip
: 10.10.10.10
Hello time
: 3s
Linked time
: 00:03:41
------------------------------------------------------
10.14 Configuration Examples of the Device Maintenance
This section provides examples for powering off different types of boards to describe common
device maintenance operations.
Follow-up Procedure
NOTE
This document takes interface numbers and link types of the NE40E-X8 as an example. In working
situations, the actual interface numbers and link types may be different from those used in this document.
10.14.1 Example for Powering off the MPU
On a dual-MPU router, if the master MPU malfunctions or you need to routinely maintain the
master MPU, you can power off the master MPU after performing the master/slave switchover.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
287
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Networking Requirements
After checking the alarm information, you find that the hardware on the master MPU fails. Then,
check the hardware by powering off the master MPU.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Switch the master MPU to the slave MPU through the master and slave switchover.
2.
Power off the slave MPU
Data Preparation
To complete the configuration, you need the following data:
l
Slot number of the master MPU
l
In this example, the slot number of the master MPU is.17
Procedure
Step 1 Perform the master and slave switchover on the router.
<HUAWEI> system-view
[HUAWEI] slave switchover enable
Before performing the master and slave switchover, make sure that the user interfaces such as
AUX, console, and VTY are connected to the two MPUs. Otherwise, the users that use the
interfaces connected with the former master MPU automatically quit the login after the master
and slave switchover.
[HUAWEI] slave switchover
Caution!!! Confirm switch slave to master[Y/N]?y
Switching......................................................................
......
Step 2 Power off the MPU in slot 17.
<HUAWEI> power off slot 17
Caution!!! This command may affect operation by wrong use, please carefully use
it with HUAWEI engineer's direction. Are you sure to do this operation?[Y/N]?y
Step 3 Verify the configuration.
# Check the registration status of the MPU. You can view that the MPU in slot 17 is in the
unregistered and abnormal state. It means that powering off the MPU succeeds.
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
9
12
11
16
17
18
Issue 02 (2011-09-10)
LPU
LPU
LPU
LPU
LPU
LPU
MPU
MPU
Present
Present
Present
Present
Present
Present
Present
Present
Registered
Registered
Registered
Registered
Registered
Registered
Unregistered
NA
Normal
Normal
Normal
Normal
Normal
Normal
Abnormal
Normal
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
NA
NA
NA
NA
NA
NA
Slave
Master
288
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
19
20
21
22
23
24
25
26
27
28
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
10 Device Maintenance
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
----End
Configuration Files
None
10.14.2 Example for Powering off the SFU
When the SFU is faulty or you need to routinely maintain the SFU, you can power off the SFU.
Networking Requirements
NOTE
SFUs are not supported on the X1 and X2 models of the NE80E/40E.
You need to power off the SFUs before dust removing.
Configuration Roadmap
The configuration roadmap is as follows:
l
Power off the SFU.
Data Preparation
To complete the configuration, you need the following data:
Slot number of the current SFU In this example, the slot number of the SFU is 19.
Procedure
Step 1 Power off the SFU in slot 19
<HUAWEI> power off slot 19
Caution!!! This command may affect operation by wrong use, please carefully use
it with HUAWEI engineer's direction. Are you sure to do this operation?[Y/N]?y
Step 2 Verify the configuration.
# Check the registration status of the SRU in slot 19. You can view that the SRU is in the
unregistered and abnormal state. It means that powering off the SRU succeeds.
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
Issue 02 (2011-09-10)
LPU
LPU
Present
Present
Registered
Registered
Normal
Normal
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
NA
NA
289
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
9
12
11
16
17
18
19
20
21
22
23
24
25
26
27
28
LPU
LPU
LPU
LPU
MPU
MPU
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
10 Device Maintenance
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Registered
Registered
Registered
Registered
Registered
NA
Unregistered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Normal
Normal
Normal
Normal
Normal
Normal
Abnormal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
Slave
Master
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
----End
Configuration Files
None
10.14.3 Example for Powering off the LPU
When the LPU is faulty or you need to routinely maintain the LPU, you can power off the LPU.
Networking Requirements
NOTE
LPUs are not supported on the X1 and X2 models of the NE80E/40E.
None
Configuration Roadmap
The configuration roadmap is as follows:
Replace the failed LPU.
Data Preparation
To complete the configuration, you need the following data:
l
Slot number of the LPU that needs replacement
In this example, the slot number of the LPU is 5.
l
Service part whose PIC card type and board type are the same as that of the LPU to be
replaced
Procedure
Step 1 Power off the LPU in slot 5.
<HUAWEI> power off slot 5
Caution!!! This command may affect operation by wrong use, please carefully use
it with HUAWEI engineer's direction. Are you sure to do this operation?[Y/N]?y
Step 2 Verify the configuration.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
290
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
# Check the registration status of the LPU in slot 51. You can view that the LPU is in the
unregistered and abnormal state. It means that powering off the LPU succeeds.
<HUAWEI> display device
NE80E's Device status:
Slot #
Type
Online
Register
Status
Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - 5
6
9
12
11
16
17
18
19
20
21
22
23
24
25
26
27
28
LPU
LPU
LPU
LPU
LPU
LPU
MPU
MPU
SFU
SFU
SFU
SFU
CLK
CLK
PWR
PWR
FAN
FAN
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Present
Unregistered
Registered
Registered
Registered
Registered
Registered
Registered
NA
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Registered
Abnormal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
NA
NA
NA
NA
NA
NA
Slave
Master
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
----End
Configuration Files
None
10.14.4 Example for Configuring the Operation Mode of the
LPUF-10
You can set the working mode of the LPUF-10 to enable the LPUF-10 to support ATM or FR
services.
NOTE
LPUF-10 is not supported on the X1 and X2 models of the NE80E/40E.
Networking Requirements
It is required that the FR service be configured for the POS interface on the LPUF-10. If the
LPUF-10 operates in support-atm mode, you need to switch the operation mode to support-fr.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Check the current operation mode of the LPUF-10.
2.
Switch the operation mode of the LPUF-10.
Data Preparation
To complete the configuration, you need the following data:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
291
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
l
10 Device Maintenance
Slot number of the LPUF-10, that is, slot 1 in this example
Configuration Procedure
1.
Check the operation mode of the LPUF-10 in slot 1. You can find that the LPUF-10 operates
in support-atm mode.
<HUAWEI> display work-mode slot 1
NE40E-4's
Slot
- - - - 1
2.
current work-mode on lpuf-10:
Type
Current-workmode
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LPUF-10
SUPPORT-ATM
Switch the operation mode of the LPUF-10 to support-fr.
<HUAWEI> system-view
[HUAWEI] slot 1
[HUAWEI-slot-1] switch lpuf work-mode support-fr
Warning: After this operation, ATM cards on this board will be powered off.
Are you sure to switch[Y/N]?y
Now begin to switch the working mode. Please wait.......................
Info: The switch is successful and the current working mode on slot1 is SUPPORTFR.
3.
Verify the configuration.
<HUAWEI> display work-mode slot 1
NE40E-4's
Slot
- - - - 1
current work-mode on lpuf-10:
Type
Current-workmode
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LPUF-10
SUPPORT-FR
You can find that the LPUF-10 in slot 1 operates in support-fr mode.
Configuration Files
None.
10.14.5 Example for Configuring NAP-based Remote Deployment
in Automatic Mode
In this example, the temporary neighbor relationship is set up between a router and another
router that has the empty configuration to implement remote deployment in automatic mode.
Networking Requirements
As shown in Figure 10-1, the user needs to perform a remote login to Router B from Router A.
Router B is the master device, and temporary neighbor relationship is to be set up between
Router B and Router C having an empty configuration. Router B and Router C need to be directly
connected via a single hop. Both the interfaces connecting Router B and Router C should be in
the Up state, and should support NAP.
Figure 10-1 Networking diagram of configuring NAP-based remote deployment
GE1/0/1
Network
PC
Issue 02 (2011-09-10)
RouterA
RouterB
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
RouterC
292
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure a primary IP address and a secondary IP address on Router B.
2.
Configure the NAP master interface on Router B.
3.
Telnet to Router C from Router B by means of NAP.
Data Preparation
None
Procedure
Step 1 Configuring the NAP master interface
# Do as follows on Router B.
<HUAWEI> system-view
[HUAWEI] sysname RouterB
[RouterB] interface gigabitethernet1/0/1
[RouterB-GigabitEthernet1/0/1] undo shutdown
[RouterB-GigabitEthernet1/0/1] nap port master
Step 2 Logging in to the slave device from the master device.
# Do as follows on Router B.
[RouterB-GigabitEthernet1/0/1] nap login neighbor
Trying 10.167.253.10 ...
Press CTRL+K to abort
Connected to 10.167.253.10 ...
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
<HUAWEI>
Step 3 Shutting down NAP on the slave device.
# Do as follows on Router C.
<HUAWEI> system-view
[HUAWEI] sysname RouterC
[RouterC] undo nap slave enable
----End
Configuration Files
None
10.14.6 Example for Configuring NAP-based Remote Deployment
in Static Mode
In this example, the temporary neighbor relationship is set up between the router and the device
with the empty configuration and IP addresses are assigned to the router and the device to
implement remote deployment in manual mode.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
293
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Networking Requirements
As shown in Figure 10-2, the user needs to perform a remote login to Router B from Router A.
Router B is the master device, and temporary neighbor relationship is to be set up between
Router B and Router C having an empty configuration. Router B and Router C need to be directly
connected via a single hop. Both the interfaces connecting Router B and Router C should be in
the Up state, and should support NAP.
Figure 10-2 Networking diagram of configuring NAP-based remote deployment
GE1/0/1
Network
PC
RouterA
RouterB
RouterC
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure a NAP master interface on Router B.
2.
Configure an IP address for establishing a NAP connection on Router B.
3.
Use NAP to log in to Router C from Router B by means of Telnet.
Data Preparation
To complete the configuration, you need the following data:
l
Two primary IP addresses. The two IP addresses are primary IP addresses for the master
interface and the slave interface respectively, and should be on the same network segment.
l
Two secondary IP addresses. The two IP addresses are secondary IP addresses for the
master interface and the slave interface respectively, and should be on the same network
segment.
Procedure
Step 1 Configure a NAP master interface on Router B
<HUAWEI> system-view
[HUAWEI] sysname RouterB
[RouterB] interface gigabitethernet1/0/1
[RouterB-GigabitEthernet1/0/1] nap port master
Step 2 Configure an IP address for establishing a NAP connection on Router B
[RouterB-GigabitEthernet1/0/1] nap local-ip 12.12.12.5 sub-ip 12.12.12.9 peer-ip
12.12.12.6 sub-ip 12.12.12.10 30
Are you sure to continue?[Y/N] y
# After the preceding configuration is complete, run the display nap status command on
Router B. You can view that NAP has been enabled on Router B. Then, run the display nap
interface command. You can view that the primary and secondary IP addresses have been
assigned to the master and slave interfaces. For example:
[RouterB-GigabitEthernet1/0/1] display nap status
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
294
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
10 Device Maintenance
Slave port status
: Enable
Nap ip-pool/Mask
: 10.167.253.0/24
[RouterB-GigabitEthernet1/0/1] display nap interface
-----------------------------------------------------NAP master port list
Port count
: 1
-----------------------------------------------------Port property
: Master
Current status
: IP-ASSIGNED
Local port
: GigabitEthernet1/0/1
Peer port
: GigabitEthernet1/0/1
Local primary ip
: 12.12.12.5
Peer primary ip
: 12.12.12.6
Local secondary ip
: 12.12.12.9
Peer secondary ip
: 12.12.12.10
Hello time
: 3s
Linked time
: 00:02:33
------------------------------------------------------
Step 3 Log in to the slave device from the master device.
# Configure Router B.
[RouterB-GigabitEthernet1/0/1] nap login neighbor
Trying 12.12.12.10 ...
Press CTRL+K to abort
Connected to 12.12.12.10 ...
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
Step 4 Disable NAP on the slave device.
# Configure Router C.
<HUAWEI> system-view
[HUAWEI] sysname RouterC
[RouterC] undo nap slave enable
----End
Configuration Files
None
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
295
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
11 Device Upgrading
11
Device Upgrading
About This Chapter
When you need to add new features, optimize existing features, or solve problems in the current
version, you can upgrade the device.
11.1 Overview of Device Upgrade
11.2 Upgrade Modes Supported by the NE80E/40E
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
296
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
11 Device Upgrading
11.1 Overview of Device Upgrade
A device is upgraded when new features need to be added, existing performance needs to be
optimized, and existing problems in the current version need to be solved.
Application Scenario of Device Upgrade
To perform the following actions, you need to upgrade the NE80E/40E:
l
Adding new features
l
Optimizing the existing performance
l
Solving existing problems in the current version
Note
Before upgrading the NE80E/40E, pay attention to the following items:
l
When upgrading the NE80E/40E at the site, prepare a spare part for each board.
l
Obtain the new system software, the Product Adaptive File (PAF) or license file, and the
corresponding documents of the new version from Huawei.
l
Back up configuration files, and collect and save service configurations.
l
Enable the log function to record all the operations during the upgrade process.
l
Check software versions of all modules on each board, including versions of the BootROM,
Firmware, and MonitorBus.
11.2 Upgrade Modes Supported by the NE80E/40E
At present, the NE80E/40E can be upgraded by using the command line, mobile storage device,
or BootROM.
Upgrade by Using the Command Line
This mode is applicable for the following situations. For operation details, refer to the
"NE80E&40E V600R003C00 Version Upgrade Instructions" of the corresponding system
software version.
l
The NE80E/40E works properly and uses FTP/TFTP for the upgrade. Other devices can
perform remote login to the NE80E/40E.
l
The NE80E/40E is upgraded for the first time and has been loaded with the system software
package. Other devices can log in to the NE80E/40E through the serial interface to
configure the IP address or perform remote login to the NE80E/40E through NAP.
Upgrade by Using a Mobile Storage Device ( CF card or USB )
Upgrading the NE80E/40E by using the CF card or USB is mainly used during the engineering
stage or troubleshooting process. Before the upgrade, prepare two CF cards or two USBs.
In this mode, the NE80E/40E is upgraded by replacing the CF card on the master and slave
MPU/SRU with CF cards containing the system software package or inserting a USB to any
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
297
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
11 Device Upgrading
USB interface on the MPU/SRU. For operation details, refer to the "Version Upgrade
Instructions" of the corresponding system software version.
Upgrade by Using BootROM
This mode is applicable for the following situations. For operation details, refer to the
"NE80E&40E V600R003C00 Version Upgrade Instructions" of the corresponding system
software version:
l
The NE80E/40E is upgraded for the first time, but the system software package of the
NE80E/40E does not exist or is incorrect.
l
After the NE80E/40E is upgraded and restarted, both the master and slave MPUs/SRUs
cannot be registered.
l
After the NE80E/40E is upgraded, the master MPU/SRU can be registered but the slave
MPUs/SRUs cannot be registered.
l
The MPU/SRU is replaced.
l
Other devices cannot log in to the NE80E/40E through Telnet.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
298
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
12
Patch Management
About This Chapter
Patch management includes checking the running patch, loading patch files, and installing
patches.
12.1 Introduction of Patch Management
This section describes the basics of the patch.
12.2 Checking the Running of Patch in the System
The system allows only one patch to run. Therefore, confirm that no patch is running before
loading a new patch.
12.3 Loading a Patch
Patches can be loaded through FTP, TFTP, or XModem.
12.4 Installing a Patch
To repair the system that has vulnerabilities or defects, you can install a patch on the system.
By installing a patch, you can upgrade the system without upgrading the system software.
12.5 (Optional) Unactivating the activating of Patch
If an installed patch does not take effect, you need to deactivate the patch.
12.6 Configuration Examples of the Patch Management
This section describes some Configuration Examples.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
299
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
12.1 Introduction of Patch Management
This section describes the basics of the patch.
12.1.1 Overview of Patch Management
You can install patches to improve system functions.
Patch Overview
During the operation of the device, you need to revise the system software sometimes such as
remove the system defects or add new functions for service requirements. We used to upgrade
the software after shutting down the system. This static upgrade affects the service on the device
and does not improve the communication. If we load a patch to the system software, we can
upgrade it online without interrupting the operation of the device. This dynamic upgrade does
not affect the service and can improve the communication.
Patch Area
In the memory of the Main Processing Unit (MPU) and Line Processing Unit (LPU), a certain
space is reserved to save the patch. This space is called patch area.
To install the patch, save the patch to the patch area in advance in the memory of the board.
The patch saved in the patch area is numbered uniquely. Up to 200 patches can be saved to the
patch area in the memory of the MPU or LPU.
Patch States
Patch status can be idle, deactive, active, and running. For details, seeTable 12-1,
Table 12-1 Patch states
State
Description
States Conversion
No patch
(idle)
The patch file is saved to the CF
card but not loaded to the patch
area in the memory.
When the patch is loaded to the patch
area, the patch status is set to deactive.
deactive
The patch is loaded to the patch
area but disabled.
The patch in the deactive state can be as
follows:
l Uninstalled, that is, deleted from the
patch area.
l Enabled temporarily and turns to the
active state.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
300
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
State
Description
States Conversion
active
The patch is loaded to the patch
area and enabled temporarily.
The patch in the active state can be as
follows:
If the board is reset, the active
patch on that board turns to the
deactive state.
l Uninstalled, that is, deleted from the
patch area.
l Enabled temporarily and turned into
the active state.
l Enabled permanently, and turns to
the running state.
The patch is loaded to the patch
area and enabled permanently.
running
If the board is reset, the patch on
the board keeps in the running
state.
The patch in the running state can be
uninstalled and deleted from the patch
area.
Figure 12-1shows the conversion between patch states.
Figure 12-1 Conversion between the statuses of a patch
Load patch
No patch
Delete patch
Deactivated
Deactive patch
Delete patch
Active patch
Delete patch
Running
Run patch
Activated
12.1.2 Patches Supported by the NE80E/40E
The NE80E/40E allows patches to be loaded to the system or a certain board.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
301
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Patch Functions
Installing patches can improve system functions or fix bugs. By installing a patch, you can
upgrade the system without upgrading the system software.
In some special scenarios, you can install patches specific to an MPU or LPU to optimize board
functions.
Logic Relationships Between Configuration Tasks
Figure 12-2Shows the logic relationships between the configuration tasks.
Figure 12-2 Logical relationships between configuration tasks
Resort to
technical
support for
new patch
Run VRP
Normally run
No
Enable patch
temporarily
Bug removed
Yes
No
Disable patch
Yes
End
Unload patch
12.2 Checking the Running of Patch in the System
The system allows only one patch to run. Therefore, confirm that no patch is running before
loading a new patch.
12.2.1 Establishing the Configuration Task
Before checking the running patch, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Applicable Environment
At a certain time, the system allows the running of only one patch. Therefore, you need to confirm
no patch is running in the current system before installing a patch. If a patch runs, delete the
patch before installing the new patch.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
302
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Pre-configuration Tasks
Before checking the running of patch in the system, complete the following tasks:
l
Ensuring that the router is started normally after power-on
l
Ensuring that the router can be logged in to
Data Preparation
None
12.2.2 Checking the Running of Patch in the System
By running the display patch-information command, you can view information about the
running patch units, activated patch units, and deactivated patch units.
Context
Do as follows on the router to be upgraded:
Procedure
Step 1 Run:
display patch-information
All the information about the current patch is displayed, including information about the patch
units that are running, the patch units that are activated, and the patch units that are deactivated.
----End
Example
<PE> display patch-information
Info: No patch exists.
This indicates that no patch runs in the current system.
NOTE
If there are patches running, you must delete them before loading new patches.
12.2.3 (Optional) Deleting a Patch
The system allows only one patch to run. If there is a running patch, you need to delete it before
loading a new patch.
Context
Before installing a patch, you need to delete the running patch.
Do as follows on the router to be upgraded.
Procedure
Step 1 Run:patch delete all
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
303
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
The running patch is deleted.
----End
12.3 Loading a Patch
Patches can be loaded through FTP, TFTP, or XModem.
12.3.1 Establishing the Configuration Task
Before loading a patch, familiarize yourself with the applicable environment, complete the preconfiguration tasks, and obtain the required data. This can help you complete the configuration
task quickly and accurately.
Applicable Environment
Before a patch is installed, it should be uploaded to the root directory of the CF card of the master
and slave MPUs. Upload the patch to the root directory of the CF card of the master MPU. Then,
copy the patch to the root directory of the CF card of the slave MPU.
The three methods to upload a patch are FTP, TFTP and XModem.
Pre-configuration Tasks
Before loading a patch, complete the following tasks:
l
Ensuring that the router is started normally after power-on
l
Ensuring that the router can be logged in to
Data Preparation
Before running a patch, you need to obtain a patch that is consistent with the board.
No.
Data
1
Uploading a Patch to the Root Directory of the CF Card of the Master MPU
2
Copying a Patch to the Root Directory of the CF Card of the Slave MPU
12.3.2 Loading a Patch
On a dual-MPU router, you need to load a patch to both the master MPU and the slave MPU.
Context
Do as follows on the router to be upgraded:
Procedure
Step 1 Upload a patch to the root directory of the CF card of the master MPU.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
304
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
The router supports the uploading of files through FTP, TFTP and XModem, for more
infirmation ,please see: "FTP, TFTP and XModem". Choose an uploading method based on the
requirements.
Step 2 Run:
copy source-filename slave#cfcard:/destination-filename
The patch is copied to the root directory of the CF card of the slave MPU.
Step 3 Run:
startup patch file-name
The patch package is specified for the master MPU on the next startup.
Step 4 Run:
startup patch file-name slave-board
The patch package is specified for the slave MPU on the next startup.
----End
12.3.3 Checking the Configuration
After a patch is loaded, you can check patch information.
Context
Run the following commands to check the previous configuration.
Procedure
l
Run:
dir cfcard:/
Check the files on the MPU.
l
Run:
dir slave#cfcard:/
Check the files on the slave MPU.
l
Run:
display startup
Check the patch file used in the next system startup.
----End
Example
After uploading the files, run the commands of dir cfcard:/ and dir slave#cfcard:/. The
patch.pat file is contained in the files on the CF card.
For example, check the files on the CF card of the master MPU:
<HUAWEI> dir cfcard:/
Directory of cfcard:/
Idx
Issue 02 (2011-09-10)
Attr
Size(Byte)
Date
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Time
FileName
305
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
0
-rw64
1
-rw418
2
-rw38017
3
-rw2292
4
-rw7041
5
-rw117013076
V600R003C00SPC300.cc
6
-rw134213212
V600R003C00SPC300.cc
7
-rw4041
500192 KB total (347760 KB free)
12 Patch Management
Nov
Jul
Aug
Aug
Aug
Jul
15
26
01
21
02
13
2006
2007
2007
2006
2007
2007
13:07:44
19:52:14
11:02:00
15:35:50
11:02:00
10:40:44
patchnpstate.dat
vrpcfg.zip
paf.txt
vrp.zip
license.txt
Nov 18 2007 05:30:11
Nov 02 2007 11:04:00
patch.pat
For example, check the files on the CF card of the slave MPU:
<HUAWEI> dir slave#cfcard:/
Directory of slave#cfcard:/
Idx
Attr
Size(Byte)
0
-rw64
1
-rw418
2
-rw38017
3
-rw2292
4
-rw7041
5
-rw117013076
V600R003C00SPC300.cc
6
-rw134213212
V600R003C00SPC300.cc
7
-rw4041
500192 KB total (343160 KB free)
Nov
Jul
Aug
Aug
Aug
Jul
Date
15 2006
26 2007
01 2007
21 2006
02 2007
13 2007
Time
13:07:44
19:52:14
11:02:00
15:35:50
11:02:00
10:40:44
FileName
patchnpstate.dat
vrpcfg.zip
paf.txt
vrp.zip
license.txt
Nov 18 2007 05:30:11
Nov 02 2007 11:04:00
patch.pat
For example, check the patch file used in the next system startup.
<HUAWEI>display startup
MainBoard:
Configed startup system software:
Startup system software:
Next startup system software:
Startup saved-configuration file:
Next startup saved-configuration file:
Startup paf file:
Next startup paf file:
Startup license file:
Next startup license file:
Startup patch package:
Next startup patch package:
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/V600R003C00SPC300.cc
cfcard:/current_cfg.cfg
cfcard:/current_cfg.cfg
cfcard:/paf-V600R003C00SPC300.txt
cfcard:/paf-V600R003C00SPC300.txt
cfcard:/license-V600R003C00SPC300.txt
cfcard:/license-V600R003C00SPC300.txt
Null
cfcard:/patch.pat
12.4 Installing a Patch
To repair the system that has vulnerabilities or defects, you can install a patch on the system.
By installing a patch, you can upgrade the system without upgrading the system software.
12.4.1 Establishing the Configuration Task
Before installing a patch on the system, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the required data. This can help you complete
the configuration task quickly and accurately.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
306
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Applicable Environment
CAUTION
When installing a patch, it is recommended to specify all to install the patch for all boards at
one time rather than specify slot to install the patch for boards one by one. In some special
scenarios, you must specify slot to install a patch for the master and slave MPUs, and then for
all LPUs one by one.
Installing patches can fix system vulnerabilities or correct system defects. By installing a patch,
you can upgrade the system without upgrading the system software.
When a patch is uploaded, the system checks that the patch version is the same as the system
version. If the two versions are not the same, the system prompts that the patch uploading fails.
Pre-configuration Tasks
Before installing a patch, upload the patch to the root directory of the CF card of the master and
slave MPUs.
Data Preparation
None
12.4.2 Loading a Patch
A patch can be successfully loaded only when the patch version matches the system software
version.
Context
Do as follows on the router to be upgraded:
Procedure
Step 1 Run:
patch load file-name all
The patch is loaded.
----End
Follow-up Procedure
When a patch is loaded, the system checks that the patch version is the same as the system
version. If the two versions are not the same, the system prompts that the patch loading fails.
When the patch is loaded successfully, it's status is Deactive and keeps Deactive after the board
is reset.
12.4.3 Activating a Patch
A patch can be activated only when it is correctly loaded and is in the deactivated state.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
307
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Context
Do as follows on the router to be upgraded:
Procedure
Step 1 Run:
patch active all
The patch is activated.
----End
Follow-up Procedure
A patch can be activated only when it is correctly loaded and is in the deactivated state. When
a patch is activated, it becomes valid immediately. After the board is reset, however, the status
of the patch becomes Deactive , and the patch does not remain valid.
12.4.4 Running a Patch
A patch can be run only after it is activated. Running a patch means that the patch is activated
permanently.
Context
Do as follows on the router be upgraded:
Procedure
Step 1 Run:
patch run all
The patch is run.
----End
Follow-up Procedure
A patch can be run only after it is activated. Running a patch means that the patch is activated
permanently and the patch remains valid after the board is reset. The status of the patch keeps
Running.
12.4.5 (Optional) Synchronizing Patches
After patches on the active and standby MPUs are synchronized, the patches on the active and
standby MPUs are the same.
Context
Do as follows on the router:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
308
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Procedure
Step 1 Enter the user view.
Step 2 Run:
patch configuration-synchronize
The patch is synchronized to the standby MPU.
After patch configurations and patch files are synchronized from the active MPU to the standby
MPU, the patch files, patch configurations, and patch status can remain unchanged if the activestandby MPU switchover occurs.
----End
12.4.6 Checking the Configuration
After a patch is installed on the system, you can check the patch status and the patch for the next
startup.
Procedure
l
Run:
display patch-information
Check the patch state.
----End
Example
After the patch is loaded, run the display patch-information command. The results are as
follows:
<HUAWEI> display patch-information
Service pack Version:V600R003C00SPH001
Pack file name
cfcard:/patch.pat
----------The patch information of slot
This slot does not need patch
3----------
----------The patch information of slot
This slot does not need patch
4----------
----------The patch information of slot
This slot does not need patch
6----------
----------The patch information of slot 33---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
:
Deactive Patch Unit
: 1 - 1
----------The patch information of slot 34---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
:
Deactive Patch Unit
: 1 - 1
<HUAWEI>display patch-information configure-file
Codes: M(Max patch ID in the board)
-------------------------------------------------------------
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
309
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Slot
State
Run
Active Deactive NPPatch
------------------------------------------------------------1
registered
M
deactive
2
registered
M
deactive
3
unregistered
M
deactive
4
unregistered
M
deactive
5
unregistered
M
deactive
6
unregistered
M
deactive
7
unregistered
M
deactive
8
unregistered
M
deactive
9
unregistered
M
deactive
10
unregistered
M
deactive
11
unregistered
M
deactive
12
unregistered
M
deactive
13
unregistered
M
deactive
14
unregistered
M
deactive
15
unregistered
M
deactive
16
unregistered
M
deactive
17
registered
M
idle
18
registered
M
idle
------------------------------------------------------<HUAWEI>display patch-information configure-file next-startup
Codes: M(Max patch ID in the board)
----------------------------------------Slot
Run Active Deactive NPPatch
----------------------------------------1
M
deactive
2
M
deactive
3
M
deactive
4
M
deactive
5
M
deactive
6
M
deactive
7
M
deactive
8
M
deactive
9
M
deactive
10
M
deactive
11
M
deactive
12
M
deactive
13
M
deactive
14
M
deactive
15
M
deactive
16
M
deactive
17
M
idle
18
M
idle
--------------------------------------
After the patch is actived, run the display patch-information command. The results are as
follows:
<HUAWEI> display patch-information
Service pack Version:V600R003C00SPH001
Pack file name
cfcard:/patch.pat
----------The patch information of slot
This slot does not need patch
3----------
----------The patch information of slot
This slot does not need patch
4----------
----------The patch information of slot
This slot does not need patch
6----------
----------The patch information of slot 33---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
: 1 - 1
Deactive Patch Unit
:
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
310
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
----------The patch information of slot 34---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
: 1 - 1
Deactive Patch Unit
:
<HUAWEI>display patch-information configure-file
Codes: M(Max patch ID in the board)
------------------------------------------------------------Slot
State
Run
Active Deactive NPPatch
------------------------------------------------------------1
registered
M
active
2
registered
M
active
3
unregistered
M
active
4
unregistered
M
active
5
unregistered
M
active
6
unregistered
M
active
7
unregistered
M
active
8
unregistered
M
active
9
unregistered
M
active
10
unregistered
M
active
11
unregistered
M
active
12
unregistered
M
active
13
unregistered
M
active
14
unregistered
M
active
15
unregistered
M
active
16
unregistered
M
active
17
registered
M
idle
18
registered
M
idle
------------------------------------------------------<HUAWEI>display patch-information configure-file next-startup
Codes: M(Max patch ID in the board)
----------------------------------------Slot
Run Active Deactive NPPatch
----------------------------------------1
M
active
2
M
active
3
M
active
4
M
active
5
M
active
6
M
active
7
M
active
8
M
active
9
M
active
10
M
active
11
M
active
12
M
active
13
M
active
14
M
active
15
M
active
16
M
active
17
M
idle
18
M
idle
--------------------------------------
After running the patch , run the display patch-information command. The results are as
follows:
<HUAWEI> display patch-information
Service pack Version:V600R003C00SPH001
Pack file name
cfcard:/patch.pat
----------The patch information of slot
This slot does not need patch
3----------
----------The patch information of slot
This slot does not need patch
4----------
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
311
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
----------The patch information of slot
This slot does not need patch
12 Patch Management
6----------
----------The patch information of slot 33---------Total Patch Unit
: 1
Running Patch Unit
: 1 - 1
Active Patch Unit
:
Deactive Patch Unit
:
----------The patch information of slot 34---------Total Patch Unit
: 1
Running Patch Unit
: 1 - 1
Active Patch Unit
:
Deactive Patch Unit
:
<HUAWEI>display patch-information configure-file
Codes: M(Max patch ID in the board)
------------------------------------------------------------Slot
State
Run
Active Deactive NPPatch
------------------------------------------------------------1
registered
M
run
2
registered
M
run
3
unregistered
M
run
4
unregistered
M
run
5
unregistered
M
run
6
unregistered
M
run
7
unregistered
M
run
8
unregistered
M
run
9
unregistered
M
run
10
unregistered
M
run
11
unregistered
M
run
12
unregistered
M
run
13
unregistered
M
run
14
unregistered
M
run
15
unregistered
M
run
16
unregistered
M
run
17
registered
M
idle
18
registered
M
idle
------------------------------------------------------<HUAWEI>display patch-information configure-file next-startup
Codes: M(Max patch ID in the board)
----------------------------------------Slot
Run Active Deactive NPPatch
----------------------------------------1
M
run
2
M
run
3
M
run
4
M
run
5
M
run
6
M
run
7
M
run
8
M
run
9
M
run
10
M
run
11
M
run
12
M
run
13
M
run
14
M
run
15
M
run
16
M
run
17
M
idle
18
M
idle
--------------------------------------
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
312
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
12.5 (Optional) Unactivating the activating of Patch
If an installed patch does not take effect, you need to deactivate the patch.
12.5.1 Establishing the Configuration Task
Before deactivating a patch, familiarize yourself with the applicable environment, complete the
pre-configuration tasks, and obtain the required data. This can help you complete the
configuration task quickly and accurately.
Applicable Environment
After a patch is activated, you need to judge that the patch has achieved the expected effect. If
the patch does not become valid, you need to activate the patch.
A patch can be deactivated only after it is activated.
Pre-configuration Tasks
None
Data Preparation
None
12.5.2 Deactivating a Patch
Deactivating a patch makes an active patch become inactive.
Procedure
Step 1 Run:
patch deactive all
The patch is deactivated.
----End
12.5.3 Checking the Configuration
After a patch is deactivated, you can run the display command to check the patch status.
Procedure
l
Run:
display patch-information
Check the patch state.
----End
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
313
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Example
After the preceding configuration succeeds, run the display patch-information command. The
results are as follows:
<HUAWEI> display patch-information
Service pack Version:V600R003C00SPH001
Pack file name
cfcard:/patch.pat
----------The patch information of slot
This slot does not need patch
3----------
----------The patch information of slot
This slot does not need patch
4----------
----------The patch information of slot
This slot does not need patch
6----------
----------The patch information of slot 33---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
:
Deactive Patch Unit
: 1 - 1
----------The patch information of slot 34---------Total Patch Unit
: 1
Running Patch Unit
:
Active Patch Unit
:
Deactive Patch Unit
: 1 - 1
12.6 Configuration Examples of the Patch Management
This section describes some Configuration Examples.
12.6.1 Example for Installing a Patch
When the system has vulnerabilities or defects, you can install a patch to repair the system.
Networking Requirements
Figure 12-3shows that some urgent bug occurs to the system software at the Provider Edge (PE)
connected to the Internet. Huawei provides the patch file to remove the bug. The patch in this
patch file must be installed to remove the bug.
Figure 12-3 Networking diagram of installing a patch
FTP Server
GE0/0/0
10.1.1.1/24
10.1.1.2/24
MPLS Core
PE
PC
10.1.1.3/24
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
314
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
12 Patch Management
Configuration Roadmap
The configuration roadmap is as follows:
1.
Save the patch file to the root directory of the CF card on the master and slave MPUs.
2.
Load the patch.
3.
Activate the patch.
4.
Run the patch.
Data Preparation
To complete the configuration, you need the following data:
l
File name of the patch: patch.pat
l
Path the patch saved to on the MPU: cfcard:/
Procedure
Step 1 Upload the patch file for the system software.
# Log in to the FTP server.
<PE> ftp 10.1.1.2
Trying 10.1.1.2 ...
Press CTRL+K to abort
Connected to 192.168.1.2.
220 FTP service ready.
User(10.1.1.2:(none)):huawei
331 Password required for huawei.
Password:
230 User logged in.
[ftp]
# Configure the binary transmission format and the working directory of the CF card on PE.
[ftp] binary
200 Type set to I.
[ftp] lcd cfcard:/
% Local directory now cfcard:.
# Load the patch file for the current system software from the remote FTP server.
[ftp] get patch.pat
200 Port command okay.
150 Opening ASCII mode data connection for license.txt.
226 Transfer complete.
FTP: 6309 byte(s) received in 0.188 second(s) 33.55Kbyte(s)/sec.
[ftp] bye
221 Server closing.
<PE>
# Copy the patch file to the CF card on the slave MPU.
<PE> copy cfcard:/patch.pat slave#cfcard:/
Copy cfcard:/patch.pat to slave#cfcard:/patch.pat?[Y/N]:y
100% complete
Info:Copied file cfcard:/ patch.pat to slave#cfcard:/ patch.pat...Done
Step 2 Load the patch.
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
315
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
<PE>
12 Patch Management
patch load patch.pat all
Step 3 Activate the patch.
<PE> patch active all
Step 4 Run the patch.
<PE> patch run all
Step 5 Verify the configuration
<PE> display patch-information
Patch Package Name
:cfcard:/patch.pat
Patch Package Version:V600R003C00SPH001
************************************************************************
*
The hot patch information, as follows:
*
************************************************************************
Slot
Type
State
Count
-----------------------------------------------------------7
C
Running
1
************************************************************************
*
The cold patch information, as follows:
*
************************************************************************
all slots do not need cold patch
----End
Configuration Files
None
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
316
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
A Glossary
A
Glossary
This appendix collates frequently used terms in this document.
A
Accounting
A network security service that records the user's access to the
network.
Agent
A process that is used in all managed devices. It receives request
packets from the NM Station and performs the Read or Write
operation on managed variables according to packet types and
generates response packets and sends them to the NM Station.
AH
Authentication Header. A security protocol that provides data
authentication and integrity for IP packets. AH is used in the
transmission mode and in the tunneling mode.
ASSP
Analogue Sensor Signal Processes. An error tolerance protocol
that provides the interface backup in the multiple access, multicast
and broadcast in LAN (such as Ethernet).
Authentication
A method used to prove user identity.
Authorization
A method used to prove identity of users to use the service.
B
Issue 02 (2011-09-10)
Backup center
A mechanism in which the interfaces on a device back up each
other and trace the status of the interface. If an interface is Down,
the backup center provides a backup interface to undertake the
service.
BFD
Bidirectional Forwarding Detection. A unified detection
mechanism that is used to detect and monitor the link or IP routes
forwarding at a fast pace.
Black list
A filtering mode that is used to filter the packet according to the
source IP address. Compared with the ACL, the black list can filter
the packet at a high speed because its matching region is simple.
It can shield the packet from the specified IP address.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
317
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
A Glossary
C
CLI
Command Line Interface. An interface that allows the user to
interact with the operating system. Users can configure and
manage the NE80E/40E by entering commands through the CLI.
Congestion avoidance
A flow control mechanism by which the network overload is
relieved by adjusting the network traffic. When the congestion
occurs and becomes worse, the packet is discarded by monitoring
the network resource.
Congestion management A flow control measure to solve the problem of network resource
competition. When the network congestion occurs, it places the
packet into the queue for buffer and determines the order of
forwarding the packet.
Command line level
The priority of the system command that is divided into 4 levels.
Users of a level can run the command only of the same or lower
level.
E
Ethernet
A baseband LAN specification created by Xerox and developed
by Xerox, Intel, and Digital Equipment Corporation (DEC). This
specification is similar to IEEE802.3.
Ethernet_II
An encapsulation format of the Ethernet frame. Ethernet_II that
contains a 16-bit protocol type field is the standard ARPA Ethernet
Version 2.0 encapsulation.
Ethernet_SNAP
An encapsulation format of the Ethernet frame. The frame format
complies with RFC 1042 and enables the transmission of the
Ethernet frame on the IEEE 802.2 media.
F
FIFO
First In First Out. A queuing scheme in which the first data into
the network is also the fist data out of the network.
File system
A method in which files and directories in the storage devices are
managed, such as creating a file system, creating, deleting,
modifying and renaming a file or directory or displaying the
contents of the file.
FTP
File Transfer Protocol. An application protocol in the TCP/IP
stack, used for transferring files between remote hosts. FTP is
implemented based on the file system.
H
Issue 02 (2011-09-10)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
318
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
HGMPv2
A Glossary
Huawei Group Management Protocol Version 2. A protocol with
which the discovery, topology collection, centralized management
and remote maintenance are implemented on Layer 2 devices of a
cluster that are connected with the router.
I
Information center
The information hinge in the MA5200G that can classify and filter
the output information.
Interface mirroring
A method of copying the packet of the mirrored interface to the
other mirroring interfaces to forward the packet.
IPv6
Internet Protocol Version 6. Replacement for the current version
of IP (version 4) designed by the IETF. It is the second generation
standard protocol of the internet layer and it is also called IPng
(next generation). The length of the IP address in IPv6 is 128 bits
and the length of the IP address in IPv4 is 32 bits.
IP negotiated
An attribute of the interface. When the user accesses the Internet
through the ISP, the IP address is usually allocated by the peer
server. The PPP packet must be encapsulated and the IP address
negotiated attribute must be configured on the interface so that the
local interface accepts the IP address allocated by the peer end
through the PPP negotiation.
IP unnumbered
A mechanism in which the interface that is not configured with an
IP address can borrow the IP address of the interface that is
configured with an IP address to save the IP address resource.
ISATAP tunnel
Intra-site Automatic Tunnel Addressing Protocol. A protocol that
is used for the IPv4/IPv6 host in the IPv4 network to access the
IPv6 network. The ISATAP tunnel can be established between the
ISATAP hosts or between the ISATAP host and the ISATAP
router.
ISIS-TE
Traffic engineering of IS-IS. (For the information of IS-IS, refer
to )
L
Issue 02 (2011-09-10)
LAN interface
Local Area Network interface. Often an Ethernet interface through
which the router can exchange data with the network device in a
LAN.
License
Permission of some features that dynamically control the product.
Logical interface
A configured interface that can exchange data but does not exist
physically. A logical interface can be a sub-interface, virtualtemplate interface, virtual Ethernet interface, Loopback interface,
Null interface and Tunnel interface.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
319
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
A Glossary
M
MIB
Management Information Base. A database of variables of the
monitored network device. It can uniquely define a managed
object.
Modem
Modulator-demodulator. Device that converts digital and analog
signals.
Multicast
A process of transmitting packets of data from one source to many
destinations. The destination address of the multicast packet uses
Class D address, that is, the IP address ranges from 224.0.0.0 to
239.255.255.255. Each multicast address represents a multicast
group rather than a host.
N
NDP
Neighbor Discovery Protocol. A protocol that is used to discover
the information of the neighboring Huawei device that is
connected with the local device.
NMS
Network Management System. A system that sends various query
packets and receives the response packet and trap packet from the
managed devices and displays all the information.
NTDP
A protocol that is used to collect the information of the adjacency
and the backup switch of each device in the network.
NTP
Network Time Protocol. An application protocol that is used to
synchronize the distributed server and the client side.
O
OSPF-TE
Traffic engineering of OSPF. (For the information of OSPF, refer
to )
P
Policy-based routing
A routing scheme that forwards packets to specific interfaces based
on user-configured policies.
R
Issue 02 (2011-09-10)
Regular expression
When a lot of information is output, you can filter the unnecessary
contents out with regular expressions and display the necessary
contents.
RMON
Remote monitoring. An MIB agent specification defined by the
IETF that defines functions for the remote monitoring of the data
flow of a network segment or the whole network.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
320
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
A Glossary
router
A device on the network layer that selects routes in the network.
The router selects the optimal route according to the destination
address of the received packet through a network and forwards the
packet to the next router. The last router is responsible for sending
the packet to the destination host.
RRPP
Rapid Ring Protection Protocol. A protocol that is applied on the
data link layer. When the Ethernet ring is complete, it can prevent
the broadcast storm caused by the data loop. When a link is
disconnected on an Ethernet ring, it can rapidly restore the
communication link between the nodes on the ring network.
RSVP-TE
Traffic engineering of RSVP. (For the information of RSVP, refer
to )
S
Service tracing
A method of service debugging, diagnosis and error detection that
is mainly used for service personnel to locate the fault in user
access. The service tracing can output the status change and the
result of the protocol processing of the specified user during the
access to the terminal or the server for the reference and analysis
of the service personnel.
SSH
Secure Shell. A protocol that provides a secure connection to a
router through a TCP application.
Static ARP
A protocol that binds some IP addresses to a specified gateway.
The packet of these IP addresses must be forwarded through this
gateway.
System environment
Basic parameters for running the MA5200G such as host name,
language mode and system time. After configuration, the system
environment can meet the requirements of the actual environment.
T
Issue 02 (2011-09-10)
Telnet
An application protocol of the TCP/IP stack that provides virtual
terminal services for a wide variety of remote systems.
Terminal
A device that is connected with other devices through the serial
port. The keyboard and the display have no disk drives.
Traffic policing
A process used to measure the actual traffic flow across a given
connection and compare it to the total admissible traffic flow for
that connection. When the traffic exceeds the flow that is agreed
upon , some restrictions or penalties are adopted to protect the
interest and the network resource of the operator.
Traffic shaping
A flow control measure to shape the flow rate. It is often used to
control the flow in regular amounts to ensure that the traffic is
within the traffic stipulated for the downstream router and prevents
unnecessary discard and congestion.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
321
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
Tunnel
A Glossary
Secure communication path between two peers in the VPN that
protect the internal information of the VPN from the interruption.
V
VPN
Virtual Private Network. A new technology developed with the
Internet to provide an apparent single private network over a public
network. "Virtual" means the network is a logical network.
VPR
Versatile Routing Platform. A versatile routing operating system
platform developed for all data communication products of
Huawei. With the IP service as its core, the NE80E/40E adopts the
componentized architecture. The NE80E/40E realizes rich
functions and provides tailorability and scalability based on
applications.
VRRP
Virtual router Redundancy Protocol. An error tolerant protocol
defined in RFC 2338. It forms a backup group for a group of
router in a LAN that functions as a virtual router.
VTY
Virtual type terminal. A terminal line that is used to access a
router through Telnet.
W
X
Issue 02 (2011-09-10)
X.25
A protocol applied on the data link layer that defines how
connections between DTE and DCE are maintained for remote
terminal access and computer communications in PDNs.
XModem
A transmission protocol in the format of the binary code.
XOT
X.25 over TCP. A protocol that implements the interconnection
between two X.25 networks through the TCP packet bearing X.25
frames.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
322
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
B
B Acronyms and Abbreviations
Acronyms and Abbreviations
This appendix collates frequently used acronyms and abbreviations in this document.
Numerics
3DES
Triple Data Encryption Standard
A
AAA
Authentication, Authorization and Accounting
ACL
Access Control List
ARP
Address Resolution Protocol
AES
Advanced Encryption Standard
ASPF
Application Specific Packet Filter
AUX
Auxiliary port
B
BGP
Border Gateway Protocol
C
CBQ
Class-based Queue
CHAP
Challenge Handshake Authentication Protocol
CQ
Custom Queuing
CR-LDP
Constraint-based Routing LDP
D
DES
Issue 02 (2011-09-10)
Data Encryption Standard
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
323
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
B Acronyms and Abbreviations
DHCP
Dynamic Host Configuration Protocol
DNS
Domain Name System
E
ESP
Encapsulating Security Payload
F
FR
Frame Relay
G
GRE
Generic Routing Encapsulation
H
HDLC
High Level Data Link Control
I
IETF
Internet Engineering Task Force
IKE
Internet Key Exchange
IPSec
IP Security
IS-IS
Intermediate System-to-Intermediate System intra-domain
routing information exchange protocol
ITU-T
International Telecommunication Union Telecommunications
Standardization Sector
L
L2TP
Layer Two Tunneling Protocol
LAPB
Link Access Procedure Balanced
LDP
Label Distribution Protocol
M
Issue 02 (2011-09-10)
MAC
Medium Access Control
MBGP
Multiprotocol Extensions for BGP-4
MFR
Multiple Frame Relay
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
324
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
B Acronyms and Abbreviations
MP
MultiLink PPP
MPLS
Multiprotocol Label Switching
MSDP
Multicast Source Discovery Protocol
MTU
Maximum Transmission Unit
N
NAT
Network Address Translation
NAT-PT
Network Address Translation - Protocol Translation
O
OAM
Operation, Administration and Maintenance
OSPF
Open Shortest Path First
P
PAP
Password Authentication Protocol
PE
Provider Edge
Ping
Ping (Packet Internet Groper)
PPP
Point-to-Point Protocol
PPPoA
PPP over AAL5
PPPoE
Point-to-Point Protocol over Ethernet
PPPoEoA
PPPoE on AAL5
PQ
Priority Queuing
Q
QoS
Quality of Service
R
Issue 02 (2011-09-10)
RADIUS
Remote Authentication Dial In User Service
RIP
Routing Information Protocol
RPR
Resilient Packet Ring
RSVP
Resource Reservation Protocol
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
325
HUAWEI NetEngine80E/40E Router
Configuration Guide - Basic Configurations
B Acronyms and Abbreviations
S
SFTP
SSH File Transfer Protocol
T
TE
Traffic Engineering
TCP
Transmission Control Protocol
TFTP
Trivial File Transfer Protocol
V
VPN
Virtual Private Network
VRP
Versatile Routing Platform
VRRP
Virtual Router Redundancy Protocol
W
WAN
Wide Area Network
WFQ
Weighted Fair Queuing
WRED
Weighted Random Early Detection
X
XOT
Issue 02 (2011-09-10)
X.25 Over TCP
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
326