CHAPTER 1 COMMANDS FOR BASIC SWITCH CONFIGURATION ........................ 1-42
1.1COMMANDS FOR BASIC CONFIGURATION ............................................................................................ 1-42
1.1.1 Authentication line .................................................................................................................................... 1-42
1.1.11 end .......................................................................................................................................................... 1-50
1.1.14 help ......................................................................................................................................................... 1-52
1.1.16 ip host ..................................................................................................................................................... 1-53
1.1.18 ip http server ........................................................................................................................................... 1-55
1.1.19 language ................................................................................................................................................. 1-55
1.1.24 service password-encryption .................................................................................................................. 1-59
1.1.25 service terminal-length ........................................................................................................................... 1-59
1.1.28 set default ............................................................................................................................................... 1-61
1.1.30 show clock .............................................................................................................................................. 1-62
1.1.31 show cpu usage ...................................................................................................................................... 1-63
1.1.32 show cpu utilization ................................................................................................................................ 1-64
1.1.33 show memory usage .............................................................................................................................. 1-64
1.1.34 show privilege ......................................................................................................................................... 1-65
1-1
Page 3
1.1.35 show privilege mode LINE ...................................................................................................................... 1-66
1.1.36 show tech-support .................................................................................................................................. 1-66
1.1.37 show version ........................................................................................................................................... 1-67
1.1.39 web language ......................................................................................................................................... 1-69
1.2.24 show crypto key ...................................................................................................................................... 1-88
1.2.25 show ssh-server ..................................................................................................................................... 1-88
1.2.26 show telnet login ..................................................................................................................................... 1-88
1.2.27 show users ............................................................................................................................................. 1-89
1.2.28 who ......................................................................................................................................................... 1-90
1.3COMMANDS FOR CONFIGURING SWITCH IP ......................................................................................... 1-90
1.3.2 ip address ................................................................................................................................................. 1-91
1.4.4 show private-mib oid ................................................................................................................................. 1-96
1.4.5 show snmp ............................................................................................................................................... 1-97
1.4.6 show snmp engineid ................................................................................................................................. 1-98
1.4.7 show snmp group ..................................................................................................................................... 1-99
1.4.8 show snmp mib ....................................................................................................................................... 1-100
1.4.9 show snmp status ................................................................................................................................... 1-100
1.4.10 show snmp user ................................................................................................................................... 1-101
1.4.11 show snmp view ................................................................................................................................... 1-101
1.4.12 snmp-server community ....................................................................................................................... 1-102
1.4.16 snmp-server group ............................................................................................................................... 1-105
1.4.21 snmp-server user .................................................................................................................................. 1-110
1.5.6 ip ftp ........................................................................................................................................................ 1-117
1.5.7 show ftp .................................................................................................................................................. 1-118
1.5.8 show tftp ................................................................................................................................................. 1-118
CHAPTER 2 FILE SYSTEM COMMANDS ................................................................. 2-122
2.1 CD .................................................................................................................................................. 2-122
2.4 DIR .................................................................................................................................................. 2-124
2.5 FORMAT .......................................................................................................................................... 2-125
3.7 CLUSTER MEMBER ........................................................................................................................... 3-134
3.8 CLUSTER MEMBER AUTO-TO-USER .................................................................................................... 3-135
3.9 CLUSTER RESET MEMBER ................................................................................................................. 3-135
3.10 CLUSTER RUN ................................................................................................................................ 3-136
3.11 CLUSTER UPDATE MEMBER ............................................................................................................. 3-137
4.1.4 flow control ............................................................................................................................................. 4-148
4.1.13 show interface ...................................................................................................................................... 4-156
7.14 SHOW ULDP ................................................................................................................................... 7-182
CHAPTER 8 COMMANDS FOR LLDP FUNCTION ................................................... 8-183
8.15 SHOW DEBUGGING LLDP ................................................................................................................. 8-193
8.16 SHOW LLDP ................................................................................................................................... 8-194
8.17 SHOW LLDP INTERFACE ETHERNET .................................................................................................. 8-195
8.18 SHOW LLDP NEIGHBORS INTERFACE ETHERNET ............................................................................... 8-196
8.19 SHOW LLDP TRAFFIC ...................................................................................................................... 8-196
CHAPTER 9 COMMANDS FOR PORT CHANNEL ................................................... 9-198
9.9 SHOW PORT-GROUP ......................................................................................................................... 9-204
CHAPTER 10 COMMANDS FOR MTU .................................................................... 10-206
10.1 MTU ............................................................................................................................................ 10-206
CHAPTER 11 COMMANDS FOR EFM OAM ........................................................... 11-207
14.12 SHOW LLDP ................................................................................................................................. 14-16
14.13 SHOW LLDP [INTERFACE ETHERNET <IFNAME>] .......................................................................... 14-17
14.14 SHOW LLDP NEIGHBORS ............................................................................................................... 14-18
CHAPTER 15 COMMANDS FOR BPDU-TUNNEL .................................................... 15-19
17.1.12 no garp timer ...................................................................................................................................... 17-33
17.1.13 name .................................................................................................................................................. 17-34
17.1.15 private-vlan association ...................................................................................................................... 17-36
17.1.16 show dot1q-tunnel .............................................................................................................................. 17-37
17.1.17 show garp timer .................................................................................................................................. 17-38
17.1.18 show gvrp fsm information ................................................................ ................................ .................. 17-38
1-10
Page 12
17.1.19 show gvrp leaveAll fsm information .................................................................................................... 17-39
17.1.20 show gvrp leavetimer running information .......................................................................................... 17-40
17.1.21 show gvrp port-member ...................................................................................................................... 17-41
17.1.22 show gvrp port registerd vlan .............................................................................................................. 17-42
17.1.23 show gvrp timer running information ................................................................................................... 17-43
17.1.24 show gvrp vlan registerd port .............................................................................................................. 17-44
17.1.25 show vlan............................................................................................................................................ 17-45
17.1.26 show vlan-translation .......................................................................................................................... 17-46
17.3.6 show dynamic-vlan prefer ..................................................................................................................... 17-64
17.3.7 show mac-vlan ...................................................................................................................................... 17-65
17.3.8 show mac-vlan interface ....................................................................................................................... 17-66
17.3.9 show protocol-vlan ................................................................................................................................ 17-66
17.3.10 show subnet-vlan ................................................................................................................................ 17-67
17.3.11 show subnet-vlan interface ................................................................................................................. 17-68
17.4COMMANDS FOR VOICE VLANCONFIGURATION ............................................................................. 17-71
17.4.1 show voice-vlan .................................................................................................................................... 17-71
18.1.7 show mac-address-table....................................................................................................................... 18-79
18.2COMMANDS FOR MAC ADDRESS BINDING CONFIGURATION .............................................................. 18-80
18.2.2 show port-security ................................................................................................................................ 18-81
18.2.3 show port-security address ................................................................................................ ................... 18-82
18.2.4 show port-security interface ................................................................ ................................ .................. 18-83
19.1.4 name .................................................................................................................................................... 19-95
19.1.5 no ......................................................................................................................................................... 19-95
19.1.7 show ..................................................................................................................................................... 19-97
19.1.11 spanning-tree format ......................................................................................................................... 19-100
19.2.2 show mst-pending .............................................................................................................................. 19-119
19.2.3 show spanning-tree ............................................................................................................................ 19-120
19.2.4 show spanning-tree mst config ........................................................................................................... 19-123
CHAPTER 20 COMMANDS FOR QOS .................................................................... 20-124
20.2 CLASS ......................................................................................................................................... 20-125
20.5 DROP .......................................................................................................................................... 20-127
20.6 MATCH ........................................................................................................................................ 20-128
20.7 MLS QOS COS .............................................................................................................................. 20-129
20.19 SET ........................................................................................................................................... 20-140
20.20 SHOW CLASS-MAP ..................................................................................................................... 20-141
20.21 SHOW POLICY-MAP..................................................................................................................... 20-142
20.22 SHOW MLS QOS INTERFACE ........................................................................................................ 20-143
20.23 SHOW MLS QOS MAPS ................................................................................................................ 20-146
20.24 SHOW MLS QOS VLAN ................................................................................................................. 20-148
CHAPTER 21 COMMANDS FOR FLOW-BASED REDIRECTION .......................... 21-151
21.1 ACCESS-GROUP REDIRECT TO INTERFACE ETHERNET ..................................................................... 21-151
1-14
Page 16
21.2 SHOW FLOW-BASED-REDIRECT ..................................................................................................... 21-152
CHAPTER 22 COMMANDS FOR FLEXIBLE QINQ ................................................ 22-153
22.1 MATCH ........................................................................................................................................ 22-153
22.3 SET ............................................................................................................................................. 22-155
CHAPTER 23 COMMANDS FOR LAYER 3 MANAGEMENT .................................. 23-157
23.1COMMANDS FOR LAYER 3INTERFACE ........................................................................................... 23-157
23.1.3 show ip route .......................................................................................................................................... 23-1
23.2COMMANDS FOR IPV4/V6 CONFIGURATION ........................................................................................ 23-3
23.2.1 clear ip traffic .......................................................................................................................................... 23-3
23.2.8 ip address ............................................................................................................................................... 23-8
23.2.9 ip default-gateway .................................................................................................................................. 23-9
23.2.10 ip route................................................................................................................................................ 23-10
23.2.16 show ip interface ................................................................................................................................. 23-15
23.2.17 show ip traffic ...................................................................................................................................... 23-15
23.2.18 show ipv6 interface ............................................................................................................................. 23-17
23.2.19 show ipv6 route .................................................................................................................................. 23-19
23.2.20 show ipv6 neighbors ........................................................................................................................... 23-21
23.2.21 show ipv6 traffic .................................................................................................................................. 23-22
23.3COMMANDS FOR ARPCONFIGURATION .......................................................................................... 23-23
23.3.5 show arp ............................................................................................................................................... 23-25
23.3.6 show arp traffic ..................................................................................................................................... 23-27
CHAPTER 24 COMMANDS FOR RIP........................................................................ 24-28
24.33 SHOW DEBUGGING RIP ................................................................................................................. 24-53
24.34 SHOW IP PROTOCOLS RIP ............................................................................................................. 24-54
24.35 SHOW IP RIP ................................................................................................................................ 24-55
24.36 SHOW IP RIP DATABASE ................................................................................................................ 24-56
24.37 SHOW IP RIP INTERFACE ............................................................................................................... 24-57
24.38 SHOW IP RIP AGGREGATE ............................................................................................................. 24-57
24.40 VERSION ...................................................................................................................................... 24-59
CHAPTER 25 COMMANDS FOR OSPF .................................................................... 25-61
25.1 AREA AUTHENTICATION .................................................................................................................. 25-61
25.2 AREA DEFAULT-COST ...................................................................................................................... 25-62
25.3 AREA FILTER-LIST .......................................................................................................................... 25-62
25.4 AREA NSSA .................................................................................................................................... 25-63
25.5 AREA RANGE ................................................................................................................................. 25-64
25.6 AREA STUB .................................................................................................................................... 25-65
25.7 AREA VIRTUAL-LINK ....................................................................................................................... 25-66
25.25 HOST AREA .................................................................................................................................. 25-79
25.26 IP OSPF AUTHENTICATION ............................................................................................................. 25-80
25.27 IP OSPF AUTHENTICATION-KEY ...................................................................................................... 25-81
25.28 IP OSPF COST .............................................................................................................................. 25-81
25.29 IP OSPF DATABASE-FILTER ............................................................................................................ 25-82
25.30 IP OSPF DEAD-INTERVAL ............................................................................................................... 25-83
25.31 IP OSPF DISABLE ALL ................................................................................................................... 25-84
25.32 IP OSPF HELLO-INTERVAL ............................................................................................................. 25-84
25.33 IP OSPF MESSAGE-DIGEST-KEY ..................................................................................................... 25-85
25.34 IP OSPF MTU ................................................................................................................................ 25-86
25.35 IP OSPF MTU-IGNORE ................................................................................................................... 25-87
25.36 IP OSPF NETWORK ....................................................................................................................... 25-88
1-18
Page 20
25.37 IP OSPF PRIORITY ......................................................................................................................... 25-88
25.38 IP OSPF RETRANSMIT-INTERVAL .................................................................................................... 25-89
25.39 IP OSPF TRANSMIT-DELAY ............................................................................................................. 25-90
CHAPTER 28 COMMAND FOR ARP GUARD .......................................................... 28-15
28.1 ARP-GUARD IP ............................................................................................................................... 28-15
CHAPTER 29 COMMANDS FOR GRATUITOUS ARP CONFIGURATION ............... 29-16
29.1 IP GRATUITOUS-ARP ....................................................................................................................... 29-16
29.2 SHOW IP GRATUITOUS-ARP ............................................................................................................. 29-17
CHAPTER 30 COMMANDS FOR DHCP ................................................................... 30-18
1-20
Page 22
30.1COMMANDS FOR DHCPSERVER CONFIGURATION .......................................................................... 30-18
30.1.2 clear ip dhcp binding ............................................................................................................................. 30-18
30.1.3 clear ip dhcp conflict ............................................................................................................................. 30-19
30.1.4 clear ip dhcp server statistics ................................................................................................................ 30-20
30.1.6 debug ip dhcp client .............................................................................................................................. 30-21
30.1.7 debug ip dhcp relay .............................................................................................................................. 30-22
30.1.8 debug ip dhcp server ............................................................................................................................ 30-22
30.1.14 ip dhcp conflict logging ....................................................................................................................... 30-26
30.1.15 ip dhcp disable .................................................................................................................................... 30-27
30.1.16 ip dhcp excluded-address ................................................................................................................... 30-28
30.1.17 ip dhcp pool ........................................................................................................................................ 30-28
30.1.18 ip dhcp conflict ping-detection enable ................................................................................................. 30-29
30.1.19 ip dhcp ping packets ........................................................................................................................... 30-30
30.1.20 ip dhcp ping timeout ........................................................................................................................... 30-31
30.1.28 service dhcp ....................................................................................................................................... 30-37
30.1.29 show ip dhcp binding .......................................................................................................................... 30-37
30.1.30 show ip dhcp conflict .......................................................................................................................... 30-38
30.1.31 show ip dhcp relay information option ................................................................................................ 30-39
30.1.32 show ip dhcp server statistics ............................................................................................................. 30-39
30.2COMMANDS FOR DHCPRELAY CONFIGURATION ............................................................................ 30-41
30.2.1 ip dhcp broadcast suppress ................................................................................................ .................. 30-41
30.2.2 ip dhcp relay share-vlan <vlanid> sub-vlan <vlanlist> .......................................................................... 30-42
30.2.3 ip forward-protocol udp bootps ............................................................................................................. 30-42
30.2.4 ip helper-address .................................................................................................................................. 30-43
30.2.5 show ip forward-protocol....................................................................................................................... 30-44
1-21
Page 23
30.2.6 show ip helper-address ........................................................................................................................ 30-44
CHAPTER 31 COMMANDS FOR DHCPV6 ................................................................. 31-2
33.1 OPTION 43 ASCII LINE ................................................................................................................... 33-38
33.2 OPTION 43 HEX WORD .................................................................................................................. 33-39
33.3 OPTION 43 IP A.B.C.D ................................................................................................................... 33-39
33.4 OPTION 60 ASCII LINE ................................................................................................................... 33-40
33.5 OPTION 60 HEX WORD .................................................................................................................. 33-41
1-23
Page 25
33.6 OPTION 60 IP A.B.C.D ................................................................................................................... 33-42
CHAPTER 34 COMMANDS FOR DHCPV6 OPTION37, 38 ...................................... 34-43
34.1COMMANDS FOR DHCPV6 OPTION37,38 ....................................................................................... 34-43
34.1.1 address range ....................................................................................................................................... 34-43
34.1.2 class ..................................................................................................................................................... 34-44
34.1.3 ipv6 dhcp class ..................................................................................................................................... 34-44
34.1.19 ipv6 dhcp use class ............................................................................................................................ 34-57
37.1.10 show ip multicast destination-control ................................................................................................ 37-100
37.1.11 show ip multicast destination-control access-list ............................................................................... 37-101
37.1.12 show ip multicast policy .................................................................................................................... 37-101
37.1.13 show ip multicast source-control ....................................................................................................... 37-102
37.1.14 show ip multicast source-control access-list ..................................................................................... 37-103
37.2COMMANDS FOR IGMPSNOOPING ............................................................................................... 37-104
37.2.1 clear ip igmp snooping vlan ................................................................................................................ 37-104
37.2.2 clear ip igmp snooping vlan <1-4094> mrouter-port ........................................................................... 37-104
37.2.13 ip igmp snooping vlan mrouter-port interface .................................................................................... 37-112
37.2.14 ip igmp snooping vlan mrouter-port learnpim .................................................................................... 37-113
37.2.15 ip igmp snooping vlan mrpt ................................................................ ............................................... 37-114
37.2.16 ip igmp snooping vlan query-interval ................................................................................................ 37-114
37.2.17 ip igmp snooping vlan query-mrsp .................................................................................................... 37-115
37.2.18 ip igmp snooping vlan query-robustness .......................................................................................... 37-116
1-26
Page 28
37.2.19 ip igmp snooping vlan report source-address ................................................................................... 37-117
37.2.20 ip igmp snooping vlan specific-query-mrsp ................................................................ ....................... 37-117
37.2.21 ip igmp snooping vlan static-group ................................................................................................... 37-118
37.2.22 ip igmp snooping vlan suppression-query-time ................................................................................. 37-119
37.2.23 show ip igmp snooping ..................................................................................................................... 37-120
42.16 SWITCHPORT ND DYNAMIC MAXIMUM ........................................................................................... 42-203
42.17 VLAN MAC-ADDRESS DYNAMIC MAXIMUM ..................................................................................... 42-204
CHAPTER 43 COMMANDS FOR AM CONFIGURATION ....................................... 43-206
43.1 AM ENABLE ................................................................................................................................. 43-206
43.2 AM PORT ..................................................................................................................................... 43-206
43.3 AM IP-POOL ................................................................................................................................. 43-207
43.4 AM MAC-IP-POOL ......................................................................................................................... 43-208
43.5 NO AM ALL ................................................................................................................................... 43-209
43.6 SHOW AM .................................................................................................................................... 43-209
CHAPTER 44 COMMANDS FOR SECURITY FEATURE ........................................ 44-211
54.12 MRPP RING ................................................................................................................................ 54-311
54.13 MRPP RING PRIMARY-PORT ......................................................................................................... 54-312
54.14 MRPP RING SECONDARY-PORT .................................................................................................... 54-313
61.4 SNTP SERVER .............................................................................................................................. 61-360
61.5 SHOW SNTP ................................................................................................................................. 61-361
CHAPTER 62 COMMANDS FOR NTP .................................................................... 62-362
64.2 DEBUG DNS ................................................................................................................................. 64-379
65.9 SHOW BOOT-FILES ....................................................................................................................... 65-397
65.10 SHOW DEBUGGING ..................................................................................................................... 65-398
65.11 SHOW FLASH ............................................................................................................................. 65-399
65.12 SHOW HISTORY .......................................................................................................................... 65-399
65.13 SHOW HISTORY ALL-USERS ......................................................................................................... 65-400
65.14 SHOW LOGGING BUFFERED ........................................................................................................ 65-401
65.15 SHOW LOGGING EXECUTED-COMMANDS STATE ............................................................................ 65-402
65.16 SHOW LOGGING SOURCE ............................................................................................................ 65-403
65.17 SHOW MEMORY .......................................................................................................................... 65-403
65.18 SHOW RUNNING-CONFIG ............................................................................................................. 65-404
65.19 SHOW RUNNING-CONFIG CURRENT-MODE .................................................................................... 65-405
65.20 SHOW STARTUP-CONFIG ............................................................................................................. 65-406
65.21 SHOW SWITCHPORT INTERFACE .................................................................................................. 65-406
65.22 SHOW TCP ................................................................................................................................. 65-407
65.23 SHOW TCP IPV6 .......................................................................................................................... 65-408
65.24 SHOW TELNET LOGIN.................................................................................................................. 65-409
65.25 SHOW TECH-SUPPORT ................................................................................................................ 65-409
65.26 SHOW UDP ................................................................................................................................. 65-410
65.27 SHOW UDP IPV6 ......................................................................................................................... 65-410
65.28 SHOW VERSION .......................................................................................................................... 65-411
67.5 SHOW CPU-RX PROTOCOL ............................................................................................................ 67-420
CHAPTER 68 COMMANDS FOR POE .................................................................... 68-421
68.1COMMANDS FOR POECONFIGURATION ........................................................................................ 68-421
68.1.1 power inline dynamic detect enable .................................................................................................... 68-421
68.1.2 power inline dynamic detect interval <30-300> ................................................................................... 68-422
68.1.3 power inline enable (Global) ............................................................................................................... 68-422
68.1.4 power inline enable (Port) ................................................................................................................... 68-423
68.1.5 power inline high-inrush ...................................................................................................................... 68-424
68.1.6 power inline legacy ................................................................ ............................................................. 68-425
68.1.7 power inline max (Global) ................................................................................................................... 68-425
68.1.8 power inline max (Port) ....................................................................................................................... 68-426
68.1.9 power inline police .............................................................................................................................. 68-427
68.1.10 power inline priority ........................................................................................................................... 68-428
68.2COMMANDS FOR POEMONITORING AND DEBUGGING ................................................................... 68-429
68.2.1 Monitoring and Debugging Information ............................................................................................... 68-429
1-41
Page 43
Chapter 1 Commands for Basic Switch
Configuration
1.1 Commands for Basic Configuration
1.1.1 Authentication line
Command:
authentication line {console | vty | web} login {local | radius | tacacs}
no authentication line {console | vty | web} login
Function:
Configure VTY (login with Telnet and SSH), Web and Console, so as to select the priority of the authentication mode
for the login user. The no form command restores the default authentication mode.
Default:
No configuration is enabled for the console login method by default. Local authentication is enabled for the VTY and
Web login method by default.
Command Mode:
Global Mode.
Usage Guide:
The authentication method for Console, VTY and Web login can be configured respectively. And authentication
method can be any one or combination of Local, RADIUS and TACACS. When login method is configuration in
combination, the preference goes from left to right. If the users have passed the authentication method,
authentication method of lower preferences will be ignored. To be mentioned, the user can login as long as a
authentication method is passed. AAA function and RADIUS server should be configured before the RADIUS
authentication can be used.
The authentication line console login command is exclusive with the login command. The authentication line console login command configures the switch to use the Console login method. And the login command makes the
Console login to use the passwords configured by the password command for authentication.
If local authentication is configured while no local users are configured, users will be able to login the switch via the
Console method.
1-42
Page 44
Example:
Configure the Telnet and ssh login method to Local and RADIUS authentication method.
Switch(config)# authentication line vty login local radius
This command is used to configure the information displayed when the login authentication of a telnet or console
user is successful, the no command configures that the information is not displayed when the authentication is
successful.
Parameters:
<LINE>: The information displayed when the authentication is successful, length limit from 1 to 100 characters.
Default:
Do not show the information when the authentication is successful.
Command mode:
Global mode.
Example:
Switch(config)#banner motd Welcome
1-43
Page 45
1.1.3 boot img
Command:
boot img <img-file-url> {primary | backup}
Function:
Configure the first and second img files used in the next boot of the switch.
Parameters:
Primary means to configure the first IMG file, backup means to configure the second IMG file, <img-file-url> is the full
path of the booting IMG file, the format of which is as follows:
1. The file path comprises of three parts: device prefix used as the root directory (flash:/), sub-directory, and the file
name. No space is allowed in each part or between two parts.
2. The suffix of all file names should be .img.
3. The length of the full file path should not be longer than 128 characters, while the file name cannot be longer than
80 characters.
Command Mode:
Admin Mode.
Default:
The factory original configuration only specifies the first booting IMG file, it is nos.img file in the FLASH, without the
second booting IMG file.
Usage Guide:
The first and second img files can only use .img files stored in switch.
Example:
Set flash:/nos.img as the second booting IMG file used in the next booting of the switch.
Switch#boot img flash:/nos.img backup
1-44
Page 46
1.1.4 boot startup-config
Command:
boot startup-config {NULL | <file-url> }
Function:
Configure the CFG file used in the next booting of the switch.
Parameters:
The NULL keyword means to use the factory original configuration as the next booting configuration. Setting the
CFG file used in the next booting as NULL equals to implementing set default and write commands. <file-url> is the
full path of CFG file used in the next booting. The format of which is as follows:
1. The file path comprises of three parts: device prefix used as the root directory (flash:/), sub-directory, and the file
name. No space is allowed in each part or between two parts.
2. The suffix of all file names should be .cfg.
3. The length of the full file path should not be longer than 128 characters, while the file name cannot be longer than
80 characters.
Command Mode:
Admin Mode.
Default Settings:
None.
Usage Guide:
Configure the CFG file used in the next booting can only use .cfg files stored in the switch.
Example:
Set flash:/ startup.cfg as the CFG file used in the next booting of the switch.
Switch# boot startup-config flash:/ startup.cfg
1-45
Page 47
1.1.5 clock set
Command:
clock set <HH:MM:SS> <YYYY.MM.DD>
Function:
Set system date and time.
Parameter:
<HH:MM:SS>is the current time, and the valid scope for HH is 0 to 23, MM and SS 0 to 59; <YYYY.MM.DD> is the
current year, month and date, and the valid scope for YYYY is 1970~2038, MON meaning month, and DD between 1
to 31.
Command mode:
Admin Mode.
Default:
upon first time start-up, it is defaulted to 2006.1.1 0: 0: 0.
Usage guide:
The switch cannot continue timing with power off, hence the current date and time must be first set at environments
where exact time is required.
Example:
To set the switch current date and time to 2002.8.1 23: 0: 0:
Switch#clock set 23:0:0 2002.8.1
Relative
Command: show clock
1-46
Page 48
1.1.6 config
Command:
config [terminal]
Function:
Enter Global Mode from Admin Mode.
Parameter:
[terminal] indicates terminal configuration.
Command mode:
Admin Mode
Example:
Switch#config
1.1.7 debug ssh-server
Command:
debug ssh-server
no debug ssh-server
Function:
Display SSH server debugging information; the “no debug ssh-server” command stops displaying SSH server
debugging information.
Default:
This function is disabled by default.
Command mode:
Admin Mode.
1-47
Page 49
1.1.8 disable
Command:
Disable
Function:
Disable admin mode.
Parameter:
None.
Default:
None.
Command mode:
Admin Mode.
Usage Guide:
None.
Example:
Switch#disable
Switch>
1.1.9 enable
Command:
enable [<1-15>]
Function:
Use enable command to enter Admin Mode from User Mode, or change the privilege level of the users.
Command mode:
User Mode/ Admin Mode.
Default:
None.
1-48
Page 50
Usage Guide:
To prevent unauthorized access of non-admin user, user authentication is required (i.e. Admin user password is
required) when entering Admin Mode from User Mode. If the correct Admin user password is entered, Admin Mode
access is granted; if 3 consecutive entry of Admin user password are all wrong, it remains in the User Mode. When
the user’s privilege is changed from the low level to the high level, it needs to authenticate the password of the
corresponding level, or else it will not authenticate the password. Set the Admin user password under Global Mode
Configure the password used for enter Admin Mode from the User Mode,
The “no enable password” command deletes this password.
Parameter:
level <1-15> is used to specify the privilege level, the default level is 15. <password> is the password for the user. If
input option 0 on password setting, the password is not encrypted; if input option 7, the password is encrypted.
Command mode:
Global Mode
Default:
This password is empty by system default
Usage Guide:
Configure this password to prevent unauthorized entering Admin Mode. It is recommended to set the password at
the initial switch configuration. Also, it is recommended to exit Admin Mode with “exit” command when the
administrator needs to leave the terminal for a long time.
1-49
Page 51
Example:
Configure the command for general users to enter the admin mode by rule as test.
Switch(config)#enable password 0 test
1.1.11 end
Command:
End
Function:
Quit current mode and return to Admin mode when not at User Mode/ Admin Mode.
Command mode:
Except User Mode/ Admin Mode
Example:
Quit VLAN mode and return to Admin mode.
Switch(config-vlan1)#end
Switch#
1.1.12 exec-timeout
Command:
exec-timeout <minutes> [<seconds>]
no exec-timeout
Function:
Configure the timeout of exiting admin mode. The “no exec-timeout” command restores the default value.
Parameters:
<minute> is the time value shown in minute and ranges between 0~35791. <seconds> is the time value shown in
seconds and ranges between 0~59.
Command mode:
Global mode
1-50
Page 52
Default:
Default timeout is 10 minutes.
Usage guide:
To secure the switch, as well to prevent malicious actions from unauthorized user, the time will be count from the last
configuration the admin had made, and the system will exit the admin mode at due time. It is required to enter admin
code and password to enter the admin mode again. The timeout timer will be disabled when the timeout is set to 0.
Example:
Set the admin mode timeout value to 6 minutes.
Switch(config)#exec-timeout 6
Set the admin mode timeout value to 5 minutes, 30 seconds.
Switch(config)#exec-timeout 5 30
1.1.13 exit
Command:
Exit
Function:
Quit current mode and return to its previous mode.
Command mode:
All Modes
Usage Guide:
This command is to quit current mode and return to its previous mode.
Example:
Quit global mode to its previous mode
Switch#exit
Switch#
1-51
Page 53
1.1.14 help
Command:
Help
Function:
Output brief description of the command interpreter help system.
Command mode:
All configuration modes.
Usage Guide:
An instant online help provided by the switch. Help command displays information about the whole help system,
including complete help and partial help. The user can type in ‘?’ any time to get online help.
Example:
switch(config)#help
CLI provides advanced help feature. When you need help, anytime at the command line please press '?'.
If nothing matches, the help list will be empty and you must backup until entering a '?' shows the available options.
Two styles of help are provided:
1. Full help is available when you are ready to enter a command argument (e.g. 'show ?') and describes each
possible argument.
2. Partial help is provided when an abbreviated argument is entered and you want to know what arguments match
the input (e.g. 'show ve?'.)
1.1.15 hostname
Command:
hostname <hostname>
no hostname
Function:
Set the prompt in the switch command line interface. The no operation cancels the configuration.
Parameter:
<hostname> is the string for the prompt, up to 64 characters are allowed.
1-52
Page 54
Command mode:
Global Mode
Default:
The default prompt is relative with the switch.
Usage Guide:
With this command, the user can set the CLI prompt of the switch according to their own requirements.
Example:
Set the prompt to “Test”.
Switch(config)#hostname Test
Test(config)#
1.1.16 ip host
Command:
ip host <hostname> <ip_addr>
no ip host {<hostname>|all}
Function:
Set the mapping relationship between the host and IP address; the “no ip host” parameter of this command will
delete the mapping.
Parameter:
<hostname> is the host name, up to 64 characters are allowed; <ip_addr> is the corresponding IP address for the
host name, takes a dot decimal format; all is all of the host name.
Command mode:
Global Mode
Usage Guide:
Set the association between host and IP address, which can be used in commands like “ping <host>“.
1-53
Page 55
Example:
Set IP address of a host with the hostname of “beijing” to 200.121.1.1.
Switch(config)#ip host beijing 200.121.1.1
Configure the mapping relationship between the IPv6 address and the host; the no command deletes this mapping
relationship.
Parameter:
<hostname> is the name of the host, containing max 64 characters; <ipv6_addr> is the IPv6 address
corresponding to the host name. all is all the host address.
Command Mode:
Global Mode
Usage Guide:
Configure a fixed corresponding relationship between the host and the IPv6 address, applicable in commands such
as traceroute6 <host>, etc.
Example:
Set the IPv6 address of the host named beijing to 2001:1:2:3::1.
Switch(config)#ipv6 host beijing 2001:1:2:3::1
Command related: ping6, traceroute6
1-54
Page 56
1.1.18 ip http server
Command:
ip http server
no ip http server
Function:
Enable Web configuration; the “no ip http server” command disables Web configuration
Command mode:
Global mode
Usage guide:
Web configuration is for supplying an interface configured with HTTP for the user, which is straight and visual, easy
to understand.
Example:
Enable Web Server function and enable Web configurations.
Switch(config)#ip http server
1.1.19 language
Command:
language {chinese | english}
Function:
Set the language for displaying the help information.
Parameter:
chinese for Chinese display; english for English display.
Command mode:
Admin and Config Mode.
Default:
The default setting is English display.
1-55
Page 57
Usage Guide:
Switch provides help information in two languages, the user can select the language according to their preference.
After the system restart, the help information display will revert to English.
1.1.20 login
Command:
Login
no login
Function:
login enable password authentication, no login command cancels the login configuration.
Command mode:
Global mode
Default:
No login by default
Usage guide:
By using this command, users have to enter the password set by password command to enter normal user mode
with console; no login cancels this restriction.
Example:
Enable password
Switch(config)#login
1.1.21 password
Command:
password [0 | 7] <password>
no password
Function:
Configure the password used for enter normal user mode on the console. The “no password” command deletes this
password.
1-56
Page 58
Parameter:
password is the password for the user. If input option 0 on password setting, the password is not encrypted; if input
option 7, the password is encrypted.
Command mode:
Global mode
Default:
This password is empty by system default
Usage guide:
When both this password and login command are configured, users have to enter the password set by password
command to enter normal user mode on console.
Example:
Switch(config)#password 0 test
Switch(config)#login
1.1.22 privilege
Command:
privilege mode level <1-15> LINE
no privilege mode level <1-15> LINE
Function:
Configure the level for the specified command, the no command restores the original level of the command.
Parameters:
mode: register mode of the command, ‘Tab’ or ‘?’ is able to show all register modes
<1-15> is the level, its range between 1 and 15
LINE: the command needs to be configured, it supports the command abbreviation
Command Mode:
Global mode
1-57
Page 59
Usage Guide:
This function cannot change the command itself. LINE must be the whole command format, the command with the
abbreviation format must be analyzed successfully. For half-baked command, false command about writing and
command that abbreviation cannot be analyzed successfully, the configuration is failure. For changing the command
line with the parameter, it should fill in the parameter which is able to be selected discretionarily according to the
required format. However, level of the no command is able to be set optionally and it does not affect the result. When
using no command, LINE must be the configured command line. If the command line with the parameter, the
parameter must be matched with the configured command.
Example:
Change the level of show ip route command to level 5.
Switch(config)#privilege exec level 5 show ip route
Change the level of peer A.B.C.D command to level 6.
Switch(config)#privilege router-msdp level 6 peer 1.2.3.4
Restore the original level for show ip route command.
Switch(config)#no privilege exec level 5 show ip route
Restore the original level for peer A.B.C.D command.
Switch(config)#no privilege router-msdp level 6 peer 1.2.3.4
1.1.23 reload
Command:
Reload
Function:
Warm reset the switch.
Command mode:
Admin Mode.
Usage Guide:
The user can use this command to restart the switch without power off.
1-58
Page 60
1.1.24 service password-encryption
Command:
service password-encryption
no service password-encryption
Function:
Encrypt system password. The “no service password-encryption” command cancels the encryption.
Command mode:
Global Mode
Default:
No service password-encryption by system default
Usage guide:
The current unencrypted passwords as well as the coming passwords configured by password, enable password, ip
ftp and username command will be encrypted by executed this command. no service password-encryption cancels
this function however encrypted passwords remain unchanged.
Example:
Encrypt system passwords
Switch(config)#service password-encryption
1.1.25 service terminal-length
Command:
service terminal-length <0-512>
no service terminal-length
Function:
Configure the columns of characters displayed in each screen on terminal (vty). The “no service terminal-length”
command cancels the screen shifting operation.
Parameter:
Columns of characters displayed on each screen of vty, ranging between 0-512.
1-59
Page 61
Command mode:
Global Mode
Usage guide:
Configure the columns of characters displayed on each screen of the terminal. The columns of characters displayed
on each screen on the telent.ssh client and the Console will be following this configuration.
Example:
Set the number of vty threads to 20.
Switch(config)#service terminal-length 20
1.1.26 sysContact
Command:
sysContact <LINE>
no sysContact
Function:
Set the factory contact mode, the “no sysContact” command reset the switch to factory settings.
Parameter:
<LINE> is the prompt character string, range from 0 to 255 characters.
Command mode:
Global Mode
Default:
Thefactory settings.
Usage guide:
The user can set the factory contact mode bases the fact instance.
Example:
Set the factory contact mode to test.
Switch(config)#sysContact test
1-60
Page 62
1.1.27 sysLocation
Command:
sysLocation <LINE>
no sysLocation
Function:
Set the factory address, the “no sysLocation” command reset the switch to factory settings.
Parameter:
<LINE> is the prompt character string, range from 0 to 255 characters.
Command mode:
Global Mode
Default:
Thefactory settings.
Usage guide:
The user can set the factory address bases the fact instance.
Example:
Set the factory address to test.
Switch(config)#sysLocation test
1.1.28 set default
Command:
set default
Function:
Reset the switch to factory settings.
Command mode:
Admin Mode.
1-61
Page 63
Usage Guide:
Reset the switch to factory settings. That is to say, all configurations made by the user to the switch will disappear.
When the switch is restarted, the prompt will be the same as when the switch was powered on for the first time.
Note: After the command, “write” command must be executed to save the operation. The switch will reset to factory
settings after restart.
Example:
Switch#set default
Are you sure? [Y/N] = y
Switch#write
Switch#reload
1.1.29 setup
Command:
Setup
Function:
Enter the Setup Mode of the switch.
Command mode:
Admin Mode.
Usage Guide:
Switch provides a Setup Mode, in which the user can configure IP addresses, etc.
1.1.30 show clock
Command:
show clock
Function:
Display the current system clock.
Command mode:
Admin and Configuration Mode.
1-62
Page 64
Usage Guide:
If the system clock is inaccurate, user can adjust the time by examining the system date and clock.
Example:
Switch#show clock
Current time is TUE AUG 22 11:00:01 2002
Command related: clock set
1.1.31 show cpu usage
Command:
show cpu usage [<slotno>]
Function:
Show CPU usage rate.
Command mode:
Admin and configuration mode.
Usage Guide:
Check the current usage of CPU resource by show cpu usage command. Only the chassis switchuses slotno
parameter which is used to show the CPU usage rate of the card on specified slot, if there is no parameter, the
default is current card.
Example:
Show the current usage rate of CPU.
Switch#show cpu usage
Last 5 second CPU IDLE: 87%
Last 30 second CPU IDLE: 89%
Last 5 minute CPU IDLE: 89%
From running CPU IDLE: 89%
1-63
Page 65
1.1.32 show cpu utilization
Command:
show cpu utilization
Function:
Show the current CPU utilization rate.
Parameter:
None.
Default:
None.
Command mode:
Admin mode.
Usage Guide:
This command is used to show CPU utilization rate in the past 5 seconds, 30 seconds and 5 minutes.
Example:
Show CPU utilization rate.
Switch#show cpu utilization
Last 5 second CPU USAGE: 9%
Last 30 second CPU USAGE: 11%
Last 5 minute CPU USAGE: 11%
From running CPU USAGE: 11%
1.1.33 show memory usage
Command:
show memory usage [<slotno>]
Function:
Show memory usage rate.
Command mode:
Admin and configuration mode.
1-64
Page 66
Usage Guide:
Check the current usage of memory resource by show memory usage command. Only the chassis switchuses
slotno parameter which is used to show the memory usage rate of card on the specified slot, if there is no parameter,
the default is current card.
Example:
Show the current usage rate of the memory.
Switch#show memory usage
The memory total 128 MB, free 58914872 bytes, usage is 56.10%
1.1.34 show privilege
Command:
show privilege
Function:
Show privilege of the current users.
Parameter:
None.
Command Mode:
All configuration modes
Example:
Show privilege of the current user.
Switch(Config)#show privilege
Current privilege level is 15
1-65
Page 67
1.1.35 show privilege mode LINE
Command:
show privilege mode LINE
Function:
Show the level of the specified command.
Parameters:
mode: register mode of the command, ‘Tab’ or ‘?’ is able to show all register modes
LINE: the command needs to be configured, it supports the command abbreviation
Command Mode:
Admin and configuration mode
Usage Guide:
LINE must be the whole command format, the abbreviation format is used to the command which can be analyzed
successfully. For half-baked command, false command about writing and command that abbreviation cannot be
analyzed successfully, the level of them cannot be shown.
Example:
Show the level of privilege command.
Switch(config)#show privilege exec show ip route
The command : show ip route
Privilege is : 15
1.1.36 show tech-support
Command:
show tech-support [no-more]
Function:
Display the operational information and the task status of the switch. The technique specialist use this command to
diagnose whether the switch operate normally.
1-66
Page 68
Parameter:
no-more: Display the operational information and the task status of the switch directly, do not connect the user by
“more”.
Command mode:
Admin and Configuration Mode.
Usage Guide:
This command is used to collect the relative information when the switch operation is malfunctioned.
Example:
Switch#show tech-support
1.1.37 show version
Command:
show version
Function:
Display the version information of the switch.
Command mode:
Admin and Configuration Mode.
Usage Guide:
This command is used to show the version of the switch, it includes the hardware version and the software version
Configure local login username and password along with its privilege level.
Parameter:
<username> is the username, its range should not exceed 32 characters. <privilege> is the maximum privilege
level of the commands that the user is able to execute, its value is limited between 1 and 15, and 1 by default.
<password> is the password for the user. If input option 0 on password setting, the password is not encrypted; if
input option 7, the password is encrypted (Use 32 bits password encrypted by MD5).
Command Mode:
Global Mode.
Usage Guide:
There are two available choices for the preferences of the registered commands in the switch. They are 1 and 15.
Preference of 1 is for the commands of the normal user configuration mode. Preference of 15 is for the commands
registered in modes other than the normal user configuration modes. 16 local users at most can be configured
through this command, and the maximum length of the password should be no less than 32.
Notice: The user can log in user and priority after the command configures, before issuing the command
authentication line console login local, it should be made sure that at one user has be configured as preference level
of 15, in order to login the switch and make configuration changes in privileged mode and global mode. If there are
no configured local users with preference level of 15, while only Local authentication is configured for the Console
login method, the switch can be login without any authentication. When using the HTTP method to login the switch,
only users with preference level of 15 can login the switch, users with preference level other than 15 will be denied.
Example:
Configure an administrator account named admin, with the preference level as 15. And configure two normal
accounts with its preference level as 1. Then enable local authentication method.
Above all the configurations, only the admin user is able to login the switch in privileged mode through Telnet or
Console login method, user1 and user2 can only login the switch in normal user mode through the telnet and console
login method. For HTTP login method, only the admin user can pass the authentication configuration, user1 and
user2 will be denied.
Switch(config)#username admin privilege 15 password 0 admin
Switch(config)# username user1 privilege 1 password 7
4a7d1ed414474e4033ac29ccb8653d9b (The password is 32 bits password encrypted by MD5)
Switch(config)# username user2 password 0 user2
Switch(config)# authentication line console login local
1-68
Page 70
1.1.39 web language
Command:
web language {chinese | english}
Function:
Set the language for displaying the HTTP Server information.
Parameter:
chinese for Chinese display; english for English display.
Command mode:
Admin Mode
Default:
The default setting is English display.
Usage Guide:
The user can select the language according to their preference.
1.1.40 write
Command:
Write
Function:
Save the currently configured parameters to the Flash memory.
Command mode:
Admin Mode.
Usage Guide:
After a set of configuration with desired functions, the setting should be saved to the specified configuration file, so
that the system can revert to the saved configuration automatically in the case of accidentally powered off or power
failure. This is the equivalent to the copy running-config startup-config command.
1-69
Page 71
1.1.41 write running-config
Command:
write running-config [<startup-config-file-name>]
Function:
Save the current running config as .cfg file to Flash Memory.
Parameters:
<startup-config-file-name> is the full path of the cfg file. The format of which is as follows:
1. The file path comprises of two parts: device prefix used as the root directory (flash:/) and the file name. No space is
allowed in each part or between two parts.
2. The suffix of all file names should be .cfg.
3. The length of the full file path should not be longer than 128 characters, while the file name cannot be longer than
80 characters.
Command Mode:
Admin Mode.
Usage Guide:
Config file saved by Flash Memory can be used for startup file.
Example:
Save the current running config as .cfg file with name of 123.
Switch#write running-config 123.cfg
1.2 Commands for Telnet
1.2.1 aaa authorization config-commands
Command:
aaa authorization config-commands
no aaa authorization config-commands
Function:
Enable command authorization function for the login user with VTY (login with Telnet and SSH). The no command
disables this function. Only enabling this command and configuring command authorization manner, it will request to
authorize when executing some command.
1-70
Page 72
Default:
Disable.
Command Mode:
Global Mode.
Usage Guide:
Only after configuring this command and configuring command authorization manner and authorization selection
priority of login user with VTY, it can be authorized when configuring command with corresponding command level
authorization line {console | vty | web} exec method [method…]
no authorization line {console | vty | web} exec
Function:
Configure the list of the authorization method for the login user with VTY (login with Telnet and SSH), Web and
Console. The no command restores the default authorization method.
Parameters:
line selects the authorization line, including console, vty (telnet and ssh) and web; method is the list of the
authorization method, it must be among local, tacacs and radius keywords; local uses the local database to
authorize; tacacs uses the remote TACACS+ server to authorize; radius uses the remote RADIUS server to
authorize.
Default:
There is no authorization mode.
Command Mode:
Global Mode.
Usage Guide:
The authorization method for Console, VTY and Web login can be configured respectively. And authorization method
can be any one or combination of Local, RADIUS or TACACS. When login method is configuration in combination,
the preference goes from left to right. If the users have passed the authorization method, authorization method of
lower preferences will be ignored. To be mentioned, if the user receives corresponding protocol’s answer whether
refuse or incept, it will not attempt the next authorization method; it will attempt the next authorization method if it
receives nothing. And AAA function RADIUS server should be configured before the RADIUS configuration method
can be used. And TACACS server should be configured before the TACACS configuration method can be used.
The local users adopt username command permission while authorization command is not configured, the users
login the switch via RADIUS/TACACS method and works under common mode.
Example:
Configure the telnet authorization method to RADIUS.