• No results found

Huawei-S2300-Configuration-Guide

N/A
N/A
Protected

Academic year: 2021

Share "Huawei-S2300-Configuration-Guide"

Copied!
200
0
0

Loading.... (view fulltext now)

Full text

(1)

V100R006C00

Configuration Guide - Basic

Configuration

Issue 02

Date 2011-07-15

(2)

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

(3)

About This Document

Intended Audience

This document provides the basic concepts, basic configuration procedures, and configuration examples supported by the S2300.

This document is intended for: l Data configuration engineers l Commissioning engineers l Network monitoring engineers l System maintenance engineers

Symbol Conventions

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

Symbol Description

DANGER

Indicates a hazard with a high level of risk, which if not avoided, will result in death or serious injury.

WARNING

Indicates a hazard with a medium or low level of risk, which if not avoided, could result in minor or moderate injury.

CAUTION

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

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

NOTE Provides additional information to emphasize or supplement

(4)

Command Conventions

The 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 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.

Change History

Updates between document issues are cumulative. Therefore, the latest document issue contains all updates made in previous issues.

Changes in Issue 02 (2011-07-15)

The second commercial release has the following updates:

l Some contents are modified according to updates in the product such as features and commands.

l Output information of some commands is modified. l Some figures are optimized.

Changes in Issue 01 (2011-05-20)

Initial commercial release.

(5)

Contents

About This Document...ii

1 Logging In to Switch...1

1.1 Introduction...2

1.1.1 Login Through the Console...2

1.1.2 Login Through Telnet...2

1.2 Logging In to the Device Through the Console Port...2

1.2.1 Establishing the Configuration Task...3

1.2.2 Establishing the Physical Connection...3

1.2.3 Configuring Terminals...4

1.2.4 Logging In to the Device...4

1.3 Logging In to Device Through Telnet...4

1.3.1 Establishing the Configuration Task...5

1.3.2 Establishing the Physical Connection...5

1.3.3 Configuring Login User Parameters...6

1.3.4 Logging In from the Telnet Client...6

1.4 Configuration Examples...6

1.4.1 Example for Logging In Through the Console Port...6

1.4.2 Example for Logging In Through Telnet...9

2 CLI Overview...11

2.1 CLI Introduction...12

2.1.1 Command Line Interface...12

2.1.2 Command Levels...12

2.1.3 Command Views...13

2.2 Online Help...15

2.2.1 Full Help...16

2.2.2 Partial Help...16

2.2.3 Error Messages of the Command Line Interface...17

2.3 Features of Command Line Interface...17

2.3.1 Editing...17

2.3.2 Displaying...18

2.3.3 Regular Expressions...19

(6)

2.4 Shortcut Keys...23

2.4.1 System Shortcut Keys...23

2.5 Configuration Examples...24

2.5.1 Example for Using the Tab Key...24

3 How to Use Interfaces...26

3.1 Introduction to Interfaces...27

3.2 Setting Basic Parameters of an Interface...29

3.2.1 Establishing the Configuration Task...29

3.2.2 Entering the Interface View...30

3.2.3 Viewing All the Commands in the Interface View...30

3.2.4 Configuring the Description for an Interface...31

3.2.5 Starting and Shutting Down an Interface...31

3.2.6 Further Configuration an Interface...32

3.2.7 Checking the Configuration...32

3.3 Configuring the Loopback Interface...33

3.3.1 Establishing the Configuration Task...33

3.3.2 Configuring IPv4 Parameters of the Loopback Interface...33

3.3.3 Checking the Configuration...34

3.4 Maintaining the Interface...34

3.4.1 Clearing Statistics Information on the Interface...34

3.4.2 Debugging the Interface...35

4 Basic Configuration...36

4.1 Basic Configuration Introduction...37

4.2 Configuring the Basic System Environment...37

4.2.1 Establishing the Configuration Task...37

4.2.2 Configuring the Equipment Name...38

4.2.3 Setting the System Clock...38

4.2.4 Configuring a Header...39

4.2.5 Configuring Command Levels...40

4.3 Configuring Basic User Environment...41

4.3.1 Establishing the Configuration Task...41

4.3.2 Configuring the Password for Switching User Levels...41

4.3.3 Switching User Levels...42

4.3.4 Locking User Interfaces...43

4.4 Displaying System Status Messages...43

4.4.1 Displaying System Configuration...43

4.4.2 Displaying System Status...44

4.4.3 Collecting System Diagnostic Information...44

5 User Management...45

5.1 User Management Introduction...46

(7)

5.1.2 User Authentication...47

5.2 Logging In to the S2300 Through the Console Port...49

5.2.1 Establishing the Configuration Task...49

5.2.2 Logging In to the S2300 Through the Console Interface...50

5.3 Configuring Console User Interface...53

5.3.1 Establishing the Configuration Task...53

5.3.2 Configuring Console Interface Attributes...54

5.3.3 Setting Console Terminal Attributes...55

5.3.4 Configuring User Priority...56

5.3.5 Configuring User Authentication...57

5.3.6 Checking the Configuration...58

5.4 Configuring VTY User Interface...58

5.4.1 Establishing the Configuration Task...58

5.4.2 Configuring Maximum VTY User Interfaces...59

5.4.3 (Optional)Configuring Limits for Incoming Calls and Outgoing Calls...60

5.4.4 Configuring VTY Terminal Attributes...60

5.4.5 Configuring User Authentication...61

5.4.6 Checking the Configuration...63

5.5 Managing User Interfaces...63

5.5.1 Establishing the Configuration Task...63

5.5.2 Sending Messages to Other User Interfaces...64

5.5.3 Clearing Online User...64

5.5.4 Checking the Configuration...65

5.6 Configuring User Management...65

5.6.1 Establishing the Configuration Task...65

5.6.2 Configuring Authentication Mode...66

5.6.3 Configuring Authentication Password...66

5.6.4 Setting Username and Password for AAA Local Authentication...67

5.6.5 Configuring Non-Authentication...67

5.6.6 Configuring User Priority...68

5.6.7 Checking the Configuration...68

5.7 Configuration Examples...69

5.7.1 Example for Configuring Logging In to the Switch Through Password...69

5.7.2 Example for Logging In to the Device Through AAA...70

6 File System Management...72

6.1 Overview of the File System...73

6.2 Managing a Storage Device...73

6.2.1 Establishing the Configuration Task...73

6.2.2 Restoring Storage Devices with File System Troubles...74

6.2.3 (Optional) Formatting a Storage Device...74

6.3 Managing the Directory...74

(8)

6.3.2 Viewing the Current Directory...75

6.3.3 Switching a Directory...75

6.3.4 Displaying a Directory or File...76

6.3.5 Creating a Directory...76

6.3.6 Deleting a Directory...76

6.4 Managing Files...77

6.4.1 Establishing the Configuration Task...77

6.4.2 Displaying Contents of Files...78

6.4.3 Copying Files...78

6.4.4 Moving Files...78

6.4.5 Renaming Files...79

6.4.6 Compressing Files...79

6.4.7 Deleting Files...79

6.4.8 Deleting Files in the Recycle Bin...80

6.4.9 Undeleting Files...80

6.4.10 Running Files in Batch...81

6.4.11 Configuring Prompt Modes...81

7 Management of Configuration Files...83

7.1 Management of Configuration Files Introduction...84

7.1.1 Configuration Files...84

7.1.2 Configuration Files and Current Configurations...84

7.2 Managing Configuration Files...85

7.2.1 Establishing the Configuration Task...85

7.2.2 Configuring System Software for a switch to Load for the Next Startup...85

7.2.3 Configuring the Configuration File for Switch to Load for the Next Startup...86

7.2.4 Saving Configuration File...86

7.2.5 Clearing a Configuration File...87

7.2.6 Comparing Configuration Files...87

7.2.7 Checking the Configuration...88

8 FTP and TFTP...90

8.1 FTP and TFTP Introduction...91

8.1.1 FTP...91

8.1.2 TFTP...91

8.2 Configuring the Switch to be the FTP Server...91

8.2.1 Establishing the Configuration Task...92

8.2.2 (Optional) Specifying a Port Number for the FTP Server...92

8.2.3 Enabling the FTP Server...93

8.2.4 (Optional) Configuring the Timeout Period...93

8.2.5 Configuring the Local Username and the Password...94

8.2.6 Configuring the Service Type and Authorization Information...94

8.2.7 Checking the Configuration...95

(9)

8.3.1 Establishing the Configuration Task...95

8.3.2 Enabling the FTP Server...96

8.3.3 Configuring a Basic ACL...96

8.3.4 Configuring the Basic FTP ACL...97

8.3.5 Checking the Configuration...97

8.4 Configuring the Switch to Be the FTP Client...98

8.4.1 Establishing the Configuration Task...98

8.4.2 Logging In to the FTP Server...99

8.4.3 Configuring Data Type and Transmission Mode for the File...100

8.4.4 (Optional) Viewing Online Help of the FTP Command...100

8.4.5 Uploading or Downloading Files...101

8.4.6 Managing Directories...101

8.4.7 Managing Files...102

8.4.8 (Optional) Changing Login Users...102

8.4.9 Disconnecting from the FTP Server...103

8.5 Configuring the Switch to Be the TFTP Client...103

8.5.1 Establishing the Configuration Task...104

8.5.2 (Optional) Configuring a Source IP Address for a TFTP Client...104

8.5.3 Downloading Files Through TFTP...105

8.5.4 Uploading Files Through TFTP...105

8.6 Limiting the Access to the TFTP Server...106

8.6.1 Establishing the Configuration Task...106

8.6.2 Configuring the Basic ACL...106

8.6.3 Configuring the Basic TFTP ACL...107

8.7 Configuration Examples...107

8.7.1 Example for Configuring the FTP Server...107

8.7.2 Example for Configuring an ACL of the FTP Server...110

8.7.3 Example for Configuring the FTP Client...111

8.7.4 Example for Configuring the TFTP Client...114

9 Telnet and SSH...116

9.1 Telnet and SSH Introduction...117

9.1.1 Overview of User Login...117

9.1.2 Telnet Terminal Services...117

9.1.3 SSH Terminal Services...118

9.2 Configuring Telnet Terminal Services...119

9.2.1 Establishing the Configuration Task...119

9.2.2 Enabling the Telnet Service...120

9.2.3 Establishing a Telnet Connection...121

9.2.4 (Optional) Configuring a Telnet Server Port Number...121

9.2.5 (Optional) Scheduled Telnet Disconnection...122

9.2.6 Checking the Configuration...122

(10)

9.3.1 Establishing the Configuration Task...123

9.3.2 Creating SSH User...124

9.3.3 Configuring SSH for the VTY User Interface...125

9.3.4 Generating a Local RSA Key Pair...125

9.3.5 Configuring the Authentication Mode for SSH Users...126

9.3.6 (Optional) Configuring the Basic Authentication Information for SSH Users...127

9.3.7 (Optional) Authorizing SSH Users Through the Command Line...128

9.3.8 Configuring the Service Type of SSH Users...128

9.3.9 (Optional) Configuring the Authorized Directory of the SFTP Service for SSH Users...129

9.3.10 Checking the Configuration...129

9.4 Configuring the SSH Server Function...130

9.4.1 Establishing the Configuration Task...130

9.4.2 Enabling the STelnet Service...131

9.4.3 Enabling the SFTP Service...131

9.4.4 Enabling SCP Services...131

9.4.5 (Optional) Enabling the Earlier Version - Compatible Function...132

9.4.6 (Optional) Configuring the Number of the Port Monitored by the SSH Server...132

9.4.7 (Optional) Configuring the Interval for Updating the Key Pair on the SSH Server...133

9.4.8 Checking the Configuration...133

9.5 Configuring the STelnet Client Function...134

9.5.1 Establishing the Configuration Task...134

9.5.2 Enabling the First-Time Authentication on the SSH Client...135

9.5.3 (Optional) Assigning an RSA Public Key to the SSH Server...136

9.5.4 Enabling the STelnet Client...137

9.5.5 Checking the Configuration...138

9.6 Configuring the SFTP Client Function...138

9.6.1 Establishing the Configuration Task...138

9.6.2 Configuring the First-Time Authentication on the SSH Client...139

9.6.3 (Optional) Assigning an RSA Public Key to the SSH Server...140

9.6.4 Enabling the SFTP Client...141

9.6.5 (Optional) Managing the Directory...142

9.6.6 (Optional) Managing the File...143

9.6.7 (Optional) Displaying the SFTP Client Command Help...144

9.6.8 Checking the Configuration...145

9.7 Configuring the SCP Client...146

9.7.1 Establishing the Configuration Task...146

9.7.2 (Optional) Configuring a Source IP Address for the SCP Client...146

9.7.3 Copying Files...147

9.7.4 Checking the Configuration...148

9.8 Configuration Examples...148

9.8.1 Example for Configuring the Telnet Terminal Service...148

(11)

9.8.3 Example for Configuring the Switch as the STelnet Client to Connect to the SSH Server ...153

9.8.4 Example for Connecting the SFTP Clinet and the SSH Server...160

9.8.5 Example for Configuring the SSH Server to Support the Access from Another Port...165

9.8.6 Example for Authenticating SSH Through RADIUS...172

9.8.7 Example for Configuring the SCP Client...177

10 Web System Configuration...180

10.1 Overview of Web System...181

10.2 Starting Web System...181

10.2.1 Logging In to the S2300 Through the Console Interface...181

10.2.2 Setting the Management IP Address of the S2300...185

10.2.3 Uploading Web Page Files...186

10.2.4 Loading a Web Page File...187

10.2.5 Creating a Web Account...187

(12)

1

Logging In to Switch

About This Chapter

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

1.1 Introduction

You can log in to switches through console port or Telnet.

1.2 Logging In to the Device Through the Console Port

This section describes how to connect a terminal to a switch through the console port to establish the configuration environment.

1.3 Logging In to Device Through Telnet

This section describes how to connect a terminal to a switch through Telnet to establish the configuration environment.

1.4 Configuration Examples

This section provides examples for configuring users to log in to the switch through the console port or Telnet together with the configuration flowchart. The configuration examples explain networking requirements, configuration notes, and configuration roadmap.

(13)

1.1 Introduction

You can log in to switches through console port or Telnet.

1.1.1 Login Through the Console

When a switch is powered on for the first time or a switch needs to be locally configured, you can 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 Telnet

If you know the IP address of a switch, you can log in to the switch through Telnet to perform local or remote configurations.

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

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 name

and 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 <Quidway> appears on the Telnet client interface.

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 the modification may terminate Telnet connection. Otherwise, set up the connection again after entering a new IP address.

1.2 Logging In to the Device Through the Console Port

This section describes how to connect a terminal to a switch through the console port to establish the configuration environment.

(14)

1.2.1 Establishing the Configuration Task

Before configuring login to the switch through the console port, 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 log in to the switch for the first time or perform the local configuration, you need to log in 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 console port.

Pre-configuration Tasks

Before 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 Preparation

To 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 parameters l Baud rate

l Data bit l Parity l Stop bit

l Flow-control mode

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

1.2.2 Establishing the Physical Connection

This part describes how to physically connect a terminal to a switch before login to the switch through the console port.

Context

(15)

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 Terminals

This part describes how to configure the terminal before login to the switch through the console port.

Context

Do as follows on the PC:

Procedure

Step 1 Run the terminal emulation program on the PC, setting the communication parameters as follows:

l Baud rate: 9600 bps l Data bit: 8

l Stop bit: 1 l Parity: none l Flow control: none ----End

1.2.4 Logging In to the Device

This part describes how to log in to the switch through the console port.

Context

Do as follows on the PC:

Procedure

Step 1 Press Enter until a command line prompt such as <Quidway> appears. Now the user view is displayed 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 the console interface, the correct user name and password must be entered for a successful login.

----End

1.3 Logging In to Device Through Telnet

This section describes how to connect a terminal to a switch through Telnet to establish the configuration environment.

(16)

1.3.1 Establishing the Configuration Task

Before configuring login to the switch through Telnet, 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 know the IP address of the switch, you can log in to the switch through Telnet for local or 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 name l Password

l Authentication mode

1.3.2 Establishing the Physical Connection

This part describes how to physically connect a terminal to a switch before login to the switch through Telnet.

Prerequisite

Establishing 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 through cables.

(17)

1.3.3 Configuring Login User Parameters

This 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 User Management.

----End

1.3.4 Logging In from the Telnet Client

This 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 the interface 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 line prompt such as <Quidway> appears. Now enter the configuration environment in the user view. ----End

1.4 Configuration Examples

This section provides examples for configuring users to log in to the switch through the console port or Telnet together with the configuration flowchart. The configuration examples explain networking requirements, configuration notes, and configuration roadmap.

1.4.1 Example for Logging In Through the Console Port

In this example, you can configure the PC so as to log in to the switch through the console port.

Networking Requirements

(18)

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

Switch PC

Configuration Roadmap

The 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 Preparation

To complete the configuration, you need the terminal communication parameters (including baud 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 standard RS-232 cable. The local configuration environment is established.

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

(19)

Figure 1-3 Setting the port

(20)

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 such as <Quidway> 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 Telnet

In this example, you can configure user parameters so as to log in to the switch from the PC or other terminals through Telnet.

Networking Requirements

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

Figure 1-5 Establishing the configuration environment through WAN

IP Network Switch Target Switch 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 PC

l IP address of the Ethernet interface on the switch

l User information accessed through Telnet (including the user name, password, and authentication mode)

Procedure

(21)

Step 2 Configure login user parameters on the target switch. # Configure the login address

<Quidway> 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 line prompt such as <Quidway> appears. Now enter the configuration environment in the user view.

NOTE

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

(22)

2

CLI Overview

About This Chapter

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

2.1 CLI Introduction

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

2.2 Online Help

When you enter command lines or configure services, online help offers real-time help in addition to the configuration guide.

2.3 Features of Command Line Interface

You can edit command lines, display command lines, use the regular expression for command lines, and invoke historical commands.

2.4 Shortcut Keys

Using the system shortcut keys makes it easier to enter commands.

2.5 Configuration Examples

(23)

2.1 CLI Introduction

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

2.1.1 Command Line Interface

You 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 switch through CLI.

The system provides a series of configuration commands. You can configure and manage the switch 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 enter their 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, the incomplete command cannot be restored. Therefore, pay attention to the length of the incomplete command.

2.1.2 Command Levels

The 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 external device (such as Telnet client side).

(24)

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

l Level 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.

l Level 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.

CAUTION

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

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 Quidway S2300 Series 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 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. For details of login user levels, refer to

User Management.

2.1.3 Command Views

The command line interface has different command views. All the commands must register in one or more command views. You can run a command only when you enter the corresponding command view.

Basic Concepts of Command Views

# Establish connection with the switch. If the switch adopts the default configuration, you can enter the user view with the prompt of <Quidway>.

<Quidway>

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

[Quidway]

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

(25)

NOTE

The prompt <Quidway> indicates the default switch name. The prompt <> indicates the user view and the prompt [] indicates other views.

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

Common Views

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

l User View

Item Description

Function Displays the running status and statistics of the S2300. Entry command Enters the user view after the connection is set up. Prompt upon

entry

<Quidway>

Quit command <Quidway>quit Prompt upon

quit

None.

l System View

Item Description

Function Sets the system parameters of the S2300, and enters other function views from this view.

Entry command <Quidway> system-view Prompt upon

entry

[Quidway]

Quit command [Quidway] quit Prompt upon

quit

<Quidway>

l Ethernet Interface View

– Fast Ethernet (FE) interface view

Item Description

Function Sets parameters related to FE interfaces of the S2300 and manages the FE interfaces.

Entry command

(26)

Item Description Prompt upon

entry

[Quidway-EthernetX/Y/Z]

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

quit

[Quidway]

NOTE

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

slot number/sub card number/interface sequence number.

– GE interface view

Item Description

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

Entry command

[Quidway] interface GigabitEthernet X/Y/Z

Prompt upon entry

[Quidway-GigabitEthernetX/Y/Z]

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

quit

[Quidway]

NOTE

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

slot number/sub card number/interface sequence number.

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

2.2 Online Help

When you enter command lines or configure services, online help offers real-time help in addition to the configuration guide.

Context

The command line of S2300 provides three types of online help: l Full help

(27)

l Partial help

l Error Messages of the Command Line Interface

2.2.1 Full Help

When you enter a command line, you can view the description of keywords or parameters in the command 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 and descriptions of the commands.

<Quidway> ?

l Enter a command and a ? separated by a space. If a keyword is in place of the ?, all keywords and 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 ?

<cr>

[Quidway-ui-vty0] authentication-mode aaa

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

<cr> indicates that no key word or parameter is in this position and you can press Enter to repeat 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 ?, all parameters and their descriptions are listed. Here is an example.

<Quidway> 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 Help

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

Context

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

Procedure

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

<Quidway> d?

debugging delete dir display

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

(28)

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 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-1 for the common error messages.

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 Interface

You can edit command lines, display command lines, use the regular expression for command lines, and invoke historical commands.

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.

(29)

Table 2-2 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 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. In this 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 key to stop the display and running of the command.

(30)

Key Function

Enter Continues to display the information on the next line.

2.3.3 Regular Expressions

The regular expression is a mode matching tool. You can construct the matching mode based on 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 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. 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, punctuations, 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-4 describes particular characters and their syntax.

Table 2-4 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".

(31)

Particul ar characte r

Syntax Example

* 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". (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 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".

[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.

_ Matches a comma "," left brace "{", right brace "}", left parenthesis "(", and right parenthesis ")".

Matches the starting position of the input string.

Matches the ending position of the input string. Matches a space. _2008_ matches "2008", "space 2008 space", "space 2008", "2008 space", ",2008,", "{2008}", "(2008)", "{2008", and "(2008}".

(32)

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.

Specifying a Filtering Mode in Command

CAUTION

The Quidway S2300 Series 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

(33)

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 History Commands

The command line interface provides a function similar to DosKey, which can automatically save historical commands. You can invoke the historical commands saved on the command line interface at any time and run them again.

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

Table 2-5 Access the history commands

Action Key or Command Result

Display the history commands.

display history-command

Display the history commands entered by users.

Access the last history command.

Up cursor key↑ or Ctrl_P

Display the last history command if there is an earlier history command. Otherwise, a bell is generated.

Access the next history

command.

Down cursor key ↓ or Ctrl_N

Display the next history command if there is a later history command. Otherwise, the command is cleared and a bell 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 the history commands, note the following:

l The saved history 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 history command is saved. If the disp ip routing command and the display ip routing-table command are run, two history commands are saved.

(34)

2.4 Shortcut Keys

Using the system shortcut keys makes it easier to enter commands.

2.4.1 System Shortcut Keys

System-defined shortcut keys with fixed functions are defined by the system. Table 2-6 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.

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.

(35)

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 Examples

This section provides several examples for using command lines.

2.5.1 Example for Using the Tab Key

You can obtain prompts on keywords or check whether the entered keywords are correct by pressing Tab.

Procedure

l If only one keyword contains the incomplete keyword, do as follows on the S2300.

1. Enter an incomplete keyword. [Quidway]

info-2. Press Tab.

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

[Quidway] info-center

l If more than one keyword contains the incomplete keyword, do as follows on the S2300.

# 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 example is log.

[Quidway] info-center log

3. Continue to press Tab to display all the keywords. There is no space between the cursor and the end of the keywords.

[Quidway] info-center loghost [Quidway] info-center logbuffer

(36)

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

(37)

3

How to Use Interfaces

About This Chapter

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

3.1 Introduction to Interfaces

This section describes different types of interfaces. The interfaces are provided by the S2300 to receive and send data.

3.2 Setting Basic Parameters of an Interface

This section describes how to set the basic parameters of an interface.

3.3 Configuring the Loopback Interface

This section describes how to configure the loopback interface.

3.4 Maintaining the Interface

(38)

3.1 Introduction to Interfaces

This section describes different types of interfaces. The interfaces are provided by the S2300 to receive and send data.

Interfaces are classified into management interfaces and service interfaces based on their functions; interfaces are classified into physical interfaces and logical interfaces based on their physical forms.

NOTE

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

Management Interface

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

The management interface of the S2300 is a console interface.

Table 3-1 Description of management interfaces

Name Description Usage

Console interface

The console interface complies with the EIA/TIA-232 standard and the interface type is DCE.

The console interface is connected to the COM series port of a configuration terminal. It is used to set up the onsite configuration environment.

The following table shows the rule for numbering management interfaces.

Table 3-2 Management interface numbers

Name Number

Console interface Console 0

Classification of Service Interfaces

Service interfaces are used to transmit service data. They are classified into 100 Mbit/s interfaces, 1 Gbit/s interfaces and 10 Gbit/s interfaces according to their rates; they are classified into electrical interfaces and optical interfaces according to their electrical properties.

The rules for numbering service interfaces are as follows:

In a single S2300, interfaces are numbered in the format slot ID/subcard ID/interface sequence number.

(39)

l Slot ID: indicates the slot where an interface is located. The value is 0.

l Subcard ID: indicates the subcard where an interface is located. The value is 0. l Interface sequence number: indicates the sequence number of an interface.

In a stack system, interfaces are numbered in the format stack ID/subcard ID/interface sequence number.

l Stack ID: indicates the ID of an S2300 in the stack system. The value ranges from 1 to 16.

l Subcard ID: indicates the ID of a subcard. The value is 0.

l Interface sequence number: indicates the sequence number of an interface on the S2300.

Table 3-3 FE and GE interface numbering rule

Figure of Interface Numbering Description

1 4 3 6 5 ... ... ...

2 The S2300 has two rows of service

interfaces with the lower-left interface numbered 1. The other interfaces are numbered in ascending order from bottom to up, and then from left to right. For example, the upper-left interface numbered 0/0/2.

Physical Interfaces

Physical interfaces are interfaces that actually exist on the S2300. Physical interfaces include management interfaces and service interfaces. The S2300 supports the following physical interfaces:

l Console interface l Eth interface

l Fast Ethernet interface l Gigabit Ethernet interface

Logical Interfaces

Logical interfaces do not exist and are set up by configurations. The S2300 supports the following logical interfaces:

l Eth-Trunk

The Eth-Trunk consists of Ethernet links only.

The Eth-Trunk technique has the following advantages:

– Increased bandwidth: The bandwidth of an Eth-Trunk is the total bandwidth of all member interfaces.

– Improved reliability: When a link fails, traffic is automatically switched to other available links. This ensures link reliability.

(40)

For details about the Eth-Trunk configuration, see "Configuring the Eth-Trunk" in the

Quidway S2300 Series Ethernet Switches Configuration Guide - Ethernet.

l Loopback interface

A loopback interface is a virtual interface. The TCP/IP protocol suite defines IP address 127.0.0.0 as a loopback address. When the system starts, it automatically creates an interface using the loopback address 127.0.0.1 to receive all data packets sent to the local device.

Some applications need a local interface with a specified IP address without affecting the configuration of physical interfaces. This IP address has a 32-bit mask (to save IP addresses) and can be advertised by routing protocols.

The status of a loopback interface is always Up; therefore, the IP address of the loopback interface can be used as the router ID, the label switching router (LSR) ID, or be land to a tunnel.

For details, see 3.3 Configuring the Loopback Interface. l Null interface

Null interfaces are similar to null devices supported by certain operating systems. Any data packets sent to a null interface are discarded. Null interfaces are used for route selection and policy-based routing (PBR). For example, if a packet matches no route during route selection, the packet is sent to the null interface.

l VLANIF interface

When the S2300 needs to communicate with devices at the network layer, you can create a logical interface of the Virtual Local Area Network (VLAN) on the S2300, namely, a VLANIF interface. You can assign IP addresses to VLANIF interfaces because VLANIF interfaces work at the network layer. The S2300 then communicates with devices at the network layer through VLANIF interfaces.

For details about the configuration, see "Configuring the VLANIF Interface" in the

Quidway S2300 Series Ethernet Switches Configuration Guide - Ethernet.

3.2 Setting Basic Parameters of an Interface

This section describes how to set the basic parameters of an interface.

3.2.1 Establishing the Configuration Task

Before configuring advanced functions of an interface such as the working mode and routes, you need to complete the basic configuration of the interface.

Applicable Environment

To facilitate the configuration and maintenance of an interface, the S2300 provides interface views. The commands related to the interface are valid only in the interface views.

The basic interface configurations include entering an interface view, configuring interface description, enabling an interface, and disabling an interface.

Pre-configuration Tasks

(41)

Data Preparation

To set parameters of an interface, you need the following data.

No. Data

1 Type and number of the interface to be configured 2 Description of the interface

3.2.2 Entering the Interface View

To configure an interface, you need to enter the interface view.

Context

Do as follows on the S2300.

Procedure

Step 1 Run: system-view

The system view is displayed. Step 2 Run:

interface interface-type interface-number The view of a specified interface is displayed.

interface-type specifies the type of the interface and interface-number specifies the number of

the interface. ----End

3.2.3 Viewing All the Commands in the Interface View

After entering the interface view, you can view all the commands in the interface view.

Context

Do as follows on the S2300.

Procedure

Step 1 Run: system-view

The system view is displayed. Step 2 Run:

interface interface-type interface-number The view of a specified interface is displayed.

(42)

Step 3 Run: ?

All the commands in the view of the specified interface are displayed. ----End

3.2.4 Configuring the Description for an Interface

The description configured for an interface on the S2300 helps you identify and memorize the usage of the interface, which facilitates the management.

Procedure

Step 1 Run: system-view

The system view is displayed. Step 2 Run:

interface interface-type interface-number The view of a specified interface is displayed. Step 3 Run:

description description

The description is configured for the interface. ----End

3.2.5 Starting and Shutting Down an Interface

When a physical interface is idle and is not connected to a cable, shut down this interface to protect the interface against interference. To use a shutdown interface, you need to start the interface.

Context

NOTE

l A null interface is always Up and cannot be shut down by command. l A loopback interface is always Up and cannot be shut down by command.

Procedure

l Shutting down the interface Do as follows on the S2300. 1. Run:

system-view

The system view is displayed. 2. Run:

(43)

The view of a specified interface is displayed. 3. Run:

shutdown

The interface is shut down.

NOTE

By default, an interface is enabled.

l Starting an interface Do as follows on the S2300. 1. Run:

system-view

The system view is displayed. 2. Run:

interface interface-type interface-number The view of a specified interface is displayed. 3. Run:

undo shutdown

The interface is started. ----End

3.2.6 Further Configuration an Interface

After configuring basic parameters, configure the interface as required.

Context

When you access a network through an interface, you need to further setting multiple parameters of the interface based on the networking requirements in addition to performing basic

configurations on the interface.

Further configurations of an interface include: l Configuring the operation mode of an interface l Configuring routes

For the detailed Configuration, please see the other configuration manuals of S2300. For the detailed Configuration, please see Quidway S2300 Series Ethernet Switches

Configuration Guide - Ethernet and Quidway S2300 Series Ethernet Switches Configuration Guide - IP Routing.

3.2.7 Checking the Configuration

After completing the basic configuration of an interface, you can use the display commands to check the configuration.

(44)

Procedure

Step 1 Run the display interface [ interface-type [ interface-number ] ] command to check the running status of the interface and the statistics on the interface.

Step 2 Run the display interface description command to check the brief information about the interface

Step 3 Run the display ip interface [ interface-type interface-number ] command to check the main configurations of the interface.

Step 4 Run the display ip interface brief [ interface-type interface-number ] command to check the brief state of the interface.

----End

3.3 Configuring the Loopback Interface

This section describes how to configure the loopback interface.

3.3.1 Establishing the Configuration Task

The users can create or delete a loopback interface. When being created, the loopback interface remains in the Up state until you delete it.

Applicable Environment

Some applications need to be configured with a local interface with a specified IP address when the configuration of a physical interface is not affected. In this case, the IP address of the local interface needs to be advertised by routing protocols. Loopback interfaces are used to improve the reliability of the configuration.

Pre-configuration Tasks

Before configuring the loopback interface, complete the following task: l Switching on the S2300

Data Preparation

To configure the loopback interface, you need the following data.

No. Data

1 Number of the loopback interface 2 IP address of the loopback interface

3.3.2 Configuring IPv4 Parameters of the Loopback Interface

A loopback interface can be assigned an IPv4 address, configured to check the source IPv4 addresses of packets.

(45)

Procedure

Step 1 Run: system-view

The system view is displayed. Step 2 Run:

interface loopback interface-number A loopback interface is created.

The value of interface-number ranges from 0 to 1023. A maximum of 1024 loopback interfaces can be created.

Step 3 Run:

ip address ip-address { mask | mask-length } [ sub ] An IPv4 address is assigned to the loopback interface. Step 4 (Optional) Run:

ip verify source-address

The loopback interface is configured to check the source IPv4 addresses of packets. ----End

3.3.3 Checking the Configuration

After configuring a loopback interface, run the following commands to check the configuration.

Procedure

Step 1 Run the display interface loopback [ number ] command to check the status of the loopback interface.

----End

3.4 Maintaining the Interface

This section describes how to maintain the interface.

3.4.1 Clearing Statistics Information on the Interface

The statistics on the interface cannot be restored after you clear them. So, confirm the action before you use the command.

Procedure

Step 1 Run the reset counters interface [ interface-type [ interface-number ] ] command in the user view to clear the statistics on the interface.

References

Related documents

File reading Syslog server From IP equipment (1) Network connection functions (6) Telnet functions Connection information settings To IP equipment File reading File server

• Socket pair consists of the client IP address, client port number, server IP address and server port number.. • Socket pair identifies the two end points that identifies a TCP

The switch plays the role of a DNS SERVER in two steps: Enable the global DNS SERVER function, configure the IP address of the real DNS server. After the DNS SERVER function

In DHCP mode, the IP phone retrieves a default gateway address from the DHCP server Changing the Default Gateway address requires a reboot of the IP phone; when you leave the menu,

switch (config)# interface vlan 20 // Vlan 20 is used between a leaf and a server switch (config interface vlan 20)# ip ospf area 0.. switch (config interface vlan 20)# ip

These address pools can also be configured to supply additional information to the requesting client such as the IP address of the DNS server, the default router,

‣ Go to Network (Client) Access &gt; IPsec Connection Profiles ‣ Check the box Allow Access for the outside interface ‣ Click Apply... Step 3 – Add an IP

• If your client PCs are having problems accessing their email accounts on your MDaemon server, check that the IP address you’ve given for their POP3 and SMTP