Preface
1.1 Declaration
This document updates at irregular intervals because of product upgrade or other reason.
This document is for your reference only.
1.2 Suggestion feedback
If you have any questions when using our product and reading this document, please contact us:
Email: support@commandonetworks.com, info@commandonetworks.com
1.3 Audience
This document is for the following audiences:
1.4 Conventions
Command syntax convention table
| Syntax | Description |
|---|---|
| Italic type with capital letters | Use italic type with capital letters for the parameters of the commands. Parameters are the parts which need to replace with the actual value. |
| (x|y|…) | Select one among the choices. |
| (x|y|…|) | Select one or none among the choices. |
| [x|y|…] | Select one or more among the choices. The choices can be selected repeatedly. |
| [x|y|…|] | Select one or more or none among the choices. The choices can be selected repeatedly. |
| {x|y|…} | Select one or more among the choices. The choices can be selected only once. |
| {x|y|…|} | Select one or more or none among the choices. The choices can be selected only once. |
| <x-y> | Select a number between x and y. |
Basic Commands
2.1 System Configuration Commands
2.1.1 hostname
Command Purpose
To specify or modify the host name for the network server, use the “hostname” command in Global Configuration.
To restore the configuration to the default, use the “no hostname” command.
Command Syntax
hostname NAME
no hostname
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| NAME | New host name for the network server | Host name is a string with 1-63 characters |
Command Mode
Global Configuration
Default
The default host name is Switch.
Usage
The host name is used in prompts and default configuration filenames.
The name must also follow the rules for ARPANET host names. They have as interior characters only letters, digits, hyphens, and underline. Names must be 64 characters or fewer.
Examples
The following example changes the host name to “sandbox”:
Switch# configure terminal
Switch(config)# hostname sandbox
sandbox(config)#
Related Commands
None
2.1.2 management ip address
Command Purpose
Use this command to set the management IP address on the Switch.
To remove the management IP address, use the no form of this command.
Command Syntax
management ip address ( A.B.C.D/M | A.B.C.D mask ) ( gateway A.B.C.D | )
no management ip address
management ipv6 address ( X:X::X:X/M | X:X::X:X mask ) ( gateway X:X::X:X | )
no management ipv6address
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| A.B.C.D/M | The management IPv4 address with mask length configured | IPv4 address with mask length 1-32 |
| A.B.C.D mask | The management IPv4 address and mask configured | IPv4 address and mask |
| X:X::X:X/M | The management IPv6 address with mask length configured | IPv4 address with mask length 1-128 |
| X:X::X:X mask | The management IPv6 address and mask configured | IPv6 address and mask |
| gateway A.B.C.D | Add IPv4 gateway | IPv4 address |
| gateway X:X::X:X | Add IPv6 gateway | IPv6 address |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example sets the management ipv4 address:
Switch# configure terminal
Switch(config)# management ip address 192.168.100.100/24
The following example unsets the management ipv4 address:
Switch# configure terminal
Switch(config)# no management ip address
The following example sets the management ipv6 address:
Switch# configure terminal
Switch(config)# management ipv6 address 2001:1000::1000/96
The following example unsets the management ipv6 address:
Switch# configure terminal
Switch(config)# no management ipv6 address
Related Commands
None
2.1.3 management route
Command Purpose
Use this command to set the gateway on the Switch for management ip.
Command Syntax
management route ( add | del ) gateway A.B.C.D
management ipv6 route ( add | del ) gateway X:X::X:X
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| add | Add the route | - |
| del | Del the route | - |
| ipv6 | Configure IPv6 gateway | - |
| gateway | Add gateway | - |
| A.B.C.D | The IPv4 address of the gateway | IPv4 address |
| X:X::X:X | The IPv6 address of the gateway | IPv6 address |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example sets the gateway of 192.168.100.254 for the switch:
Switch# configure terminal
Switch(config)# management route add gateway 192.168.100.254
The following example sets the gateway of 200110001 for the switch:
Switch# configure terminal
Switch(config)# management ipv6 route add gateway 2001:1000::1
Related Commands
None
2.1.4 show management arp
Command Purpose
Use This command to show the ARP of the management port.
Command Syntax
show management arp
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows the ARP of the management port:
Switch# show management arp
Address Hardware Addr Interface
----------------+--------------------+----------
10.10.39.241 24:6e:96:62:3f:c4 mgmt-if
10.10.39.254 00:1e:08:09:67:6d mgmt-if
Related Commands
None
2.1.5 Show Management IP Address
Command Purpose
Use This command to show the IP address of the management port.
Command Syntax
show management ip address
show management ipv6 address
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows the IP address of the management port:
Switch# show management ip address
Management IP address is: 192.168.100.100/24
Gateway: 192.168.100.254
Switch# show management ipv6 address
Management IPv6 address is: 2001:1000::1000/96
Gateway: 2001:1000::1
Related Commands
None
2.1.6 show management interface
Command Purpose
Use this command to display the configurations and statistics on management interface.
Command Syntax
show management interface
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows how to display the configurations and statistics on management interface:
Switch# show management interface
Management Interface current state: DOWN
Description:
Link encap: Ethernet HWaddr: 94:EB:AB:88:2A:B4
Inet addr: 192.168.100.102 Mask: 255.255.255.0
Bcast: 192.168.100.255 MTU: 1500
Speed: 10 Duplex: Half
Auto-negotiation: Enable
Received: 2 Packets, 128 Bytes (128.0 b)
Transmitted: 1 Packets, 78 Bytes (78.0 b)
Related Commands
clear counters mgmt-if
2.1.7 clear counters mgmt-if
Command Purpose
Use this command to clear statistics counters on management interface.
Command Syntax
clear counters mgmt-if
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows how to clear statistics counters on management interface:
Switch# clear counters mgmt-if
Related Commands
None
2.1.8 enable password
Command Purpose
Use this command to set the password which is needed when user enter Privileged EXEC mode.
Command Syntax
enable password ( privilege LEVEL | ) ( 8 | ) LINE
no enable password
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| Privilege LEVEL | User privilege level | Level value <1-4> |
| 8 | Specifies a hidden password will follow | - |
| LINE | The password string | - |
Command Mode
Global Configuration
Default
None
Usage
If this command is set, user need to provide the password when enter Privileged EXEC mode.
Examples
The following example shows how to set the password:
Switch# configure terminal
Switch(config)# enable password 123
Switch(config)# exit
Switch# disable
Switch> enable
Password:
Switch#
Related Commands
None
2.1.9 terminal length
Command Purpose
To set the number of lines on the current terminal screen for the current session, use the terminal length command in EXEC mode. To restore the configuration to the default, use the no form of this command.
Command Syntax
terminal length LENGTH
terminal no length
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LENGTH | Number of lines on the screen | The value is a number from 0 to 512. A value of zero disables pausing between screens of output |
Command Mode
Privileged EXEC
Default
Automatically detected by terminal screen length by default
Usage
The system uses the length value to determine when to pause during multiple-screen output. A value of zero prevents the switch from pausing between screens of output.
Some types of terminal sessions do not require you to specify the screen length because the screen length specified can be learned by some remote hosts. For example, the rlogin protocol uses the screen length to set up terminal parameters on a remote UNIX host.
Examples
In the following example, the system is configured to prevent output from pausing if it exceeds the length of the screen:
Switch# terminal length 0
Related Commands
service terminal-length
2.1.10 service terminal-length
Command Purpose
To set the number of lines on the current terminal screen for all sessions, use the service terminal-length command in Global Configuration. To restore the configuration to the default, use the no form of this command.
Command Syntax
service terminal-length LENGTH
no service terminal-length
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LENGTH | Number of lines on the screen | The value is a number from 0 to 512. A value of zero disables pausing between screens of output |
Command Mode
Global Configuration
Default
None
Usage
The system uses the length value to determine when to pause during multiple-screen output. A value of zero prevents the switch from pausing between screens of output.
Some types of terminal sessions do not require you to specify the screen length because the screen length specified can be learned by some remote hosts. For example, the rlogin protocol uses the screen length to set up terminal parameters on a remote UNIX host.
Examples
In the following example, the system is configured to prevent output from pausing if it exceeds the length of the screen:
Switch# configure terminal
Switch(config)# service terminal-length 0
Related Commands
terminal length
2.1.11 banner motd
Command Purpose
To set a single or multiline message banner that appears on the screen when someone logs in to the switch, use the banner motd command in Global Configuration. To restore the configuration to the default, use the no form of this command.
Command Syntax
banner motd line
no banner motd
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LINE | message string | specify a visible character as delimiting character, enter the message between 2 delimiting characters. At most support 99 lines with 1023 character in each line |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example shows how to set a single message banner:
Switch# configure terminal
Switch(config)# banner motd #
Enter TEXT message. End with the character '#'.
this is a example message#
Related Commands
banner exec
banner login
2.1.12 banner exec
Command Purpose
To set an exec banner to be displayed on all connected terminals and this banner appears when terminal in Privileged EXEC mode, use the banner motd command in Global Configuration. To restore the configuration to the default, use the no form of this command.
Command Syntax
banner exec line
no banner exec
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LINE | message string | specify a visible character as delimiting character, enter the message between 2 delimiting characters. At most support 99 lines with 1023 character in each line |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example shows how to set a single message banner:
Switch# configure terminal
Switch(config)# banner exec #
Enter TEXT message. End with the character '#'.
this is a example message#
Related Commands
banner motd
banner login
2.1.13 banner login
Command Purpose
To set a login banner to be displayed on all connected terminals, and this banner appears after the MOTD banner and before the login prompt, use the banner motd command in Global Configuration. To restore the configuration to the default, use the no form of this command.
Command Syntax
banner login line
no banner login
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LINE | message string | specify a visible character as delimiting character, enter the message between 2 delimiting characters. At most support 99 lines with 1023 character in each line |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example shows how to set a single message banner:
Switch# configure terminal
Switch(config)# banner login #
Enter TEXT message. End with the character '#'.
this is a example message#
Related Commands
banner exec
banner motd
2.1.14 show version
Command Purpose
To display the version information of the hardware and firmware, use the show version command in EXEC mode.
Command Syntax
show version ( slot ID | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| ID | slot id | 1-29 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows how to display version information of the hardware and firmware:
Switch# show version
Switch# show version
NetworkOS Software, Switch, Version 5.3.8.5
Copyright (C) 2018 Switch Vendor Inc. All rights reserved.
The current running image is flash:/boot/uImage.p1010.48t4x.r_20181115
Switch uptime is 0 days, 19 hours, 8 minutes
Hardware Type is 52TX
Hardware Version is 1.1
SDRAM size 2048M
Flash size 2048M
EPLD Version is 2.1
BootRom Version is 6.1.2
System serial number is E101ZB14202C
Current Web Version is 5.3.8.3
Related Commands
None
2.1.15 line vty
Command Purpose
To set the max login VTY, use this command in Global Configuration. To restore the configuration to the default, use the no form of this command.
Command Syntax
line vty maximum MAX_VTY
no line vty maximum
line vty VTY
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| MAX_VTY | Max login VTY | The default value is 8.range <0-8> |
| VTY | Number of VTY | Range <0-7> |
Command Mode
Global Configuration
Default
8
Usage
None
Examples
The following example shows how to set the max VTY to 5:
Switch# configure terminal
Switch(config)# line vty maximum 5
The following example shows how to enter Line Configuration mode:
Switch# configure terminal
Switch(config)# line vty 2
Related Commands
None
2.1.16 exec-timeout
Command Purpose
To set how much time the login user do not do any operation then the user should be forced to quit, use the no form of this command.
Command Syntax
exec-timeout MINUTES SECONDS
no exec-timeout
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| MINUTES | Timeout in minute | Range <0-35791> |
| SECONDS | Timeout in second | Range <0-2147483> |
Command Mode
Line Configuration
Default
600 seconds
Usage
When the user login again then config will be effected
Examples
The following example shows how to set max time the login user do not do any operation then the user should be forced to quit:
Switch# configure terminal
Switch(config)# line vty 0
Swicth(config-line)# exec-timeout 3 200
Related Commands
None
2.1.17 access-class
Command Purpose
To apply IPv4 ACL on line vty. To restore to default, use the no form of this command.
Command Syntax
access-class ACL-NAME in
no access-class in
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| ACL-NAME | The name of the IPv4 acl | A string with up to 40 characters |
Command Mode
Line Configuration
Default
No ACL
Usage
If an ACL be applied to line VTY, none of the entries in the ACL will be matched except for IP address and port number.
Examples
The following example shows how to apply IPv4 ACL on vty:
Switch(config-line)# access-class acl4 in
Related Commands
ip access-list
2.1.18 ipv6 access-class
Command Purpose
To apply IPv6 ACL on line vty. To restore to default, use the no form of this command.
Command Syntax
ipv6 access-class ACL-NAME in
no ipv6 access-class in
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| ACL-NAME | The name of the IPv6 acl | A string with up to 40 characters |
Command Mode
Line Configuration
Default
No ACL
Usage
If an ACL be applied to line VTY, none of the entries in the ACL will be matched except for IP address and port number.
Examples
The following example shows how to apply IPv6 ACL on vty:
Switch(config-line)# ipv6 access-class aclv6 in
Related Commands
ipv6 access-list
2.1.19 reboot
Command Purpose
To reload the operating system, use the reload command in Privileged EXEC mode.
Command Syntax
reboot
Command Mode
Privileged EXEC
Default
None
Usage
The reboot command halts the system. Use the reboot command after configuration information is entered into a file and saved to the startup configuration.
Examples
The following example is sample dialog from the reboot command:
Switch# reboot
Related Commands
reload
2.1.20 schedule reboot at
Command Purpose
To schedule a reload of the software to take place at the specified time, use the schedule reboot at command in Global Configuration. To cancel the scheduled reboot task, use the no form of this command.
Command Syntax
schedule reboot at HH:MM ( MM/DD | MM/DD/YYYY | YYYY/MM/DD )
no schedule reboot
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| HH:MM | The hour and minutes | The time range is 00:00 – 23:59 |
| MM/DD | Specify the date for current year (MM/DD format) | date range is [1/1, 12/31] |
| MM/DD/YYYY | Specify the date (MM/DD/YYYY format, year range is [2000, 2037]) | year range is [2000, 2037] |
| YYYY/MM/DD | Specify the date (YYYY/MM/DD format ) | year range is [2000, 2037] |
Command Mode
Global Configuration
Default
No scheduled reboot task is defined.
Usage
If you specify the month and day, the reload is scheduled to take place at the specified time and date. If you do not specify the month and day, the reload takes place at the specified time on the current day.
Examples
The following example is sample dialog from the schedule reboot at command:
Switch# configure terminal
Switch(config)# schedule reboot at 12:12 2008/12/25
Related Commands
schedule reboot delay
2.1.21 schedule reboot delay
Command Purpose
To schedule a reload of the software to take place after the specified time, use the schedule reboot delay command in Global Configuration. To cancel the scheduled reboot task, use the no form of this command.
Command Syntax
schedule reboot delay { HH:MM | MINUTES }
no schedule reboot
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| HH:MM | The hour and minutes | The time range is 00:00 – 23:59 |
| MINUTES | The minutes | The range is 1-720 |
Command Mode
Global Configuration
Default
No scheduled reboot task is defined.
Usage
None
Examples
The following example is sample dialog from the schedule reboot delay command:
Switch# configure terminal
Switch(config)# schedule reboot delay 300
Related Commands
schedule reboot at
2.1.22 boot system
Command Purpose
To specify the system image that the switch loads at startup, use the following boot system commands in Privileged EXEC mode.
Command Syntax
boot system ( tftp: mgmt-if SERVERIP | flash:/ ) FILE_NAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| flash:/ | System image file for next booting | - |
| tftp | System image file for next booting | - |
| mgmt-if | Management port | - |
| SERVERIP | The tftp server ip | - |
| FILE_NAME | The file name that will be used to load at startup | The full path and file name ,up to 255 characters |
Command Mode
Privileged EXEC
Default
None
Usage
Management IP address in startup-config file will be used as source address when system boot via TFTP.
Examples
The following example is sample dialog from the boot system command:
Switch# boot system flash:/boot/Internal-1.0.0.25.bin
Related Commands
show boot
2.1.23 show boot
Command Purpose
To display the current image and the image the next startup will load, use the show boot command in Privileged EXEC mode.
Command Syntax
show boot
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show boot command:
Switch# show boot
The current boot image version is: E330-3.0.0.23.it
The current running image is: tftp://10.10.29.160/humberOS-e330-ma-v3.0.0.23.it.r.bin
The next running image is: tftp://10.10.29.160/humberOS-e330-ma-v3.0.0.23.it.r.bin
Related Commands
show boot images
2.1.24 show boot images
Command Purpose
To display all booting images available in the flash system, use the show boot images command in Privileged EXEC mode.
Command Syntax
show boot images
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show boot images command:
Switch# show boot images
System image files list:
Current boot image version: 1.0.0.25
Create Time Version File name
===============================================================
* 2011-07-25 10:58:29 v3.0.0.22it Internal-.00.22.bin
show boot
2.1.25 show memory
Command Purpose
To display memory utilization information about the active processes, use the show memory command in Privileged EXEC mode.
Command Syntax
show memory ( all | bgp | bhm | chsm | dhclient | dot1x | imi | ipv6 | lacp | ldp | lib | mstp | nsm | oamd | onmd | ospf | pim | ptp | rip | rsvp | shal | summary )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| all | All memory information | - |
| bgp | Border Gateway Protocol (BGP) | - |
| bhm | Health monitoring | - |
| chsm | Chassis management | - |
| dhclient | DHCP client module | - |
| dhcpd | DHCP | - |
| dhcprelay | DHCP relay | - |
| dhcprelay6 | DHCP relay6(IPv6) | - |
| dot1x | IEEE 802.1X Port-Based Access Control | - |
| imi | Integrated Management Interface (IMI) | - |
| ipv6 | Internet Protocol version 6 (IPv6) | - |
| lacp | Link Aggregation Control Protocol (LACP) | - |
| ldp | Label Distribution Protocol (LDP) | - |
| lib | Library information | - |
| mstp | Spanning Tree Protocols (STP/RSTP/MSTP) | - |
| nsm | Network Service Module (NSM) | - |
| oamd | Bidirectional Forwarding Detection (BFD) | - |
| onmd | LLDP and EFM_OAM | - |
| ospf | Open Shortest Path First (OSPF) | - |
| pim | Protocol Independent Multicast (PIM) | - |
| ptp | Precision Time Protocol (PTP) | - |
| rip | Routing Information Protocol (RIP) | - |
| rsvp | Resource Reservation Protocol (RSVP) | - |
| shal | Hal server monitoring | - |
| summary | Summary memory information | - |
| monitor | monitor | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show memory command with keyword bgp:
Switch# show memory bgp
Library memories for BGP
Memory type Alloc cells Alloc bytes
============================== ============ ==============
Temporary memory : 6596 322216
Hash : 10 320
Hash index : 10 40960
Hash bucket : 55 880
Link list : 13 400
Link list node : 115 1840
Show : 1 512
Show page : 1 8192
Show server : 1 64
Prefix IPv4 : 6 48
Route table : 6 48
Route node : 309 19776
Vector : 3383 324768
Vector index : 3383 48824
SNMP subtree : 8 6144
Host config : 1 16
Message of The Day : 1 128
IMI Client : 2 1056
VTY master : 1 16
VTY if : 52 39936
VTY connected : 3 192
Message handler : 2 128
Host : 1 96
Log information : 2 128
Context : 1 512
Memories for BGP
Memory type Alloc cells Alloc bytes
============================== ============= ===============
BGP structure : 1 768
BGP VR structure : 1 384
BGP global structure : 1 64
BGP peer : 1 2048
Ext community : 1 16
BGP as list master : 1 32
Community list handler : 1 32
BGP Damp Reuse List Array : 1 2048
BGP table : 31 248
BGP VRF list : 1 64
Related Commands
show processes memory sorted
2.1.26 show cpu traffic-limit
Command Purpose
Use this command to show the CPU traffic-limit configurations.
Command Syntax
show cpu traffic-limit
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show cpu traffic-limit :
Switch# show cpu traffic-limit
reason rate (pps) class
bpdu 64 3
cfm 512 2
slow-protocol 128 1
eapol 128 0
erps 128 2
smart-link 128 2
udld 128 3
arp 640 1
dhcp 128 0
rip 64 1
ldp 512 1
ospf 256 1
pim 128 1
vrrp 512 1
rsvp 512 1
ipda 1024 0
icmp-redirect 128 0
mcast-rpf-fail 128 1
macsa-mismatch 128 0
port-security-discard 128 0
vlan-security-discard 128 0
mtu-dontfrag 64 0
mtu-frag 64 0
ptp 512 2
ip-option 512 0
ucast-ttl-fail 64 0
mpls-ttl-fail 64 0
igmp 128 2
sflow-ingress 128 0
sflow-egress 128 0
fwd-to-cpu 64 0
mpls-tp-pwoam 128 2
Total rate: 2048 (pps)
Related Commands
None
2.1.27 show processes cpu sorted
Command Purpose
To display CPU utilization information about the active processes sorted by percentage in a device, use the show processes cpu sorted command in Privileged EXEC mode.
Command Syntax
show process cpu sorted
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show process cpu sorted :
Switch# show processes cpu sorted
PID TIME %CPU TTY COMMAND
924 00:20:03 2.0 ? hsrvd
956 00:07:17 0.7 ? nsm
1007 00:02:44 0.2 ? imi
959 00:01:24 0.1 ? snmpd
1317 00:00:01 0.1 pts/0 imish
5 00:00:45 0.0 ? events/0
983 00:00:23 0.0 ? mstpd
985 00:00:15 0.0 ? onmd
966 00:00:15 0.0 ? lacpd
963 00:00:12 0.0 ? bhm
929 00:00:12 0.0 ? chsm
964 00:00:11 0.0 ? oamd
919 00:00:10 0.0 ? ntpd
1003 00:00:08 0.0 ? pimd
942 00:00:08 0.0 ? sshd
957 00:00:08 0.0 ? dhcrelay
973 00:00:07 0.0 ? authd
1005 00:00:07 0.0 ? ldpd
977 00:00:07 0.0 ? rmond
1021 00:00:07 0.0 ? ripd
1027 00:00:07 0.0 ? ospfd
1032 00:00:07 0.0 ? bgpd
1 00:00:05 0.0 ? init
779 00:00:04 0.0 ? jffs2_gcd_mtd1
1106 00:00:01 0.0 ? imish
3 00:00:00 0.0 ? ksoftirqd/0
916 00:00:00 0.0 ? syslog-ng
65 00:00:00 0.0 ? bdi-default
965 00:00:00 0.0 ? ptpd
917 00:00:00 0.0 ? crond
63 00:00:00 0.0 ? sync_supers
1096 00:00:00 0.0 ? telnetd
6 00:00:00 0.0 ? khelper
105 00:00:00 0.0 ? khungtaskd
2 00:00:00 0.0 ? kthreadd
4 00:00:00 0.0 ? watchdog/0
9 00:00:00 0.0 ? netns
10 00:00:00 0.0 ? async/mgr
66 00:00:00 0.0 ? kblockd/0
73 00:00:00 0.0 ? kseriod
88 00:00:00 0.0 ? rpciod/0
106 00:00:00 0.0 ? kswapd0
157 00:00:00 0.0 ? aio/0
164 00:00:00 0.0 ? nfsiod
171 00:00:00 0.0 ? crypto/0
712 00:00:00 0.0 ? mtdblockd
741 00:00:00 0.0 ? kpsmoused
789 00:00:00 0.0 ? PETH/Tx
912 00:00:00 0.0 ? angel
1098 00:00:00 0.0 ? telnetd
1414 00:00:00 0.0 pts/0 imish
1415 00:00:00 0.0 pts/0 more
1416 00:00:00 0.0 ? ps
Related Commands
None
2.1.28 show processes cpu history
Command Purpose
To display CPU utilization information for a period of time, use the show processes cpu history command in Privileged EXEC mode, the period of 1s, 1min, 5min could be shown.
Command Syntax
show process cpu history
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show processes cpu history command:
Switch# show processes cpu history
CPU usage for five seconds: 4.17%; one minute: 3.70%; five minutes: 3.68%
None
2.1.29 show processes memory sorted
Command Purpose
To display memory utilization information about the active processes sorted by percentage in a device, use the show processes memory sorted command in Privileged EXEC mode. Here, CPU usage for each process means the CPU timeslice used by this process from the process was started to this command has been operated.
Command Syntax
show processes memory sorted ( core | physical | virtual )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| core | Size in physical pages of the core image of the process | - |
| physical | Non-swapped physical memory that a task has used | - |
| virtual | Virtual memory usage of entire process | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show processes memory sorted command without keywords:
Switch# show processes memory sorted
Total: 256108; Used: 89644; Free: 166464; Buffers: 0
PID TTY RSS VSZ SZ COMMAND
1317 pts/0 9516 13104 3276 imish
1106 ? 9428 13104 3276 imish
1463 pts/0 7436 13104 3276 imish
956 ? 6836 14644 3661 nsm
1007 ? 5948 9624 2406 imi
924 ? 5912 17652 4413 hsrvd
959 ? 3336 8076 2019 snmpd
1032 ? 2724 8204 2051bgpd
1027 ? 2488 7140 1785 ospfd
1003 ? 2472 7152 1788 pimd
957 ? 2340 6572 1643 dhcrelay
983 ? 2336 6592 1648 mstpd
1021 ? 2324 6600 1650 ripd
1005 ? 2320 6732 1683 ldpd
942 ? 2284 6772 1693 sshd
985 ? 2208 6592 1648 onmd
929 ? 2132 7168 1792 chsm
966 ? 2028 6140 1535 lacpd
973 ? 2028 6284 1571 authd
965 ? 2024 6408 1602 ptpd
964 ? 1952 6364 1591 oamd
977 ? 1948 6200 1550 rmond
963 ? 1708 5980 1495 bhm
919 ? 1120 3792 948 ntpd
916 ? 1060 2300 575 syslog-ng
1465 pts/0 764 2516 629 ps
917 ? 668 3040 760 crond
1 ? 656 2928 732 init
1464 pts/0 472 1668 417 more
1096 ? 416 2928 732 telnetd
1098 ? 272 2928 732 telnetd
912 ? 172 1496 374 angel
2 ? 0 0 0 kthreadd
3 ? 0 0 0 ksoftirqd/0
4 ? 0 0 0 watchdog/0
5 ? 0 0 0 events/0
6 ? 0 0 0 khelper
9 ? 0 0 0 netns
10 ? 0 0 0 async/mgr
63 ? 0 0 0 sync_supers
65 ? 0 0 0 bdi-default
66 ? 0 0 0 kblockd/0
73 ? 0 0 0 kseriod
88 ? 0 0 0 rpciod/0
105 ? 0 0 0 khungtaskd
106 ? 0 0 0 kswapd0
157 ? 0 0 0 aio/0
164 ? 0 0 0 nfsiod
171 ? 0 0 0 crypto/0
712 ? 0 0 0 mtdblockd
741 ? 0 0 0 kpsmoused
779 ? 0 0 0 jffs2_gcd_mtd1
789 ? 0 0 0 PETH/Tx
Related Commands
None
2.1.30 terminal monitor
Command Purpose
To copy debug output to the current terminal line, use the terminal monitor command in Privileged EXEC mode.
Command Syntax
terminal monitor
terminal no monitor
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the terminal monitor command:
Switch# terminal monitor
Jan 1 16:09:30 DUT1 IMISH-6: ready to service
Related Commands
None
2.1.31 configure terminal
Command Purpose
To enter Global Configuration, use configure terminal command in Privileged EXEC mode.
Command Syntax
configure terminal
Command Mode
Privileged EXEC
Default
None
Usage
Use this command to enter Global Configuration. Note that commands in this mode are written to the running configuration file as soon as you enter them (using the Enter key/Carriage Return).
After you enter the configure command, the system prompt changes from # to (config)#, indicating that the switch is in Global Configuration. To leave Global Configuration and return to Privileged EXEC mode, type end or press Ctrl-Z.
Examples
In the following example, the user enters Global Configuration:
Switch# configure terminal
Switch(config)#
Enter configuration commands , one per line. End with CNTL/Z.
Switch(config)#
Related Commands
enable
disable
2.1.32 disable
Command Purpose
To exit Privileged EXEC mode and return to user EXEC mode, enter the disable command in EXEC mode.
Command Syntax
disable
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
In the following example, the user enters Privileged EXEC mode using the enable command, then exits back to user EXEC mode using the disable command. Note that the prompt for user EXEC mode is >, and the prompt for Privileged EXEC mode is #:
Switch# configure terminal
Switch> enable
Password:
Switch# disable
Switch>
Related Commands
enable
2.1.33 enable
Command Purpose
To enter Privileged EXEC mod, use the enable command in user EXEC or Privileged EXEC mode.
Command Syntax
enable
Command Mode
User EXEC
Privileged EXEC
Default
None
Usage
None
Examples
In the following example, the user enters Privileged EXEC mode using the enable command. The system prompts the user for a password before allowing access to the Privileged EXEC mode. The password is not printed to the screen. The user then exits back to user EXEC mode using the disable command. Note that the prompt for user EXEC mode is the greater than symbol (>), and the prompt for Privileged EXEC mode is the number sign (#).:
Switch# configure terminal
Switch> enable
Password:
Switch# disable
Switch>
Related Commands
disable
2.1.34 end
Command Purpose
To end the current configuration session and return to Privileged EXEC mode, use the end command in Global Configuration.
Command Syntax
end
Command Mode
Global Configuration
Default
None
Usage
This command will bring you back to Privileged EXEC mode regardless of what configuration mode or configuration sub-mode you are in.
This global configuration command can be used in any configuration mode.
Use this command when you are done configuring the system and you want to return to EXEC mode to perform verification steps.
Examples
In the following example, the end command is used to exit from interface configuration mode and return to Privileged EXEC mode. A show command is used in Privileged EXEC mode to verify the configuration:
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# end
Switch# show interface eth-0-1
Related Commands
exit
2.1.35 exit (global)
Command Purpose
To exit any configuration mode to the lower mode in the CLI mode hierarchy, use the exit command in any configuration mode.
Command Syntax
exit
Command Mode
All Configuration Mode
Default
None
Usage
The exit command is used in the CLI to exit from the current command mode to the lower mode in the CLI mode hierarchy.
For example, use the exit command in Global Configuration to return to Privileged EXEC mode. Use the exit command in interface, line, or router configuration mode to return to Global Configuration.
Examples
The following example displays an exit from the interface configuration mode to return to the Global Configuration:
Switch# configure terminal
Switch(config-if)# exit
Switch(config)#
Related Commands
end
exit (EXEC)
2.1.36 exit (EXEC)
Command Purpose
To close an active terminal session by logging off the switch, use the exit command in EXEC mode.
Command Syntax
exit
Command Mode
Privileged EXEC
Default
None
Usage
Use the exit command in EXEC mode to exit the active session (log off the device). This command can be used in any EXEC mode (such as User EXEC mode or Privileged EXEC mode) to exit from the EXEC process.
Examples
In the following example, the exit (global) command is used to move from Global Configuration to Privileged EXEC mode, the disable command is used to move from Privileged EXEC mode to user EXEC mode, and the exit (EXEC) command is used to log off (exit the active session):
Switch# configure terminal
Switch(config)# exit
Switch# disable
Switch> exit
Related Commands
quit
2.1.37 quit
Command Purpose
To close an active terminal session by logging off the switch, use the quit command in EXEC mode.
Command Syntax
quit
Command Mode
All Configuration Mode
Default
None
Usage
Use the quit command in EXEC mode to exit the active session (log off the device). This command can be used in any EXEC mode (such as User EXEC mode or Privileged EXEC mode) to exit from the EXEC process.
Examples
In the following example, the quit command is used to move from Global Configuration to Privileged EXEC mode, the disable command is used to move from Privileged EXEC mode to user EXEC mode, and the quit command is used to log off (exit the active session):
Switch# configure terminal
Switch(config)# quit
Switch# disable
Switch> quit
Related Commands
exit
2.1.38 cd
Command Purpose
Change the current directory to dir, use the cd command in EXEC mode.
Command Syntax
cd ( dir | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| dir | (Optional) The directory or file systems followed by a colon. If flash: argument is specified, change the current directory to flash: . If udisk: argument is specified, change the current directory to udisk:. If you don’t use USB device, failed to cd udisk | - |
Command Mode
Privileged EXEC
Default
The initial default file system is flash:. If you do not specify a directory on a file system, the default is the root directory on that file system.
Usage
For all EXEC commands that have an optional file system argument, the system uses the file system specified by the cd command when you omit the optional file system argument. For example, the dir EXEC command, which displays a list of files on a file system, contain an optional file system argument. When you omit this argument, the system lists the files on the file system specified by the cd command.
Examples
In the following example, the cd command is used to set the default file system to the Flash memory.:
Switch# configure terminal
DUT1# cd
DUT1# pwd
flash:/
In the following example, the cd command is used to set the default file system to the USB device:
Switch# configure terminal
storage device
DUT1# cd udisk:
DUT1# pwd
udisk:/
In the following example, the cd command is used to set the file system without plug in the USB mass storage device:
Switch# cd udisk:
% Failed to cd udisk:: No such file or directory
In the following example, the cd command is used to set the file system with plug in the USB mass storage device
Related Commands
dir
ls
pwd
2.1.39 copy
Command Purpose
To copy file system, use the copy command in Privileged EXEC mode.
Command Syntax
copy source-name destination-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| source-name | The location URL of the source file to be copied. The source can be either local or remote | - |
| destination-name | The destination URL of the copied file. The destination can be either local or remote | - |
Command Mode
Privileged EXEC
Default
None
Usage
The exact format of the source and destination URLs varies according to the file or directory location. You may enter a particular file or a filename that follows the standard file system syntax (filesystem:[/filepath][/filename]).
Examples
The following example shows how to get image from TFTP server through in band management interface.:
Switch# copy tftp://192.168.0.1/image flash:/boot/image
Download from URL to temporary file.
Get file from tftp://192.168.0.1/image
..............................................................................................................
Received 15591515 bytes in 16.6 seconds
Copy the temporary file to its destination.
..............................................................................................................
15591515 bytes in 69.8 seconds, 218 kbytes/second
The following example shows how to get image from TFTP server through out band management interface:
Switch# copy mgmt-if tftp://192.168.0.1/image flash:/boot/image
Related Commands
delete
2.1.40 delete
Command Purpose
To delete a file on the flash, use the delete command in Privileged EXEC mode.
Command Syntax
delete file-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| file-name | The file name that is supposed to be deleted | - |
Command Mode
Privileged EXEC
Default
None
Usage
If you attempt to delete the configuration file or image, the system prompts you to confirm the deletion. Also, if you attempt to delete the system specified file such as DHCP snooping bindings, the system prompts you to confirm the deletion.
Examples
The following example deletes the file named test from the flash:
Switch# delete flash:/test
Are you sure to delete flash:/test? [confirm]:y
Related Commands
copy
2.1.41 dir
Command Purpose
To display a list of files on a file system, use the dir command in EXEC mode.
Command Syntax
dir ( flash: | udisk: | ) ( directory-name | ) ( file-name | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| flash | The flash system | - |
| udisk | The USB mass storage device. If you don’t use USB mass storage device, failed to dir udisk | - |
| directory-name | The directory in flash or udisk | - |
| file-name | The file name | - |
Command Mode
Privileged EXEC
Default
None
Usage
Use the dir (Flash file system) command to display flash or udisk information.
Examples
The following is sample output from the dir command.:
Switch# dir
Directory of flash:/
total 42
drwxr-xr-x 2 0 Jul 30 15:42 boot
drwxr-xr-x 3 0 Jan 1 1970 conf
drwxr-xr-x 2 0 Jan 1 1970 log
-rw-r----- 1 1020 Jul 29 19:18 startup-config.conf
-rw-r--r-- 1 10270 Jul 30 10:10 syslog
-rw-r--r-- 1 6886 Jul 29 23:59 syslog.1.gz
63.0M bytes total (30.4M bytes free)
Switch # cd udisk:
Switch # dir
Directory of udisk:/
total 12
drwxrwxrwx 2 4096 Jun 2 2011test
drwxrwxrwx 2 4096 Jun 8 2011test1
drwxrwxrwx 2 4096 Jun 7 2011test2
3.7G bytes total (3.7G bytes free)
The following is sample output from udisk if plug in the USB mass storage device.:
Switch# cd udisk:
Switch# dir
Directory of udisk:/
total 12
drwxrwxrwx 2 4096 Jun 2 2011 test
drwxrwxrwx 2 4096 Jun 8 2011 test1
drwxrwxrwx 2 4096 Jun 7 2011 test2
3.7G bytes total (3.7G bytes free)
Related Commands
ls
2.1.42 ls
Command Purpose
To display a list of files on a file system, use the ls command in EXEC mode.
Command Syntax
ls ( flash: | udisk: | ) ( directory-name | ) ( file-name | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| flash | The flash system | - |
| udisk | The USB mass storage device. If you don’t use USB mass storage device, failed to dir udisk | - |
| directory-name | The directory in flash or udisk | - |
| file-name | The file name | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the ls command:
Switch# ls
Directory of flash:/
total 42
drwxr-xr-x 2 0 Jul 30 15:42 boot
drwxr-xr-x 3 0 Jan 1 1970 conf
drwxr-xr-x 2 0 Jan 1 1970 log
-rw-r----- 1 1020 Jul 29 19:18 startup-config.conf
-rw-r--r-- 1 10270 Jul 30 10:10 syslog
-rw-r--r-- 1 6886 Jul 29 23:59 syslog.1.gz
63.0M bytes total (30.4M bytes free)
Related Commands
dir
2.1.43 more
Command Purpose
To display the contents of a file, use the more command in EXEC mode.
Command Syntax
more ( flash: | udisk: ) ( directory-name | ) file-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| flash | The flash system | - |
| udisk | The USB mass storage device. If you don’t use USB mass storage device, failed to dir udisk | - |
| directory-name | The directory in flash or udisk | - |
| file-name | The file name | - |
Command Mode
Privileged EXEC
Default
None
Usage
The system can only display a file in ASCII format.
Examples
The following partial sample output displays the configuration file named startup-config in flash:
Switch# more flash:/startup-config.conf
Related Commands
dir
ls
2.1.44 mkdir
Command Purpose
To create a new directory in a Flash file system or udisk device, use the mkdir command in EXEC mode.
Command Syntax
mkdir directory-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| directory-name | The directory in flash or udisk | - |
Command Mode
Privileged EXEC
Default
None
Usage
This command is valid only for local file systems.
Examples
The following example creates a directory named newdir in Flash.:
Switch# mkdir flash:/newdir
The following example creates a directory named newdir in USB mass storage device if plug in it:
Switch# mkdir udisk:/newdir
Related Commands
rmdir
dir
2.1.45 rename
Command Purpose
To rename a file in a Class C Flash file system or udisk device, use the rename command in EXEC mode.
Command Syntax
rename old-filename new-filename
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| old-filename | The original file name in flash | - |
| new-filename | The new file name in flash | - |
Command Mode
Privileged EXEC
Default
None
Usage
This command is valid only for local file systems
Examples
In the following example, the file named startup-config.conf-bak is renamed startup-config.conf-bak2:
Switch# configure terminal
Switch1# rename udisk:/wus udisk:/wu
Are you sure to rename udisk:/wus? [confirm]
Related Commands
None
2.1.46 rmdir
Command Purpose
To remove an existing directory in a Flash file system or udisk device, use the rmdir command in Privileged EXEC mode.
Command Syntax
rmdir directory-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| directory-name | The directory in flash | - |
Command Mode
Privileged EXEC
Default
None
Usage
This command is valid only for local file systems
Examples
The following example deletes a directory named newdir:
Switch# rmdir flash:/newdir
Are you sure to delete newdir? [yes/no]: y
Related Commands
mkdir
dir
2.1.47 tar create
Command Purpose
To create an new tar file in a Flash file system or udisk device, use the tar create command in Privileged EXEC mode.
Command Syntax
tar create tar-file-name source-directory
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| tar-file-name | The file name of the new tar file | - |
| source-directory | The source directory in flash | - |
Command Mode
Privileged EXEC
Default
None
Usage
The source-directory must be a directory
Examples
The following example creates a tar file named tar1:
Switch# tar create udisk:/tar1 udisk:/wu
Related Commands
tar table
tar xtract
2.1.48 tar table
Command Purpose
To display files in the tar file, use the tar table command in Privileged EXEC mode.
Command Syntax
tar table tar-file-name
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| tar-file-name | The file name of the new tar file | - |
Command Mode
Privileged EXEC
Default
None
Usage
The tar-file-name must be a in the flash
Examples
The following example shows files in a tar file named tar1:
Switch# tar table udisk:/tar1
Related Commands
tar create
2.1.49 tar xtract
Command Purpose
To untar files in the tar file, use the tar xtract command in Privileged EXEC mode.
Command Syntax
tar xtract tar-file destination-directory
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| tar-file | The file name of the tar file | - |
| destination-directory | The destination directory | - |
Command Mode
Privileged EXEC
Default
None
Usage
The destination-directory must exist in the flash. You can use mkdir to create a new directory
Examples
The following shows an example to extract a tar file named tar1 into a directory name dir1:
Switch# tar xtract flash:/tar1 flash:/mydir
Related Commands
tar create
tar table
2.1.50 show diagnostic-information
Command Purpose
Display diagnstic-information including syslog files, core dump files, tcam entries ,running-config, startup-config, version, clock, memory and logging buffer.
Command Syntax
show diagnostic-information ( bgp | ospf | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| bgp | BGP protocol diagnostic information | - |
| ospf | OSPF protocol diagnostic information | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example show diagnostic-information:
Switch# show diagnostic-information
Related Commands
None
2.1.51 tar diagnostic-information
Command Purpose
To put diagnostic-information to a Flash file system ,udisk device, ftp server or tftp server, use the tar diagnostic-information command in Privileged EXEC mode. Syslog files, core dump files, tcam entries ,running-config, startup-config, version, clock, memory and logging buffer are included in this tarfile.
Command Syntax
tar diagnostic-information ( mgmt-if | ) destination-directory/ tar-file
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| destination-directory | The destination directory, such as flash, udisk, tftp or ftp server | - |
| tar-file | The file name of the tar file | - |
Command Mode
Privileged EXEC
Default
None
Usage
The destination-directory must reachable and disk is enough
Examples
The following shows an example to put a diagnostic-information tar file to flash:
Switch# tar diagnostic-information flash:/diag.tar.gz
Related Commands
None
2.1.52 format
Command Purpose
To format udisk, all data on udisk: will be lost.
Command Syntax
format udsik:
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| udsik: | The USB mass storage device. If you don’t use USB mass storage device, failed to format udisk | - |
Command Mode
Application Configuration
Default
None
Usage
The destination-directory must exist
Examples
The following shows an example to format USB mass storage device:
Switch# configure terminal
Switch(config)# format udisk:
WARNING: All data on udisk: will be lost!!!
And format operation may take a while.
Are you sure to process with format? [yes/no]: yes
Related Commands
None
2.1.53 umount
Command Purpose
To uninstall the USB mass storage device before plug out it from the switch.
Command Syntax
umount udsik:
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| udisk: | The USB mass storage device. If you don’t use USB mass storage device, failed to format udisk | - |
Command Mode
Application Configuration
Default
None
Usage
USB mass storage device must exist in the system. You can use umount command to uninstall the USB mass storage device
Examples
The following shows an example to umount USB mass storage device:
Switch# configure terminal
Switch(config)# umount udisk:
After this operation, you can not use USB disk.
Are you sure to continue? [yes/no]: yes
Related Commands
None
2.1.54 cut-through enable
Command Purpose
To enable cut through mode, and can configure speed only on GG truck .
Command Syntax
cut_through_forwarding enable ( 10G | 100G | 1G | 25G | 2G5 | 40G | 50G | 5G )
no cut_through_forwarding enable
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enbale | enable cut through mode | - |
| (10G|100G| 1G| 25G|2G5|40G|50G|5G) | Configure cut_through speed | - |
Command Mode
Application Configuration
Default
None
Usage
None
Examples
The following example shows how to configure cut through mode:
Switch# configure terminal
Switch(config)# cut-through-forwarding enable 10G
% Configuration about cutting through forwarding mode has been stored, but cannot take effect until the next reload.
Related Commands
None
2.1.55 show cut-through-forwarding mode
Command Purpose
To display current working mode.
Command Syntax
show cut-through-forwarding mode
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following shows an example to display current working mode:
DUT1# show cut-through-forwarding mode
Related Commands
None
2.1.56 reset factory-config
Command Purpose
Reset to factory configuration.
Command Syntax
reset factory-config
Command Mode
Privileged EXEC
Default
None
Usage
Device will restore the saved configuration to factory configuration when select yes, and prompt to save configuration when rebooting, please select NO.
Examples
The following shows an example to reset factory configuration:
Switch# configure terminal
DUT1# reset factory-config
This action will reset the saved configuration immediately.
Running-config will be erased after reboot. Continue? [yes/no]:
Related Commands
None
2.1.57 show factory-config
Command Purpose
To display the factory configuration.
Command Syntax
show factory-config
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following shows an example to display factory configuration DUT1# show factory-config :
DUT1# show factory-config
Related Commands
None
2.1.58 show this
Command Purpose
To display the configuration of this mode.
Command Syntax
show this
Command Mode
All Configuration Mode
Default
None
Usage
Not support this mode :key-chain ,key-chain key ,time range ,acl ,route-map ,line ,class map
Examples
The following example show the configuration of this mode:
Switch(config-vlan)# show this
vlan database
vlan 5
!
Related Commands
None
2.1.59 show route-mac
Command Purpose
To display the route MAC address of this device.
Command Syntax
show route-mac
Command Mode
Privileged EXEC
Default
None
Usage
All interfaces on a device share the same single route-mac.
Examples
The following shows an example to display route-mac of this device:
Switch# show route-mac
Route MAC is: 222c.12fd.6c00
!
Related Commands
None
2.2 User Management Commands
2.2.1 username
Command Purpose
Use this command to create or delete a local user account on the switch.
Command Syntax
username WORD
no username WORD
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| username | Establish User Name Authentication | - |
| WORD | User name | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to add a user named testName:
Switch# configure terminal
Switch(config)#username testName
Related Commands
None
2.2.2 username password
Command Purpose
Use this command to add username and password.
Command Syntax
username WORD password ( 8 | ) LINE
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| WORD | User name | - |
| Password | Password for username | - |
| (8|) | Specifies a hidden password will follow | - |
| LINE | User password string | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to add a user named testName and with the password of 123456:
Switch# configure terminal
Switch(config)# username testName password 123456
Related Commands
None
2.2.3 username secret
Command Purpose
Use this command to add username and password and the password will be encrypted by the switch.
Command Syntax
username WORD secret LINE
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| WORD | User name | - |
| secret | Specify the secret for the user | - |
| LINE | User privilege level | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to add a user named testName and with the password of 123456:
Switch# configure terminal
Switch(config)#username testName secret 123456
Related Commands
None
2.2.4 username privilege
Command Purpose
Use this command to set a local user account with privilege level on the switch.
Command Syntax
username WORD privilege <1-4>
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| username WORD | User name | - |
| privilege <1-4> | ser privilege level | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to add a user with privilege level of 2:
Switch# configure terminal
Switch(config)#username testName privilege 2
Related Commands
None
2.2.5 username service-type
Command Purpose
Use this command to set the user service type.
Command Syntax
username WORD service-type ( { rpc-api | ssh | telnet | web } | ftp-server } | all | none )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| username WORD | User name | - |
| service-type | User service type(include rpc-api, ssh, telnet, web, ftp-server) | - |
Command Mode
Global Configuration
Default
Allow all user service type
Usage
None
Examples
This is a sample show how to set only support rpc-api user service-type:
Switch# configure terminal
Switch(config)#username testName service-type rpc-api
Related Commands
None
2.2.6 username privilege password
Command Purpose
Use this command to set a local user account with privilege level and password on the switch.
Command Syntax
username WORD privilege <1-4> password ( 8 | ) LINE
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| WORD | User name | - |
| privilege <1-4> | User privilege level | - |
| 8 | Specifies a HIDDEN password will follow | - |
| LINE | User privilege level | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to add a user with privilege level of 2 and password of 123456:
Switch# configure terminal
Switch(config)# username testName privilege 2 password 123456
Related Commands
None
2.2.7 re-username newname
Command Purpose
Use this command to reset username.
Command Syntax
re-username WORD newname WORD
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| re-username WORD | Old user name | - |
| newname WORD | New user name | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
This is a sample output from this command displaying how to reset username:
Switch# configure terminal
Switch(config)# re-username testName newname newname
Related Commands
None
2.2.8 cipher detect
Command Purpose
Use this command to set high level of cipher detect.
Command Syntax
cipher detect ( strong | normal | none )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| strong | Cipher must contain digital, normal char and special char | - |
| normal | Cipher must contain digital and normal char | - |
| none | Disable security check | - |
Command Mode
Global Configuration
Default
None
Usage
This cmd will make all un-strong clear text passwords lost
Examples
This is a sample output from this command displaying how to set high level of cipher detect:
Switch# configure terminal
Switch(config)# cipher detect strong
Related Commands
None
2.3 FTP Commands
2.3.1 ftp
Command Purpose
To exchange files between local and remote ftp server, use the ftp command in Privileged EXEC mode.
Command Syntax
ftp ( mgmt-if | ) host
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| HOST | IPv4, IPv6 address or name of the remote host | Support IPv4/IPv6 address or hostname |
Command Mode
Privileged EXEC
Default
None
Usage
Use the ftp command to upload and download files from remote ftp server.
Examples
The following example shows how to connect ftp server by ipv4 address:
Switch# ftp mgmt-if 10.10.29.160
Connected to 10.10.29.160.
220---------- Welcome to Pure-FTPd ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:00. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (10.10.29.160:root): root
331 User root OK. Password required
Password:
230-User root has group access to: wheel disk adm sys daemon
230- bin root
230 OK. Current directory is /root
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
The following example shows how to connect ftp server by ipv6 address:
Switch# ftp mgmt-if 2001:1000::2
Connected to 2001:1000::2 (2001:1000::2).
220 Serv-U FTP Server v10.2 ready...
Name (2001:1000::2:root): Username
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Related Commands
None
2.3.2 ftp vrf
Command Purpose
To exchange files between local and remote ftp server in VPN, use the ftp vrf command in Privileged EXEC mode.
Command Syntax
ftp vrf WORD
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| WORD | VPN Routing/Forwarding instance name | A string with 1-15 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
Switch# ftp vrf testvrf
Related Commands
None
2.3.3 ftp username
Command Purpose
To create an FTP username, use the ftp username command in Global Configuration. To remove an FTP username, use the no form of this command.
Command Syntax
ftp username USERNAME
no ftp username
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| USERNAME | The user name of the remote FTP server | Up to 31 characters |
Command Mode
Global Configuration
Default
None
Usage
The username must also follow the rules. They must start with a letter, and have as interior characters only letters, digits, and underline. Names must be 31 characters or fewer.
Examples
The following example creates an FTP username “abc”:
Switch# configure terminal
Switch(config)# ftp username abc
Related Commands
ftp password
ftp passive
2.3.4 ftp password
Command Purpose
To create the password of an FTP username, use the ftp password command in Global Configuration. To remove the password of an FTP username, use the no form of this command.
Command Syntax
ftp password ( 8 | ) LINE
no ftp password
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| LINE | The password of the user name of the remote FTP server | Up to 128 characters |
| 8 | Specifies a hidden password will follow | - |
Command Mode
Global Configuration
Default
No ftp password is defined.
Usage
The password will be encrypted in running-config if service password-encryption is enabled.
Examples
The following example creates the ftp password:
Switch# configure terminal
Switch(config)# ftp password abc
Related Commands
ftp username
ftp passive
2.3.5 ftp passive
Command Purpose
To set the FTP mode in passive mode, use the ftp passive command in Global Configuration. To restore the configuration to the default, use no form of this command.
Command Syntax
ftp passive
no ftp passive
Command Mode
Global Configuration
Default
FTP works in Active mode.
Usage
None
Examples
The following example sets the ftp mode to passive:
Switch# configure terminal
Switch(config)# ftp passive
Related Commands
ftp username
ftp password
2.3.6 show ftp
Command Purpose
To display the ftp configurations, use show ftp command in Privileged EXEC mode.
Command Syntax
show ftp
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example displays the ftp configurations:
Switch# show ftp
ftp passive mode: on
ftp username: root
ftp password: unencrypted , abc
Switch#
Related Commands
ftp username
ftp password
2.3.7 copy GFILENAME GURLNAME
Command Purpose
Use this command to copy local file to ftp server.
Command Syntax
copy GFILENAME ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| vrf WORD | VPN Routing/Forwarding instance | A string with 1-15 characters |
| GFILENAME | Copy from local file | The full path and file name ,up to 255 characters |
| GURLNAME | Copy to local file | The full path and file name ,up to 255 characters |
| -a SRC_ADDR | Copy with assigned IP | - |
| -si SRC_INTF | Copy with assigned Interface | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy local file to ftp server:
Switch# copy flash:/test.c ftp:/username:password@1.1.1.1:21/running-config
Related Commands
None
2.3.8 copy GURLNAME GFILENAME
Command Purpose
Use this command to copy file from ftp server to local.
Command Syntax
copy ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME GFILENAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| vrf WORD | VPN Routing/Forwarding instance | A string with 1-15 characters |
| GURLNAME | Copy from URL | The full path and file name ,up to 255 characters |
| GFILENAME | Copy to local file | The full path and file name ,up to 255 characters |
| -a SRC_ADDR | Copy with assigned IP | - |
| -si SRC_INTF | Copy with assigned Interface | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy file from ftp server to local:
Switch# copy ftp://username:password@1.1.1.1:21/test.c flash:test1.c
get file from ftp://username:password@1.1.1.1:21/test.c
.
Received 225 bytes in 0.3 seconds
Related Commands
None
2.4 FTP server Commands
2.4.1 ftp server enable
Command Purpose
To enable FTP server on switch.
Command Syntax
ftp server ( mgmt-if | ) enable
no ftp server enable
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
Related Commands
None
2.4.2 ftp server port
Command Purpose
To config FTP server listen port.To restore the default value, use the no form of this command.
Command Syntax
ftp server port PORTNUM
no ftp server port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| port num |
|
(1025-65535) |
Command Mode
Global Configuration
Default
Default value is 21
Usage
None
Examples
The following example set FTP server port is 10000:
Switch# configure terminal
Switch# ftp server port 10000
Related Commands
None
2.4.3 ftp server time-out
Command Purpose
To config FTP server idle-time.To restore the default value, use the no form of this command.
Command Syntax
ftp server time-out MINUTES
no ftp server time-out
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| minutes |
|
(1-1000)mins |
Command Mode
Global Configuration
Default
Default idle-time is 15mins
Usage
None
Examples
The following example set FTP server idle-time is 5mins:
Switch# configure terminal
Switch# ftp server time-out 5
Related Commands
ftp passive
2.4.4 ftp server source address
Command Purpose
To configure the source address of FTP server on your switch, use the FTP server source address command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ftp server source address ( vrf NAME | ) IP_ADDR
no ftp server source address
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| vrf NAME | Specify a vrf to provide FTP server | A string with 1-15 characters |
| IP_ADDR | Configure IP address for ftp server working inband | IPv4 Address |
Command Mode
Global Configuration
Default
None
Usage
You can use this command to modify the address which FTP server works on, and specify a vrf to provide FTP server. The source address can only be 0.0.0.0 or loopback interface’s address, 0.0.0.0 indicates that the SSH server address is not specified.
Examples
The following example shows how to specify FTP server source address:
Switch# configure terminal
Switch(config)# ftp server source address vrf vpn1 10.10.10.1
Related Commands
None
2.5 TFTP Commands
2.5.1 copy GFILENAME GURLNAME
Command Purpose
Use this command to copy local file to tftp server.
Command Syntax
copy GFILENAME ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| vrf WORD | VPN Routing/Forwarding instance | A string with 1-15 characters |
| GFILENAME | Copy from local file | The full path and file name ,up to 255 characters |
| GURLNAME | Copy to local file | The full path and file name ,up to 255 characters |
| -a SRC_ADDR | Copy with assigned IP | - |
| -si SRC_INTF | Copy with assigned Interface | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy local file to tftp server:
Switch# copy flash:/test.c tftp://1.1.1.1/running-config
Related Commands
None
2.5.2 copy GURLNAME GFILENAME
Command Purpose
Use this command to copy file from tftp server to local.
Command Syntax
copy ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME GFILENAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| vrf WORD | VPN Routing/Forwarding instance | A string with 1-15 characters |
| GURLNAME | Copy from URL | The full path and file name ,up to 255 characters |
| GFILENAME | Copy to local file | The full path and file name ,up to 255 characters |
| -a SRC_ADDR | Copy with assigned IP | - |
| -si SRC_INTF | Copy with assigned Interface | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy file from tftp server to local:
Switch# copy tftp://1.1.1.1/test.c flash:test1.c
get file from tftp://1.1.1.1/test.c
.
Received 225 bytes in 0.3 seconds
Related Commands
None
2.5.3 copy running-config mgmt-if
Command Purpose
Use this command to copy running-config to tftp server.
Command Syntax
copy running-config ( mgmt-if | ) GURLNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| startup-config | Copy from current system configuration | - |
| mgmt-if | Management port | - |
| GURLNAME | Copy to URL | The full path and file name ,up to 255 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy running-config to tftp server:
Switch#copy running-config tftp://1.1.1.1/running-config
Building configuration…
send file to tftp://1.1.1.1/running-config
…
Sent 40198 bytes in 8.3 seconds
Related Commands
None
2.5.4 copy mgmt-if startup-config
Command Purpose
Use this command to copy startup-config from tftp server.
Command Syntax
copy ( mgmt-if | ) GURLNAME startup-config
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| GURLNAME | Copy from URL | The full path and file name ,up to 255 characters |
| startup-config | Copy to startup system configuration | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy startup-config from tftp server:
Switch#copy tftp://1.1.1.1/startup-config startup-config
get file from tftp://1.1.1.1/startup-config
..
Sent 32252 bytes in 6.4 seconds
Related Commands
None
2.6 scp Commands
2.6.1 copy GFILENAME GURLNAME
Command Purpose
Use this command to copy local file to scp server.
Command Syntax
copy GFILENAME ( mgmt-if | ) GURLNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| GFILENAME | Copy from local file | The full path and file name ,up to 255 characters |
| GURLNAME | Copy to local file | The full path and file name ,up to 255 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy local file to scp server:
Switch# copy flash:/test.c scp://1.1.1.1/running-config
Related Commands
None
2.6.2 copy GURLNAME GFILENAME
Command Purpose
Use this command to copy file from scp server to local.
Command Syntax
copy ( mgmt-if | ) GURLNAME GFILENAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| GURLNAME | Copy from URL | The full path and file name ,up to 255 characters |
| GFILENAME | Copy to local file | The full path and file name ,up to 255 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy file from scp server to local:
Switch# copy scp://1.1.1.1/test.c flash:test1.c
get file from scp://1.1.1.1/test.c
.
Received 225 bytes in 0.3 seconds
Related Commands
None
2.6.3 copy running-config mgmt-if
Command Purpose
Use this command to copy running-config to scp server.
Command Syntax
copy running-config ( mgmt-if | ) GURLNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| startup-config | Copy from current system configuration | - |
| mgmt-if | Management port | - |
| GURLNAME | Copy to URL | The full path and file name ,up to 255 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy running-config to scp server:
Switch#copy running-config mgmt-if scp://1.1.1.1/running-config
Building configuration…
send file to scp://1.1.1.1/running-config
…
Sent 40198 bytes in 8.3 seconds
Related Commands
None
2.6.4 copy mgmt-if startup-config
Command Purpose
Use this command to copy startup-config from scp server.
Command Syntax
copy ( mgmt-if | ) GURLNAME startup-config
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| GURLNAME | Copy from URL | The full path and file name ,up to 255 characters |
| startup-config | Copy to startup system configuration | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is a sample output from the command displaying how to copy startup-config from scp server:
Switch#copy scp://1.1.1.1/startup-config startup-config
get file from scp://1.1.1.1/startup-config
..
Sent 32252 bytes in 6.4 seconds
Related Commands
None
2.7 Telnet Commands
2.7.1 telnet
Command Purpose
Use this command from the switch to access the other devices in the network.
Command Syntax
telnet ( -a SRC_ADDR ) ( vrf WORD | mgmt-if ) HOST ( PORT | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| -a SRC_ADDR | Telnet with assigned IP | - |
| vrf WORD | VPN Routing/Forwarding instance | A string with 1-15 characters |
| mgmt-if | Management port | - |
| HOST | IPv4, IPv6 address or name of the remote host | Support IPv4/IPv6 address or hostname |
| PORT | TCP Port number | 1-65535 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This example shows how to Telnet from the switch to a remote host:
Switch# telnet mgmt-if 10.10.29.247
Entering character mode
Escape character is '^]'.
TestOS , Version 2.3(62) ,fcs
Switch# telnet 2001:1000::1
Entering character mode
Escape character is '^]'.
DUT1#
Related Commands
None
2.7.2 ip telnet server source address
Command Purpose
To configure the source address of telnet server on your switch, use the telnet server source address command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip telnet server source address ( vrf NAME | ) IP_ADDR
no ip telnet server source address
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| vrf NAME | Specify a vrf to provide telnet server | A string with 1-15 characters |
| IP_ADDR | Configure IP address for telnet server working inband | IPv4 Address |
Command Mode
Global Configuration
Default
None
Usage
You can use this command to modify the address which telnet server works on, and specify a vrf to provide telnet server. The source address can only be 0.0.0.0 or loopback interface’s address, 0.0.0.0 indicates that the SSH server address is not specified.
Examples
The following example shows how to specify telnet server source address:
Switch# configure terminal
Switch(config)# ip telnet server source address vrf vpn1 10.10.10.1
Related Commands
None
2.7.3 ip telnet server source port
Command Purpose
To configure the TCP port for telnet server working inband on your switch, use the telnet server source command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip telnet server source port NUMBER
no ip telnet server source port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| port NUMBER | Configure TCP port for telnet server working inband | 1025-65535 |
Command Mode
Global Configuration
Default
None
Usage
The CLI of “no telnet server source port” will configure TCP port for telnet server working inband with default value of 23.
Examples
The following example shows how to set the TCP port for telnet server working inband on the switch :
Switch# configure terminal
Switch(config)# ip telnet server source port 2323
Related Commands
None
2.7.4 ip telnet server source mgmt-if port
Command Purpose
To configure the TCP port for telnet server working outband on your switch, use the telnet server source command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip telnet server source mgmt-if port NUMBER
no ip telnet server source mgmt-if port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if port NUMBER | Configure TCP port for telnet server working outband | 1025-65535 |
Command Mode
Global Configuration
Default
None
Usage
The CLI of “no telnet server sourc mgmt-if port” will configure TCP port for telnet server working outband with default value of 23.
Examples
The following example shows how to set the TCP port for telnet server working outband on the switch :
Switch# configure terminal
Switch(config)# ip telnet server source mgmt-if port 2323
Related Commands
None
2.8 SSH Commands
2.8.1 ip ssh server
Command Purpose
To enable SSH service, use ip ssh server enable command in Global Configuration. To disable SSH service, use ip ssh server disable command.
Command Syntax
ip ssh server ( enable | disable )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enable | Turn on the SSH service | - |
| disable | Turn off the SSH service | - |
Command Mode
Global Configuration
Default
SSH service is enabled.
Usage
None
Examples
The following example enables the SSH service on your switch:
Switch# configure terminal
Switch(config)# ip ssh server enable
Related Commands
show ip ssh server status
2.8.2 ip ssh server authentication-retries
Command Purpose
To configure Secure Shell (SSH) authentication retry times on your switch, use the ip ssh server authentication-retries command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server authentication-retries COUNT
no ip ssh server authentication-retries
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| COUNT | The number of retries, with a maximum of 6 authentication retries | 1-6 |
Command Mode
Global Configuration
Default
The default is 6.
Usage
None
Examples
The following examples configure SSH authentication retry times on your switch:
Switch# configure terminal
Switch(config)# ip ssh server authentication-retries 3
Related Commands
show ip ssh server status
2.8.3 ip ssh server authentication-timeout
Command Purpose
To configure Secure Shell (SSH) authentication timeout on your switch, use the ip ssh server authentication-timeout command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server authentication-timeout SECONDS
no ip ssh server authentication-timeout
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| SECONDS | The number of seconds until timeout disconnects | 1-120 seconds |
Command Mode
Global Configuration
Default
The default is 120 seconds.
Usage
None
Examples
The following examples configure SSH authentication timeout on your switch:
Switch# configure terminal
Switch(config)# ip ssh server authentication-timeout 100
Related Commands
show ip ssh server status
2.8.4 ip ssh server authentication-type
Command Purpose
To configure Secure Shell (SSH) authentication type on your switch, use the ip ssh server authentication-type command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server authentication-type ( all | { password | public-key | rsa } )
no ip ssh server authentication-type
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| all | Enable all authentication type | - |
| password | Enable password authentication | - |
| public-key | Enable SSHv2 public key authentication | - |
| rsa | Enable SSHv1 rsa authentication | - |
Command Mode
Global Configuration
Default
The default authentication type is all.
Usage
None
Examples
The following examples configure SSH authentication type on the switch:
Switch# configure terminal
Switch(config)# ip ssh server authentication-type password
Related Commands
show ip ssh server status
2.8.5 ip ssh server host-key rsa key
Command Purpose
To configure Secure Shell (SSH) host-key on your switch, use the ip ssh server host-key rsa key command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server host-key rsa key KEYNAME
no ip ssh server host-key rsa
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | The key value for host key | Up to 32 characters |
Command Mode
Global Configuration
Default
None
Usage
Host-key is used to combining public key to generate a session. When SSH login,modifing host-key can cause connection closed.
Examples
The following examples configure SSH host key on your switch:
Switch# configure terminal
Switch(config)# ip ssh server host-key rsa key KEY1
Related Commands
show ip ssh server status
2.8.6 ip ssh server rekey-interval
Command Purpose
To configure Secure Shell (SSH) rekey interval on your switch, use the ip ssh server rekey-interval command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server rekey-interval MINUTE
no ip ssh server rekey-interval
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| MINUTE | The rekey interval in minutes | 1-1440 minutes |
Command Mode
Global Configuration
Default
The default interval is 60 minutes.
Usage
None
Examples
The following examples configure SSH rekey interval on your switch:
Switch# configure terminal
Switch(config)# ip ssh server rekey-interval 30
Related Commands
show ip ssh server status
2.8.7 ip ssh server version
Command Purpose
To configure Secure Shell (SSH) version on your switch, use the ip ssh server version command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server version ( 1 | 2 | all )
no ip ssh server version
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| 1 | Switch runs only SSH Version 1 | - |
| 2 | Switch runs only SSH Version 2 | - |
| all | Version 1 and Version 2 are both supported | - |
Command Mode
Global Configuration
Default
The default SSH version is 2.
Usage
You can use this command with the 2 keyword to ensure that your switch will not inadvertently establish a weaker SSH Version 1 connection.
Examples
The following example shows that only SSH Version 1 support is configured:
Switch# configure terminal
Switch(config)# ip ssh server version 1
Related Commands
show ip ssh server status
2.8.8 ip ssh server source address
Command Purpose
To configure the source address of Secure Shell (SSH) server on your switch, use the ip ssh server source command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server source address { vrf NAME | } IP_ADDR
no ip ssh server source address
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| vrf NAME | Specify a vrf to provide SSH server | Up to 15 characters |
| IP_ADDR | Configure IP address for SSH server working inband | IPv4 Address |
Command Mode
Global Configuration
Default
None
Usage
You can use this command to modify the address which SSH server works on, and specify a vrf to provide SSH server. The source address can only be 0.0.0.0 or loopback interface’s address, 0.0.0.0 indicates that the SSH server address is not specified.
Examples
The following example shows how to set SSH server inbind address :
Switch# configure terminal
Switch(config)# ip ssh server source address 10.10.10.1
Related Commands
ip ssh server
2.8.9 ip ssh server source port
Command Purpose
To configure the TCP port for SSH server working inband on your switch, use the ip ssh server source command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server source port NUMBER
no ip ssh server source port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| port NUMBER | Configure TCP port for SSH server working inband | 1025-65535 |
Command Mode
Global Configuration
Default
None
Usage
The CLI of “no ip ssh server source port” will configure TCP port for SSH server working inband with default value of 22.
Examples
The following example shows the special port is configured:
Switch# configure terminal
Switch(config)# ip ssh server source port 2222
Related Commands
ip ssh server
2.8.10 ip ssh server source mgmt-if port
Command Purpose
To configure the TCP port for SSH server working outband on your switch, use the ip ssh server source command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
ip ssh server source mgmt-if port NUMBER
no ip ssh server source mgmt-if port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if port NUMBER | Configure TCP port for SSH server working outband | 1025-65535 |
Command Mode
Global Configuration
Default
None
Usage
The CLI of “no ip ssh server source mgmt-if port” will configure TCP port for SSH server working outband with default value of 22.
Examples
The following example shows the special port is configured:
Switch# configure terminal
Switch(config)# ip ssh server source mgmt-if port 2222
Related Commands
ip ssh server
2.8.11 show ip ssh server session
Command Purpose
To display the session information for Secure Shell (SSH), use the show ip ssh server session command in Privileged EXEC mode.
Command Syntax
show ip ssh server session
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows the current SSH sessions:
Switch# show ip ssh server session
Version Encryption Hmac User IP State
=================================================================
2.0 aes128-cbc hmac-md5 abc 10.10.29.22 Session started
Related Commands
show ip ssh server status
2.8.12 show ip ssh server status
Command Purpose
To display the version and configuration data for Secure Shell (SSH), use the show ip ssh server status command in Privileged EXEC mode.
Command Syntax
show ip ssh server status
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows the current SSH configurations:
Switch# show ip ssh server status
SSH server enabled
Version: 1.99
Authentication timeout: 33 second(s)
Authentication retries: 6 time(s)
Server key lifetime: 60 minute(s)
Authentication type: password , public-key
Related Commands
show ip ssh server session
2.8.13 rsa key generate
Command Purpose
To create a key by system, use the rsa key generate command in Global Configuration.
Command Syntax
rsa key KEYNAME generate
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | The name of the key | Up to 32 characters |
Command Mode
Global Configuration
Default
None
Usage
Use the rsa key command to create a key by system.
Examples
The following example creates a key named KEY1:
Switch# configure terminal
Switch(config)# rsa key KEY1 generate
Generating RSA private key, 1024 bit long modulus
Please waiting for a moment: done!
Public exponent is 65537 (0x10001)
Generate RSA key successfully
Switch(config)#
Related Commands
show rsa keys
2.8.14 rsa key
Command Purpose
To create a key, use the rsa key command in Global Configuration.
Command Syntax
rsa key KEYNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | The name of the key | Up to 32 characters |
Command Mode
Global Configuration
Default
None
Usage
Use the rsa key command to create a key.
Examples
The following example creates a key named KEY1:
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)#
Related Commands
show rsa keys
2.8.15 key format
Command Purpose
To specify the key format, use the key format command in RSA key configuration mode.
Command Syntax
key format ( der | pem )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| der | The format is der | - |
| pem | The format is pem | - |
Command Mode
Rsa Key Configuration
Default
The default key format is DER.
Usage
None
Examples
The following example specify the key format of KEY1 as der :
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# key format der
Related Commands
rsa key
2.8.16 key string end
Command Purpose
To exit the rsa key configuration mode to Global Configuration and apply all rsa key configurations, use the key string end command in RSA key configuration mode.
Command Syntax
key string end
Command Mode
Rsa Key Configuration
Default
None
Usage
None
Examples
The following example shows exit the rsa key configuration mode :
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# key string end
Switch(config)#
Related Commands
rsa key
2.8.17 key type
Command Purpose
To specify the key type, use the key type command in RSA key configuration mode.
Command Syntax
key type ( public | private )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| public | Specify the key as a public key | - |
| private | Specify the key as a private key | - |
Command Mode
Rsa Key Configuration
Default
None
Usage
None
Examples
The following example specifies the key type of KEY1 as public key:
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# key type public
Related Commands
rsa key
2.8.18 reset
Command Purpose
To clear all key configurations, use the reset command in RSA key configuration mode.
Command Syntax
reset
Command Mode
Rsa Key Configuration
Default
None
Usage
None
Examples
The following example shows to clear all configurations for the key KEY1:
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# reset
Related Commands
rsa key
2.8.19 validate
Command Purpose
To check the validation of the key strings, use the validate command in RSA key configuration mode.
Command Syntax
validate
Command Mode
Rsa Key Configuration
Default
None
Usage
None
Examples
The following example shows to validate key strings of the key KEY1:
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# validate
Related Commands
rsa key
2.8.20 KEYLINE
Command Purpose
To add key strings from the screen directly, type any strings in RSA key configuration mode except the keywords in this mode.
Command Syntax
KEYLINE
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYLINE | key line | key line string |
Command Mode
Rsa Key Configuration
Default
None
Usage
Type any key string.
Examples
The following example shows to type a key string of the key KEY1:
Switch# configure terminal
Switch(config)# rsa key KEY1
Switch(config-rsa-key)# 00302017 4A7D385B 1234EF29 335FC973
Switch(config-rsa-key)# 2DD50A37 C4F4B0FD 9DADE748 429618D5
Related Commands
validate
2.8.21 rsa key export
Command Purpose
To export the key file to a specified destination, use the rsa key export command in Global Configuration.
Command Syntax
rsa key KEYNAME export url DEST_FILE ( public | private ) ( der | der-hex | pem | ssh1 | ssh2 )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | Specify the key name to display | Up to 32 characters |
| DEST_FILE | The destination file path and name | The full path and file name ,up to 255 characters |
| public | Specify the key as a public key | - |
| private | Specify the key as a private key | - |
| der | DER format | - |
| der-hex | DER HEX format | - |
| pem | PEM format | - |
| ssh1 | SSHv1 format | - |
| ssh2 | Specify the key format | - |
Command Mode
Global Configuration
Default
None
Usage
Use the rsa key generate command to generate a key.
Examples
The following example shows to export the key KEY1 to flash as a public key:
Switch# configure terminal
Switch(config)# rsa key KEY1 export url flash:/key1.pub public ssh2
The following example shows to export the key KEY2 to flash as a private key:
Switch# configure terminal
Switch(config)# rsa key KEY2 export url flash:/key1 private ssh1
Related Commands
rsa key generate
rsa key import
2.8.22 rsa key import
Command Purpose
To import the key file from a specified source, use the rsa key import command in Global Configuration.
Command Syntax
rsa key KEYNAME import url SRC_FILE ( public | private ) ( der | der-hex | pem | ssh1 | ssh2 )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | Specify the key name to display | Up to 32 characters |
| SRC_FILE | The destination file path and name | The full path and file name ,up to 255 characters |
| public | Specify the key as a public key | - |
| private | Specify the key as a private key | - |
| der | DER format | - |
| der-hex | DER HEX format | - |
| pem | PEM format | - |
| ssh1 | SSHv1 format | - |
| ssh2 | Specify the key format | - |
Command Mode
Global Configuration
Default
None
Usage
Use the rsa key to generate command to generate a key.
Examples
The following example shows to import the key KEY1 to flash as a public key:
Switch# configure terminal
Switch(config)# rsa key KEY1 import url flash:/key1.pub public ssh2
The following example shows to import the key KEY2 to flash as a private key:
Switch# configure terminal
Switch(config)# rsa key KEY2 import url flash:/key1 private ssh1
Related Commands
rsa key generate
rsa key export
2.8.23 show rsa key
Command Purpose
To display the details of the keys, use the show rsa key command in Privileged EXEC mode.
Command Syntax
show rsa key KEYNAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| KEYNAME | Specify the key name to display | Up to 32 characters |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example displays the detailed information of the key named “KEY1”:
Switch# show rsa key KEY1
RSA key information:
============================================================
Name: KEY1
Type: private
Modulus: 1024 bit
Usage count: 0
Private key DER code:
30820258
0201
00
028180
9B3E9726 6405BD54 692F172A901F3879 C947366E 5703D282 AA31707F 214D38C9
Related Commands
show rsa keys
2.8.24 show rsa keys
Command Purpose
To display the brief information of all the keys, use the show rsa keys command in Privileged EXEC mode.
Command Syntax
show rsa keys
Command Mode
Privileged EXEC
Default
None
Usage
Use the rsa key generate command to generate a key.
Examples
The following example displays the brief information of the keys:
Switch# show rsa keys
Name Type Usage Modulus
============================================================
key1 private 0 1024
key2 public 0 1024
Related Commands
show rsa key
2.8.25 ssh
Command Purpose
To connect to the remote SSH server, use the ssh command in Privileged EXEC mode.
Command Syntax
ssh -l NAME ( { -i KEYNAME | -p DPORT | -v ( 1 | 2 ) | -c { 3des | des | 3des-cbc | aes128-cbc | aes192-cbc | aes256-cbc } | -m { hmac-md5-128 | hmac-md5-96 | hmac-sha1-160 | hmac-sha1-96 } | -o numberofpasswordprompts NUM | -a A.B.C.D } | ) ( mgmt-if | ) ( A.B.C.D | X:X::X:X | HOST )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| -l NAME | Log in using this user name | Up to 31 characters |
| -i KEYNAME | Specify the name of RSA private key | Up to 32 characters |
| -p DPORT | Specify the remote port | 1-65535 |
| -v (1|2) | Specify SSH protocol version | - |
| -c | Select encryption algorithm | - |
| 3des | Triple DES (SSHv1 only) | - |
| des | DES (SSHv1 only) | - |
| 3des-cbc | Triple DES (SSHv2 only) | - |
| aes128-cbc | AES 128 bits (SSHv2 only) | - |
| aes192-cbc | AES 192 bits (SSHv2 only) | - |
| aes256-cbc | AES 256 bits (SSHv2 only) | - |
| -m | Select HMAC algorithm | - |
| hmac-md5-128 | MD5 based HMAC (128 bits, SSHv2 only) | - |
| hmac-md5-96 | MD5 based HMAC (96 bits, SSHv2 only) | - |
| hmac-sha1-160 | SHA1 based HMAC (160 bits, SSHv2 only) | - |
| hmac-sha1-96 | SHA1 based HMAC (96 bits, SSHv2 only) | - |
|
-o numberof- passwordprompts NUM |
Specify number of password prompts with | The range in [1, 7] |
| -a A.B.C.D | Ssh with assigned IP | IPv4 Address |
| mgmt-if | Use Management port | - |
| A.B.C.D | Specify IP address of remote system | IPv4 Address |
| X:X::X:X | Specify IPv6 address of remote system | IPv6 Address |
| HOST | Specify hostname of remote system | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example displays the usage of this command:
Switch# ssh -l aaa -v 2 1.1.1.1
aaa@1.1.1.1's password:
Switch#
Related Commands
ip ssh server
2.9 Time&Timezone Commands
2.9.1 clock set datetime
Command Purpose
Use this command to set system current date and time on the Switch.
Command Syntax
clock set datetime HH:MM:SS MONTH DAY YEAR
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| HH:MM:SS | Specify the time in hours (24-hour format), minutes, and seconds. The time specified is relative to the configured time zone | HH:MM:SS in 24-hour format. |
| MONTH | Specify the month by name | Should be in range 1 to 12 |
| DAY | Specify the day by date in the month | Should be in range 1 to 31 |
| YEAR | Specify the year | Should be in range 1993 to 2035 |
Command Mode
Global Configuration
Default
The default time is based from UTC.
Usage
If no other source of time is available, you can manually configure the time and date after the system is restarted. The time remains accurate until the next system restart. We recommend that you use manual configuration only as a last resort. If you have an outside source to which the switch can synchronize, you do not need to manually set the system clock.
Examples
This example shows how to manually set the system clock to 1 :32 p.m. on July 23, 2014:
Switch# configure terminal
Switch(config)# clock set 13:32:00 23 7 2014
Related Commands
show clock
2.9.2 clock set timezone
Command Purpose
Use this command to set the time zone on the Switch.
To restore to the default time of UTC, use the no form of this command.
Command Syntax
clock set timezone ZONE ( add | minus ) hours-offset [ minutes-offset ] [ seconds-offset ]
no clock set timezone
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| ZONE | Specify the zone name | the length should be [3, 32), and only [a-zA-Z_] is supported, and the first and last character must be alphabet. |
| add | Specify the time offset is positive from UTC | - |
| minus | Specify the time offset is negative from UTC | - |
| HOUR_OFFSET | Specify the time offset in hours | 0-18 |
| MINUTES_OFFSET | [optional]Specify the time offset in minutes, should be in range 0 to 59 | 0-59 |
| SECCONDS_OFFSET | [optional]Specify the time offset in seconds | 0-59 |
Command Mode
Global Configuration
Default
The default time zone should be UTC.
Usage
None
Examples
The following example sets the Atlantic Canada time zone is 3.5 hours less than UTC:
Switch# configure terminal
Switch(config)# clock set timezone Canada minus 3 30
The following example sets the time zone named ZZZ is 5 hours faster than UTC:
Switch# configure terminal
Switch(config)# clock set timezone ZZZ add 5
Related Commands
show clock (detail)
2.9.3 clock set summer-time
Command Purpose
Use this command to set summer time (daylight saving time) in areas where it starts and ends on a particular day each year(recurring) or on specified year(date).
To restore to the default time of UTC, use the no form of this command.
Command Syntax
clock set summer-time ZONE recurring start-time end-time offset
clock set summer-time ZONE date start-time end-time offset
no clock set summer-time
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| ZONE | Specify the summer zone name | The length should be [3, 32), and only [a-zA-Z_] is supported, and the first and last character must be alphabet. |
| recurring | Specify that summer time starts and ends on a particular day of the week each year | - |
| date | Specify that summer time starts and ends on a particular day of the specified year | - |
| START_TIME | Specify the start time of summer time | For recurring summer time, the format should be month, day, hh:mm:ss or (first | second | third | fourth | last) DAY <1-12> HH:MM:SS, while for date summer time, the format should be month, day, year, hh:mm:ss |
| END_TIME | Specify the end time of summer time | For recurring summer time, the format should be month, day, hh:mm:ss or (first | second | third | fourth | last) DAY <1-12> HH:MM:SS, while for date summer time, the format should be month, day, year, hh:mm:ss |
| OFFSET | For offset, specify the number of minutes to add during summer time. The default is 60. | 1-120 minutes |
Command Mode
Global Configuration
Default
Summer time should be disabled by default.
Usage
The first part of the clock summer-time global configuration command specifies when summer time begins, and the second part specifies when it ends. All times are relative to the local time zone. The start time is relative to standard time. The end time is relative to summer time. If the starting month is after the ending month, the system assumes that you are in the southern hemisphere.
Examples
This example shows how to specify that summer time starts on june 1st at 0200 and ends on the October 31 at 0200:
Switch# configure terminal
Switch(config)# clock set summer-time stime recurring 6 1 02:00:00 10 31 02:00:00 120
This example shows how to specify that summer time starts on March the second Wednesday at 0200 and ends on the August the last Friday at 0100:
Switch# configure terminal
Switch(config)# clock set summer-time stime recurring second Wed 3 02:0:0 last Fri 8 01:0:0 60
Related Commands
show clock (detail)
2.9.4 show clock
Command Purpose
Use this command to display the current time and date configuration.
Command Syntax
show clock ( detail | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| detail | Display the configured timezone and summer time information in addition to current date and time | - |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This example displays current time and date in detail:
Switch#show clock detail
10:43:00 beijing Fri Oct 25 2013
Time zone: (GMT + 08:00:00) beijing
Related Commands
show clock
2.9.5 show timezones
Command Purpose
Use this command to display all the timezones in world.
Command Syntax
show timezons
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This example displays all the current timezones:
Switch#show timezones
(GMT+00:06:04) Europe/Andorra
(GMT+03:41:12) Asia/Dubai
(GMT+04:36:48) Asia/Kabul
(GMT-04:07:12) America/Antigua
(GMT-04:12:16) America/Anguilla
(GMT+01:19:20) Europe/Tirane
(GMT+02:58:00) Asia/Yerevan
(GMT-04:36:00) America/Curacao
(GMT+00:52:56) Africa/Luanda
(GMT+11:06:24) Antarctica/McMurdo McMurdo Station, Ross Island
============================================================
(GMT+00:00:00) Antarctica/South_Pole Amundsen-Scott Station, South Pole
(GMT-04:32:32) Antarctica/Rothera Rothera Station, Adelaide Island
(GMT-04:16:24) Antarctica/Palmer Palmer Station, Anvers Island
Related Commands
show clock
2.10 License Commands
2.10.1 generate device identifier
Command Purpose
To generate device identifier, use this command in Privileged EXEC mode.
Command Syntax
generate device identifier ( mgmt-if | ) GURLNAME
generate device identifier ( GFILENAME | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| mgmt-if | Management port | - |
| GURLNAME | URL name | - |
| GFILENAME | local file name | - |
Command Mode
Privileged EXEC
Default
None
Usage
This command will generate the unique device identifier (UDI) on the current device, customer can get license for the current device form the vendor with UDI.
Examples
The following example shows how to generate UDI:
Switch# generate device identifier mgmt-if tftp://10.10.38.160/device.udi
Related Commands
None
2.10.2 show license
Command Purpose
To show license on the device, use the show license command in Privileged EXEC mode.
Command Syntax
show license ( GFILENAME | )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| GFILENAME | local file name | - |
Command Mode
Privileged EXEC
Default
None
Usage
This command will show the license on the current device.
Examples
The following example shows how to show license:
Switch# show lincese
License files:
======================================================================
flash:/ma.lic:
Created Time: Fri Dec 6 17:22:23 CST 2013
Vendor: Vendor1
Customer: Customer1
Device MAC: 00:1E:08:09:03:00
Feature Set: QINQ MVR ERPS MEF ETHOAM
VPWS VPLS HVPLS SMLK TPOAM
OSPF PIM_SM IGMP VRF MPLS
LDP BGP RSVP OSPF_TE EXTEND_ACL
PTP BFD SSM IPV6 OSPF6
PIM_SM6 MVR6 RIPNG TUNNEL_V6
Related Commands
None
2.11 HTTP commands Commands
2.11.1 service http
Command Purpose
To enable HTTP service, use service http enable command in Global Configuration. To disable HTTP service, use service http disable command.
Command Syntax
service http ( enable | disable )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enable | Turn on the HTTP service | - |
| disable | Turn off the HTTP service | - |
Command Mode
Global Configuration
Default
HTTP service is disabled.
Usage
The WEB image should be loaded first.
Examples
The following example shows how to enable HTTP service:
Switch# configure terminal
Switch(config)# service http enable
Related Commands
http server load
http timeout
2.11.2 service https
Command Purpose
To enable HTTPS service, use service http enable command in Global Configuration. To disable HTTPS service, use service http disable command.
Command Syntax
service https ( enable | disable )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enable | Turn on the HTTPS service | - |
| disable | Turn off the HTTPS service | - |
Command Mode
Global Configuration
Default
HTTPS service is disabled.
Usage
The WEB image should be loaded first.
Examples
The following example shows how to enable HTTPS service:
Switch# configure terminal
Switch(config)# service https enable
Related Commands
http server load
http timeout
2.11.3 http server load
Command Purpose
To load WEB image, user the http server load command .
Command Syntax
http server load FILENAME
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| FILENAME | Name of WEB image | - |
Command Mode
Global Configuration
Default
None
Usage
None
Examples
The following example shows how to specify web image:
Switch# configure terminal
Switch(config)# http server load flash:/webImage.bin
Related Commands
service http enable
service https enable
http timeout
2.11.4 http timeout
Command Purpose
To configure the expire time of online web users.
Command Syntax
http timeout TIMEOUT
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| TIMEOUT | Online web user expire time. | The range is [1,60], unit is minute. |
Command Mode
Global Configuration
Default
20min.
Usage
None
Examples
The following example shows how to configure http timeout:
Switch# configure terminal
Switch(config)# http timeout 30
Related Commands
http server load
service http enable
service https enable
2.11.5 http server source address
Command Purpose
To configure the source address of WEB server on your switch, use the http server source address command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http server source address ( vrf NAME | ) A.B.C.D
no http server source address
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| vrf NAME | Specify a vrf to provide WEB server | A string with 1-15 characters |
| A.B.C.D | Configure IP address for WEB server working | - |
Command Mode
Global Configuration
Default
None
Usage
You can use this command to modify the address which WEB server works on, and specify a vrf to provide WEB server. The source address can only be 0.0.0.0 or loopback interface’s address, 0.0.0.0 indicates that the WEB server address is not specified.
Examples
The following example shows how to set inband http server address:
Switch# configure terminal
Switch(config)# http server source address 10.10.10.1
Related Commands
http server load
service http enable
service https enable
2.11.6 http server source port
Command Purpose
To configure the TCP port for HTTP server working inband on your switch, use the http server source port command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http server source port PORT
no http server source port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| PORT | Configure TCP port for HTTP server working inband | 1025-65535 |
Command Mode
Global Configuration
Default
80
Usage
The CLI of “no http server source port” will configure TCP port for HTTP server working inband with default value of 80.
Examples
The following example shows how to set inband http server TCP port:
Switch# configure terminal
Switch(config)# http server source port 1080
Related Commands
http server load
service http enable
service https enable
2.11.7 http server source ssl-port
Command Purpose
To configure the TCP port for HTTPS server working inband on your switch, use the http server source ssl-port command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http server source ssl-port PORT
no http server source ssl-port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| PORT | Configure TCP port for HTTPS server working inband | 1025-65535 |
Command Mode
Global Configuration
Default
443
Usage
The CLI of “no http server source ssl-port” will configure TCP port for HTTPS server working inband with default value of 443.
Examples
The following example shows how to set inband https server TCP port:
Switch# configure terminal
Switch(config)# http server source port 10443
Switch# configure terminal
Switch(config)# http server source ssl-port 10443
Related Commands
http server load
service http enable
service https enable
2.11.8 http server source mgmt-if port
Command Purpose
To configure the TCP port for HTTP server working outband on your switch, use the http server source mgmt-if port command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http server source mgmt-if port PORT
no http server source mgmt-if port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| PORT | Configure TCP port for HTTP server working outband | 1025-65535 |
Command Mode
Global Configuration
Default
80
Usage
The CLI of “no http server source mgmt-if port” will configure TCP port for HTTP server working outband with default value of 80.
Examples
The following example shows how to set outband http server TCP port:
Switch# configure terminal
Switch(config)# http server source mgmt-if port 1080
Related Commands
http server load
service http enable
service https enable
2.11.9 http server source mgmt-if ssl-port
Command Purpose
To configure the TCP port for HTTPS server working outband on your switch, use the http server source mgmt-if ssl-port command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http server source mgmt-if ssl-port PORT
no http server source mgmt-if port
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| PORT | Configure TCP port for HTTPS server working outband | 1025-65535 |
Command Mode
Global Configuration
Default
443
Usage
The CLI of “no http server source mgmt-if ssl-port” will configure TCP port for HTTPS server working outband with default value of 443.
Examples
The following example shows how to set outband https server TCP port:
Switch# configure terminal
Switch(config)# http server source port 10443
Related Commands
http server load
service http enable
service https enable
2.11.10 http authentication aaa
Command Purpose
To configure the AAA method list for web login on your switch, use the http authentication aaa command in Global Configuration. To restore the default value, use the no form of this command.
Command Syntax
http authentication ( local | aaa ( login-authentication | exec-authorization ) ( default | LISTNAME ) )
no http authentication ( aaa ( login-authentication | exec-authorization ) )
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| local | Configure web login authentication by local | - |
| aaa | Configure web login authentication by AAA | - |
| login-authentication | Configure web login authentication method list | - |
| exec-authorization | Configure web login authorization method list | - |
| default | Set method list name default | - |
| LISTNAME | Set method list name | Up to 31 characters |
Command Mode
Global Configuration
Default
default web login method is local
Usage
The CLI of “http authentication (local |aaa (login-authentication|exec-authorization) (default|LISTNAME))” can only be configured when AAA is enable.
Examples
The following example shows how to set web AAA login method to be default.:
Switch# configure terminal
Switch(config)# http authentication aaa login-authentication default
Related Commands
aaa new-model
aaa authentication login
aaa authorization exec
2.12 RPC-API commands Commands
2.12.1 service rpc-api
Command Purpose
To enable RPC-API service, use service rpc-api enable command in Global Configuration. To disable RPC-API service, use service rpc-api disable command.
Command Syntax
service rpc-api ( enable ( port PORT | ssl ( ssl-port SSLPORT | ) | ) ( vrf NAME | ) | disable )
service rpc-api disable
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enable | Turn on the RPC-API service | - |
| disable | Turn off the RPC-API service | - |
| PORT |
TCP port number. TCP port number. By default, the RPC-API service listens on TCP port 80 (HTTP) |
1025-65535 |
| vrf NAME | VPN Routing/Forwarding instance | A string with 1-15 characters |
| ssl | Enable SSL (HTTPS) | - |
| SSLPORT |
TCP port number. TCP port number. By default, the RPC-API service listens on TCP port 443 (HTTPS) |
1025-65535 |
Command Mode
Global Configuration
Default
Disabled.
Usage
None
Examples
The following example shows how to enable RPC-API service:
Switch# configure terminal
Switch(config)# service rpc-api enable port 2000
Related Commands
show services rpc-api
service rpc-api auth-mode
2.12.2 service rpc-api auth-mode
Command Purpose
To enable RPC-API HTTP Basic authentication.
Command Syntax
service rpc-api auth-mode basic
no service rpc-api auth-mode
Command Mode
Global Configuration
Default
Disabled.
Usage
Once enable or disable RPC-API HTTP Basic authentication, and users want to continue to use RPC-API service, users must re-enable it.
Examples
The following example shows how to enable RPC-API HTTP Basic authentication:
Switch# configure terminal
Switch(config)# service rpc-api auth-mode basic
Related Commands
service rpc-api enable
show services rpc-api
2.12.3 show services rpc-api
Command Purpose
To show RPC-API configuration information.
Command Syntax
show services rpc-api
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following example shows the configuration information:
Switch(config)# show services rpc-api
RPC API services configuration:
HTTP server: shutdown, port: 80, authentication mode: none
Related Commands
service rpc-api enable
2.13 DIAG Commands
2.13.1 diagnostic-information discard
Command Purpose
Use this command to enable the function of diagnostic-information discard.
Command Syntax
diagnostic-information discard enable
no diagnostic-information discard enable
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| enable | enable | The string of enable. |
Command Mode
Global Configuration
Default
no diagnostic-information discard enable
Usage
The command uses to enable the function of diagnostic-information discard.
Examples
The following example shows how to enable the function of diagnostic-information discard:
Switch(config)# diagnostic-information discard enable
The following example shows how to disable the function of diagnostic-information discard:
Switch(config)# no diagnostic-information discard enable
Related Commands
N/A
2.13.2 show diagnostic-information discard
Command Purpose
Use this command to display the situation of packet discard.
Command Syntax
show diagnostic-information discard
clear diagnostic-information discard
| Parameter | Parameter Description | Parameter Value |
|---|---|---|
| discard | discard | The string of discard. |
Command Mode
Privileged EXEC
Default
None
Usage
The command uses to dispaly the situation of packet discard.
Examples
The following example shows how to display the situation of packet discard:
Switch# show diagnostic-information discard
Diagnostic-Information Discard:
Drop-Reason Description
------------------------------+------------------------------------
CTC_DROP_TTL_CHK TTL check fail
CTC_DROP_ACL_DENY Acl deny
CTC_DROP_PKT_ERR Packet check error
CTC_DROP_ISOLATE_CHK Port isolate check fail
CTC_DROP_TRANSIT_DISABLE Transit disable
CTC_DROP_IP_CHK Ip address or packet check fail
CTC_DROP_VLAN_FILTER Vlan filtering
CTC_DROP_STP_CHK Stp check fail
CTC_DROP_CHKSUM_ERR Checksum error
CTC_DROP_PARSER_ERR Parser error
CTC_DROP_TRAFFIC_MANAGER Trafic manager check fail
CTC_DROP_NET_RX Netrx check fail
CTC_DROP_NET_TX Nettx check fail
Others Other drop reasons
The following example shows how to clear packet discard:
Switch# clear diagnostic-information discard
Related Commands
N/A

