Professional Documents
Culture Documents
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.
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.
Website: Email:
Issue 02 (2011-07-15)
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. Indicates a hazard with a medium or low level of risk, which if not avoided, could result in minor or moderate injury. Indicates a potentially hazardous situation, which if not avoided, could result in equipment damage, data loss, performance degradation, or unexpected results. Indicates a tip that may help you solve a problem or save time. Provides additional information to emphasize or supplement important points of the main text.
WARNING
CAUTION
TIP
NOTE
Issue 02 (2011-07-15)
ii
Command Conventions
The command conventions that may be found in this document are defined as follows. Convention Boldface Italic [] { x | y | ... } [ x | y | ... ] { x | y | ... }* Description The keywords of a command line are in boldface. Command arguments are in italics. Items (keywords or arguments) in brackets [ ] are optional. Optional items are grouped in braces and separated by vertical bars. One item is selected. Optional items are grouped in brackets and separated by vertical bars. One item is selected or no item is selected. 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. Optional items are grouped in brackets and separated by vertical 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.
[ x | y | ... ]* &<1-n> #
Change History
Updates between document issues are cumulative. Therefore, the latest document issue contains all changes made in previous issues.
Issue 02 (2011-07-15)
iii
Contents
Contents
About This Document.....................................................................................................................ii 1 Auto-Config....................................................................................................................................1
1.1 Overview............................................................................................................................................................2 1.2 Auto-Config Features Supported by the S5300..................................................................................................3 1.3 Deploying Unconfigured Switches (Same Network Segment)..........................................................................6 1.3.1 Establishing the Configuration Task.........................................................................................................6 1.3.2 Configuring the DHCP Server...................................................................................................................7 1.3.3 Configuring the FTP/TFTP Server............................................................................................................8 1.3.4 Checking the Configuration.......................................................................................................................8 1.4 Deploying Unconfigured Switches (Different Network Segments)...................................................................9 1.4.1 Establishing the Configuration Task.........................................................................................................9 1.4.2 Configuring the DHCP Server.................................................................................................................10 1.4.3 Configuring DHCP Relay........................................................................................................................11 1.4.4 Configuring the FTP/TFTP Server..........................................................................................................11 1.4.5 Checking the Configuration.....................................................................................................................11
2 NAP Configuration.....................................................................................................................13
2.1 NAP Overview.................................................................................................................................................14 2.2 Configuring NAP-based Remote Deployment.................................................................................................14 2.2.1 Establishing the Configuration Task.......................................................................................................14 2.2.2 Configuring and Starting the NAP Master Interface...............................................................................15 2.2.3 Remote Login..........................................................................................................................................17 2.2.4 Disabling NAP on the Slave Device........................................................................................................18 2.2.5 Checking the Configuration.....................................................................................................................18 2.3 Configuration Examples...................................................................................................................................19 2.3.1 Example for Configuring NAP-based Remote Deployment in Static Mode...........................................20 2.3.2 Example for Configuring NAP-based Remote Deployment in Automatic Mode...................................21
3 Stacking.........................................................................................................................................24
3.1 Stacking Overview...........................................................................................................................................25 3.2 Principle of Stacking........................................................................................................................................25 3.3 Features of Stacking Supported by the S5300..................................................................................................31 3.4 Typical Topology of a Stack............................................................................................................................32 3.5 Configuring the Stacking Function on the S5300............................................................................................33 Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. iv
Contents
3.5.1 Establishing the Configuration Task.......................................................................................................33 3.5.2 (Optional) Configuring the Reserved VLAN of the Stack......................................................................33 3.5.3 (Optional) Enabling the Stacking Function.............................................................................................34 3.5.4 (Optional) Configuring a Stack ID for the S5300...................................................................................34 3.5.5 (Optional) Configuring a Stack Priority for a Device.............................................................................35 3.5.6 (Optional) Configuring the MAC Address Switchover Time.................................................................35 3.5.7 Checking the Configuration.....................................................................................................................36 3.6 Configuration Examples...................................................................................................................................37 3.6.1 Example for Configuring a Stack in a Ring Topology............................................................................37
5 Hardware Management..............................................................................................................44
5.1 Hardware Management Overview....................................................................................................................45 5.2 Hardware Management Features Supported by the S5300...............................................................................45 5.3 Backing Up the Electronic Label......................................................................................................................45 5.3.1 Establishing the Configuration Task.......................................................................................................45 5.3.2 Backing Up the Electronic Label.............................................................................................................46 5.4 Configuring Electrical Port Sleep.....................................................................................................................46 5.4.1 Establishing the Configuration Task.......................................................................................................46 5.4.2 Enabling Electrical Port Sleep.................................................................................................................47 5.4.3 Checking the Configuration.....................................................................................................................47
Contents
6.2.5 (Optional) Configuring the Timestamp for the Output Information.......................................................56 6.2.6 Checking the Configuration.....................................................................................................................57 6.3 Sending Information to the Information Center...............................................................................................57 6.3.1 Sending Information to the Console........................................................................................................57 6.3.2 Sending Information to the Telnet Terminal...........................................................................................58 6.3.3 Sending Information to the SNMP Agent...............................................................................................59 6.3.4 Sending Information to the Log Buffer...................................................................................................59 6.3.5 Sending Information to the Trap Buffer..................................................................................................59 6.3.6 Sending Information to the Log Host......................................................................................................60 6.3.7 Checking the Configuration.....................................................................................................................60 6.4 Maintaining the Information Center.................................................................................................................60 6.5 Configuration Examples...................................................................................................................................61 6.5.1 Example for Configuring the Information Center...................................................................................61
8 Mirroring.......................................................................................................................................72
8.1 Introduction......................................................................................................................................................74 8.1.1 Mirroring Functions.................................................................................................................................74 8.2 Configuring Local Port Mirroring....................................................................................................................77 8.2.1 Establishing the Configuration Task.......................................................................................................77 8.2.2 Configuring Local Port Mirroring...........................................................................................................78 8.2.3 Checking the Configuration.....................................................................................................................78 8.3 Configuring Remote Port Mirroring.................................................................................................................79 8.3.1 Establishing the Configuration Task.......................................................................................................79 8.3.2 Configuring Remote Port Mirroring........................................................................................................79 8.3.3 Checking the Configuration.....................................................................................................................82 8.4 Canceling Port Mirroring..................................................................................................................................82 8.4.1 Establishing the Configuration Task.......................................................................................................82 8.4.2 Canceling Port Mirroring.........................................................................................................................83 8.4.3 Checking the Configuration.....................................................................................................................83 8.5 Configuring Local VLAN Mirroring................................................................................................................83 Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. vi
Contents
8.5.1 Establishing the Configuration Task.......................................................................................................84 8.5.2 Configuring Local VLAN Mirroring.......................................................................................................84 8.5.3 Checking the Configuration.....................................................................................................................85 8.6 Configuring Remote VLAN Mirroring............................................................................................................85 8.6.1 Establishing the Configuration Task.......................................................................................................85 8.6.2 Configuring Remote VLAN Mirroring...................................................................................................86 8.6.3 Checking the Configuration.....................................................................................................................87 8.7 Canceling VLAN Mirroring.............................................................................................................................87 8.7.1 Establishing the Configuration Task.......................................................................................................87 8.7.2 Canceling VLAN Mirroring....................................................................................................................87 8.7.3 Checking the Configuration.....................................................................................................................88 8.8 Configuring MAC Address-based Local Mirroring.........................................................................................88 8.8.1 Establishing the Configuration Task.......................................................................................................88 8.8.2 Configuring Local SPAN Based on MAC Addresses.............................................................................89 8.8.3 Checking the Configuration.....................................................................................................................89 8.9 Configuring RSPAN Based on MAC Addresses.............................................................................................90 8.9.1 Establishing the Configuration Task.......................................................................................................90 8.9.2 Configuring Remote MAC Address Mirroring.......................................................................................90 8.9.3 Checking the Configuration.....................................................................................................................91 8.10 Canceling Mirroring Based on MAC Addresses............................................................................................92 8.10.1 Establishing the Configuration Task.....................................................................................................92 8.10.2 Canceling Mirroring Based on MAC Addresses...................................................................................92 8.10.3 Checking the Configuration...................................................................................................................93 8.11 Configuring Local Flow Mirroring.................................................................................................................93 8.11.1 Establishing the Configuration Task.....................................................................................................93 8.11.2 Configuring Traffic Classification Rules..............................................................................................93 8.11.3 Configuring Flow Mirroring..................................................................................................................94 8.11.4 Creating and Applying a Traffic Policy................................................................................................94 8.11.5 Checking the Configuration...................................................................................................................95 8.12 Configuring Remote Flow Mirroring.............................................................................................................95 8.12.1 Establishing the Configuration Task.....................................................................................................96 8.12.2 Setting Traffic Classification Rules.......................................................................................................96 8.12.3 Configuring Remote Flow Mirroring....................................................................................................96 8.12.4 Creating and Applying a Traffic Policy................................................................................................97 8.12.5 Checking the Configuration...................................................................................................................97 8.13 Canceling Flow Mirroring..............................................................................................................................98 8.13.1 Establishing the Configuration Task.....................................................................................................98 8.13.2 Canceling Flow Mirroring.....................................................................................................................99 8.13.3 Checking the Configuration...................................................................................................................99 8.14 Changing or Deleting an Observing Port.....................................................................................................100 8.14.1 Establishing the Configuration Task...................................................................................................100 8.14.2 (Optional) Deleting an Observing Port................................................................................................100 Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. vii
Contents
8.14.3 (Optional) Changing an Observing Port..............................................................................................101 8.14.4 Checking the Configuration.................................................................................................................101 8.15 Configuring CPU Mirroring.........................................................................................................................102 8.15.1 Establishing the Configuration Task...................................................................................................102 8.15.2 (Optional) Configuring an ACL Rule..................................................................................................102 8.15.3 Configuring an Observing Port............................................................................................................103 8.15.4 Configuring CPU Mirroring................................................................................................................103 8.15.5 Checking the Configuration.................................................................................................................103 8.16 Cancelling CPU Mirroring...........................................................................................................................104 8.16.1 Establishing the Configuration Task...................................................................................................104 8.16.2 Cancelling CPU Mirroring..................................................................................................................104 8.16.3 Checking the Configuration.................................................................................................................104 8.17 Configuration Examples...............................................................................................................................105 8.17.1 Example for Configuring Local Port Mirroring..................................................................................105 8.17.2 Example for Configuring Local VLAN Mirroring..............................................................................106 8.17.3 Example for Configuring MAC Address-based Local Mirroring.......................................................108 8.17.4 Example for Configuring Local Flow Mirroring.................................................................................110 8.17.5 Example for Configuring Remote Port Mirroring...............................................................................113 8.17.6 Example for Changing an Observing Port...........................................................................................116
9 PoE Configuration.....................................................................................................................119
9.1 PoE Overview.................................................................................................................................................120 9.2 PoE Features Supported by the S5300...........................................................................................................120 9.3 Configuring PoE Functions............................................................................................................................121 9.3.1 Establishing the Configuration Task.....................................................................................................121 9.3.2 Configuring the PoE Function Globally................................................................................................121 9.3.3 Configuring the PoE Function on an Interface......................................................................................123 9.3.4 Checking the Configuration...................................................................................................................125 9.4 Configuration Examples.................................................................................................................................126 9.4.1 Example for Configuring PoE on the Switch........................................................................................126
10 ALS Configuration..................................................................................................................129
10.1 ALS Overview..............................................................................................................................................130 10.2 ALS Features Supported by the S5300.........................................................................................................130 10.3 Configuring ALS..........................................................................................................................................131 10.3.1 Establishing the Configuration Task...................................................................................................131 10.3.2 Enabling ALS on an Interface.............................................................................................................132 10.3.3 (Optional) Setting the Restart Mode of the Laser................................................................................133 10.3.4 (Optional) Starting the Laser Manually...............................................................................................133 10.3.5 (Optional) Setting the ALS Pulse Interval and Width of the Laser.....................................................134 10.3.6 Checking the Configuration.................................................................................................................135 10.4 Configuration Examples...............................................................................................................................135 10.4.1 Example for Configuring ALS............................................................................................................135
Issue 02 (2011-07-15)
viii
Contents
Issue 02 (2011-07-15)
ix
1 Auto-Config
1
About This Chapter
1.2 Auto-Config Features Supported by the S5300 This section describes how Auto-Config runs on the S5300.
Auto-Config
This chapter describes the concept, working mechanism, and deployment of Auto-Config. 1.1 Overview This section describes the functions, application scenarios, and terms of Auto-Config.
1.3 Deploying Unconfigured Switches (Same Network Segment) This section describes how to deploy S5300s without configuration file. 1.4 Deploying Unconfigured Switches (Different Network Segments) This section describes how to deploy unconfigured S5300s.
Issue 02 (2011-07-15)
1 Auto-Config
1.1 Overview
This section describes the functions, application scenarios, and terms of Auto-Config. When a new switch or a switch without any configuration file is powered on, Auto-Config runs automatically to obtain a configuration file. With the Auto-Config function, the network administrator can manage new switches or switches without any configuration file remotely.
NOTE
The Auto-Config function is applicable to new switches or switches without any configuration file (unconfigured switches).
The Auto-Config function has the following advantages: l l l The maintenance personnel do not need to manually configure each switch. With this function, a few maintenance personnel can maintenance widely deployed devices. Auto-Config simplifies the network configurations and implements unified management and remote debugging on switches. With Auto-Config allows switches to automatically download corresponding configuration files, reducing the workload of network administrators.
Intermediate File
The intermediate file lswnet.cfg is used in the Auto-Config process. The intermediate file records the mapping between MAC addresses of switches and names of configuration files. After an unconfigured switch obtains the IP address of the FTP/TFTP server, it downloads the lswnet.cfg file from the FTP/TFTP server to search for the name of the required configuration file, and then downloads the configuration file from the FTP/TFTP server.
NOTE
Auto-Config uses Option 67 to obtain the configuration file first. If Option 67 is not configured, AutoConfig obtains the intermediate file.
For example, if the MAC address of an S5300 is 0018-82C5-AA89 and the S5300 needs to download the configuration file S5300.cfg, the contents of the intermediate file are as follows: mac=0018-82C5AA89;vrpfile=V100R006C00.cc;vrpver=V100R006C00;cfgfile=S5300.cfg;patchfile=S5300pat.pat; esn=0213778899;vrpfile=V100R006C00.cc;vrpver=V100R006C00;cfgfile=S5300. cfg;patchfile=S5300-pat.pat;
NOTE
If the configuration file is located on the FTP or TFTP server, its extension must be .cfg. A MAC address and a configuration file name are separated by a semicolon. The format of a MAC address is xxxx-xxxx-xxxx-xxxx. The name of a configuration file contains up to 48 characters, including the extension .cfg. The name is case insensitive and cannot contain special characters. It is recommended that the name consists of English letters, numbers, and underscore (_). If multiple unconfigured switches need to be configured, each row in the intermediate file records the MAC address of a switch and the name of the configuration file that the switch requires.
Option 67
The Option 67 field is configured on the DHCP server to specify the configuration file.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2
1 Auto-Config
Option 150
The Option 150 field is configured on the DHCP server to specify the IP address of the TFTP server.
Option 14x
The Option 14x field is configured on the DHCP server to specify the IP address, user name, and password of the FTP server. l l l l l l Option 141: specifies the user name of the FTP user. Option 142: specifies the password of the FTP user. Option 143: specifies the IP address of the FTP server. Option 145: version file. Option 146: identity. Option 147: authentication.
Issue 02 (2011-07-15)
1 Auto-Config
No
Are there No Version file name and version info? Yes Does the No device need to be upgraded? Yes Obtain a version file
Yes Is there patch file information? Yes Can a patch file be downloaded to device? No Obtain the patch file No
Is the restart flag 1? No Is there Web file information? Yes Obtain the Web file No
Obtain a configuration file Is the No configuration file obtained? Yes Start a timer to set the delay in device restart Timer expires, delete temporary configuration and make configuration file effective End
No
No
No
Is the version file valid? Yes Specify it as next startup file Set the restart flag
No
Is the patch file valid? Yes Specify it as next startup file Restart device Start a new AutoConfig process
Issue 02 (2011-07-15)
1 Auto-Config
The Auto-Config process can be divided into three phases: l Startup After being powered on, an unconfigured switch checks whether there is *.cfg or *.zip file except the *web.zip and web.zip files in the flash memory, and then takes actions according to the checking result: If the switch detects a configuration file, it loads the configuration file to complete the startup. If the switch does not detect any configuration file, it checks whether Auto-Config is enabled. If Auto-Config is enabled, the switch starts a 5-minute timer for obtaining a configuration file and then load the default configuration to complete the startup. If Auto-Config is disabled, the switch loads the default configuration to complete the startup. l Obtaining a configuration file when the timer expires When the timer set for obtaining a configuration file expires, the switch checks whether a configuration file is saved in the flash memory. If the flash memory does not contain any configuration file, the switch checks whether it is added to a Huawei Group Management Protocol (HGMP) cluster. If the switch is not in any HGMP cluster, the switch begins to obtain a configuration file as follows: 1. Obtaining the IP address and information about the FTP/TFTP server A switch that does not load any configuration file automatically enables the DHCP client function on the VLANIF1 interface in Up state. VLANIF1 then broadcasts DHCP Request packets (presuming that the DHCP server has been configured with the address pool, Option 150 or Option 14x, and gateway information). Then, the DHCP server sends the related configurations to the switch, including the IP address allocated to the switch, IP address of the FTP/TFTP server, FTP user name and password, and default gateway. If the switch fails to obtain the IP address of the FTP/TFTP server, it sends DHCP requests repeatedly until it obtains the IP address. 2. Downloading a configuration file After the switch that does not load any configuration file obtains the IP address of the FTP/TFTP server, it accesses the FTP/TFTP server to obtain a configuration file through Layer 2 or Layer 3 forwarding. (1) The switch downloads the intermediate file lswnet.cfg from the FTP/TFTP server. (2) The switch searches for the name of the required configuration file, and then downloads the configuration file from the FTP/TFTP server. (3) If downloading the configuration file fails, the AutoConfig process will be suspend. l Loading a configuration file After the configuration file is downloaded successfully, the router is restarted according to the setting of Option 146. If no Option 146 is configured, the router is restarted immediately after the configuration file is downloaded.
Issue 02 (2011-07-15)
1 Auto-Config
SwitchA
Operator
Pre-configuration Tasks
Before deploying unconfigured switches, complete the following tasks: l l l Ensuring that there are routes from the DHCP server and FTP/TFTP server to the switches Ensuring that there is no *.cfg or *.zip file except the *web.zip and web.zip files in the flash memory of each switch Ensuring that the switches are not added to any HGMP cluster
Data Preparation
To deploy unconfigured switches, you need the following data.
Issue 02 (2011-07-15)
1 Auto-Config
N o. 1 2 3 4
Data Interconnection information about the upstream interfaces on each S5300 and the downstream interfaces on the DHCP server MAC address of each unconfigured switch IP address, mask, address pool, and Option 150 or Option 14x of the DHCP server IP address, version file, patch file, and configuration file on the FTP/TFTP server
The DHCP server must support either Option 150 or Option 14x.
Procedure
l l Enable DHCP server. Configure an address pool, including the address range and Option 150 (or Option 14x). It is required that the address pool be on the same network segment with unconfigured switches and the FTP/TFTP server.
NOTE
Pay attention to the following points when configuring Option 150 or Option 14x: l When new switches obtain configuration files through TFTP, the DHCP server must support Option 150. l When new switches obtain configuration files through FTP, the DHCP server must support Option 141, Option 142, and Option 143. l If both Option 150 and Option 14x are configured on the DHCP server, Option 150 takes precedence over Option 14x. l If you use ordinary characters to configure Option 150 or Option 143 on the DHCP server, the Auto-Config module cannot recognize the IP address, which results in an Auto-Config process sends the DHCP messages incessantly.
Add the downstream interface on the DHCP server to the management VLAN in access mode and assign an IP address on the same network segment as the IP address of the DHCP server to the management VLAN. After Auto-Config is enabled, packets from an unconfigured switch do not carry tags. Therefore, ensure that untagged packets can be transmitted between unconfigured switches and the DHCP server.
----End
Issue 02 (2011-07-15)
1 Auto-Config
Procedure
l Set the IP address of the FTP/TFTP server. For an FTP server, the IP address must be the same as the value of Option 143 configured on the DHCP server; for a TFTP server, the IP address must be the same as the value of Option 150 configured on the DHCP server. Create and configure an intermediate file. The intermediate file is configured according to the MAC addresses of unconfigured switches and the names of configuration files. For the format of the intermediate file, see 1.1 Overview. l Save the intermediate file and configuration files to the working directory on the FTP/TFTP server.
----End
Context
You can check different items in different phases in the Auto-Config process to confirm that Auto-Config runs properly.
Procedure
Step 1 Five minutes after unconfigured switches are powered on, check address allocation on the DHCP server to confirm that the switches are connected to the DHCP server.
NOTE
If the switches are connected to the DHCP server, you can log in to the switches through Telnet but do not configure the switches.
Step 2 Five minutes after the switches obtain IP addresses, check the file downloading log on the FTP/ TFTP server or log in to the switches to confirm that correct configuration files have been downloaded.
NOTE
Do not save a configuration file to a switch to be configured immediately after the configuration file is downloaded; otherwise, only a temporary configuration file is saved because the configurations have not taken effect.
Step 3 If the user has specified the activation delay, the configuration file will take effect after the delay. If the user has not specified the activation delay, the configuration file will take effect
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8
1 Auto-Config
immediately by default. Then run the display current-configuration command to check whether the configurations take effect.
NOTE
If you access the switch when it is busy delivering configurations in the Auto-Config process, the switch may not respond in real time. After the configurations take effect, modify the configuration of the downstream interface on the DHCP server as required.
----End
Operator
FTP/TFTP Server
Pre-configuration Tasks
Before deploying unconfigured switches, complete the following tasks: l Ensuring that there are routes from the DHCP server, DHCP relay, and FTP/TFTP server to the switches
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9
Issue 02 (2011-07-15)
1 Auto-Config
l l
Ensuring that there is no *.cfg or *.zip file except the *web.zip and web.zip files in the flash memory of each switch Ensuring that the switches are not added to any HGMP cluster and USB upgrade
Data Preparation
To deploy unconfigured switches, you need the following data. N o. 1 2 3 4 5 6 Data Interconnection information about the upstream interfaces on each S5300 and the downstream interfaces on the DHCP relay Interconnection information about the DHCP relay and DHCP server MAC address of each unconfigured switch IP address, mask, address pool, and Option 150 or Option 14x of the DHCP server IP address, mask, and relay address of the DHCP relay IP address, default configuration file, and configuration files on the FTP/TFTP server
The DHCP server must support either Option 150 or Option 14x.
Procedure
l l Enable DHCP server. Configure an address pool, including the address range, gateway, and Option 150 (or Option 14x).
NOTE
Pay attention to the following points when configuring Option 150 or Option 14x: l When new switches obtain configuration files through TFTP, the DHCP server must support Option 150. l When new switches obtain configuration files through FTP, the DHCP server must support Option 141, Option 142, and Option 143. l If both Option 150 and Option 14x are configured on the DHCP server, Option 150 takes precedence over Option 14x. l If you use ordinary characters to configure Option 150 or Option 143 on the DHCP server, the Auto-Config module cannot recognize the IP address.
----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10
1 Auto-Config
Procedure
l l Enable DHCP relay. Configure the upstream and downstream interfaces. You need to configure the IP address and mask for the upstream interface and configure the IP address, mask, and DHCP relay address for the downstream interface.
NOTE
You can temporarily set the IP address of the downstream interface on the same network segment with the IP addresses of unconfigured switches, and then add the downstream interface to the management VLAN in access mode.
----End
Procedure
l Set the IP address of the FTP/TFTP server. For an FTP server, the IP address must be the same as the value of Option 143 configured on the DHCP server; for a TFTP server, the IP address must be the same as the value of Option 150 configured on the DHCP server. l Create and configure an intermediate file. The intermediate file is configured according to the MAC addresses of unconfigured switches and the names of configuration files. For the format of the intermediate file, see 1.1 Overview. l Save the intermediate file and configuration files to the working directory on the FTP/TFTP server.
----End
1 Auto-Config
Context
You can check different items in different phases in the Auto-Config process to confirm that Auto-Config runs properly.
Procedure
Step 1 Five minutes after unconfigured switches are powered on, check address allocation on the DHCP server to confirm that the switches are connected to the DHCP server.
NOTE
If the switches are connected to the DHCP server, you can log in to the switches through Telnet but do not configure the switches.
Step 2 Five minutes after the switches obtain IP addresses, check the file downloading log on the FTP/ TFTP server or log in to the switches to confirm that correct configuration files have been downloaded.
NOTE
Do not save a configuration file to a switch to be configured immediately after the configuration file is downloaded; otherwise, only a temporary configuration file is saved because the configurations have not taken effect.
Step 3 If the user has specified the activation delay, the configuration file will take effect after the delay. If the user has not specified the activation delay, the configuration file will take effect immediately by default. Then run the display current-configuration command to check whether the configurations take effect.
NOTE
If you access the switch when it is busy delivering configurations in the Auto-Config process, the switch may not respond in real time. After the configurations take effect, modify the configuration of the downstream interface on the DHCP relay as required.
----End
Issue 02 (2011-07-15)
12
2 NAP Configuration
2
About This Chapter
NAP Configuration
This chapter describes how to configure the Neighbor Access Protocol (NAP) on the S5300. 2.1 NAP Overview NAP is a Huawei proprietary protocol that implements remote configuration and deployment of unconfigured devices. You can log in to an unconfigured device from a directly connected device and configure the unconfigured device remotely through NAP. 2.2 Configuring NAP-based Remote Deployment Using NAP, you can remotely log in to devices with empty configurations to implement remote deployment. 2.3 Configuration Examples This section provides upgrade and maintenance examples together with the configuration flowchart. The configuration examples explain networking requirements, configuration notes, and configuration roadmap.
Issue 02 (2011-07-15)
13
2 NAP Configuration
Context
CAUTION
After the device with an empty configuration is powered on and started, you must make sure that its interfaces connected to the devices on the current network are Up and support NAP; otherwise, the function of NAP-based remote deployment cannot take effect.
Applicable Environment
To deploy devices having empty configurations, you can use NAP to perform remote login to the devices from a device in the current network. In this manner, you can implement remote deployment of devices.
Pre-configuration Tasks
Before configuring NAP-based remote deployment, complete the following tasks:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 14
2 NAP Configuration
l l
Connecting the device having an empty configuration to a device in the current network via a single hop by using network cables Ensuring that the interfaces connecting the device with an empty configuration and the device in the current network are both in the Up state, and support NAP.
Data Preparation
NOTE
l If the IP addresses used for establishing NAP connections are to be manually configured, you need to prepare the following data before configuring NAP. l Conversely, if the IP addresses for establishing NAP connections are to be automatically configured, you can skip this.
To configure NAP-based remote deployment, you need the following data. No. 1 Data Two primary IP addresses. The two IP addresses are primary IP addresses for the master interface and the slave interface respectively, and should be on the same network segment. Two secondary IP addresses. The two IP addresses are secondary IP addresses for the master interface and the slave interface respectively, and should be on the same network segment.
Context
CAUTION
If commands affecting the IP address configuration or IP packet forwarding (such as configurations and commands related to the VPN, Eth-Trunk, or Layer 2 interface) exist on device of the master interface, NAP enabled on the master interface becomes unavailable. You are recommended to delete these commands and re-enable NAP. Do as follows on the switch to configure and start the NAP master interface. In NAP, IP addresses can be allocated either automatically or manually.
Procedure
l Automatic allocation of IP addresses 1. Run:
system-view
Issue 02 (2011-07-15)
15
2 NAP Configuration
The NAP Master interface is configured and started. l Manual IP address allocation Two methods are available for manually allocating IP addresses. You can choose the method according to actual needs. You can specify the NAP IP address pool. Then, IP addresses are automatically allocated to the IP address pool. To use this method, do as follows. 1. Run:
system-view
An IP address pool is configured for NAP. The default IP address pool for establishing NAP connections is 10.167.253.0/24. You can run the nap ip-pool ip-address mask-length command to change the IP address pool.
NOTE
After NAP is started on the master device, the IP address pool cannot be changed.
3.
Run:
interface interface-type interface-number
The NAP Master interface is configured and started. You can also specify the NAP IP addresses. To use this method, do as follows. 1. Run:
system-view
Issue 02 (2011-07-15)
16
2 NAP Configuration
IP addresses are configured for establishing NAP connections. The default IP address pool for establishing NAP connections is 10.167.253.0/24. When configuring IP addresses, ensure that the primary IP addresses of both the master and the slave interfaces are on the same network segment, and that the secondary IP addresses of both the master and the slave interfaces are on the same network segment. ----End
Context
Using the display nap interface command, you can view the NAP status of an interface to ensure that the interface is assigned a correct IP address. Do as follows on the switch where the NAP master interface is configured.
Procedure
Step 1 Run:
system-view
The login to the slave device from the master device is performed. l If the slave device has an empty configuration, you can log in to the slave device from the master device without a user name and a password. l If, however, the slave device is configured with user name(s) and password(s), you must enter the correct user name and password to perform a NAP-based remote login to the slave device.
NOTE
To ensure security for NAP, the slave device having an empty configuration checks the source address of the Telnet login. If the Telnet source address is the NAP address of the master device that is telnetting to the slave device, the slave device allows the master device to directly log in without being authenticated. This is because by default, the user level of the remote login based on the NAP address is the same as the login through the console interface, which enjoys the highest user level. If the Telnet source address is not the NAP address of the master device, the remote login fails. If ip source check user-bind enable command is executed on an interface, the interface cannot connect to the NAP neighbor.
----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 17
2 NAP Configuration
Context
The master device has logged in to the slave device through Telnet. The NAP function is no longer required, and to ensure security of the network, NAP should be globally disabled on the slave interface of the slave device. Do as follows on the switch that is configured as the NAP slave device.
Procedure
Step 1 Run:
system-view
Prerequisite
NAP-based remote deployment has been completed.
Procedure
Step 1 Using the display nap status command, you can view the current NAP status. Step 2 Using the display nap interface [ interface-type interface-number ] command, you can view the NAP status of the specified interface. ----End
Example
Run the display nap status command to view the current NAP status.
<Quidway> display nap status Slave port status : Enable Nap ip-pool/Mask : 12.12.12.0/24
Run the display nap interface interface-type interface-number command to view the NAP status of the specified interface.
<Quidway> display nap interface gigabitethernet0/0/1
Issue 02 (2011-07-15)
18
2 NAP Configuration
Issue 02 (2011-07-15)
19
2 NAP Configuration
Networking Requirements
As shown in Figure 2-1, the user needs to perform a remote login to Switch B from Switch A. Switch B is the master device, and temporary neighbor relationship is to be set up between Switch B and Switch C having an empty configuration. Switch B and Switch C need to be directly connected via a single hop. Both the interfaces connecting Switch B and Switch C should be in the Up state, and should support NAP. Figure 2-1 Networking diagram of NAP-based remote deployment
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure a NAP master interface on Switch B. Configure an IP address for establishing a NAP connection on Switch B. Use NAP to log in to Switch C from Switch B by means of Telnet.
Data Preparation
To complete the configuration, you need the following data: l l Two primary IP addresses. The two IP addresses are primary IP addresses for the master interface and the slave interface respectively, and should be on the same network segment. Two secondary IP addresses. The two IP addresses are secondary IP addresses for the master interface and the slave interface respectively, and should be on the same network segment.
Procedure
Step 1 Configure a NAP master interface on Switch B
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] interface gigabitethernet0/0/1 [SwitchB-GigabitEthernet0/0/1] nap port master
2 NAP Configuration
[SwitchB-GigabitEthernet0/0/1] nap local-ip 12.12.12.5 sub-ip 12.12.12.9 peer-ip 12.12.12.6 sub-ip 12.12.12.10 30 Are you sure to continue?[Y/N] y
# After the preceding configuration is complete, run the display nap status command on Switch B. You can view that NAP has been enabled on Switch B. Then, run the display nap interface command. You can view that the primary and secondary IP addresses have been assigned to the master and slave interfaces. For example:
[SwitchB-GigabitEthernet0/0/1] display nap status Slave port status : Enable Nap ip-pool/Mask : 10.167.253.0/24 [SwitchB-GigabitEthernet0/0/1] display nap interface -----------------------------------------------------NAP master port list Port count : 1 -----------------------------------------------------Port property : Master Current status : IP-ASSIGNED Local port : GigabitEthernet0/0/1 Peer port : GigabitEthernet0/0/1 Local primary ip : 12.12.12.5 Peer primary ip : 12.12.12.6 Local secondary ip : 12.12.12.9 Peer secondary ip : 12.12.12.10 Hello time : 3s Linked time : 00:02:33 ------------------------------------------------------
Step 3 Log in to the slave device from the master device. # Configure Switch B.
[SwitchB-GigabitEthernet0/0/1] nap login neighbor Trying 12.12.12.10 ... Press CTRL+K to abort Connected to 12.12.12.10 ... Info: The max number of VTY users is 10, and the number of current VTY users on line is 1.
----End
Configuration Files
None
Networking Requirements
As shown in Figure 2-2, the user needs to perform a remote login to Switch B from Switch A. Switch B is the master device, and temporary neighbor relationship is to be set up between
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 21
2 NAP Configuration
Switch B and Switch C having an empty configuration. Switch B and Switch C need to be directly connected via a single hop. Both the interfaces connecting Switch B and Switch C should be in the Up state, and should support NAP. Figure 2-2 Networking diagram of NAP-based remote deployment
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure a primary IP address and a secondary IP address on Switch B. Configure a NAP master interface on Switch B. Telnet to Switch C from Switch B by means of NAP.
Data Preparation
None
Procedure
Step 1 Configuring the NAP master interface # Do as follows on Switch B.
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] interface gigabitethernet0/0/1 [SwitchB-GigabitEthernet0/0/1] nap port master
Step 2 Logging in to the slave device from the master device. # Do as follows on Switch B.
[SwitchB-GigabitEthernet0/0/1] nap login neighbor Trying 10.167.253.10 ... Press CTRL+K to abort Connected to 10.167.253.10 ... Info: The max number of VTY users is 10, and the number of current VTY users on line is 1.
----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 22
2 NAP Configuration
Configuration Files
None
Issue 02 (2011-07-15)
23
3 Stacking
3
About This Chapter
3.1 Stacking Overview This section describes the basic concepts of the stacking function. 3.2 Principle of Stacking This section describes how a stack system is set up. 3.3 Features of Stacking Supported by the S5300 3.4 Typical Topology of a Stack This section describes two typical topologies of a stack.
Stacking
This chapter describes the basic concepts and configuration methods of the stacking function.
3.5 Configuring the Stacking Function on the S5300 This section describes how to configure the stacking function on the S5300. 3.6 Configuration Examples This section provides an example for configuring a stack in a ring topology.
Issue 02 (2011-07-15)
24
3 Stacking
Master switch A stack has only one master switch. The master switch manages the entire stack system by assigning stack IDs to member switches, collecting information about the stack topology, and notifying all the member switches of the information.
Standby switch A stack has only one standby switch. The standby switch backs up the master switch. When the master switch is faulty, the standby switch functions as a master switch.
Slave switch The slave switch sends packets to inform the master switch of the topology change after detecting that a neighbor is lost. Apart from the master switch and standby switch, all the other switches in a stack are slave switches.
The master switch, standby switch, and all the slave switches are all member switches. Interfaces connecting member switches are stack interfaces, and other interfaces are common user interfaces. Member switches are connected through independent stack modules and stack cables.
l When the products of the same series are stacked, the switch that is closest to the physical interface of the new member switch added to the stack system synchronizes the system version of the new member switch. l If no switch in the stack system is of the same series as the new member switch or the system version of the new member switch cannot be synchronized to the master switch version, the new member cannot join the stack system.
Issue 02 (2011-07-15)
25
3 Stacking
Use the devices of the same type (for example, EI devices or SI devices) as the member switches of a stack system. The EI devices and SI devices cannot be used in the same stack system. Connect all devices by using leased stack cables and stack modules. Ensure that all the stack devices can be started normally. Ensure that the stacking function is enabled on all the stack devices.
l l l
The standby switch is elected as follows: l If all the switches excluding the master switch start at the same time, the master switch preferentially selects the switch connected to stack interface 2 on the master switch as the standby switch. If all the other switches excluding the master switch start at the same time and no switch is connected to stack interface 2 on the master switch, the master switch selects the switch connected to stack interface 1 on the master switch as the standby switch.
Before the stacking system is created, each switch is an independent entity. That is, each switch has its own IP address and functions individually. As a result, a user needs to manage each switch individually. After the stacking system is created, all the member switches are presented as one unified logical entity. In this manner, a user manages and maintains all the member switches in a stack through one IP address. The stacking protocol elects the master switch, standby switch, and slave switch in a stack. Then, data can be backed up and the active/standby switchover can be implemented. The switches are connected through stack cables in a ring or link topology. A master switch is elected among all the member switches through the stacking protocol. The master switch manages the stacking system by assigning stack IDs to member switches, collecting information about the topology of the stack, and informing all the stack members of the topology information. A standby switch is specified by the master switch. The standby switch becomes the master switch to manage the stack system if the original master switch is faulty. After the master, standby, and slave switches are specified, the master switch collects the packets that are sent from all the slave switches to report the topology information, and then generates stack entries accordingly and deliver the entries to all the member switches in the stack.
3 Stacking
(An independent switch can be regarded as a stack system after being enabled with stacking.) The details are described in the scenario of combining two stacks. The member switch to be added is powered off at first and then restarts after being connected to the stack interface of the stack. Adding a member switch does not affect the status of the original master switch in the stack. The original service configurations on a switch are cleared after the switch is added to a stack. Then, the switch uses global configurations of the master switch. If the configuration file already exists on the master device and an interface already exists in the configuration file, the interface can be configured through the configuration file. If an interface does not exist in the configuration file, the configuration of the interface is null. If the configuration file does not exist on the master device, the default configuration of the interface is used. If the stack ID of the added switch conflicts with the stack ID of another member switch in the stack, the master switch reassigns a stack ID to the added switch. Adding a member switch does not affect the original services in the stack system. A stack consists of up to nine switches. The number of the member switches cannot exceed the limit after new member switches are added to the stack.
l l
When a member switch restarts, the master switch recalculates the stack topology and delivers the stack routing table. Then, the member switch rejoins the stack as a standby or slave switch.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 27
3 Stacking
CAUTION
Frequent switchovers may cause split of the stack.
3 Stacking
these slave switches and synchronizes its configurations to these slave switches. In addition, services in this stack system are interrupted.
CAUTION
l An instance loop will occur when a stack link is disconnected intermittently or a new switch is added to the stack. l An instance loop will occur when a stack is being set up.
Ethernet
SwitchB
SwitchD
Switch A is disconnected from Switch B; Switch C is disconnected from Switch D; Switch B is directly connected to the Ethernet. As shown in Figure 3-2, Switch A and Switch B form StackB; Switch C and Switch D form Stack-C. In this case, Stack-A is divided into Stack-B and StackC, and the process of dividing a stack system is complete.
Issue 02 (2011-07-15)
29
3 Stacking
Ethernet
The action of dividing a stack system varies with different roles of the removed switches. l After a stack system is divided, the original master and standby switches still belong to the same stack system. In this case, the master switch recalculates the stack topology and updates the topology information accordingly. After detecting that the stack protocol packets time out, the removed slave switches are reset by themselves and reelect the master switch. The newly-elected master switch obtains the configurations of the stack system from the flash memory and then restores the configurations of other switches. After a stack system is divided, the original master and standby switches belong to different stack systems. In this case, the original master switch specifies another switch as the standby switch in its own stack system. The process of the stack system becoming stable is the same as that when the standby switch quits the stack system. In the stack system where the original standby switch currently belongs, the active/standby switchover is implemented, and the process of the stack system becoming stable is the same as that when the master switch quits the stack system.
3 Stacking
this case, the active/standby switchover is implemented on the stack system where the standby switch belongs. After the active/standby switchover, the new master switch specifies the MAC address of its own as the MAC address of the stack system. In addition, the new master switch sends gratuitous ARP packets to instruct other switches to update their MAC address and implements IP collision detection. It is required that the two newly-created stack systems be able to receive gratuitous ARP packets. After the original stack system is divided, the original master switch detects IP address collision if receiving gratuitous packets whose source IP address is the same as the IP address of the master switch. At the same time, the original master switch keeps sending gratuitous ARP packets until no ARP packet with the conflicted IP address is received.
After a stack system is created, the entire stack system logically functions as one switch. The features supported by stacking are configured the same whether in a stack system or in a nonstack system. For more details, see the related configuration guide.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 31
3 Stacking
Ring Topology
The typical topology of a stack is a ring topology. As shown in Figure 3-3, stack interfaces on the Switches are connected through leased stack cables.
NOTE
Do not directly connect stack ports on the same switch to form a loop.
SwitchA SwitchC
SwitchB SwitchD
Link Topology
As shown in Figure 3-4, stack interfaces on the Switches are connected through leased stack cables.
NOTE
Do not directly connect stack ports on the same switch to form a loop.
PC1
SwitchA
SwitchB
PC2
common link
Issue 02 (2011-07-15)
32
3 Stacking
Compared with the link topology, the ring topology enjoys higher reliability. When a stack link in a ring topology breaks, the ring topology becomes a link topology. The entire stack system, however, runs normally. You are recommended to adopt a ring topology when deploying services.
Pre-configuration Tasks
Before creating a stack system, complete the following tasks: l l Configuring the same software version for all the member switches Using the devices of the same type (for example, EI devices or SI devices) as the member switches of a stack system The EI devices and SI devices cannot be used in the same stack system. l l Installing stack cards on all devices and connecting the devices through stack cables Ensuring that all the stack devices can be started normally
Data Preparation
To configure the stacking function, you need the following data. No. 1 2 3 Data Stack ID of an S5300 Stack priority of an S5300 MAC address switchover time
Context
When the default reserved VLAN of the stack is used for other services, you need to configure a new reserved VLAN before enabling the stacking function.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 33
3 Stacking
Procedure
Step 1 Run:
system-view
The reserved VLAN is configured. By default, a stack system uses VLAN 4093 as the reserved VLAN.
NOTE
----End
Procedure
Step 1 Run:
system-view
The stacking function is enabled on the S5300. By default, the stacking function is enabled.
NOTE
If you run the undo stack enable command to disable the stacking function on the S5300, the configuration takes effect only after the S5300 is restarted. If you run the stack enable command to enable the stacking function on the S5300, the configuration takes effect only after the S5300 is restarted.
----End
3 Stacking
created. After the stack system is created successfully, all the configuration of the stack system can be performed on the master switch only.
Procedure
Step 1 Run:
system-view
After the stack ID is configured, the configuration takes effect only after the device is restarted. The stack slot-id command is valid only on the device where the stacking function is enabled.
----End
Procedure
Step 1 Run:
system-view
A stack priority is configured for a specified stack device. By default, the priority value of a device is 100. A great value indicates a high priority.
NOTE
Before the stack system is created, the default stack ID is 0. You can run the display stack and display stack peers commands to view the stack ID of a device.
----End
3 Stacking
system is created, the MAC address switchover time of the stack system is specified by the MAC address switchover time of the master switch after the stack system is created, and the MAC address switchover time of other member switches keeps the same as that of the master switch. After the stack system is restarted, the MAC address of the stack is changed into the MAC address of the new master switch. In this case, the MAC address of the stack system keeps unchanged if the master switch is unchanged. If the stack system is created before the MAC address switchover time of the system is configured, you can configure the MAC address switchover time of the system on the master switch only. In this case, the MAC address switchover time of other member switches keeps the same as that of the master switch. The MAC address of the stack system keeps unchanged after the stack system is restarted. Do as follows on the devices where the MAC address switchover time is to be configured.
Procedure
Step 1 Run:
system-view
The MAC address switchover time of the stack system is configured. By default, the delay of the MAC address switchover is 10 minutes. ----End
Procedure
l l Run the display stack command to check information about the member switches in a stack. Run the display stack configuration command to check the default stack ID and stack priority when the stack member starts this time and next time.
----End
Example
You can use the display stack command to check stack IDs and priorities of member switches in a stack.
<Quidway> display stack Stack topology type : Link Stack system MAC: 0018-82b1-6eb4 MAC switch delay time: 2 min Stack reserve vlanid : 4093 slot# role Mac address ---------------------0 Master 0018-82b1-6eb4 1 Standby 0018-82b1-6eba
Issue 02 (2011-07-15)
36
3 Stacking
You can use the display stack configuration command to check the default stack ID and stack priority when the stack member starts this time and next time.
<Quidway> display stack configuration Current slot-id Next slot-id Current Priority ---------------------------- ---------------------0 8 200 1 3 150 Next Priority ------------200 150
SwitchA
SwitchB
SwitchC
SwitchD
Configuration Roadmap
The configuration roadmap is as follows: l Configure the MAC address switchover time of the stack system on the master switch.
Data Preparation
To complete the configuration, you need the following data:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 37
3 Stacking
Configuration Procedure
1. # Configure the MAC address switchover time of the stack system on Switch A.
<SwitchA> system-view [SwitchA] stack timer mac-address switch-delay 1
# Run the display stack command on Switch A to check basic information about a stack.
<SwitchA> display stack Stack topology type : Ring Stack system MAC : 0018-82b1-6eb8 MAC switch delay time: 1 min Stack reserve vlanid : 4093 slot# role Mac address ---------------------0 Slave 0018-82d2-2e85 1 Slave 0018-82c6-1f44 3 Standby 0018-82c6-1f4c 4 Master 0018-82b1-6eb8
Configuration Files
None.
Issue 02 (2011-07-15)
38
Issue 02 (2011-07-15)
39
4.1 Introduction
This section describes function of display commands. You can use display commands to view the status of a device and check whether the device runs normally.
Procedure
Step 1 Run:
display device [ slot slot-id ]
Procedure
Step 1 Run:
display version [ slot slot-id ]
You can run the display elabel command to check information about the hardware code. The hardware code provides necessary basis for such services as network installation, network upgrade, network expansion, device management and maintenance, and device replacement in batches. The displayed information includes: type of the card, bar code, Bill of Material (BOM) code, English description, production date, supplier name, issuing number, Common Language Equipment Identification (CLEI) code, and sales BOM code.
Procedure
Step 1 Run:
display elabel [ slot slot-id [ subcard-id ] ]
Procedure
Step 1 Run:
display environment [ slot slot-id ]
Procedure
Step 1 Run:
display fan [ slot slot-id | verbose ]
Procedure
Step 1 Run the following command in any view:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 41
Procedure
Step 1 Run:
display cpu-usage [ configuration | slave | slot slot-id ]
The CPU utilization statistics and CPU settings are displayed. ----End
Procedure
Step 1 Run:
display memory-usage [ slave | slot slot-id ]
Procedure
Step 1 Run:
display alarm urgent [ slot slot-id | time interval ]
The status of a specified interface is displayed. Information about the status of an interface contains the running status, basic configuration of the interface, and statistics of the transmission of packets.
Issue 02 (2011-07-15)
43
5 Hardware Management
5
About This Chapter
Hardware Management
This chapter describes the hardware management configurations on the S5300. 5.1 Hardware Management Overview This section explains the definition of hardware management. 5.2 Hardware Management Features Supported by the S5300 This section describes the hardware management features supported by the S5300. 5.3 Backing Up the Electronic Label This section describes how to back up the electronic label of the S5300. 5.4 Configuring Electrical Port Sleep This section describes how to configure electrical port sleep to save energy.
Issue 02 (2011-07-15)
44
5 Hardware Management
Applicable Environment
Electronic labels of network devices play an important role in troubleshooting. When faults occur on a network, you can obtain hardware information quickly from electronic labels. Therefore, you need to back up electronic labels.
Pre-configuration Tasks
Before backing up the electronic label of the S5300, complete the following task: l Connecting the S5300 to an FTP server and ensuring that there is a reachable route between them
Data Preparation
To back up the electronic label of the S5300, you need the following data. No. 1 2
Issue 02 (2011-07-15)
Data Name of the electronic label backup file Stack ID of the S5300 whose electronic label needs to be backed up
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 45
5 Hardware Management
No. 3
Data FTP server address, FTP user name, and password (only applicable to saving the electronic label to an FTP server)
Procedure
l Back up the electronic label to the CF card. 1. Run the following command in the user view:
backup elabel [ slot slot-id ]
The electronic label is backed up to the CF card. l Back up the electronic label to an FTP server. 1. Run the following command in the user view:
backup elabel [ ftp ip-address filename username password ] [ slot slotid [ subcard-id ] ]
Applicable Environment
When a device is working normally, you can enable electrical port sleep to save energy.
Pre-configuration Tasks
None.
Data Preparation
To configure electrical port sleep, you need the following data.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 46
5 Hardware Management
No. 1
Data Number of the electrical port where the sleep function is to be enabled
Procedure
Step 1 Run:
system-view
Electrical port sleep is enabled. By default, the sleep function is disabled on an Ethernet port. ----End
Procedure
l Run:
system-view
Issue 02 (2011-07-15)
47
Issue 02 (2011-07-15)
48
Information Classification
The information receives and processes the following types of information: l l l Logs Debugging information Alarm information
Alert
Critical
Issue 02 (2011-07-15)
49
Threshold 3
Description A fault caused by an improper operation or a wrong process occurs, such as entering the wrong user password or receiving wrong protocol packets from other devices. The faults do not affect service but should be paid attention to.
Warning
An abnormal situation of the running device occurs, such as the user disables the routing process, BFD detects packet loss, or the wrong protocol packet is received. The fault should be paid attention to because it may affect services.
Notice
Indicates the key operations used to ensure that the device runs normally, such as the shutdown command, neighbor discovery, or the state machine. Indicates the common operations to ensure that the device runs normally, such as the display command. Indicates the common information of the device that need not be paid attention to.
6 7
Informational Debugging
When information filtering based on severity levels is enabled, only the information whose severity level threshold is less than or equal to the configured value is output. For example, if the severity level value is configured to 6, only the information with the severity level value from 0 to 6 is output.
Generally, the information center distributes the three types of information that can be classified into eight levels to ten information channels. The information is then output to different directions. As shown in Figure 6-1, logs, alarms, and debugging information have default output channels. You can, however, customize them to be output from other channels. For example, you can configure logs to be output to the log cache through Channel 6 rather than Channel 4.
Issue 02 (2011-07-15)
50
Infomation type
Output direction
Console Remote terminal Loghost Trap buffer Log buffer SNMP agent
Logs
Traps
2 3
Debugs
5 SNMP agent 6 Direction of logs Direction of alarms Direction of debugging information 7 8 9 channel6 channel7 channel8 channel9
Monitor
Monitor
Loghost
Log host
Issue 02 (2011-07-15)
51
Channel Number 3
Description Outputs information to the trap buffer that can receive traps. An area is specified inside a device as the trap buffer to record traps. Outputs information to the log buffer area that can receive logs. The switch assigns a specified area in itself to be the log buffer area that can record the information. Outputs information to the SNMP agent that can receive alarms. Reserved. Reserved. Reserved. Reserved.
Logbuffer
Log buffer
5 6 7 8 9
When multiple log hosts are configured, you can configure logs to be output to different log hosts through one channel or several channels. For example, configure parts of logs to be output to a log host either through Channel 2 (loghost) or through Channel 6. You can also change the name of Channel 6 for managing channel conveniently.
Format of Logs
Syslog is a sub-function of the information center. It outputs information to a log host through port 514. Figure 6-2 shows the format of logs. Figure 6-2 Format of the output logs
Table 6-3 describes each field in the log format. Table 6-3 Description of each field in the format of logs Field <Int_16> Indication Leading character Description Before logs are output to log hosts, leading characters are added. Logs saved in the local device do not contain leading characters.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 52
Field TIMESTAMP
Description Timestamp has five formats. l short-date: The only difference between date format and short-date is that short-date does not include the year. l format-date: It is another time format of the system time. l none: indicates that the information does not contain timestamp. There is a space between the timestamp and the host name.
Host name Log information Version number Module name Log level Brief description Information type Location information Descriptor
By default, the name is Quidway. Indicates that this piece of log is output by the device produced by Huawei. Identifies the version of the log format. Indicates the name of the module that outputs information to an information center. Indicates the severity levels of logs. Describes the information type. L: indicates the user log identifier. Slot indicates the number of the slot that sends the location information. Indicates the detailed information output from each module to the information center. Each module fills in this field before outputting logs to describe the detailed contents of logs.
Format of Alarms
Figure 6-3 shows the format of the output alarms. Figure 6-3 Format of the output alarms
Issue 02 (2011-07-15)
53
Table 6-4 Description of each field in the format of alarms Field TimeStamp Indication Time to send out the information Description Five timestamp formats are available: l boot: indicates relative time. By default, debugging information adopts this timestamp format. l date: indicates the timestamp in the format of system time. By default, logs and traps adopt this timestamp format. l short-date: indicates system time. The shortdate format does not contain year information. l format-date: indicates another format of system time. l none: indicates that no timestamp is contained in traps. The timestamp and the host name are separated by a blank space. HostName Host name By default, the name is Quidway. There is a space between the sysname and module name. ModuleName Severity Module name Severity of information Indicates the name of the module that generates an alarm. Indicates the severity of alarms: l Critical l Major l Minor l Warning l Indeterminate l Cleared Brief Description Brief information Description Provides brief information of the alarms. Provides a detailed description of the alarms.
Issue 02 (2011-07-15)
54
Pre-configuration Tasks
None.
Data Preparation
To manage the information center, you need the following data. No. 1 2 3 4 5 Data (Optional) Numbers and names of the information channels (Optional) Format of the timestamp (Optional) Information severity (Optional) Language used in the logs and the address of the log host (Optional) Size of the log buffer and the trap buffer
Procedure
Step 1 Run:
system-view
The system sends the system information to the log host and the console only after the information center is enabled.
----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 55
Channels are specified to send debugging information, logs, and traps. ----End
A module (or modules) is specified to send debugging information, logs, or traps to the information channels.
NOTE
Run the undo info-center source { module-name | default } channel { channel-number | channelname } command to disable the unnecessary modules and select one or more modules to send information to the information channels.
----End
Issue 02 (2011-07-15)
56
The format of the timestamp is set for the debugging information. Step 3 Run:
info-center timestamp { trap | log } { boot | none | { short-date | format-date | date } [ precision-time { tenth-second | millisecond } ] }
The format of the timestamp is set for the output logs or traps information. ----End
Step 4 Run:
terminal monitor
The terminal is enabled to display information. By default, the terminal is enabled to display information. Step 5 Run:
terminal debugging
or
terminal logging
or
terminal trapping
----End
or
terminal logging
or
terminal trapping
----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 58
The SNMP agent is enabled. For details on configuring the SNMP agent, refer to chapter "SNMP Configuration" in the Configuration Guide - Network Management. ----End
Procedure
Step 1 Run:
system-view
Step 2 Run:
info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] *
Run the preceding command. If the information center can send the statistics to the destination terminal, it means that the configuration succeeds.
CAUTION
Statistics cannot be restored after being cleared. So, confirm the action before you run the command. Action Clear the statistics in the information center. Clear the information in the log buffer. Clear the information in the trap buffer. Command reset info-center statistics reset logbuffer reset trapbuffer
Switch Network
VLANIF10 2.0.0.1/8
Log Host
1.0.0.1/8
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Enable the information center. Configure the information channel to ensure that the S5300 can correctly send logs to the log host. Disable the sending of the traps and debugging information to the log host. Configure the log host.
Data Preparation
To complete the configuration, you need the following data:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 61
Configuration Procedure
NOTE
In the example, only the commands related to monitoring are listed. For details on configuring the log host, see the help files on the log host.
1.
Enable the information center. # Enable the information center. By default, the information center on the S5300 is enabled.
<Quidway> system-view [Quidway] info-center enable Info:Information center is enabled
2.
Configure the information channel. # Send logs of severity levels 0 to 7 from all modules on the S5300 through the channel to the log host. Disable the sending of the debugging information and traps through the channel to the log host.
[Quidway] info-center source default channel loghost log level debugging state on trap state off debug state off
3.
Configure the log host. # Set the IP address of the log host to 1.0.0.1.
[Quidway] info-center loghost 1.0.0.1
# Set VLANIF 10 as the interface for sending information to the log host on the S5300.
[Quidway] vlan 10 [Quidway-vlan10] quit [Quidway] interface gigabitethernet0/0/1 [Quidway-GigabitEthernet0/0/1] port link-type hybrid [Quidway-GigabitEthernet0/0/1] port hybrid untagged vlan 10 [Quidway-GigabitEthernet0/0/1] quit [Quidway] interface vlanif 10 [Quidway-vlanif10] ip address 2.0.0.1 255.0.0.0 [Quidway-vlanif10] quit [Quidway] info-center loghost source vlanif 10
Issue 02 (2011-07-15)
62
Information timestamp setting: log - date, trap - date, debug - boot Sent messages = 499, Received messages = 499 IO Reg messages = 0 IO Sent messages = 0
4.
Enable the terminal display of the console. # Enable the terminal display of the console. Enable the corresponding terminal display to check the information type as required.
[Quidway] info-center console channel 0 [Quidway] quit <Quidway> terminal monitor Info:Current terminal monitor is on <Quidway> terminal logging Info:Current terminal logging is on
Configuration Files
# info-center source default channel 2 log level debugging state on trap state off debug state off info-center loghost source vlanif 10 info-center loghost 1.0.0.1 # # vlan batch 10 # interface vlanif10 ip address 2.0.0.1 255.0.0.0 # interface GigabitEthernet0/0/1 port hybrid untagged vlan 10 # return
Issue 02 (2011-07-15)
63
Issue 02 (2011-07-15)
64
7.2 Configuring the Association Between a Monitoring Interface and the NMS
7.2.1 Establishing the Configuration Task
Applicable Environment
The monitoring interface of the S5300HI connects four input lines. These four input lines monitor the cabinet door, device power supply, battery power, and power supply of the air conditioner. Based on the status of the four input lines, the S5300 generates related traps and sends them to the NMS. In this case, it is not necessary to define output rules. Each input line corresponds to two traps. Line ID 1 2 3 4 Normal Status low-level high-level low-level low-level Trap(Warning) InputLine1 abnormal InputLine2 abnormal InputLine3 abnormal InputLine4 abnormal Trap(Cancel) InputLine1 normal InputLine2 normal InputLine3 normal InputLine4 normal
Pre-configuration Tasks
Before configuring a monitoring interface, complete the following tasks: l l The device is normally started. The monitoring card runs normally.
Data Preparation
To configure a monitoring interface, you need the following data.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 65
No. 1 2
Data Normal levels of input lines 1 to 4 connected to a monitoring interface Names of input lines
The name and the normal level of a monitored input line are set. ----End
Procedure
l Run the display monitor input { id-number | all } command to check the previous configuration.
----End
Example
Run the display monitor input all command. If you can view information about all input lines connected to the monitoring interface, it means that the configuration succeeds. For example:
<Quidway> display monitor input all --------------------------------------------------------------------------LineID LineName Enable NormalStatus CurrentStatus --------------------------------------------------------------------------1 Inputline1 enable low-level abnormal 2 Inputline2 enable high-level normal 3 Inputline3 enable high-level normal 4 Inputline4 enable low-level normal ---------------------------------------------------------------------------
Issue 02 (2011-07-15)
66
Change the high or low levels of input lines 1 to 4. Traps indicating that the status of the input lines is normal are generated. l When input lines 1 and 4 are of high level, traps indicating that the two input lines are abnormal are generated; when input lines 1 and 4 are of low level, traps indicating that the two input lines restore the normal status are generated. When input lines 2 and 3 are of low level, traps indicating that the two input lines are abnormal are generated; when input lines 2 and 3 are of high level, traps indicating that the two input lines restore the normal status are generated.
7.3 Configuring the Association Between a Monitoring Interface and Audible and Visual Trap Devices
7.3.1 Establishing the Configuration Task
Applicable Environment
The monitoring interface of the S5300HI connects four input lines. These four input lines monitor the cabinet door, device power supply, battery power, and power supply of the air conditioner. The monitoring interface also connects three output lines. These three output lines can connect audible and visual trap devices. When an exception occurs, audible and visual trap devices generate alarms. Based on the changes of the status of the four input lines, the S5300 controls the three output lines. The relationships between input lines and output lines can be configured with related commands.
Pre-configuration Tasks
Before configuring a monitoring interface, complete the following tasks: l l The device is normally started. The monitoring card runs normally.
Data Preparation
To configure a monitoring interface, you need the following data. No. 1 2 Data Normal levels of input lines 1 to 4 connected to a monitoring interface Names of input lines
Issue 02 (2011-07-15)
67
The name and the normal level of a monitored input line are configured. ----End
An output control list is created for an output line and the output view is displayed. Step 3 Run:
rule rule-id match-input line-mask key level-value
The input interface monitored by the output interface is configured and the logical relationship between the two interfaces is set up. ----End
Procedure
l Run the display monitor output id-number command to check the previous configuration. ----End
Example
Run the display monitor output 1 command. If you can view the matching rule of the output line of a specified monitoring interface, it means that the configuration succeeds. For example:
<Quidway> display monitor output 1 ------------------------------------------------------------------------------------------------RuleID InputMask LevelValue
Issue 02 (2011-07-15)
68
NMS
Switch
Metro
CX600
cabinet door
IP/MPLS Core
Issue 02 (2011-07-15)
69
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure input lines. Configure output lines. Configure the logical relationships between input lines and output lines.
Data Preparation
To complete the configuration, you need the following data: l l Names of input lines Normal levels of the input lines, that is, input lines 1 to 4 being of high level in the normal state
Procedure
Step 1 Configure input lines on the Switch. # Enable the monitoring function on input lines 1 to 4.
<Quidway> [Quidway] [Quidway] [Quidway] [Quidway] system-view monitor input monitor input monitor input monitor input 1 2 3 4 enable enable enable enable
Step 2 Configure output lines on the Switch. # Configure the association between output line 1 and input line 1 and set the lines in the normal state to be of high level.
[Quidway] monitor output 1 [Quidway-monitor-output1] rule 1 match-input 1000 key 1000 [Quidway-monitor-output1] quit
# Configure the association between output line 2 and input line 2 and set the lines in the normal state to be of high level.
[Quidway] monitor output 2 [Quidway-monitor-output2] rule 1 match-input 0100 key 0100 [Quidway-monitor-output2] quit
# Configure the association between output line 3 and input lines 3 and 4, and then set the lines in the normal state to be of high level.
[Quidway] monitor output 3 [Quidway-monitor-output3] rule 1 match-input 0010 key 0010 [Quidway-monitor-output3] rule 2 match-input 0001 key 0001 [Quidway-monitor-output3] quit
Step 3 Verify the configuration. # Verify that the configuration takes effect through audible and visual trap devices.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 70
l When input line 1 changes from high level to low level, the trap indicating that input line 1 is abnormal is generated and the indicator of output line 1 is on. l When input line 2 changes from high level to low level, the trap indicating that input line 2 is abnormal is generated and the indicator of output line 2 is on. l When either of input lines 3 and 4 is of low level, the trap indicating that input line 3 is abnormal is generated and the indicator of output line 3 is on. ----End
Configuration Files
Configuration file of the Switch
# sysname Quidway # monitor input 1 enable monitor input 1 name input1 normal-state monitor input 2 enable monitor input 2 name input2 normal-state monitor input 3 enable monitor input 3 name input3 normal-state monitor input 4 enable monitor input 4 name input4 normal-state # monitor output 1 rule 1 match-input 1000 key 1000 monitor output 2 rule 1 match-input 0100 key 0100 monitor output 3 rule 1 match-input 0010 key 0010 rule 2 match-input 0001 key 0001 # return
Issue 02 (2011-07-15)
71
8 Mirroring
8
About This Chapter
8.1 Introduction This section describes the basics of mirroring. 8.2 Configuring Local Port Mirroring This section describes how to configure local port mirroring. 8.3 Configuring Remote Port Mirroring This section describes how to configure remote port mirroring. 8.4 Canceling Port Mirroring This section describes how to cancel port mirroring. 8.5 Configuring Local VLAN Mirroring This section describes how to configure local VLAN mirroring. 8.6 Configuring Remote VLAN Mirroring This section describes how to configure remote VLAN mirroring.
Mirroring
The mirroring function is used to monitor packets that meet certain requirements.
8.7 Canceling VLAN Mirroring This section describes how to cancel local VLAN mirroring and remote VLAN mirroring. 8.8 Configuring MAC Address-based Local Mirroring This section describes how to configure local MAC address mirroring. 8.9 Configuring RSPAN Based on MAC Addresses This section describes how to configure RSPAN based on MAC addresses. 8.10 Canceling Mirroring Based on MAC Addresses This section describes how to cancel mirroring based on MAC addresses. 8.11 Configuring Local Flow Mirroring This section describes how to configure local flow mirroring. 8.12 Configuring Remote Flow Mirroring This section describes how to configure remote flow mirroring.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 72
8 Mirroring
8.13 Canceling Flow Mirroring This section describes how to cancel flow mirroring. 8.14 Changing or Deleting an Observing Port This section describes how to change or delete an observing port. 8.15 Configuring CPU Mirroring This section describes how to configure CPU mirroring. 8.16 Cancelling CPU Mirroring This section describes how to cancel CPU mirroring. 8.17 Configuration Examples This section provides several configuration examples for mirroring.
Issue 02 (2011-07-15)
73
8 Mirroring
8.1 Introduction
This section describes the basics of mirroring.
Concepts
l Observing port An observing port on the S5300 is connected to a monitoring host. It is used to export the traffic copied from a mirrored port or a flow mirroring port. l Mirrored port A mirrored port is the interface to be observed. Incoming traffic or outgoing traffic passing through a mirrored port is copied to an observing port. l Flow mirroring port A flow mirroring port is a port to which traffic policies are applied. On such a port, the incoming traffic that matches the traffic classifier in the traffic policy is copied to an observing port. l Mirrored flow A mirrored flow is a packet flow that runs to a flow mirroring port and is observed. When a flow becomes a mirrored flow, it is copied to an observing port. l Mirrored VLAN A mirrored VLAN is a VLAN to be observed. Incoming traffic or outgoing traffic passing through a mirrored VLAN is copied to an observing port. l Mirrored MAC address A mirrored MAC address is the source or destination MAC address of the packets to be mirrored. The S5300 copies the traffic matching this MAC address to an observing port. l RSPAN VLAN A Remote Switched Port Analyzer (RSPAN) VLAN is a VLAN used for remote mirroring. When the mirrored port and the observing port are located on different switches, packets from the mirrored port must be broadcast to the observing port through the RSPAN VLAN. l l Local mirroring The observing port and mirrored port are on the same switch. Remote mirroring The observing port and mirrored port are on different switches.
NOTE
The S5300 does not support the function of mirroring a flow to multiple observing ports.
Issue 02 (2011-07-15)
74
8 Mirroring
Port Mirroring
In the process of port mirroring, the S5300 copies the packets passing through a mirrored port and then sends the copy to a specified observing port. Figure 8-1 shows the diagram of interface mirroring. Figure 8-1 Schematic diagram of port mirroring
Mirror port Switch Mirror port Observe port Port Data flow Copy of data flow
Sniffer host
Flow Mirroring
In the process of flow mirroring, the S5300 copies the mirroring flow passing one or more interfaces and sends the copy to an observing port. Figure 8-2 shows the diagram of flow mirroring. Figure 8-2 Schematic diagram of flow mirroring
Sniffer host
Issue 02 (2011-07-15)
75
8 Mirroring
Flow mirroring is a type of action in traffic behaviors. When a traffic policy configured with flow mirroring is applied to an interface, the S5300 copies the inbound data flow on this interface that matches the traffic classifier and sends the copy to the observing port.
VLAN Mirroring
In the process of VLAN mirroring, the S5300 mirrors the packets passing through all active interfaces in a specified VLAN to a specified observing port. Compared with interface mirroring, VLAN mirroring mirrors packets in a wider range. You can monitor packets in one or more VLANs.
CPU Mirroring
CPU mirroring is used to mirror all the packets received by the CPU. CPU mirroring is implemented as follows: l l If an ACL rule is specified, the packets that match the ACL rule are mirrored to a specified observing port. If no ACL rule is specified, all the packets received by the CPU are mirrored to a specified observing port.
RSPAN
A switch can copy incoming or outgoing packets on a mirrored port to an observing port. When the observing port and the mirrored port are on different switches, packets can be copied to the observing port through the RSPAN function, which is also called remote mirroring. Figure 8-3 Networking diagram of RSPAN
Destination Switch Observe port Observe port Sniffer host Intermediate Switch Port Data flow Copy of data flow
Issue 02 (2011-07-15)
76
8 Mirroring
In Figure 8-3: l l l The source switch is the Switch where the mirrored port is located. The destination switch is the Switch where the observing port is located. The intermediate switch is a device between the source switch and destination switch.
NOTE
The source switch and destination switch can also be directly connected to implement the RSPAN function.
The RSPAN function broadcasts mirrored packets from the source switch to the destination switch in the RSPAN VLAN. Interfaces between the source switch, intermediate switch, and destination switch must be added to the RSPAN VLAN. Mirrored packets are forwarded to the intermediate switch through the observing port on the source switch. Then the intermediate switch broadcasts mirrored packets to the observing port on the destination switch in the RSPAN VLAN. The observing port on the destination switch receives mirrored packets. Through the RSPAN function, packets on a specified interface or VLAN, with a specified source or destination MAC address, or matching a classifier can be copied to an observing port on a remote device.
Pre-configuration Tasks
None.
Data Preparation
To configure local port mirroring, you need the following data. No. 1 2 Data Type and number of the observing port Type and number of the mirrored port
Issue 02 (2011-07-15)
77
8 Mirroring
Procedure
Step 1 Run:
system-view
Interface mirroring is configured on the mirrored port. To monitor packets on multiple interface, repeat Step 3 and Step 4. ----End
8 Mirroring
l l
The observing port is configured properly. The mirrored port and the mirroring direction are configured properly.
Pre-configuration Tasks
None.
Data Preparation
To configure remote port mirroring, you need the following data. No. 1 2 3 Data Type and number of the observing port Number of the mirrored port ID of the RSPAN VLAN
Procedure
l Specify a mirrored port and an RSPAN VLAN on the source switch.
NOTE
Issue 02 (2011-07-15)
79
8 Mirroring
1.
Run:
system-view
An RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
mac-address learning disable
If MAC address learning is disabled in the VLAN, other services cannot be configured in the VLAN.
4.
Run:
quit
Remote port mirroring is configured. To observe incoming and outgoing packets on multiple interfaces, repeat Step 6 and Step 7. l Configure the RSPAN VLAN and add the interfaces connected to the source switch and destination switch to the RSPAN VLAN.
NOTE
Do as follows on the intermediate switch. The configurations on the interfaces connected to the source switch and destination switch are similar. If no intermediate switch exists, skip this step. 1. Run:
system-view
The RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
quit
Issue 02 (2011-07-15)
80
8 Mirroring
The view of the interface connected to the source switch or destination switch is displayed. 5. Run:
port link-type trunk
Return to the system view. l Configure the remote observing port on the destination switch. 1. Run:
system-view
The RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
quit
If no intermediate switch exists, you enter the view of the interface connected to the source switch.
5.
Run:
port link-type trunk
Issue 02 (2011-07-15)
81
8 Mirroring
The observing port is configured as a hybrid interface and it allows packets of the RSPAN VLAN to pass. 9. Run:
quit
If the following results are obtained, the configuration is successful: l l l l The RSPAN VLAN is configured properly. The number of the observing port is configured properly. The type of the observing port is configured properly. The number of the mirrored port and the mirroring direction are configured properly.
Pre-configuration Tasks
None.
Data Preparation
To cancel port mirroring, you need the following data.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 82
8 Mirroring
No. 1 2
Data Type and number of an observing port Type and number of the mirrored port to be deleted
Run the display port-mirroring command. If port mirroring is cancelled properly, the configuration is successful.
Issue 02 (2011-07-15)
83
8 Mirroring
Pre-configuration Tasks
Before configuring local VLAN mirroring, complete the following tasks: l l Creating a VLAN as the monitored VLAN Adding physical interfaces to the monitored VLAN
Data Preparation
To configure local VLAN mirroring, you need the following data. No. 1 2 Data Type and number of an observing port ID of a mirrored VLAN
VLAN mirroring is configured. To observe incoming packets from multiple VLANs, repeat Step 3 and Step 4. ----End
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 84
8 Mirroring
If the following results are obtained, the configuration is successful: l l The type of the observing port is configured properly. The number of the observing port is configured properly.
Pre-configuration Tasks
Before configuring remote VLAN mirroring, complete the following tasks: l l Creating a VLAN as the monitored VLAN Adding physical interfaces to the monitored VLAN
Data Preparation
To configure remote VLAN mirroring, you need the following data. No. 1 2 3
Issue 02 (2011-07-15)
Data Type and number of the observing port ID of the mirrored VLAN ID of the RSPAN VLAN
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 85
8 Mirroring
1.
Run:
system-view
An RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
mac-address learning disable
If MAC address learning is disabled in the VLAN, other services cannot be configured in the VLAN.
4.
Run:
quit
Remote VLAN mirroring is configured. To observe incoming and outgoing packets of multiple VLANs, repeat Step 6 and Step 7. l Configure the RSPAN VLAN on the intermediate switch and add interfaces to the RSPAN VLAN. The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. l
Issue 02 (2011-07-15)
8 Mirroring
The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. ----End
If the following results are obtained, the configuration is successful: l l The type of the observing port is configured properly. The number of the observing port is configured properly.
Pre-configuration Tasks
None.
Data Preparation
To cancel VLAN mirroring, you need the following data. No. 1 Data ID of the mirrored VLAN to be deleted
8 Mirroring
Procedure
Step 1 Run:
system-view
Pre-configuration Tasks
None.
Data Preparation
To configure local MAC address mirroring, you need the following data.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 88
8 Mirroring
No. 1 2 3
Data Type and number of the observing port MAC address of the packets to be mirrored ID of the VLAN that the observed MAC address belongs to
Local SPAN based on MAC addresses is configured. You can repeatedly perform Step 3 and Step 4 to monitor the incoming packets with multiple MAC addresses in multiple VLANs. ----End
8 Mirroring
Pre-configuration Tasks
None.
Data Preparation
To configure RSPAN based on MAC addresses, you need the following data. No. 1 2 3 4 Data Type and number of an observing port MAC address of the packet to be mirrored ID of the VLAN that the packet with the MAC address to be mirrored belongs to ID of an RSPAN VLAN
Procedure
l Configure remote MAC address mirroring on the source switch.
NOTE
The mirrored port cannot be added to the RSPAN VLAN. The S5300SI series do not support remote MAC address mirroring.
1.
Run:
system-view
Issue 02 (2011-07-15)
90
8 Mirroring
An RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
mac-address learning disable
If MAC address learning is disabled in the VLAN, other services cannot be configured in the VLAN.
4.
Run:
quit
The view of the VLAN that the observed MAC address belongs to is displayed. 7. Run:
mac-mirroring mac-address to observe-port index inbound
Remote MAC address mirroring is configured and the RSPAN VLAN is specified. To observe incoming packets from or destined for multiple MAC addresses, repeat Step 6 and Step 7. l Configure the RSPAN VLAN on the intermediate switch and add interfaces to the RSPAN VLAN. The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. l Configure the remote observing port on the destination switch. The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. ----End
8 Mirroring
l l l
The type of the observing port is configured properly. The RSPAN VLAN is configured properly. The number of the observing port is configured properly.
Pre-configuration Tasks
None.
Data Preparation
To cancel mirroring based on MAC addresses, you need the following data. No. 1 Data MAC address of the mirrored packet to be deleted
The view of the VLAN that monitored MAC address belongs to is displayed. Step 3 Run:
undo mac-mirroring mac-address inbound
8 Mirroring
If MAC address mirroring on the VLANIF interface is cancelled, the configuration is successful.
Pre-configuration Tasks
None.
Data Preparation
To configure local flow mirroring, you need the following data. No. 1 2 3 Data Type and number of the observing port Type and number of the flow mirroring interface Names of the traffic classifier, traffic behavior, and traffic policy
There is no specified order among the matching rules in a traffic classifier. You can combine these rules.
For details on configuring traffic classification rules, see Configuring Complex Traffic Classification in the Quidway S5300 Series Ethernet Switches Configuration Guide - QoS.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 93
8 Mirroring
A traffic behavior is created and the traffic behavior view is displayed. Step 4 Run:
mirroring to observe-port index
Follow-up Procedure
After configuring flow mirroring in a traffic behavior, you need to bind the behavior to a traffic classifier in a traffic policy and then apply the policy to the interface. For detailed configuration procedures, see 8.11.4 Creating and Applying a Traffic Policy.
Procedure
Step 1 Run:
system-view
A traffic policy is created and the policy view is displayed. Step 3 Run:
classifier classifier-name behavior behavior-name
8 Mirroring
class-name in this step must be the same as the name of the traffic class created in 8.11.2 Configuring Traffic Classification Rules. In this step, behavior-name must be the same as that specified in Step 3 when you configure the traffic behavior. Step 4 Run:
quit
The traffic policy that contains flow mirroring is applied to the interface. You can repeatedly perform Step 5 and Step 6 to monitor the incoming flows, with the same attributes, passing through multiple interfaces. ----End
Check the flow mirroring display traffic policy interface [ interface-type configuration in the traffic policy interface-number ] [ inbound ] on an interface.
If the following results are obtained, the configuration is successful: l l l The observing port is configured properly. A proper traffic policy is applied to the interface where incoming flows need to be monitored. The traffic policy contains a proper traffic classifier and a traffic behavior and the traffic behavior contains a flow mirroring action.
8 Mirroring
Pre-configuration Tasks
None.
Data Preparation
To configure remote flow mirroring, you need the following data. No. 1 2 3 4 Data Type and number of the observing port Type and number of the flow mirroring interface Names of the traffic classifier, traffic behavior, and traffic policy ID of the RSPAN VLAN
The mirrored port cannot be added to the RSPAN VLAN. The S5300SI series do not support remote flow mirroring.
1.
Run:
system-view
Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 96
8 Mirroring
An RSPAN VLAN is created and the RSPAN VLAN view is displayed. 3. Run:
mac-address learning disable
If MAC address learning is disabled in the VLAN, other services cannot be configured in the VLAN.
4.
Run:
quit
A traffic behavior is created and the traffic behavior view is displayed. 7. Run:
mirroring to observe-port index
Remote flow mirroring is configured. After configuring flow mirroring in a traffic behavior, you need to bind the behavior to a traffic classifier in a traffic policy and then apply the policy to the interface. For details, see 8.11.4 Creating and Applying a Traffic Policy. l Configure the RSPAN VLAN on the intermediate switch and add interfaces to the RSPAN VLAN. The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. l Configure the remote observing Interface on the destination switch. The configuration is the same as that for remote port mirroring. For details, see 8.3.2 Configuring Remote Port Mirroring. ----End
8 Mirroring
Action Check information about the observing port. Check information about port mirroring. Check the configuration of flow mirroring in the traffic policy on an interface.
Command display observe-port display port-mirroring display traffic policy interface [ interface-type interface-number ] [ inbound ]
If the following results are obtained, the configuration succeeds: l l l l l The number of the observing port is configured properly. The type of the observing port is configured properly. The RSPAN VLAN is configured properly. A proper traffic policy is applied to the interface where incoming flows need to be monitored. The traffic policy contains a proper traffic classifier and a traffic behavior, and the traffic behavior contains the flow mirroring action.
Pre-configuration Tasks
None.
Data Preparation
To cancel flow mirroring, you need the following data. No. 1 2 Data Type and number of the interface where flow mirroring needs to be cancelled Name of the traffic policy
Issue 02 (2011-07-15)
98
8 Mirroring
Procedure
Step 1 Run:
system-view
The traffic policy and flow mirroring action on the interface are canceled. To cancel a traffic policy, you must cancel the traffic policy on all the interfaces where the traffic policy is applied, and then run the undo traffic policy policy-name command to cancel the traffic policy in the system view. ----End
99
8 Mirroring
Action
Command
Check the flow mirroring display traffic policy interface [ interface-type configuration in the traffic policy interface-number ] [ inbound ] on an interface.
If the following result is obtained, the configuration is successful: The traffic policy applied on an interface is cancelled.
Pre-configuration Tasks
Before changing or deleting an observing port, complete the following tasks: l l l l 8.4 Canceling Port Mirroring 8.7 Canceling VLAN Mirroring 8.10 Canceling Mirroring Based on MAC Addresses 8.13 Canceling Flow Mirroring
Data Preparation
To change or delete an observing port, you need the following data. No. 1 Data Type and number of the new observing port
8 Mirroring
Procedure
Step 1 Run:
system-view
Issue 02 (2011-07-15)
101
8 Mirroring
If the observing port is deleted or a new observing port is specified, the configuration is successful.
Pre-configuration Tasks
None.
Data Preparation
To configure CPU mirroring, you need the following data. No. 1 2 Data (Optional) ACL number and ACL rule Index, type, and ID of the observing port
Procedure
Step 1 Run:
system-view
An Access Control List (ACL) is created and the ACL view is displayed. For details on the acl command, see the Quidway S5300 Series Ethernet Switches - Command Reference. Step 3 Run:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 102
8 Mirroring
A basic or an advanced ACL rule is created. For details on the rule command, see the Quidway S5300 Series Ethernet Switches - Command Reference. ----End
Issue 02 (2011-07-15)
103
8 Mirroring
If the number of the ACL that matches packets received by the CPU and the observing port are displayed, the configuration is successful.
Pre-configuration Tasks
None.
Data Preparation
To cancel CPU mirroring, you need the following data. No. 1 Data Number of the observing port
8 Mirroring
Action Check information about port mirroring. Check information about CPU mirroring.
Router
L2 Switch
Mirroring host
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure GigabitEthernet 0/0/24 as an observing port. Configure GigabitEthernet 0/0/1 as a mirrored port.
Data Preparation
None.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 105
8 Mirroring
Configuration Procedure
1. Create a VLAN on the Switch and add interfaces to the VLAN in trunk mode. # Add GigabitEthernet 0/0/1 and GigabitEthernet 0/0/3 to a same VLAN in trunk mode. The following takes the configuration of GigabitEthernet 0/0/1 as an example. The configuration of GigabitEthernet 0/0/3 is the same as the configuration of GigabitEthernet 0/0/1 and is not mentioned here.
<Switch> system-view [Switch] vlan 1 [Switch-vlan1] quit [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 1 [Switch-GigabitEthernet0/0/1] quit
2.
3.
4.
Verify the configuration. # Run the display port-mirroring command. You can check the configurations on the observing port and mirrored port.
[Switch] display port-mirroring Observe index 1 is set to interface GigabitEthernet0/0/24 Observe Type: Local Interface GigabitEthernet0/0/1 Mirrored to: Observe index 1 Direction: inbound Observe index 2 is not set to any interface Observe index 3 is not set to any interface Observe index 4 is not set to any interface
Configuration Files
Configuration file of the Switch
# vlan batch 1 # sysname Switch # observing-port 1 interface GigabitEthernet0/0/24 # interface GigabitEthernet0/0/1 port trunk allow-pass vlan 1 port-mirroring to observe-port 1 inbound # interface GigabitEthernet0/0/3 port trunk allow-pass vlan 1 # return
8 Mirroring
Networking Requirements
As shown in Figure 8-5, GigabitEthernet0/0/1 is connected to PC1; GigabitEthernet0/0/2 is connected to PC2. PC1 and PC2 belong to VLAN 10. Now, incoming traffic of all active interfaces in VLAN 10 needs to be monitored. In this case, you can configure local VLAN mirroring. GigabitEthernet0/0/3 serves as an observing port. Figure 8-5 Networking diagram of local VLAN mapping
PC3
PC1
PC2
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure GigabitEthernet0/0/3 as an observing port. Configure VLAN 10 as a mirrored VLAN.
Data Preparation
None.
Configuration Procedure
1. Add GigabitEthernet0/0/1 and GigabitEthernet0/0/2 to VLAN 10 as access interfaces. # Add GigabitEthernet0/0/1 to VLAN 10 as an access interface.
<Switch> system-view [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type access [Switch-GigabitEthernet0/0/1] port default vlan 10 [Switch-GigabitEthernet0/0/1] quit
Add GigabitEthernet0/0/2 to VLAN 10 as an access interface in the same way. 2. Configure an observing port. # Set GigabitEthernet0/0/3 as an observing port.
[Switch] observing-port 1 interface gigabitethernet 0/0/3
3.
Issue 02 (2011-07-15)
8 Mirroring
4.
Verify the configuration. # Run the display port-mirroring command. You can view the configuration of the observing port.
[Switch] display Observe index 1 Observe Type: Observe index 2 Observe index 3 Observe index 4 port-mirroring is set to interface GigabitEthernet0/0/3 Local is not set to any interface is not set to any interface is not set to any interface
Configuration Files
Configuration file of the Switch
# sysname Switch # vlan batch 10 # observe-port 1 interface GigabitEthernet0/0/3 # vlan 10 mirroring to observe-port 1 inbound # interface GigabitEthernet0/0/1 port link-type access port default vlan 10 # interface GigabitEthernet0/0/2 port link-type access port default vlan 10 # # return
Issue 02 (2011-07-15)
108
8 Mirroring
PC1
PC2
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Set GigabitEthernet 0/0/3 as an observing port. Configure local MAC address mirroring in the view of VLAN 10.
Data Preparation
None.
Configuration Procedure
1. 2. Configure VLAN 10 and then add GigabitEthernet 0/0/1, GigabitEthernet 0/0/2, and GigabitEthernet 0/0/4 to VLAN 10. The configuration procedure is not mentioned here. # Set GigabitEthernet 0/0/3 as an observing port.
<Switch> system-view [Switch] observing-port 1 interface GigabitEthernet 0/0/3
3.
Configure a mirroring MAC. # Configure local MAC address mirroring in the view of VLAN 10.
[Switch] VLAN 10 [Switch-VLAN10] mac-mirroring 0001-0001-0001 to observe-port 1 inbound [Switch-VLAN10] quit
4.
Verify the configuration. # Run the display port-mirroring command. You can view the configuration of the observing port.
[Switch] display Observe index 1 Observe Type: Observe index 2 Observe index 3 Observe index 4 port-mirroring is set to interface GigabitEthernet0/0/3 Local is not set to any interface is not set to any interface is not set to any interface
Configuration Files
Configuration file of the Switch
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 109
8 Mirroring
Issue 02 (2011-07-15)
110
8 Mirroring
Router
Switch GE 0/0/1
L2 Switch
L2 Switch
Mirroring host
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. Configure GigabitEthernet 0/0/24 as an observing port. Create a traffic classifier and set the traffic classification rule that only the packets with the 802.1p priority as 6 can be matched. Create a traffic behavior and configure flow mirroring in the traffic behavior. Create a traffic policy and bind the traffic classifier to the traffic behavior. Apply the traffic policy to GigabitEthernet 0/0/1 and GigabitEthernet 0/0/5. Create a VLAN on the Switch. Add GigabitEthernet 0/0/1, GigabitEthernet 0/0/3, and GigabitEthernet 0/0/5 to the same VLAN in trunk mode.
Data Preparation
To complete the configuration, you need the following data: l l l l Name of the traffic classifier: c1 Name of the traffic behavior: b1 Name of the traffic policy: p1 ID of the VLAN created on the Switch: 1
Configuration Procedure
1. Create a VLAN on the Switch and add interfaces to the VLAN in trunk mode. # Add GigabitEthernet 0/0/1, GigabitEthernet 0/0/3, and GigabitEthernet 0/0/5 to the same VLAN in trunk mode. The following takes the configuration of GigabitEthernet 0/0/1 as an example. The configurations of GigabitEthernet 0/0/3 and GigabitEthernet 0/0/5 are the same as the configuration of GigabitEthernet 0/0/1 and are not mentioned here.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 111
8 Mirroring
2.
3.
# Create a traffic classifier. # Create traffic classifier c1 and set the traffic classification rule that only the packets with the 802.1p priority as 6 can be matched.
[Switch] traffic classifier c1 [Switch-classifier-c1] if-match 8021p 6 [Switch-classifier-c1] quit
4.
# Create a traffic behavior. # Create traffic behavior b1 and configure flow mirroring in the traffic behavior.
[Switch] traffic behavior b1 [Switch-behavior-b1] mirroring to observe-port 1 [Switch-behavior-b1] quit
5.
Create a traffic policy. # Create a traffic policy and bind traffic classifier c1 to traffic behavior b1.
[Switch] traffic policy p1 [Switch-trafficpolicy-p1] classifier c1 behavior b1 [Switch-trafficpolicy-p1] quit
6.
Apply the traffic policy and enable the interface to trust the 802.1p priority of packets. # Apply traffic policy p1 to GigabitEthernet 0/0/1 and GigabitEthernet 0/0/5, and enable GigabitEthernet 0/0/1 and GigabitEthernet 0/0/5 to trust the 802.1p priority of packets.
NOTE
If the Switch is an S5306 or S5300HI, run the trust 8021p inner command.
[Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] traffic-policy p1 inbound [Switch-GigabitEthernet0/0/1] trust 8021p [Switch-GigabitEthernet0/0/1] quit [Switch]interface gigabitethernet 0/0/5 [Switch-GigabitEthernet0/0/5] traffic-policy p1 inbound [Switch-GigabitEthernet0/0/5] trust 8021p [Switch-GigabitEthernet0/0/5] quit
7.
Verify the configuration. # Run the display port-mirroring command. You can check the observing port.
[Switch] display Observe index 1 Observe Type: Observe index 2 Observe index 3 Observe index 4 port-mirroring is set to interface GigabitEthernet0/0/24 Local is not set to any interface is not set to any interface is not set to any interface
# Run the display traffic policy interface command. You can check the traffic policy applied to GigabitEthernet 0/0/1 and GigabitEthernet 0/0/5.
[Switch] display traffic policy interface Interface: GigabitEthernet0/0/1 Direction: Inbound Policy: p1 Classifier: c1 Rule(s) : if-match 8021p 6
Issue 02 (2011-07-15)
112
8 Mirroring
Configuration Files
Configuration file of the Switch
# sysname Switch # vlan batch 10 # observe-port 1 interface GigabitEthernet0/0/24 # traffic classifier c1 if-match 8021p 6 # traffic behavior b1 mirroring to observe-port 1 # traffic policy p1 classifier c1 behavior b1 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 traffic-policy p1 inbound trust 8021p # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/5 port link-type trunk port trunk allow-pass vlan 10 traffic-policy p1 inbound trust 8021p # interface GigabitEthernet0/0/24 # return
Issue 02 (2011-07-15)
113
8 Mirroring
SwitchA
GE0/0/2
PC1
PC2
Configuration Roadmap
The configuration roadmap is as follows: l l l Configure GigabitEthernet0/0/1 of Switch A as an observing port and specify the RSPAN VLAN. Configure GigabitEthernet0/0/2 of Switch A as a mirrored port. Configure GigabitEthernet0/0/1 of Switch C as an observing port.
Data Preparation
To complete the configuration, you need the following data: l l l Index of the observing port on Switch A: 1 ID of the RSPAN VLAN on Switch A, Switch B, and Switch C: 2 Index of the observing port on Switch C: 1
Configuration Procedure
1. Configure Switch A. # Configure the RSPAN VLAN.
<SwitchA> system-view [SwitchA] vlan 2 [SwitchA-vlan2] quit
# Configure GigabitEthernet0/0/1 of Switch A as an observing port and specify the RSPAN VLAN.
[SwitchA] observe-port 1 interface gigabitethernet 0/0/1 vlan 2
Issue 02 (2011-07-15)
114
8 Mirroring
2.
3.
# Configure GE 0/0/1 as a hybrid interface and configure it to allow packets of the RSPAN VLAN to pass.
[SwitchC] interface gigabitethernet 0/0/1 [SwitchC-GigabitEthernet0/0/1] port hybrid untagged vlan 2 [SwitchC-GigabitEthernet0/0/1] quit
Configuration Files
Configuration file of Switch A
# sysname SwitchA # vlan 2 # observe-port 1 interface GigabitEthernet0/0/1 vlan 2 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 2 # interface GigabitEthernet0/0/2 port-mirroring to observe-port 1 inbound # # return
Issue 02 (2011-07-15)
115
8 Mirroring
Issue 02 (2011-07-15)
116
8 Mirroring
Router
Switch GE0/0/1
L2 Switch
Mirroring host2
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Delete the mirrored port GigabitEthernet 0/0/1. Set GigabitEthernet 0/0/5 instead of GigabitEthernet 0/0/24 as the observing port. Reset GigabitEthernet 0/0/1 as a mirrored port.
Data Preparation
To complete the configuration, you need the following data: l Type and number of the new observing port, that is, GigabitEthernet 0/0/5
Configuration Procedure
1. Check the configurations on the current observing port and mirrored port. # Run the display port-mirroring command to check the configurations on the current observing port and mirrored port.
<Switch> display port-mirroring Portmirror: ---------------------------------------------------------Mirror-port Direction Observe-port ---------------------------------------------------------GigabitEthernet0/0/1 Inbound GigabitEthernet0/0/24
2.
Delete the mirrored port. # Delete the mirrored port GigabitEthernet 0/0/1.
<Switch> system-view [Switch] interface GigabitEthernet 0/0/1 [Switch-GigabitEthernet0/0/1] undo port-mirroring inbound
Issue 02 (2011-07-15)
117
8 Mirroring
3.
Delete the observing port. # Delete the observing port GigabitEthernet 0/0/24.
<Switch> system-view [Switch] undo observe-port 1
4.
Change the observing port. # Change the observing port to GigabitEthernet 0/0/5.
[Switch] observe-port 1 interface GigabitEthernet 0/0/5
5.
Configure a mirrored port. # Configure GigabitEthernet 0/0/1 as the mirrored port again.
[Switch] interface GigabitEthernet 0/0/1 [Switch-GigabitEthernet0/0/1] port-mirroring to observe-port 1 inbound [Switch-GigabitEthernet0/0/1] quit
6.
Verify the configuration. # Run the display port-mirroring command. You can check the configurations on the current observing port and mirrored port.
[Switch] display port-mirroring Portmirror: ---------------------------------------------------------Mirror-port Direction Observe-port ---------------------------------------------------------GigabitEthernet0/0/1 Inbound GigabitEthernet0/0/5
Configuration Files
Configuration file of the Switch
# sysname Switch # observe-port 1 interface GigabitEthernet0/0/5 # interface GigabitEthernet0/0/1 port-mirroring to observe-port 1 inbound # return
Issue 02 (2011-07-15)
118
9 PoE Configuration
9
About This Chapter
NOTE
PoE Configuration
This chapter describes the basic concepts and configuration methods of PoE.
The S5300HI and 5306 do not support PoE.
9.1 PoE Overview This section describes the basic concepts of PoE. 9.2 PoE Features Supported by the S5300 This section describes the PoE features supported by the S5300. 9.3 Configuring PoE Functions This section describes how to configure PoE functions. 9.4 Configuration Examples This section provides an example for configuring PoE on the S5300.
Issue 02 (2011-07-15)
119
9 PoE Configuration
The following S5300 models support PoE: l S5348TP-PWR-SI, S5352C-PWR-SI and S5352C-PWR-EI Each switch has two power supply slots. Each slot supports a 500 W or 250 W power supply. When two PoE power supplies are used, determine their working mode according to the following table. Power Supply Combination 250 W constant current 500 W constant current 250 W constant current 250 W constant current 500 W constant current 250 W constant current 500 W constant current 500 W constant current Available PoE Power 123.2W 369.6W 246.4W 492.8W 739.2W
S5324TP-PWR-SI, S5328C-PWR-EI and S5328C-PWR-SI Each switch has two power supply slots. Each slot supports a 500 W or 250 W power supply. When two PoE power supplies are used, determine their working mode according to the following table.
Issue 02 (2011-07-15)
120
9 PoE Configuration
Power Supply Combination 250 W constant current 500 W constant current 250 W constant current 250 W constant current 500 W constant current 250 W constant current 500 W constant current 500 W constant current
Pre-configuration Tasks
Before configuring the PoE functions, complete the following task: Installing the PoE power supply on the S5300.
9 PoE Configuration
The value of maximum-power ranges from 15400 to 739200, in mW. l (Optional) Configuring the PoE power supply management mode 1. Run:
system-view
The power supply management mode is configured. l (Optional) Manually powering on or powering off the PD connected to an interface
NOTE
When the manual power management mode is adopted, you must manually power on or power off PDs on interfaces.
1.
Run:
system-view
The PD connected to an interface is powered on or powered off manually. l (Optional) Configuring a board to allow high inrush current during power-on If a PD does not comply with IEEE 802.3at or 802.3af, high inrush current is generated when the PD is powered on. In this case, the PSE cuts off the power of the PD to protect itself. If the PSE is required to provide power for the PD, the PSE must allow high inrush current. 1. Run:
system-view
A PoE board is configured to allow high inrush current during power-on. By default, a board does not allow high inrush power during power-on. l (Optional) Setting the percentage of the reserved PoE power against the total PoE power The S5300 can dynamically allocate power to each interface according to the power consumption of each interface. The power consumption of a PD keeps changing when the PD is running. The S5300 periodically calculates the total power consumption of all the PDs connected to the device. If the total power consumption exceeds the upper threshold of the board, the S5300 cuts off the power of the PDs on the interfaces of low priority to ensure that other PDs can run normally. Sometimes, the power consumption increases sharply and the available power of the device cannot support the burst increase of power. At this time, the software system has not found that the total power consumption exceeded the upper threshold; therefore, the S5300 does not power off interfaces of low priority in time. As a result, the PoE power supply is shut down for overload protection, and hence all PDs are powered off.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 122
9 PoE Configuration
This problem can be solved by setting proper reserved power. When the power consumption increases sharply, the reserved power can support the system running. Then the system software has time to power off interfaces of low priority to ensure stable running of other PDs. 1. Run:
system-view
The percentage of the reserved PoE power against the total PoE power is set. By default, 20% of the total PoE power is reserved. l (Optional) Setting the alarm threshold of power consumption percentage 1. Run:
system-view
The alarm threshold of power consumption percentage is set. By default, the alarm threshold is 90%. That is, an alarm is generated when the consumed power accounts for 90% of the total power. ----End
Procedure
Step 1 Enable the PoE function on an interface. 1. Run:
system-view
The PoE function is enabled. By default, the PoE function is enabled on all interfaces. Step 2 Optional: Set the maximum output power of an interface. 1.
Issue 02 (2011-07-15)
Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 123
9 PoE Configuration
The maximum output power of the interface is set. By default, the maximum output power of an interface is 30000 mW. Step 3 Optional: Set the power supply priority of an interface. 1. Run:
system-view
The power supply priority of the interface is set. By default, the power supply priority of an interface is low. The priorities in descending order are critical, high, and low. Step 4 Optional: (Optional) Set the power-off time range of a PoE interface. 1. Run:
system-view
The power-off time range takes effect on the interface. Step 5 Optional: Enable an interface to check compatibility of PDs.
NOTE
Before enabling an interface to check compatibility of PDs, you must enable PoE on the PSE. After this function is enabled, the interface can detect the PDs that do not comply with IEEE 802.3af.
Issue 02 (2011-07-15)
124
9 PoE Configuration
1.
Run:
system-view
The interface is enabled to check compatibility of PDs. By default, an interface does not check compatibility of PDs. Step 6 Optional: Power on an interface forcibly. If the PSE cannot identify the PD connected to an interface, you can forcibly power on the interface. Before powering on the interface, ensure that the system power is sufficient. 1. Run:
system-view
The interface is forcibly powered on. By default, an interface cannot provide power for unidentified PDs. ----End
Procedure
Step 1 Run the display poe-power command to view the status of the PoE power supply. Step 2 Run the display poe device command to view information about the devices that support the PoE function. Step 3 Run the display poe information command to view the PoE information. Step 4 Run the display poe power interface interface-type interface-number command to view the output power of an interface.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 125
9 PoE Configuration
Step 5 Run the display poe power-state interface interface-type interface-number command to view the status of PoE power supply on an interface. ----End
Switch A, Switch B, and the AP are devices of other vendors and need to be powered through PoE.
l l l
Switch A is connected to GE 0/0/1 on Switch; the maximum power consumption of Switch A is 12000 mw; Switch A is connected to the data server and needs to be powered first. Switch B is connected to GE 0/0/2 on Switch; the maximum power consumption of Switch B is 12000 mw; Switch B is connected to common users who access the Internet. The AP is connected to GE 0/0/3 on Switch; the maximum power consumption of the AP is 2500 mw; the AP is connected to users who access the Internet through a wireless network.
Switch provides power for Switch A, Switch B, and the AP in automatic mode, and is enabled with compatibility detection for PDs. Figure 9-1 Networking diagram of PoE configurations
SwitchB
Configuration Roadmap
The configuration roadmap is as follows:
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 126
9 PoE Configuration
1. 2. 3. 4. 5.
Enable PoE on GE 0/0/1 of Switch, and configure the maximum power and the power supply priority of GE 0/0/1. Enable PoE on GE 0/0/2 of Switch, and set the maximum power consumption of GE 0/0/2. Enable PoE on GE 0/0/3 of Switch, and set the maximum power consumption of GE 0/0/3. Configure the maximum power consumption of the interface connecting the AP on Switch. Configure the power supply management of Switch to be in automatic mode.
Data Preparation
To complete the configuration, you need the following data: l l Number of an interface on which PoE is to be enabled Maximum power consumption of an interface
Configuration Procedure
1. # Enable PoE on GE 0/0/1 of Switch, and configure the maximum power and the power supply priority GE 0/0/1.
<Switch> system-view [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] poe enable [Switch-GigabitEthernet0/0/1] poe power 12000 [Switch-GigabitEthernet0/0/1] poe priority critical [Switch-GigabitEthernet0/0/1] quit
2.
# Enable PoE on GE 0/0/2 of Switch, and set the maximum power consumption of GE 0/0/2 to 20000 mW.
[Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] poe enable [Switch-GigabitEthernet0/0/2] poe power 20000 [Switch-GigabitEthernet0/0/2] quit
3.
# Enable PoE on GE 0/0/3 of Switch, and set the maximum power consumption of GE 0/0/3 to 2500 mW.
[Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] poe enable [Switch-GigabitEthernet0/0/3] poe power 2500 [Switch-GigabitEthernet0/0/3] quit
4.
Configuration Files
Configuration file of Switch
# sysname Switch # interface GigabitEthernet0/0/1 poe power 12000 poe priority critical # interface GigabitEthernet0/0/2 poe power 20000 # interface GigabitEthernet0/0/3 poe power 2500 #
Issue 02 (2011-07-15)
127
9 PoE Configuration
Issue 02 (2011-07-15)
128
10 ALS Configuration
10
About This Chapter
ALS Configuration
This chapter describes the Automatic Laser Shutdown (ALS) configuration on the S5300. 10.1 ALS Overview The ALS mechanism controls the pulse of the laser of an optical module by detecting the Loss of Signal (LOS) on an optical interface. 10.2 ALS Features Supported by the S5300 This section describes the ALS features supported by the S5300. 10.3 Configuring ALS Configuring ALS of the laser of an optical module in the interface view provides security protection and saves energy. 10.4 Configuration Examples This section provides a configuration example of ALS.
Issue 02 (2011-07-15)
129
10 ALS Configuration
TX
RX
RX SwitchA
l
TX SwitchB
The switch and the optical network terminal (ONT) are connected through fibers. In the application of fiber to the home (FTTH), if ONT users perform improper operations on the fiber because of lack of knowledge about radiation or children touch the fiber, the radiation of the laser harms eyes. To solve this problem, you can enable the ALS function on the switch to protect safety of users. Figure 10-2 shows the connection. Figure 10-2 Connecting the switch and ONT through the fiber
TX
RX
RX Switch
TX ONT
Issue 02 (2011-07-15)
130
10 ALS Configuration
ALS is enabled on one end of the fiber link. As shown in Figure 10-1, two switches are connected through the fiber. ALS is disabled on the interface of Switch A and enabled on the interface of Switch B, and the interface work in automatic restart mode. After the fiber link is recovered, the process for interfaces of Switch A and Switch B changing from Down to Up is as follows: 1. 2. 3. 4. 5. The optical module laser of Switch A is still working. Switch B receives optical signals of Switch A immediately after the fiber link is recovered. The LOS on the interface of Switch B is cleared, and the interface becomes Up and sends signals. Switch A receives signals of Switch B. The LOS on the interface of Switch A is cleared, the interface becomes Up, and data communication is recovered.
After ALS is enabled on an interface, the communication recovery speed on the interface is reduced. Packets are discarded if traffic is transmitted on the interface.
10 ALS Configuration
Applicable Environment
The S5300 detects LOSs on optical interfaces to control the laser of optical modules, ensuring security and saving energy. According to the actual networking requirements, after ALS is enabled, you can: l l l Set the restart mode of the laser of an optical module through a command. Set the ALS pulse interval and width of the laser of an optical module through commands. View the ALS configuration on interfaces of different optical modules through commands.
Pre-configuration Tasks
Before configuring ALS, complete the following task: Ensure that the S5300 has an optical module.
Data Preparation
To configure ALS, you need the following data. No. 1 Data ALS pulse interval of the laser ALS pulse width of the laser
Context
The constraints on ALS are as follows: l Only optical interfaces support ALS. Electrical interfaces do not support ALS. When optical interfaces transmit services unidirectionally, they do not support ALS. The hardware must provide support for the software to detect the LOS on an optical interface and control the laser on an interface. l The link aggregation group does not support ALS.
Procedure
Step 1 Run:
system-view
10 ALS Configuration
Step 3 Run:
als enable
Prerequisite
ALS is enabled on the interface.
Context
If the laser of an optical module works in automatic restart mode, the laser starts automatically at ALS pulse intervals. If the laser of an optical module is set to work in manual restart mode, you must start the laser manually. Then the laser sends a pulse. If the fiber link recovery is detected in time, you can use the manual restart mode so that the laser can send pulses immediately. Therefore, data communication can be recovered rapidly. By default, the laser works in automatic restart mode after ALS is enabled on all the interfaces.
Procedure
Step 1 Run:
system-view
The restart mode of the laser is set to manual. The ALS pulse width of the interface in manual restart mode is the same as that in automatic restart mode. ----End
10 ALS Configuration
Prerequisite
The interface is enabled with ALS and works in manual restart mode.
Context
When an interface detects the LOS, the laser of the optical module stops sending pulses. If the als restart command is not used, the laser will not be restarted. If the interface still detects the LOS after the laser is started manually, the laser is stopped again. If the interface detects that the LOS is cleared, the laser of an optical module sends pulses and data communication is recovered.
Procedure
Step 1 Run:
system-view
The laser of an optical module is started manually. Then the laser sends a pulse. ----End
10.3.5 (Optional) Setting the ALS Pulse Interval and Width of the Laser
You can set the proper laser pulse interval and width to ensure energy conservation and emission deduction and timely detection of fiber link recovery.
Prerequisite
The interface is enabled with ALS and works in automatic restart mode.
Context
The ALS pulse width refers to the duration in which a laser sends pulses; the ALS pulse interval refers to the period between rising edges of pulses. A smaller pulse width and a greater pulse interval save more energy but reduce the speed of fiber link recovery.
Procedure
Step 1 Run:
system-view
10 ALS Configuration
The ALS pulse interval of the laser on the interface is set. By default, the ALS pulse interval is 100s. Step 4 Run:
als restart pulse-width pulse-width
The ALS pulse width of the laser on the interface is set. By default, the ALS pulse width is 2s. ----End
Prerequisite
The ALS configurations are complete on the S5300.
Procedure
l l Run the display als configuration slot slot-id command to view the ALS configurations of member switches. Run the display als configuration interface interface-type interface-number command to check the ALS configuration on the specified interface.
----End
Networking Requirements
As shown in Figure 10-3, the LPUs that support ALS are installed in slot 1 of Switch A and Switch B, GE 0/0/1 of Switch A and Switch B are connected through a fiber. When data transmission is interrupted by faults occurred on the fiber link, if the laser of the optical module sends pulses continuously, the energy is wasted and potential risks are caused. After ALS is enabled on both interfaces of the fiber link, the laser stops sending pulses if a fault occurs on the fiber link. If the faulty link is recovered, the laser starts to send pulses.
Issue 02 (2011-07-15) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 135
10 ALS Configuration
GE0/0/1
GE0/0/1
SwitchA
SwitchB
Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Enable ALS on GE 0/0/1 on Switch A and Switch B. Configure the lasers of GE 0/0/1 on Switch A and Switch B to work in automatic restart mode. Set the ALS pulse intervals and widths of the lasers of GE 0/0/1 on Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l l ALS pulse interval and width of the laser of the optical module on GE 0/0/1 of Switch A ALS pulse interval and width of the laser of the optical module on GE 0/0/1 of Switch B
Procedure
Step 1 Enable ALS on GE 0/0/1 of Switch A, configure the laser of the interface to work in automatic restart mode, and set the ALS pulse interval and width to 200s and 3s. # Enable ALS.
<SwitchA> system-view [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] als enable
Step 2 Enable ALS on GE 0/0/1 of Switch B, configure the laser of the interface to work in automatic restart mode, and set the ALS pulse interval and width to 200s and 3s. # Enable ALS.
<SwitchB> system-view [SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] als enable
10 ALS Configuration
# Run the display als configuration interface interface-type interface-number command on Switch A and Switch B to view the ALS configuration.
<SwitchA> display als configuration interface gigabitethernet0/0/1 ------------------------------------------------------------------------------Interface ALS Laser Restart Interval(s) Width(s) Status Status Mode ------------------------------------------------------------------------------GigabitEthernet0/0/1 Enable Off Auto 200 3 ------------------------------------------------------------------------------<SwitchB> display als configuration interface gigabitethernet0/0/1 ------------------------------------------------------------------------------Interface ALS Laser Restart Interval(s) Width(s) Status Status Mode ------------------------------------------------------------------------------GigabitEthernet0/0/1 Enable Off Auto 200 3 -------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of Switch A
# sysname SwitchA # interface GigabitEthernet0/0/1 als enable als restart pulse-interval 200 als restart pulse-width 3 # return
Issue 02 (2011-07-15)
137
11
About This Chapter
This chapter introduces the basics of the BootROM software and the Versatile Routing Platform (VRP) system software, and describes how to restart the S5300. 11.1 Introduction This section introduces the required knowledge in restarting and resetting the S5300. 11.2 Restarting the S5300 Immediately This section describes how to restart the S5300 immediately. 11.3 Restarting the S5300 at a Fixed Time This section describes how to restart the S5300 at a fixed time.
Issue 02 (2011-07-15)
138
11.1 Introduction
This section introduces the required knowledge in restarting and resetting the S5300.
BootROM starts
Press Ctrl+B No
Yes
End
To check the BootROM startup process, you need to connect the Console port of the switch to a terminal by using a serial port cable.
The BootROM compares the current configuration with the configuration file. If they are the same, the BootROM asks you whether to reboot the system. The message is as follows:
Info: The system is now comparing the configuration, please wait. System will reboot! Continue?[Y/N]:y
Issue 02 (2011-07-15)
139
BIOS LOADING ... Copyright (c) 2008-2010 HUAWEI TECH CO., LTD. CX22EFFE (Ver124, Jun 9 2010, 17:41:46) Press Ctrl+B to enter BOOTROM menu ... 0
Press Ctrl+B within two seconds. The system prompts you to enter the password of the advanced BootROM menu as follows: The default password is huawei.
password: BOOTROM MENU 1. Boot with default mode 2. Enter serial submenu 3. Enter startup submenu 4. Enter ethernet submenu 5. Enter filesystem submenu 6. Modify BOOTROM password 7. Reboot Enter your choice(1-7):
In the advanced BootROM menu, you can choose to upgrade the VRP or specify the VRP version to be loaded when the S5300 is started. The BootROM initializes the serial interface and the console interface, decompresses the logical files on the logical chip and the VRP, and then starts the VRP. The terminal displays information as follows:
Decompressing Image file ... done PPI DEV SysInit......OK Hard system init.................OK Begin to start the system, please waiting ...... VOS VOS CFM PAT VOS VFS init.....................OK monitor init.................OK init advance.................OK init ........................OK VFS init hind ...............OK
VRP_Root begin... VRP_InitializeTask begin... Init the Device Link.............OK CFG_PlaneInit begin..............OK CFM_Init begin...................OK CLI_CmdInit begin................OK VRP_RegestAllLINKCmd begin.......OK create task begin................ task init begin... Recover configuration...OK!done Press ENTER to get started.
When the terminal displays the preceding information, the VRP has started. Press Enter to enter the command line interface (CLI).
Issue 02 (2011-07-15)
140
CAUTION
The reboot command can paralyze the network for a while. Therefore, run the reboot command with caution. Before restarting the S5300, check whether to save the configuration file and whether the file contents are correct. For details on saving the configuration file, refer to the Quidway S5300 Series Ethernet Switches Configuration Guide - Basic Configuration.
Procedure
Step 1 Run:
reboot
11.2.2 Restarting the S5300 by Pressing the Power Button on the S5300
Context
CAUTION
The action can paralyze the network for a while. Therefore, perform this action with caution. Before restarting the S5300, check whether to save the configuration file and whether the file contents are correct. For details on saving the configuration file, see the Quidway S5300 Series Ethernet Switches Configuration Guide - Basic Configuration.
Procedure
Step 1 Press the power button on the S5300 to power off the running S5300. Step 2 Press the power button on the S5300 again to restart the S5300. ----End
Procedure
Step 1 Run:
schedule reboot { at time | delay interval [ force ] }
The function of restarting the S5300 at a fixed time is enabled. The S5300 does not support the function of restarting the S5300 at a fixed time by default. ----End
Issue 02 (2011-07-15)
142