200
Quidway S2700 Series Ethernet Switches V100R006C00 Configuration Guide - Basic Configuration Issue 01 Date 2011-07-15 HUAWEI TECHNOLOGIES CO., LTD.

Configuration Guide - Basic ConfigurationQuidway S2700 Series Ethernet Switches V100R006C00 Configuration Guide - Basic Configuration Issue 01 Date 2011-07-15 HUAWEI TECHNOLOGIES CO.,

  • Upload
    others

  • View
    25

  • Download
    1

Embed Size (px)

Citation preview

  • Quidway S2700 Series Ethernet SwitchesV100R006C00

    Configuration Guide - BasicConfiguration

    Issue 01

    Date 2011-07-15

    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 writtenconsent 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. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase 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 representationsof any kind, either express or implied.

    The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute the warranty of any kind, express or implied.

    Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

    Bantian, LonggangShenzhen 518129People's Republic of China

    Website: http://www.huawei.com

    Email: [email protected]

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    i

    http://www.huawei.commailto:[email protected]

  • About This Document

    Intended AudienceThis document provides the basic concepts, basic configuration procedures, and configurationexamples supported by the S2700.

    This document is intended for:

    l Data configuration engineersl Commissioning engineersl Network monitoring engineersl System maintenance engineers

    Symbol ConventionsThe symbols that may be found in this document are defined as follows.

    Symbol Description

    DANGERIndicates a hazard with a high level of risk, which if notavoided, will result in death or serious injury.

    WARNINGIndicates a hazard with a medium or low level of risk, whichif not avoided, could result in minor or moderate injury.

    CAUTIONIndicates a potentially hazardous situation, which if notavoided, could result in equipment damage, data loss,performance degradation, or unexpected results.

    TIP Indicates a tip that may help you solve a problem or savetime.

    NOTE Provides additional information to emphasize or supplementimportant points of the main text.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration About This Document

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    ii

  • Command ConventionsThe command conventions that may be found in this document are defined as follows.

    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 byvertical bars. One item is selected.

    [ x | y | ... ] Optional items are grouped in brackets and separated byvertical bars. One item is selected or no item is selected.

    { x | y | ... }* Optional items are grouped in braces and separated byvertical bars. A minimum of one item or a maximum of allitems can be selected.

    [ x | y | ... ]* Optional items are grouped in brackets and separated byvertical bars. Several items or no item can be selected.

    & The parameter before the & sign can be repeated 1 to n times.

    # A line starting with the # sign is comments.

    Change HistoryUpdates between document issues are cumulative. Therefore, the latest document issue containsall updates made in previous issues.

    Changes in Issue 01 (2011-07-15)Initial commercial release.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration About This Document

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    iii

  • Contents

    About This Document.....................................................................................................................ii

    1 Logging In to Switch.....................................................................................................................11.1 Introduction........................................................................................................................................................2

    1.1.1 Login Through the Console.......................................................................................................................21.1.2 Login Through Telnet................................................................................................................................2

    1.2 Logging In to the Device Through the Console Port..........................................................................................21.2.1 Establishing the Configuration Task.........................................................................................................31.2.2 Establishing the Physical Connection........................................................................................................31.2.3 Configuring Terminals..............................................................................................................................41.2.4 Logging In to the Device...........................................................................................................................4

    1.3 Logging In to Device Through Telnet................................................................................................................41.3.1 Establishing the Configuration Task.........................................................................................................51.3.2 Establishing the Physical Connection........................................................................................................51.3.3 Configuring Login User Parameters..........................................................................................................61.3.4 Logging In from the Telnet Client.............................................................................................................6

    1.4 Configuration Examples.....................................................................................................................................61.4.1 Example for Logging In Through the Console Port..................................................................................61.4.2 Example for Logging In Through Telnet..................................................................................................9

    2 CLI Overview...............................................................................................................................112.1 CLI Introduction...............................................................................................................................................12

    2.1.1 Command Line Interface.........................................................................................................................122.1.2 Command Levels.....................................................................................................................................122.1.3 Command Views.....................................................................................................................................13

    2.2 Online Help.......................................................................................................................................................152.2.1 Full Help..................................................................................................................................................162.2.2 Partial Help..............................................................................................................................................162.2.3 Error Messages of the Command Line Interface.....................................................................................17

    2.3 Features of Command Line Interface...............................................................................................................172.3.1 Editing.....................................................................................................................................................172.3.2 Displaying................................................................................................................................................182.3.3 Regular Expressions................................................................................................................................192.3.4 History Commands..................................................................................................................................22

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    iv

  • 2.4 Shortcut Keys...................................................................................................................................................232.4.1 System Shortcut Keys..............................................................................................................................23

    2.5 Configuration Examples...................................................................................................................................242.5.1 Example for Using the Tab Key..............................................................................................................24

    3 How to Use Interfaces.................................................................................................................263.1 Introduction to Interfaces..................................................................................................................................273.2 Setting Basic Parameters of an Interface..........................................................................................................29

    3.2.1 Establishing the Configuration Task.......................................................................................................293.2.2 Entering the Interface View.....................................................................................................................303.2.3 Viewing All the Commands in the Interface View.................................................................................303.2.4 Configuring the Description for an Interface...........................................................................................313.2.5 Starting and Shutting Down an Interface................................................................................................313.2.6 Further Configuration an Interface..........................................................................................................323.2.7 Checking the Configuration.....................................................................................................................32

    3.3 Configuring the Loopback Interface.................................................................................................................333.3.1 Establishing the Configuration Task.......................................................................................................333.3.2 Configuring IPv4 Parameters of the Loopback Interface........................................................................333.3.3 Checking the Configuration.....................................................................................................................34

    3.4 Maintaining the Interface..................................................................................................................................343.4.1 Clearing Statistics Information on the Interface......................................................................................343.4.2 Debugging the Interface..........................................................................................................................35

    4 Basic Configuration.....................................................................................................................364.1 Basic Configuration Introduction.....................................................................................................................374.2 Configuring the Basic System Environment....................................................................................................37

    4.2.1 Establishing the Configuration Task.......................................................................................................374.2.2 Configuring the Equipment Name...........................................................................................................384.2.3 Setting the System Clock.........................................................................................................................384.2.4 Configuring a Header..............................................................................................................................394.2.5 Configuring Command Levels................................................................................................................40

    4.3 Configuring Basic User Environment..............................................................................................................414.3.1 Establishing the Configuration Task.......................................................................................................414.3.2 Configuring the Password for Switching User Levels............................................................................414.3.3 Switching User Levels.............................................................................................................................424.3.4 Locking User Interfaces...........................................................................................................................43

    4.4 Displaying System Status Messages.................................................................................................................434.4.1 Displaying System Configuration...........................................................................................................434.4.2 Displaying System Status........................................................................................................................444.4.3 Collecting System Diagnostic Information.............................................................................................44

    5 User Management........................................................................................................................455.1 User Management Introduction........................................................................................................................46

    5.1.1 User Interface..........................................................................................................................................46

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    v

  • 5.1.2 User Authentication.................................................................................................................................475.2 Logging In to the S2700 Through the Console Port.........................................................................................49

    5.2.1 Establishing the Configuration Task.......................................................................................................495.2.2 Logging In to the S2700 Through the Console Interface........................................................................50

    5.3 Configuring Console User Interface.................................................................................................................535.3.1 Establishing the Configuration Task.......................................................................................................535.3.2 Configuring Console Interface Attributes...............................................................................................545.3.3 Setting Console Terminal Attributes.......................................................................................................555.3.4 Configuring User Priority........................................................................................................................565.3.5 Configuring User Authentication............................................................................................................575.3.6 Checking the Configuration.....................................................................................................................58

    5.4 Configuring VTY User Interface......................................................................................................................585.4.1 Establishing the Configuration Task.......................................................................................................585.4.2 Configuring Maximum VTY User Interfaces.........................................................................................595.4.3 (Optional)Configuring Limits for Incoming Calls and Outgoing Calls..................................................605.4.4 Configuring VTY Terminal Attributes....................................................................................................605.4.5 Configuring User Authentication............................................................................................................615.4.6 Checking the Configuration.....................................................................................................................63

    5.5 Managing User Interfaces.................................................................................................................................635.5.1 Establishing the Configuration Task.......................................................................................................635.5.2 Sending Messages to Other User Interfaces............................................................................................645.5.3 Clearing Online User...............................................................................................................................645.5.4 Checking the Configuration.....................................................................................................................65

    5.6 Configuring User Management........................................................................................................................655.6.1 Establishing the Configuration Task.......................................................................................................655.6.2 Configuring Authentication Mode...........................................................................................................665.6.3 Configuring Authentication Password.....................................................................................................665.6.4 Setting Username and Password for AAA Local Authentication...........................................................675.6.5 Configuring Non-Authentication.............................................................................................................675.6.6 Configuring User Priority........................................................................................................................685.6.7 Checking the Configuration.....................................................................................................................68

    5.7 Configuration Examples...................................................................................................................................695.7.1 Example for Configuring Logging In to the Switch Through Password.................................................695.7.2 Example for Logging In to the Device Through AAA............................................................................70

    6 File System Management...........................................................................................................726.1 Overview of the File System............................................................................................................................736.2 Managing a Storage Device..............................................................................................................................73

    6.2.1 Establishing the Configuration Task.......................................................................................................736.2.2 Restoring Storage Devices with File System Troubles...........................................................................746.2.3 (Optional) Formatting a Storage Device.................................................................................................74

    6.3 Managing the Directory....................................................................................................................................746.3.1 Establishing the Configuration Task.......................................................................................................74

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    vi

  • 6.3.2 Viewing the Current Directory................................................................................................................756.3.3 Switching a Directory..............................................................................................................................756.3.4 Displaying a Directory or File.................................................................................................................766.3.5 Creating a Directory................................................................................................................................766.3.6 Deleting a Directory................................................................................................................................76

    6.4 Managing Files.................................................................................................................................................776.4.1 Establishing the Configuration Task.......................................................................................................776.4.2 Displaying Contents of Files...................................................................................................................786.4.3 Copying Files...........................................................................................................................................786.4.4 Moving Files............................................................................................................................................786.4.5 Renaming Files........................................................................................................................................796.4.6 Compressing Files...................................................................................................................................796.4.7 Deleting Files...........................................................................................................................................796.4.8 Deleting Files in the Recycle Bin............................................................................................................806.4.9 Undeleting Files.......................................................................................................................................806.4.10 Running Files in Batch..........................................................................................................................816.4.11 Configuring Prompt Modes...................................................................................................................81

    7 Management of Configuration Files........................................................................................837.1 Management of Configuration Files Introduction............................................................................................84

    7.1.1 Configuration Files..................................................................................................................................847.1.2 Configuration Files and Current Configurations.....................................................................................84

    7.2 Managing Configuration Files..........................................................................................................................857.2.1 Establishing the Configuration Task.......................................................................................................857.2.2 Configuring System Software for a switch to Load for the Next Startup...............................................857.2.3 Configuring the Configuration File for Switch to Load for the Next Startup.........................................867.2.4 Saving Configuration File.......................................................................................................................867.2.5 Clearing a Configuration File..................................................................................................................877.2.6 Comparing Configuration Files...............................................................................................................877.2.7 Checking the Configuration.....................................................................................................................88

    8 FTP and TFTP...............................................................................................................................908.1 FTP and TFTP Introduction.............................................................................................................................91

    8.1.1 FTP..........................................................................................................................................................918.1.2 TFTP........................................................................................................................................................91

    8.2 Configuring the Switch to be the FTP Server...................................................................................................918.2.1 Establishing the Configuration Task.......................................................................................................928.2.2 (Optional) Specifying a Port Number for the FTP Server.......................................................................928.2.3 Enabling the FTP Server..........................................................................................................................938.2.4 (Optional) Configuring the Timeout Period............................................................................................938.2.5 Configuring the Local Username and the Password...............................................................................948.2.6 Configuring the Service Type and Authorization Information................................................................948.2.7 Checking the Configuration.....................................................................................................................95

    8.3 Configuring FTP ACL......................................................................................................................................95

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    vii

  • 8.3.1 Establishing the Configuration Task.......................................................................................................958.3.2 Enabling the FTP Server..........................................................................................................................968.3.3 Configuring a Basic ACL........................................................................................................................968.3.4 Configuring the Basic FTP ACL.............................................................................................................978.3.5 Checking the Configuration.....................................................................................................................97

    8.4 Configuring the Switch to Be the FTP Client...................................................................................................988.4.1 Establishing the Configuration Task.......................................................................................................988.4.2 Logging In to the FTP Server..................................................................................................................998.4.3 Configuring Data Type and Transmission Mode for the File...............................................................1008.4.4 (Optional) Viewing Online Help of the FTP Command.......................................................................1008.4.5 Uploading or Downloading Files..........................................................................................................1018.4.6 Managing Directories............................................................................................................................1018.4.7 Managing Files......................................................................................................................................1028.4.8 (Optional) Changing Login Users.........................................................................................................1028.4.9 Disconnecting from the FTP Server......................................................................................................103

    8.5 Configuring the Switch to Be the TFTP Client..............................................................................................1038.5.1 Establishing the Configuration Task.....................................................................................................1048.5.2 (Optional) Configuring a Source IP Address for a TFTP Client...........................................................1048.5.3 Downloading Files Through TFTP........................................................................................................1058.5.4 Uploading Files Through TFTP............................................................................................................105

    8.6 Limiting the Access to the TFTP Server........................................................................................................1068.6.1 Establishing the Configuration Task.....................................................................................................1068.6.2 Configuring the Basic ACL...................................................................................................................1068.6.3 Configuring the Basic TFTP ACL.........................................................................................................107

    8.7 Configuration Examples.................................................................................................................................1078.7.1 Example for Configuring the FTP Server..............................................................................................1078.7.2 Example for Configuring an ACL of the FTP Server...........................................................................1108.7.3 Example for Configuring the FTP Client..............................................................................................1118.7.4 Example for Configuring the TFTP Client............................................................................................114

    9 Telnet and SSH..........................................................................................................................1169.1 Telnet and SSH Introduction..........................................................................................................................117

    9.1.1 Overview of User Login........................................................................................................................1179.1.2 Telnet Terminal Services.......................................................................................................................1179.1.3 SSH Terminal Services..........................................................................................................................118

    9.2 Configuring Telnet Terminal Services...........................................................................................................1199.2.1 Establishing the Configuration Task.....................................................................................................1199.2.2 Enabling the Telnet Service...................................................................................................................1209.2.3 Establishing a Telnet Connection..........................................................................................................1219.2.4 (Optional) Configuring a Telnet Server Port Number...........................................................................1219.2.5 (Optional) Scheduled Telnet Disconnection..........................................................................................1229.2.6 Checking the Configuration...................................................................................................................122

    9.3 Configuring SSH Users..................................................................................................................................123

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    viii

  • 9.3.1 Establishing the Configuration Task.....................................................................................................1239.3.2 Creating SSH User.................................................................................................................................1249.3.3 Configuring SSH for the VTY User Interface.......................................................................................1259.3.4 Generating a Local RSA Key Pair.........................................................................................................1259.3.5 Configuring the Authentication Mode for SSH Users...........................................................................1269.3.6 (Optional) Configuring the Basic Authentication Information for SSH Users.....................................1279.3.7 (Optional) Authorizing SSH Users Through the Command Line.........................................................1289.3.8 Configuring the Service Type of SSH Users.........................................................................................1289.3.9 (Optional) Configuring the Authorized Directory of the SFTP Service for SSH Users.......................1299.3.10 Checking the Configuration.................................................................................................................129

    9.4 Configuring the SSH Server Function............................................................................................................1309.4.1 Establishing the Configuration Task.....................................................................................................1309.4.2 Enabling the STelnet Service................................................................................................................1319.4.3 Enabling the SFTP Service....................................................................................................................1319.4.4 Enabling SCP Services..........................................................................................................................1319.4.5 (Optional) Enabling the Earlier Version - Compatible Function...........................................................1329.4.6 (Optional) Configuring the Number of the Port Monitored by the SSH Server....................................1329.4.7 (Optional) Configuring the Interval for Updating the Key Pair on the SSH Server..............................1339.4.8 Checking the Configuration...................................................................................................................133

    9.5 Configuring the STelnet Client Function.......................................................................................................1349.5.1 Establishing the Configuration Task.....................................................................................................1349.5.2 Enabling the First-Time Authentication on the SSH Client..................................................................1359.5.3 (Optional) Assigning an RSA Public Key to the SSH Server...............................................................1369.5.4 Enabling the STelnet Client...................................................................................................................1379.5.5 Checking the Configuration...................................................................................................................138

    9.6 Configuring the SFTP Client Function...........................................................................................................1389.6.1 Establishing the Configuration Task.....................................................................................................1389.6.2 Configuring the First-Time Authentication on the SSH Client.............................................................1399.6.3 (Optional) Assigning an RSA Public Key to the SSH Server...............................................................1409.6.4 Enabling the SFTP Client......................................................................................................................1419.6.5 (Optional) Managing the Directory.......................................................................................................1429.6.6 (Optional) Managing the File................................................................................................................1439.6.7 (Optional) Displaying the SFTP Client Command Help.......................................................................1449.6.8 Checking the Configuration...................................................................................................................145

    9.7 Configuring the SCP Client............................................................................................................................1469.7.1 Establishing the Configuration Task.....................................................................................................1469.7.2 (Optional) Configuring a Source IP Address for the SCP Client..........................................................1469.7.3 Copying Files.........................................................................................................................................1479.7.4 Checking the Configuration...................................................................................................................148

    9.8 Configuration Examples.................................................................................................................................1489.8.1 Example for Configuring the Telnet Terminal Service.........................................................................1489.8.2 Example for Configuring the PC as the STelnet Client to Connect to the SSH Server........................150

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    ix

  • 9.8.3 Example for Configuring the Switch as the STelnet Client to Connect to the SSH Server .................1539.8.4 Example for Connecting the SFTP Clinet and the SSH Server.............................................................1609.8.5 Example for Configuring the SSH Server to Support the Access from Another Port...........................1659.8.6 Example for Authenticating SSH Through RADIUS............................................................................1729.8.7 Example for Configuring the SCP Client..............................................................................................177

    10 Web System Configuration...................................................................................................18010.1 Overview of Web System.............................................................................................................................18110.2 Starting Web System....................................................................................................................................181

    10.2.1 Logging In to the S2700 Through the Console Interface....................................................................18110.2.2 Setting the Management IP Address of the S2700..............................................................................18510.2.3 Uploading Web Page Files..................................................................................................................18610.2.4 Loading a Web Page File.....................................................................................................................18710.2.5 Creating a Web Account......................................................................................................................18710.2.6 Logging In to the Web System............................................................................................................188

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration Contents

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    x

  • 1 Logging In to SwitchAbout This Chapter

    Before configuring switches, you need to log in to the switch.

    1.1 IntroductionYou can log in to switches through console port or Telnet.

    1.2 Logging In to the Device Through the Console PortThis section describes how to connect a terminal to a switch through the console port to establishthe configuration environment.

    1.3 Logging In to Device Through TelnetThis section describes how to connect a terminal to a switch through Telnet to establish theconfiguration environment.

    1.4 Configuration ExamplesThis section provides examples for configuring users to log in to the switch through the consoleport or Telnet together with the configuration flowchart. The configuration examples explainnetworking requirements, configuration notes, and configuration roadmap.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    1

  • 1.1 IntroductionYou can log in to switches through console port or Telnet.

    1.1.1 Login Through the ConsoleWhen a switch is powered on for the first time or a switch needs to be locally configured, youcan log in to the switch through the console port.

    In the following cases, a switch can be configured only through the console port:

    l The switch is powered on for the first time.

    l The subscriber cannot login through Telnet.

    1.1.2 Login Through TelnetIf you know the IP address of a switch, you can log in to the switch through Telnet to performlocal or remote configurations.

    YYou need to pre-configure the IP addresses of interfaces, the user account, the authenticationmode, and the incoming and outgoing call restriction through the console interface on theswitch. Also, ensure that directly-connected or reachable switch exist between terminals and theswitch.

    The destination switch authenticates the user based on the configured parameters in three modes:

    l Password authentication: indicates that the login user should enter the correct password.

    l AAA local authentication: indicates that the login user should enter the correct user nameand password.

    l None authentication: indicates that the login user need not enter the user name or password.

    If the login succeeds, a command line prompt such as appears on the Telnet clientinterface.

    Enter a command to check the running status of the switch or to configure the switch.

    Enter "?" for help.

    NOTE

    Do not modify the IP address of the switch when you configure the switch through Telnet because themodification may terminate Telnet connection. Otherwise, set up the connection again after entering a newIP address.

    1.2 Logging In to the Device Through the Console PortThis section describes how to connect a terminal to a switch through the console port to establishthe configuration environment.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    2

  • 1.2.1 Establishing the Configuration TaskBefore configuring login to the switch through the console port, familiarize yourself with theapplicable environment, complete the pre-configuration tasks, and obtain the required data. Thiscan help you complete the configuration task quickly and accurately.

    Applicable EnvironmentIf you log in to the switch for the first time or perform the local configuration, you need to login to the switch through the console port.

    NOTE

    If you cannot log in to the switch through the telnet, you need to log in to the switch through the consoleport.

    Pre-configuration TasksBefore configuring login to the switch through the console port, complete the following tasks:

    l Preparing the PC/terminal (including serial port and RS-232 cable)l Installing terminal emulation program on the PC (such as Windows XP HyperTerminal)

    Data PreparationTo login the switch through the console port, you need the following data.

    NOTE

    If the AAA authentication mode is configured for users to log in to the switch through the console interface,the correct user name and password must be entered for a successful login.

    No. Data

    1 Terminal communication parametersl Baud ratel Data bitl Parityl Stop bitl Flow-control mode

    2 (Optional) User name and password to be entered for a successful login in AAAauthentication mode

    1.2.2 Establishing the Physical ConnectionThis part describes how to physically connect a terminal to a switch before login to the switchthrough the console port.

    ContextDo as follows on the switch:

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    3

  • Procedure

    Step 1 Connect the COM port on the PC and the console port on the switch by a cable.

    Step 2 Power on all devices to perform a self-check.

    ----End

    1.2.3 Configuring TerminalsThis part describes how to configure the terminal before login to the switch through the consoleport.

    ContextDo as follows on the PC:

    Procedure

    Step 1 Run the terminal emulation program on the PC, setting the communication parameters asfollows:l Baud rate: 9600 bpsl Data bit: 8l Stop bit: 1l Parity: nonel Flow control: none

    ----End

    1.2.4 Logging In to the DeviceThis part describes how to log in to the switch through the console port.

    ContextDo as follows on the PC:

    Procedure

    Step 1 Press Enter until a command line prompt such as appears. Now the user view isdisplayed for you to configure the switch.

    NOTE

    If the AAA or Password authentication mode is configured for users to log in to the switch through theconsole interface, the correct user name and password must be entered for a successful login.

    ----End

    1.3 Logging In to Device Through TelnetThis section describes how to connect a terminal to a switch through Telnet to establish theconfiguration environment.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    4

  • 1.3.1 Establishing the Configuration TaskBefore configuring login to the switch through Telnet, familiarize yourself with the applicableenvironment, complete the pre-configuration tasks, and obtain the required data. This can helpyou complete the configuration task quickly and accurately.

    Applicable Environment

    If you know the IP address of the switch, you can log in to the switch through Telnet for localor remote configuration.

    Pre-configuration Tasks

    Before configuring the switch through Telnet, complete the following tasks:

    l Powering on devices and performing a self-check

    l Preparing the PC (including the serial port and Ethernet crossover/direct cable)

    Data Preparation

    To log in to the switch through Telnet, you need the following data.

    No. Data

    1 IP address of the PC

    2 IP address of the Ethernet interface on the switch

    3 User information accessed through Telnet:l User namel Passwordl Authentication mode

    1.3.2 Establishing the Physical ConnectionThis part describes how to physically connect a terminal to a switch before login to the switchthrough Telnet.

    PrerequisiteEstablishing the Physical Connection are complete.

    Procedure

    Step 1 Connect the switch and the PC directly or connect the switch and the PC to the network throughcables.

    ----End

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    5

  • 1.3.3 Configuring Login User ParametersThis part describes how to configure user parameters for login to the switch through Telnet.

    Context

    Do as follows on the switch:

    Procedure

    Step 1 Configure the authentication mode of login users.

    Step 2 Configure the authority limitation of login user.

    For details, see 5.4 Configuring VTY User Interface and 5.6 Configuring UserManagement.

    ----End

    1.3.4 Logging In from the Telnet ClientThis part describes how to log in to the switch through Telnet.

    Context

    Do as follows on the PC:

    Procedure

    Step 1 Run the Telnet program on the PC that functions as a client, and enter the IP address of theinterface on the destination switch that provides the Telnet service.

    Step 2 Enter the user name and password in the login window. After authentication, a command lineprompt such as appears. Now enter the configuration environment in the user view.

    ----End

    1.4 Configuration ExamplesThis section provides examples for configuring users to log in to the switch through the consoleport or Telnet together with the configuration flowchart. The configuration examples explainnetworking requirements, configuration notes, and configuration roadmap.

    1.4.1 Example for Logging In Through the Console PortIn this example, you can configure the PC so as to log in to the switch through the console port.

    Networking Requirements

    Initialize the configuration of the switch when the switch is powered on for the first time.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    6

  • Figure 1-1 Networking diagram of logging in through the console port

    SwitchPC

    Configuration RoadmapThe configuration roadmap is as follows:

    1. Connect the PC and the switch through the console port.2. Configure the login on the PC end.3. Log in to the switch.

    Data PreparationTo complete the configuration, you need the terminal communication parameters (includingbaud rate, data bit, parity, stop bit, and flow control).

    Procedure

    Step 1 Connect the serial port of the PC (or terminal) to the console port of the switch through a standardRS-232 cable. The local configuration environment is established.

    Step 2 Run the terminal emulation program on the PC. Set the terminal communication parameters tobe 9600 bps, data bit to be 8, stop bit to be 1. Specify no parity and no flow control as shownfrom Figure 1-2 to Figure 1-4.

    Figure 1-2 New connection

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    7

  • Figure 1-3 Setting the port

    Figure 1-4 Setting the port communication parameters

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    8

  • Step 3 Power on the switch to perform a self-check and the system performs automatic configuration.When the self-check ends, you are prompted to press Enter until a command line prompt suchas appears.

    Enter the command to check the running status of the switch or configure the switch.

    Enter "?" for help.

    ----End

    1.4.2 Example for Logging In Through TelnetIn this example, you can configure user parameters so as to log in to the switch from the PC orother terminals through Telnet.

    Networking Requirements

    You can log in to the switch on other network segments through the PC or other terminals toperform remote maintenance.

    Figure 1-5 Establishing the configuration environment through WAN

    IPNetwork

    Switch TargetSwitch

    PC

    Configuration Roadmap

    The configuration roadmap is as follows:

    1. Establish the physical connection.2. Configure user login parameters.3. Log in to the switch from the client side.

    Data Preparation

    To complete the configuration, you need the following data

    l IP address of the PCl IP address of the Ethernet interface on the switchl User information accessed through Telnet (including the user name, password, and

    authentication mode)

    Procedure

    Step 1 Connect the PC and the switch to the network.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    9

  • Step 2 Configure login user parameters on the target switch.

    # Configure the login address

    system-view[Quidway] vlan 10[Quidway-vlan10] quit[Quidway] interface gigabitethernet 0/0/1[Quidway-GigabitEthernet0/0/1] port link-type hybrid[Quidway-GigabitEthernet0/0/1] port hybrid pvid vlan 10[Quidway-GigabitEthernet0/0/1] port untagged vlan 10[Quidway-GigabitEthernet0/0/1] quit[Quidway]interface vlanif 10[Quidway-vlanif10] ip address 202.38.160.92 255.255.0.0[Quidway-vlanif10] quit

    # Configure login authentication mode

    [Quidway] aaa[Quidway-aaa] local-user huawei password cipher hello[Quidway-aaa] local-user huawei service-type telnet[Quidway-aaa] local-user huawei level 3[Quidway-aaa] quit[Quidway] user-interface vty 0 4[Quidway-ui-vty0-14] authentication-mode aaa

    Step 3 Configure the client login.

    Run the Telnet on the PC, as shown in Figure 1-6.

    Figure 1-6 Running the Telnet program on the PC

    Click OK.

    Enter the user name and password in the login window. After authentication, a command lineprompt such as appears. Now enter the configuration environment in the user view.

    NOTEBefore logging in to the switch, ensure that the PC and switch can ping each other.

    ----End

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 1 Logging In to Switch

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    10

  • 2 CLI OverviewAbout This Chapter

    Users operate devices, that is, configure the device and perform routine maintenance, by enteringcommand lines.

    2.1 CLI IntroductionThe command line interface (CLI) is the common tool for running commands.

    2.2 Online HelpWhen you enter command lines or configure services, online help offers real-time help inaddition to the configuration guide.

    2.3 Features of Command Line InterfaceYou can edit command lines, display command lines, use the regular expression for commandlines, and invoke historical commands.

    2.4 Shortcut KeysUsing the system shortcut keys makes it easier to enter commands.

    2.5 Configuration ExamplesThis section provides several examples for using command lines.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    11

  • 2.1 CLI IntroductionThe command line interface (CLI) is the common tool for running commands.

    2.1.1 Command Line InterfaceYou can configure and manage a switch by using the CLI commands.

    When a prompt appears, you enter the command line interface (CLI) and interact with switchthrough CLI.

    The system provides a series of configuration commands. You can configure and manage theswitch by entering commands on CLI.

    The characteristics of CLI are as follows:

    l Local configuration through console port.l Local or remote configuration through Telnet or Secure Shell (SSH).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 level.l None authentication, password authentication and Authentication, Authorization and

    Accounting (AAA) to prevent the unauthorized user from accessing the switch.l Entering "?" for online help at any time.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 The telnet command for directly logging in to and manage other switch.l FTP service for file uploading and downloading.l Running a history command, like DosKey.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 entertheir commands.

    NOTE

    l The system supports the command with up to 512 characters. The command can be incomplete.

    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, theincomplete command cannot be restored. Therefore, pay attention to the length of the incompletecommand.

    2.1.2 Command LevelsThe system adopts a hierarchical protection mode that has 16 command levels.

    The default command levels are as follows:

    l Level 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 externaldevice (such as Telnet client side).

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    12

  • l Level 1-Monitoring level: Commands of this level, including the display commands, areused for system maintenance and fault diagnosis.

    l Level 2-Configuration level: Commands of this level are service configuration commandsthat provide direct network service to the user, including routing and network layercommands.

    l Level 3-Management level: Commands of this level are commands that influence the basicoperation of the system and provide support to the service. They include file systemcommands, FTP commands, TFTP commands, XModem downloading commands,configuration file switching commands, power supply control commands, backup boardcontrol commands, user management commands, level setting commands, system internalparameter setting commands, and debugging commands that are used for fault diagnosis.

    CAUTIONNot all display commands are of the monitoring level. For example, the display current-configuration and display saved-configuration commands are of the management level. Forthe level of a command, see the Quidway S2700 Series Command Reference.

    To implement efficient management, you can increase the command levels to 0-15. For theincrease in the command levels, refer to Chapter 4 "Basic Configuration" ConfiguringCommand Levels in the Quidway S2700 Series Configuration Guide - Basic Configurations.

    NOTE

    l The default command level may be higher than the command level defined according to the commandrules in application.

    l Login users have the same 16 levels as the command levels. The login users can use only the commandof the levels that are equal to or lower than their own levels. For details of login user levels, refer toUser Management.

    2.1.3 Command ViewsThe command line interface has different command views. All the commands must register inone or more command views. You can run a command only when you enter the correspondingcommand view.

    Basic Concepts of Command Views

    # Establish connection with the switch. If the switch adopts the default configuration, you canenter the user view with the prompt of .

    # Type system-view, and you can enter the system view.

    system-view[Quidway]

    # Type aaa in the system view, and you can enter the AAA view.

    [Quidway] aaa[Quidway-aaa]

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    13

  • NOTE

    The prompt indicates the default switch name. The prompt indicates the user view and theprompt [] indicates other views.

    Some commands that are implemented in the system view can also be implemented in the otherviews; however, the functions that can be implemented are command view-specific.

    Common Views

    The S2700 provides various command line views. For the methods of entering the commandline views except the following views, see the Quidway S2700 Command Reference.

    l User View

    Item Description

    Function Displays the running status and statistics of the S2700.

    Entry command Enters the user view after the connection is set up.

    Prompt uponentry

    Quit command quit

    Prompt uponquit

    None.

    l System View

    Item Description

    Function Sets the system parameters of the S2700, and enters other functionviews from this view.

    Entry command system-view

    Prompt uponentry

    [Quidway]

    Quit command [Quidway] quit

    Prompt uponquit

    l Ethernet Interface View

    – Fast Ethernet (FE) interface view

    Item Description

    Function Sets parameters related to FE interfaces of the S2700 and managesthe FE interfaces.

    Entrycommand

    [Quidway] interface ethernet X/Y/Z

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    14

  • Item Description

    Prompt uponentry

    [Quidway-EthernetX/Y/Z]

    Quit command [Quidway-EthernetX/Y/Z] quit

    Prompt uponquit

    [Quidway]

    NOTE

    X/Y/Z indicates the number of an FE interface that needs to be configured. It is in the format ofslot number/sub card number/interface sequence number.

    – GE interface view

    Item Description

    Function Configures related parameters about the GE interfaces of theS2700 and manages the GE interfaces.

    Entrycommand

    [Quidway] interface GigabitEthernet X/Y/Z

    Prompt uponentry

    [Quidway-GigabitEthernetX/Y/Z]

    Quit command [Quidway-GigabitEthernetX/Y/Z] quit

    Prompt uponquit

    [Quidway]

    NOTE

    X/Y/Z indicates the number of a GE interface that needs to be configured. It is in the format ofslot number/sub card number/interface sequence number.

    If an LPU provides GE interfaces and 10GE interfaces, the difference lies in the subcard wherethe 10GE interfaces reside. Generally, the sequence number of a 10GE interface is 1. If an LPUprovides only 10GE interfaces, the method of entering the 10GE interface view is the same asthe method of entering the GE interface view.

    2.2 Online HelpWhen you enter command lines or configure services, online help offers real-time help inaddition to the configuration guide.

    Context

    The command line of S2700 provides three types of online help:

    l Full help

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    15

  • l Partial help

    l Error Messages of the Command Line Interface

    2.2.1 Full HelpWhen you enter a command line, you can view the description of keywords or parameters in thecommand line through the Full Help.

    You can obtain full help from a command view in the following methods:

    l In a command view, enter ? to obtain all the commands in this command view anddescriptions of the commands. ?

    l Enter a command and a ? separated by a space. If a keyword is in place of the ?, all keywordsand their descriptions are listed. Here is an example.[Quidway-ui-vty0] authentication-mode ? aaa AAA authentication none Login without checking password Authentication through the password of a user terminal interface [Quidway-ui-vty0] authentication-mode aaa ?

    [Quidway-ui-vty0] authentication-mode aaa

    aaa, none and password are keywords. AAA authentication, Login without checking andAuthentication through the password of a user terminal interface are the descriptions of thetwo keywords.

    indicates that no key word or parameter is in this position and you can press Enter torepeat the command in the next command line.

    l Enter a command and a ? separated by a space. If a parameter is in place of the ?, allparameters and their descriptions are listed. Here is an example. system-view[Quidway] sysname ?TEXT Host name(1 to 246 characters)

    TEXT is a parameter and Host name (1 to 246 characters) is the description.

    2.2.2 Partial HelpWhen you enter a command line, you can obtain prompts on the keywords or parameters at thebeginning of the string through the Partial Help.

    Context

    You can obtain the partial help of the command line in the following ways.

    Procedurel Enter a character string with a "?" closely following it to display all commands that begin

    with this character string. d? debugging delete dir display

    l Enter a command and a character string with "?" closely following it to display all the keywords that begin with this character string. display b?

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    16

  • bfd bgp bootrom bpdu bpdu-tunnel buffer

    l Enter the first several letters of a key word in the command and then press Tab to displaythe 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 selectthe needed key word.

    ----End

    2.2.3 Error Messages of the Command Line InterfaceIf an entered command passes the syntax check, the system executes it. Otherwise, the systemprompts 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-1 for the common errormessages.

    Table 2-1 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

    Incomplete command Incomplete command entered

    Too many parameters Too many parameters entered

    Ambiguous command Indefinite parameters entered

    2.3 Features of Command Line InterfaceYou can edit command lines, display command lines, use the regular expression for commandlines, and invoke historical commands.

    2.3.1 EditingThe editing function of command lines helps you edit command lines or obtain help by usingcertain keys.

    The command line supports multi-line edition. The maximum length of each command is 512characters.

    Keys for editing that are often used are shown in Table 2-2.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    17

  • Table 2-2 Keys for editing

    Key Function

    Common key Inserts a character in the current position of the cursor if the editingbuffer is not full and the cursor moves to the right. Otherwise, analarm is generated.

    Backspace Deletes the character on the left of the cursor that moves to theleft. When the cursor reaches the head of the command, an alarmis generated.

    Left cursor key ← orCtrl_B

    Moves the cursor to the left by the space of a character. When thecursor reaches the head of the command, an alarm is generated.

    Right cursor key → orCtrl_F

    Moves the cursor to the right by the space of a character. Whenthe cursor reaches the end of the command, an alarm is generated.

    Tab Press Tab after typing the incomplete key word and the systemruns 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 newline with the cursor a space behind.

    l If there are several matches or no match at all, the systemdisplays the prefix first. Then you can press Tab to view thematching key word one by one. In this case, the cursor closelyfollows the end of the word and you can type a space to enterthe next word.

    l If a wrong key word is entered, press Tab and the word isdisplayed in a new line.

    2.3.2 DisplayingAll command lines have the same displaying feature. You can construct the displaying mode asrequired.

    You can control the display of information on CLI as follows:

    l Display prompt and help information in both Chinese and English.

    l When the information displayed exceeds a full screen, it provides the pause function. Inthis case, the user has three choices as shown in Table 2-3.

    Table 2-3 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 keyto stop the display and running of the command.

    Space Continues to display the information on the next screen.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    18

  • Key Function

    Enter Continues to display the information on the next line.

    2.3.3 Regular ExpressionsThe regular expression is a mode matching tool. You can construct the matching mode basedon certain rules, and then match the mode with the target object.

    The regular expression is an expression that describes a set of strings. It consists of commoncharacters (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.

    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 ExpressionThe regular expression consists of common characters and particular characters.

    l Common charactersCommon characters are used to match themselves in a string, including all upper-case andlower-case letters, digits, punctuations, and special symbols. For example, a matches theletter "a" in "abc", 202 matches the digit "202" in "202.113.25.155", and @ matches thesymbol "@" in "[email protected]".

    l Particular charactersParticular characters are used together with common characters to match the complex orparticular string combination. Table 2-4 describes particular characters and their syntax.

    Table 2-4 Description of particular characters

    Particularcharacter

    Syntax Example

    \ Defines an escape character, whichis used to mark the next character(common or particular) as thecommon character.

    \* matches "*".

    ^ Matches the starting position of thestring.

    ^10 matches "10.10.10.1" instead of"20.10.10.1".

    $ Matches the ending position of thestring.

    1$ matches "10.10.10.1" instead of"10.10.10.2".

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    19

  • Particularcharacter

    Syntax Example

    * Matches the preceding element zeroor more times.

    10* matches "1", "10", "100", and"1000".(10)* matches "null", "10", "1010",and "101010".

    + Matches the preceding element oneor more times

    10+ matches "10", "100", and"1000".(10)+ matches "10", "1010", and"101010".

    ? Matches the preceding element zeroor one time.

    10? matches "1" and "10".(10)? matches "null" and "10".

    . Matches any single character. 0.0 matches "0x0" and "020"..oo matches "book", "look", and"tool".

    () Defines a subexpression, which canbe null. Both the expression and thesubexpression 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".

    [xyz] Matches any single character in theregular expression.

    [123] matches the character 2 in"255".

    [^xyz] Matches any character that is notcontained within the brackets.

    [^123] matches any character exceptfor "1", "2", and "3".

    [a-z] Matches any character within thespecified range.

    [0-9] matches any character rangingfrom 0 to 9.

    [^a-z] Matches any character beyond thespecified range.

    [^0-9] matches all non-numericcharacters.

    _ Matches a comma "," left brace "{",right brace "}", left parenthesis "(",and right parenthesis ")".Matches the starting position of theinput string.Matches the ending position of theinput string.Matches a space.

    _2008_ matches "2008", "space2008 space", "space 2008", "2008space", ",2008,", "{2008}","(2008)", "{2008", and "(2008}".

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    20

  • NOTE

    Unless otherwise specified, all characters in the preceding table are displayed on the screen.

    l Degeneration of particular charactersCertain particular characters, when being placed at the following positions in the regularexpression, 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 expressionsserve as subexpressions within parentheses.

    l Combination of common and particular charactersIn actual application, a regular expression combines multiple common and particularcharacters to match certain strings.

    Specifying a Filtering Mode in Command

    CAUTIONThe Quidway S2700 Series uses a regular expression to implement the filtering function of thepipe character. A display command supports the pipe character only when there is excessiveoutput information.When the output information is queried according to the filtering conditions, the first line of thecommand output starts with the information containing the regular expression.

    The command can carry the parameter | count to display the number of matching entries. Theparameter | 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 matchesregular expression.

    l | exclude regular-expression: displays the information that excludes the lines that matchregular expression.

    l | include regular-expression: displays the information that includes the lines that matchregular expression.

    NOTE

    The value of regular-expression is a string of 1 to 255 characters.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    21

  • 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 regularexpression.

    l -regular-expression: displays the information that excludes lines that match regularexpression.

    l +regular-expression: displays the information that includes lines that match regularexpression.

    2.3.4 History CommandsThe command line interface provides a function similar to DosKey, which can automaticallysave historical commands. You can invoke the historical commands saved on the command lineinterface at any time and run them again.

    By default, the system saves 10 history commands at most for each user. The operations are asshown in Table 2-5.

    Table 2-5 Access the history commands

    Action Key or Command Result

    Display thehistorycommands.

    display history-command

    Display the history commands entered by users.

    Access the lasthistorycommand.

    Up cursor key↑ orCtrl_P

    Display the last history command if there is anearlier history command. Otherwise, a bell isgenerated.

    Access the nexthistorycommand.

    Down cursor key ↓or Ctrl_N

    Display the next history command if there is a laterhistory command. Otherwise, the command iscleared and a bell is generated.

    NOTE

    On the HyperTerminal of Windows 9X, cursor key ↑ is invalid as the HyperTerminals of Windows 9Xdefine the keys differently. In this case, you can replace the cursor key ↑ with Ctrl_P.

    When you use the history commands, note the following:

    l The saved history commands are the same as that those entered by users. For example, ifthe 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 thecommand 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 historycommand is saved. If the disp ip routing command and the display ip routing-tablecommand are run, two history commands are saved.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    22

  • 2.4 Shortcut KeysUsing the system shortcut keys makes it easier to enter commands.

    2.4.1 System Shortcut KeysSystem-defined shortcut keys with fixed functions are defined by the system. Table 2-6 lists thesystem-defined shortcut keys.

    NOTE

    Different terminal software defines these keys differently. Therefore, the shortcut keys on the terminal maybe different from those listed in this section.

    Table 2-6 System-defined shortcut keys

    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 history command buffer.

    CTRL_P Displays the previous command in the history 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 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.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    23

  • Key Function

    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.

    2.5 Configuration ExamplesThis section provides several examples for using command lines.

    2.5.1 Example for Using the Tab KeyYou can obtain prompts on keywords or check whether the entered keywords are correct bypressing Tab.

    Procedurel If only one keyword contains the incomplete keyword,

    do as follows on the S2700.1. Enter an incomplete keyword.

    [Quidway] info-

    2. Press Tab.

    The system replaces the incomplete keyword with a complete keyword and displaysthe complete keyword in another line. There is only one space between the cursor andthe end of the keyword.

    [Quidway] info-center

    l If more than one keyword contains the incomplete keyword,

    do as follows on the S2700.

    # The keyword info-center can be followed by the following keywords.

    [Quidway] info-center log? logbuffer loghost

    1. Enter an incomplete keyword.[Quidway] info-center l

    2. Press Tab.

    The system displays the prefix of all the matched keywords. The prefix in this exampleis log.

    [Quidway] info-center log

    3. Continue to press Tab to display all the keywords. There is no space between thecursor and the end of the keywords.[Quidway] info-center loghost[Quidway] info-center logbuffer

    Stop pressing Tab when you find the required keyword logbuffer.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    24

  • 4. Enter a space and enter the next keyword channel.[Quidway] info-center logbuffer channel

    ----End

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 2 CLI Overview

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    25

  • 3 How to Use InterfacesAbout This Chapter

    This chapter describes the concept of the interface and the basic configuration about the interface.

    3.1 Introduction to InterfacesThis section describes different types of interfaces. The interfaces are provided by the S2700 toreceive and send data.

    3.2 Setting Basic Parameters of an InterfaceThis section describes how to set the basic parameters of an interface.

    3.3 Configuring the Loopback InterfaceThis section describes how to configure the loopback interface.

    3.4 Maintaining the InterfaceThis section describes how to maintain the interface.

    Quidway S2700 Series Ethernet SwitchesConfiguration Guide - Basic Configuration 3 How to Use Interfaces

    Issue 01 (2011-07-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

    26

  • 3.1 Introduction to InterfacesThis section describes different types of interfaces. The interfaces are provided by the S2700 toreceive and send data.

    Interfaces are classified into management interfaces and service interfaces based on theirfunctions; interfaces are classified into physical interfaces and logical interfaces based on theirphysical forms.

    NOTE

    A physical interface is sometimes called a port. Both physical interfaces and logical interfaces are calledinterfaces in this document.

    Management Interface

    Management interfaces are used to manage and configure a device. You can log in to theS2700 through a management interface to configure and manage the S2700. Managementinterfaces do not transmit service data.

    The management interface of the S2700 is a console interface.

    Table 3-1 Description of management interfaces

    Name Description Usage

    Consoleinterface

    The console interface complieswith the EIA/TIA-232 standardand the interface type is DCE.

    The console interface is connected to theCOM series port of a configurationterminal. It is used to set up the onsiteconfiguration environment.

    The following table shows the rule for numbering management interfaces.

    Table 3-2 Management interface numbers

    Name Number

    Console interface Console 0

    Classif