- Table of Contents
-
- 01-Fundamentals Command Reference
- 00-Preface
- 01-CLI commands
- 02-RBAC commands
- 03-Login management commands
- 04-FTP and TFTP commands
- 05-File system management commands
- 06-Configuration file management commands
- 07-Software upgrade commands
- 08-ISSU commands
- 09-Emergency shell commands
- 10-Device management commands
- 11-Security zone commands
- 12-Tcl commands
- 13-Python commands
- 14-License management commands
- Related Documents
-
Title | Size | Download |
---|---|---|
09-Emergency shell commands | 106.20 KB |
Emergency shell commands
File system names, directory names, or file names must be compliant with the naming conventions. For more information about the naming conventions and the methods for specifying the names, see Fundamentals Configuration Guide.
Unless otherwise stated, a file or directory name argument in this document is case insensitive. It must contain the storage medium and cannot contain slot information. The path information might contain multiple levels of directories, each of which can have 1 to 255 characters. The file name alone (without the path information) can have 1 to 255 characters. The entire argument, including the file system name, the path information, and the file name, can have 1 to 511 characters. (In standalone mode.)
Unless otherwise stated, a file or directory name argument in this document is case insensitive. It must contain the file system name and cannot contain chassis or slot information. The path information might contain multiple levels of directories, each of which can have 1 to 255 characters. The file name alone (without the path information) can have 1 to 255 characters. The entire argument, including the file system name, the path information, and the file name, can include 1 to 511 characters. (In IRF mode.)
If the device has a flash memory and a CF card, you can access the flash memory and the CF card in emergency shell mode.
Examples in this chapter use the CF card. A different storage medium might be used on your device.
copy
Use copy to copy a file.
Syntax
copy fileurl-source fileurl-dest
Views
User view
Parameters
fileurl-source: Specifies the file to be copied.
fileurl-dest: Specifies the destination file or directory. If you specify a destination directory, the system uses the name of the source file as the file name.
Usage guidelines
If the destination file already exists, the system prompts whether or not to overwrite it. If you enter Y, the existing file is overwritten. If you enter N, the command is not executed.
Examples
# Copy the file cfa0:/test.cfg. Save the copy to the file cfa0:/testbackup.cfg.
<boot> copy cfa0:/test.cfg cfa0:/testbackup.cfg
Copy cfa0:/test.cfg to cfa0:/testbackup.cfg?[Y/N]:y
Start to copy cfa0:/test.cfg to cfa0:/testbackup.cfg...Done.
# Copy the file cfa0:/test.cfg and save the copy to the file cfa0:/testbackup.cfg. Overwrite the existing file that has the same name as the destination file.
<boot> copy cfa0:/test.cfg cfa0:/testbackup.cfg
Copy cfa0:/test.cfg to cfa0:/testbackup.cfg?[Y/N]:y
cfa0:/testbackup.cfg already exists. Overwrite it?[Y/N]:y
Start to copy cfa0:/test.cfg to cfa0:/testbackup.cfg...Done.
delete
Use delete to permanently delete a file.
Syntax
delete file-url
Views
User view
Parameters
file-url: Specifies the file to be deleted.
Examples
# Delete the tt.cfg file from the current directory.
<boot> delete cfa0:/tt.cfg
Delete cfa0:/tt.cfg? [Y/N]:y
Deleting the file permanently will take a long time. Please wait...
Start to delete cfa0:/tt.cfg...Done.
dir
Use dir to display files or directories.
Syntax
dir [ /all ] [ file-url ]
Views
User view
/all: Displays both hidden and non-hidden files and subdirectories.
file-url: Specifies a file or directory.
Usage guidelines
Task |
Command |
Remarks |
Display all non-hidden files and subdirectories in the current directory. |
dir |
N/A |
Display all files and subdirectories in the current directory. |
dir /all |
N/A |
Display all non-hidden files and subdirectories in a directory. |
dir file-url |
Specify a directory for the file-url argument. |
Display all files and subdirectories in a directory. |
dir /all file-url |
Specify a directory for the file-url argument. |
Display a file. |
dir file-url |
Specify a file for the file-url argument. |
Examples
# Display information about all files and directories in the system.
<boot> dir /all
Directory of cfa0:
0 drw- - Jan 01 2012 00:06:09 01
1 drw- - Sep 15 2012 04:03:14 test
2 drw- - Jan 01 2012 00:04:07 test1
3 drw- - Aug 26 2012 02:48:00 test123
4 drw- - Nov 05 2012 06:45:07 logfile
5 -rwh 20 Oct 20 2012 09:09:52 .snmpboots
6 drw- - Nov 05 2012 05:56:22 diagfile
7 drwh - Aug 20 2012 09:23:48 .trash
8 -rw- 816 Aug 20 2012 06:15:00 ifindex.dat
9 -rw- 3231 Aug 31 2012 09:01:41 startup.cfg
10 -rw- 60620 Aug 31 2012 09:01:43 startup.mdb
11 drw- - Sep 30 2012 04:43:24 versionInfo
12 drw- - Nov 05 2012 05:56:22 seclog
13 -rwh 18 Aug 20 2012 09:09:34 .pathfile
14 -rw- 11238400 Aug 30 2012 11:06:53 boot.bin
15 -rw- 0 Aug 31 2012 05:04:40 lauth.dat
16 -rw- 4383 Oct 20 2012 06:15:00 test.cfg
61440 KB total (11108 KB free)
# Display all unhidden files and directories in the system.
<boot> dir
Directory of cfa0:
0 drw- - Jan 01 2012 00:06:09 01
1 drw- - Sep 15 2012 04:03:14 test
2 drw- - Jan 01 2012 00:04:07 test1
3 drw- - Aug 26 2012 02:48:00 test123
4 drw- - Nov 05 2012 06:45:07 logfile
5 drw- - Nov 05 2012 05:56:22 diagfile
6 -rw- 816 Aug 20 2012 06:15:00 ifindex.dat
7 -rw- 3231 Aug 31 2012 09:01:41 startup.cfg
8 -rw- 60620 Aug 31 2012 09:01:43 startup.mdb
9 drw- - Sep 30 2012 04:43:24 versionInfo
10 drw- - Nov 05 2012 05:56:22 seclog
11 -rw- 11238400 Aug 30 2012 11:06:53 boot-t2301001.bin
12 -rw- 0 Aug 31 2012 05:04:40 lauth.dat
13 -rw- 4383 Aug 20 2012 06:15:00 test.cfg
61440 KB total (11108 KB free)
# Display information about the config.cfg file.
<boot> dir cfa0:/config.cfg
Directory of cfa0:
0 -rw- 3231 Aug 31 2012 09:01:41 startup.cfg
61440 KB total (11108 KB free)
Table 1 Command output
Field |
Description |
Directory of |
Current directory. |
7 -rw- 3231 Aug 31 2012 09:01:41 startup.cfg |
Information about a file or directory: · 7—Index number, automatically assigned by the system. · -rw-—Attributes of the file or directory. The first character is the directory indicator (d for directory and - for file). The second character indicates whether the file or directory is readable (r for readable). The third character indicates whether the file or directory is writable (w for writable). The last character indicates whether the file or directory is hidden (h for hidden and - for visible). · 3231—Size of the file, in bytes. For a directory, the value of this field is a hyphen (-). · Aug 31 2012 09:01:41—Time when the file was most recently modified. · startup.cfg—Name of the file or directory. |
Total size of the storage medium and size of the free space, in kilobytes. |
display copyright
Use display copyright to display copyright information.
Syntax
display copyright
Views
Any view
Examples
# Display copyright information.
<boot> display copyright
...
display install package
Use display install package to display information about a software package.
Syntax
display install package package
Views
Any view
Parameters
package: Specifies a .bin file in the filesystemname/filename.bin format, for example, cfa0:/a.bin. The file must be saved in the root directory of a file system on the device. The value string is case insensitive and can have a maximum of 63 characters.
Examples
# Display information about the system.bin software package.
<boot> display install package cfa0:/system.bin
Verifying the file cfa0:/system.bin ......Done.
cfa0:/system.bin
[Package]
Vendor: H3C
Product: sr66c1
Service name: system
Platform version: 7.1.064
Product version: Ess 7602P02
Supported board: 6602x
[Component]
Component: system
Description: system package
Table 2 Command output
Field |
Description |
Product |
Product name. |
Service name |
Type of the service package: · boot—Boot image. · system—System image. · patch—Patch package. If the value of this field is not boot, system, or patch, the service packet is a feature package. |
Platform version |
Platform version number. |
Product version |
Product version number. You determine whether the version of a system image matches that of a boot image by checking the value of this field. |
Supported board |
The value of this field represents the current device. |
[Component] |
Information about the components of the software package. |
display interface m-eth0
Use display interface m-eth0 to display information about the management Ethernet interface M-Eth 0.
Syntax
display interface m-eth0
Views
Any view
Examples
# Display information about the management Ethernet interface.
<boot> display interface m-eth0
m-eth0 current state: UP
Line protocol current state: UP
The Maximum Transmit Unit is 1500
Inet4 Address is 192.168.20.189/24
Inet6 Address is 1:1::1:1/64 Scope:Global
Inet6 Address is FE80::202:3FF:FE04:506/10 Scope:Link
IP Packet Frame Type:PKTFMT_ETHNT_2, Hardware Address: c4ca-d94c-e201
IPV6 Packet Frame Type:PKTFMT_ETHNT_2, Hardware Address: c4ca-d94c-e201
Input: 8983 packets, 0 errors, 0 dropped, 0 overruns, 2 frame
Output: 431 packets, 0 errors, 0 dropped, 0 overruns, 0 carrier,
0 collisions, 1000 txqueuelen
Input bytes:804168
Output bytes:30367
Table 3 Command output
Field |
Description |
m-eth0 current state |
Physical layer status of the management Ethernet interface: · Administratively DOWN—The interface has been shut down by using the shutdown command. · DOWN—The interface has been enabled by using the undo shutdown command, but its physical status is down. The interface might not have a cable connected or the cable has a problem. · UP—The interface has been enabled by using the undo shutdown command, and its physical status is up. |
Line protocol current state |
Link layer status of the interface. |
The Maximum Transmit Unit |
MTU of the interface. |
Inet4 Address |
IPv4 address of the interface. This field is displayed only when the device is configured with an IPv4 address. |
Inet6 Address |
IPv6 global unicast address of the interface. This field is displayed only when the device is configured with an IPv6 address. |
Inet6 Address is FE80::202:3FF:FE04:506/10 Scope:Link |
IPv6 link-local address of the interface. |
IP Packet Frame Type:PKTFMT_ETHNT_2, Hardware Address: c4ca-d94c-e201 |
Link layer encapsulation type and hardware address for IPv4 packets. |
IPV6 Packet Frame Type:PKTFMT_ETHNT_2, Hardware Address: c4ca-d94c-e201 |
Link layer encapsulation type and hardware address for IPv6 packets. |
Input: 8983 packets, 0 errors, 0 dropped, 0 overruns, 2 frame |
Statistics for received packets: · Total number. · Number of erroneous packets. · Number of dropped packets. · Number of packets encountering queue overflow errors. · Number of packets encountering frame queue errors. |
Output: 431 packets, 0 errors, 0 dropped, 0 overruns, 0 carrier, 0 collisions, 1000 txqueuelen |
Statistics for sent packets: · Total number. · Number of erroneous packets. · Number of dropped packets. · Number of packets encountering queue overflow errors. · Number of packets encountering carrier failures. · Number of packets with collision. · Number of packets permitted by the queue. |
Input bytes |
Total number of received bytes. |
Output bytes |
Total number of sent bytes. |
display ip routing-table
Use display ip routing-table to display IPv4 routing information.
Syntax
display ip routing-table
Views
Any view
Examples
# Display IPv4 routing information.
<boot> display ip routing-table
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.116.0 * 255.255.255.0 U 0 0 0 m-eth0
default 192.168.116.1 0.0.0.0 UG 0 0 0 m-eth0
Table 4 Command output
Field |
Description |
Kernel IP routing table |
IPv4 routing information. |
Destination |
Destination address. For the default route, the value of this field is default. |
Gateway |
Gateway address. If no gateway is needed, the value of this field is an asterisk (*). |
Genmask |
Subnet mask. For the default route, the value of this field is 0.0.0.0. |
Flags |
Flags: · A—The route was learned from a route advertisement. · C—The route is a cached route used to fast forward packets. · D—The route is the default route learned through neighbor discovery. · G—The route is a gateway route. · H—The route is a host route. · U—The route can be used. |
Metric |
Cost of the route. |
Ref |
Number of times the route has been referenced by other route entries. |
Use |
Number of times the route has been matched. |
Iface |
Outbound interface. |
display ipv6 routing-table
Use display ipv6 routing-table to display IPv6 routing information.
Syntax
display ipv6 routing-table
Views
Any view
Examples
# Display IPv6 routing information.
<boot> display ipv6 routing-table
Kernel IPv6 routing table
Destination Next Hop
Flags Metric Ref Use Iface
::1/128 ::
U 0 0 1 lo
FE80::201:2FF:FE03:406/128 ::
U 0 0 1 lo
FE80::/64 ::
U 256 0 0 m-eth0
FF02::1:2/128 FF02::1:2
UC 0 2888 0 m-eth0
FF00::/8 ::
U 256 0 0 m-eth0
Table 5 Command output
Field |
Description |
Kernel IPv6 routing table |
IPv6 routing information. |
Flags |
Flags: · A—The route was learned from a route advertisement. · C—The route is a cached route used to fast forward packets. · D—The route is the default route learned through neighbor discovery. · G—The route is a gateway route. · H—The route is a host route. · U—The route can be used. |
Metric |
Cost of the route. |
Ref |
Number of times the route has been referenced by other route entries. |
Use |
Number of times the route has been matched. |
Iface |
Outbound interface. If it is a loopback interface, the value of this field is lo. |
display version
Use display version to display boot image version information.
Syntax
display version
Views
Any view
Examples
# Display boot image version information.
<boot> display version
…
format
Use format to format a file system.
Syntax
format filesystem
Views
User view
Parameters
filesystem: Specifies a file system.
Usage guidelines
Use this command with caution. This command permanently deletes all files and directories from the file system, including the startup image files and startup configuration files. The deleted files and directories cannot be restored. Without startup images, the device cannot reboot.
Examples
# Format the cfa0: file system.
<boot> format cfa0:
All data on cfa0: will be lost, continue?[Y/N]:y
Formatting cfa0:… Done.
ftp
Use ftp to access an FTP server.
Syntax
ftp { server-ipv4-address | ipv6 server-ipv6-address } { get remote-file local-file | put local-file remote-file }
Views
User view
Parameters
server-ipv4-address: Specifies the IPv4 address of the FTP server.
server-ipv6-address: Specifies the IPv6 address of the FTP server.
get remote-file local-file: Downloads a file from the FTP server. The remote-file argument indicates the file to be downloaded. The local-file argument indicates the name for the downloaded file.
put local-file remote-file: Uploads a file to the FTP server. The local-file argument indicates the file to be uploaded. The remote-file argument indicates the name for the uploaded file.
Usage guidelines
If the traffic is heavy and the file transfer speed is low, you can press Ctrl+C to abort the transfer and try again later.
Examples
# Log in to FTP server 192.168.1.100. Download the 111.txt file and save it to a local file named 222.txt.
<boot> ftp 192.168.1.100 get 111.txt cfa0:/222.txt
User: test
Password: ***
install load
Use install load to load a system image and start the Comware system.
Syntax
install load system-package
Views
User view
Parameters
system-package: Specifies the .bin system image file in the filesystemname/filename.bin format, for example, cfa0:/startup-system.bin. The filesystemname cannot contain slot information. The file must be saved in the root directory of a file system on the current device. The value string is case insensitive and can have a maximum of 63 characters.
Usage guidelines
This command modifies the main startup image list to include only the boot image and system image. The modification ensures that the device can reboot correctly.
After the Comware system starts up, you can load feature and patch images. For more information, see the chapters about software upgrade and ISSU in Fundamentals Configuration Guide.
Examples
# Load a system image and start the Comware system.
<boot> install load cfa0:/system.bin
Check package cfa0:/system.bin ...
Verifying the file flash:/system.bin ......Done.
Extracting package ...
Loading...
Line con1 is available.
Press ENTER to get started.
interface m-eth0
Use interface m-eth0 to enter management Ethernet interface view.
Syntax
interface m-eth0
Views
System view
Usage guidelines
In management Ethernet interface view, you can assign an IP address to the interface and specify a gateway.
Examples
# Enter management Ethernet interface view.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0]
Related commands
quit
ip address
Use ip address to assign an IPv4 address to the management Ethernet interface.
Use undo ip address to restore the default.
Syntax
ip address ip-address { mask-length | mask }
undo ip address
Default
No IPv4 address is assigned to the management Ethernet interface.
Views
Management Ethernet interface view
Parameters
ip-address: Specifies an IPv4 address in dotted decimal notation.
mask-length: Specifies the length of the subnet mask, in the range of 1 to 31.
mask: Specifies the subnet mask in dotted decimal notation.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
When the management Ethernet interface is manually shut down, assigning it an IPv4 address or removing its IPv4 address activates it at the same time.
The IP address assigned to the management Ethernet interface must be different from the IP addresses of the other devices on the network.
Examples
# Assign the IPv4 address 192.168.1.1/24 to the management Ethernet interface.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0] ip address 192.168.1.1 24
ip gateway
Use ip gateway to specify an IPv4 gateway for the management Ethernet interface.
Use undo ip gateway to restore the default.
Syntax
ip gateway ip-address
undo ip gateway
Default
No IPv4 gateway is specified for the management Ethernet interface.
Views
Management Ethernet interface view
Parameters
ip-address: Specifies the IPv4 address of an IPv4 gateway in dotted decimal notation.
Usage guidelines
When the device needs to communicate with a device on a remote IPv4 network, you must specify an IPv4 gateway for the management Ethernet interface.
If you execute this command multiple times, the most recent configuration takes effect.
Changing or removing the IPv4 address of the management Ethernet interface deletes the interface's IPv4 gateway configuration.
Examples
# Configure the management Ethernet interface to use the IPv4 gateway 192.168.1.5.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0] ip gateway 192.168.1.5
ipv6 address
Use ipv6 address to assign an IPv6 address to the management Ethernet interface.
Use undo ipv6 address to restore the default.
Syntax
ipv6 address ipv6-address prefix-length
undo ipv6 address
Default
No IPv6 address is assigned to the management Ethernet interface .
Views
Management Ethernet interface view
Parameters
ipv6-address: Specifies an IPv6 address.
prefix-length: Specifies a prefix length in the range of 1 to 127.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
When the management Ethernet interface is manually shut down, assigning it an IPv6 address or removing its IPv6 address activates it at the same time.
Examples
# Assign the IPv6 address 2001::1/64 to the management Ethernet interface.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0] ipv6 address 2001::1 64
ipv6 gateway
Use ipv6 gateway to specify an IPv6 gateway for the management Ethernet interface.
Use undo ipv6 gateway to restore the default.
Syntax
ipv6 gateway link-local
undo ipv6 gateway
Default
No IPv6 gateway is specified for the management Ethernet interface.
Views
Management Ethernet interface view
Parameters
link-local: Specifies the link-local address of an IPv6 gateway.
Usage guidelines
When the device needs to communicate with a device on a remote IPv6 network, you must specify an IPv6 gateway for the management Ethernet interface.
If you execute this command multiple times, the most recent configuration takes effect.
Changing or removing the IPv6 address of the management Ethernet interface deletes the interface's IPv6 gateway configuration.
Examples
# Configure the management Ethernet interface to use the IPv6 gateway FE80::BAAF:67FF:FE27:DCD0.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0] ipv6 gateway fe80::baaf:67ff:fe27:dcd0
mkdir
Use mkdir to create a directory.
Syntax
mkdir directory
Views
User view
Parameters
directory: Specifies a directory.
Usage guidelines
You can create a directory only in an existing directory. For example, to create the cfa0:/test/mytest directory, the directory test must already exist.
The name of the directory to be created must be unique in the parent directory.
Examples
# Create a directory named test in the root directory of the cfa0: file system.
<boot> mkdir cfa0:/test
Directory cfa0:/test created.
# Create a directory named subtest in the cfa0:/test directory.
<boot> mkdir cfa0:/test/subtest
Directory cfa0:/test/subtest created.
Related commands
dir
rmdir
more
Use more to display the contents of a file.
Syntax
more file-url
Views
User view
Parameters
file-url: Specifies a file.
Examples
# Display the contents of the file test.txt.
<boot> more cfa0:/test.txt
Have a nice day.
move
Use move to move a file.
Syntax
move fileurl-source fileurl-dest
Views
User view
Parameters
fileurl-source: Specifies the name of the file to be moved, a case-insensitive string of 1 to 63 characters.
fileurl-dest: Specifies the name of the destination file or directory, a case-insensitive string of 1 to 63 characters.
Usage guidelines
If a file in the destination directory is using the destination file name, the system prompts whether or not to overwrite the existing file. If you enter Y, the existing file is overwritten. If you enter N, the command is not executed.
Examples
# Move the config.cfg file to the cfa0:/test directory.
<boot>move cfa0:/config.cfg cfa0:/test/
Move cfa0:/config.cfg to cfa0:/test/config.cfg?[Y/N]:y
<boot> dir cfa0:/test
Directory of cfa0:/test
0 -rw- 77065 Oct 20 1939 06:15:02 test.mdb
61440 KB total (11108 KB free)
ping
Use ping to check the connectivity to an IPv4 address.
Syntax
ping [ -c count | -s size ] * ip-address
Views
Any view
Parameters
-c count: Specifies the number of ICMP echo requests to send, in the range of 1 to 2147483647. The default is 5.
-s size: Specifies the length (in bytes) of each ICMP echo request, in the range of 20 to 8100. The default is 56.
ip-address: Specifies the IPv4 address of the destination in dotted decimal notation.
Usage guidelines
When you execute the ping command, the device sends ICMP echo requests to the destination. You can press Ctrl+C to abort the ping operation.
Examples
# Check the connectivity to the destination 1.2.1.1.
<boot> ping 1.2.1.1
PING 1.2.1.1 (1.2.1.1): 56 data bytes
56 bytes from 1.2.1.1: seq=0 ttl=128 time=2.243 ms
56 bytes from 1.2.1.1: seq=1 ttl=128 time=0.717 ms
56 bytes from 1.2.1.1: seq=2 ttl=128 time=0.891 ms
56 bytes from 1.2.1.1: seq=3 ttl=128 time=0.745 ms
56 bytes from 1.2.1.1: seq=4 ttl=128 time=0.911 ms
--- 1.2.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.717/1.101/2.243 ms
Field |
Description |
PING 1.2.1.1 (1.2.1.1) |
Checking the connectivity to the device at 1.2.1.1. |
56 data bytes |
Number of data bytes in each ICMP echo request. |
56 bytes from 1.2.1.1: seq=0 ttl=128 time=2.243 ms |
Received an ICMP reply from the device at 1.2.1.1. Fields of the reply: · bytes—Number of data bytes in the ICMP reply. · seq—Sequence number of the reply. You can examine the sequence numbers of replies to determine whether packets are missing, disordered, or duplicated. · ttl—TTL value in the ICMP reply. · time—Response time. |
--- 1.2.1.1 ping statistics --- |
Statistics for packets sent and received during the ping operation. |
5 packets transmitted |
Number of ICMP echo requests sent. |
5 packets received |
Number of ICMP echo replies received. |
0% packet loss |
Percentage of echo requests that failed to be echoed back. |
round-trip min/avg/max = 0.717/1.101/2.243 ms |
Minimum/average/maximum response time, in milliseconds. |
ping ipv6
Use ping ipv6 to check the connectivity to an IPv6 address.
Syntax
ping ipv6 [ -c count | -s size ] * ipv6-address
Views
Any view
Parameters
-c count: Specifies the number of ICMPv6 echo requests to send, in the range of 1 to 2147483647. The default is 5.
-s size: Specifies the length (in bytes) of each ICMPv6 echo request, in the range of 20 to 8100. The default is 56.
Ipv6-address: Specifies the IPv6 address of the destination.
Usage guidelines
When you execute the ping ipv6 command, the device sends ICMPv6 echo requests to the destination. You can press Ctrl+C to abort the ping operation.
Examples
# Check the connectivity to the destination 2001::2.
<boot> ping ipv6 2001::2
ping ipv6 2001::2
PING 2001::2 (2001::2): 56 data bytes
56 bytes from 2001::2: seq=0 ttl=64 time=5.420 ms
56 bytes from 2001::2: seq=1 ttl=64 time=1.140 ms
56 bytes from 2001::2: seq=2 ttl=64 time=2.027 ms
56 bytes from 2001::2: seq=3 ttl=64 time=0.887 ms
56 bytes from 2001::2: seq=4 ttl=64 time=0.791 ms
--- 2001::2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.791/2.053/5.420 ms
For information about the fields, see Table 6.
pwd
Use pwd to display the working directory.
Syntax
pwd
Views
User view
Examples
# Display the working directory.
<boot> pwd
cfa0:
quit
Use quit to return to the upper-level view.
Syntax
quit
Views
System view
Management Ethernet interface view
Examples
# Return from management Ethernet interface view to user view.
[boot-m-eth0] quit
[boot] quit
<boot>
reboot
Use the reboot command to reboot the device.
Syntax
reboot
Views
User view
Examples
# Reboot the current device.
<boot> reboot
reset ssh public-key
Use reset ssh public-key to delete all SSH server public keys saved on the device.
Syntax
reset ssh public-key
Views
User view
Usage guidelines
The first time you use the ssh2 command to connect to an SSH server, the device saves the server's public key locally. The device can then use the public key to authenticate the server when you connect to the server from the device again. If the server changes its public key, the public keys will not match anymore and you cannot connect to the server. To solve this problem, use this command to delete all SSH server public keys saved on the device.
Examples
# Delete all SSH server public keys saved on the device.
<boot> ssh2 192.168.1.59
login as:client001
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the DSA key sent by the remote host is
83:2d:b6:90:4a:1b:0e:c1:ea:af:09:3a:65:09:8a:b3.
Please contact your system administrator.
DSA host key for 192.168.1.59 has changed and you have requested strict checking
.
Host key verification failed.
<boot> reset ssh public-key
<boot> ssh2 192.168.1.59
login as:client001
The authenticity of host '192.168.1.59 (192.168.1.59)' can't be established.
DSA key fingerprint is 83:2d:b6:90:4a:1b:0e:c1:ea:af:09:3a:65:09:8a:b3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.59' (DSA) to the list of known hosts.
[email protected]'s password:
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname.59>
rmdir
Use rmdir to delete an existing directory.
Syntax
rmdir directory
Views
User view
Parameters
directory: Specifies the directory to be deleted.
Usage guidelines
To delete a directory, first delete the files and subdirectories in the directory. To delete files, use the delete command.
Examples
# Delete the mydir directory.
<boot> rmdir cfa0:/mydir
Remove directory cfa0:/mydir?[Y/N]:y
Directory cfa0:/1 removed.
Related commands
delete
dir
mkdir
shutdown
Use shutdown to shut down the management Ethernet interface.
Use undo shutdown to bring up the management Ethernet interface.
Syntax
shutdown
undo shutdown
Default
The management Ethernet interface is up.
Views
Management Ethernet interface view
Usage guidelines
When the management Ethernet interface is not operating correctly, you can shut it down and then bring it up.
Examples
# Shut down the management Ethernet interface.
<boot> system-view
[boot] interface m-eth0
[boot-m-eth0] shutdown
# Bring up the management Ethernet interface.
[boot-m-eth0] undo shutdown
ssh2
Use ssh2 to log in to an SSH server.
Syntax
ssh2 { server-ipv4-address | ipv6 server-ipv6-address }
Views
User view
Parameters
server-ipv4-address: Specifies the IPv4 address of the SSH server in dotted decimal notation.
ipv6 server-ipv6-address: Specifies the IPv6 address of the SSH server.
Usage guidelines
If the SSH server does not respond, you can press Ctrl+C to abort the login attempt and try again later.
Examples
# Connect to the SSH server 192.168.1.59 for the first time.
<boot> ssh2 192.168.1.59
login as:client001
The authenticity of host '192.168.1.59 (192.168.1.59)' can't be established.
DSA key fingerprint is 3d:ee:1f:f9:81:be:4f:aa:42:88:1c:ab:81:4e:95:6f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.59' (DSA) to the list of known hosts.
[email protected]'s password:
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Syaname.59>
# Connect to the SSH server 192.168.1.59 for the second time.
<boot> ssh2 192.168.1.59
login as:client001
[email protected]'s password:
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Syaname.59>
system-view
Use system-view to enter system view from user view.
Syntax
system-view
Views
User view
Examples
# Enter system view from user view.
<boot> system-view
[boot]
Related commands
quit
telnet
Use telnet to log in to a Telnet server.
Syntax
telnet { server-ipv4-address | ipv6 server-ipv6-address }
Views
User view
Parameters
server-ipv4-address: Specifies the IPv4 address of the Telnet server in dotted decimal notation.
server-ipv6-address: Specifies the IPv6 address of the Telnet server.
Usage guidelines
If the Telnet server does not respond, you can press Ctrl+K to abort the login attempt and try again later.
Examples
# Log in to the Telnet server 192.168.100.1.
<boot> telnet 192.168.100.1
tftp
Use tftp to access to a TFTP server.
Syntax
tftp server-ipv4-address { get remote-file local-file | put local-file remote-file }
tftp ipv6 server-ipv6-address { get remote-file local-file | put local-file remote-file }
Views
User view
Parameters
server-ipv4-address: Specifies the IPv4 address of the TFTP server in dotted decimal notation.
server-ipv6-address: Specifies the IPv6 address of the TFTP server.
get remote-file local-file: Downloads a file from the TFTP server. The remote-file argument indicates the file to be downloaded. The local-file argument indicates the name for the downloaded file.
put local-file remote-file: Uploads a file to the TFTP server. The local-file argument indicates the file to be uploaded. The remote-file argument indicates the name for the uploaded file.
Usage guidelines
If the traffic is heavy and the file transfer speed is low, you can press Ctrl+C to abort the transfer and try again later.
Examples
# Download the 111.txt file from the TFTP server 192.168.1.100, and save the copy to a local file named 222.txt.
<boot> tftp 192.168.1.100 get 111.txt cfa0:/222.txt
# Upload the startup configuration file named startup.cfg to the TFTP server 192.168.1.100.
<boot> tftp 192.168.1.100 put cfa0:/startup.cfg startup.cfg