01-Fundamentals Command Reference

HomeSupportResource CenterSwitchesH3C S6300 Switch SeriesH3C S6300 Switch SeriesTechnical DocumentsCommandCommand ReferencesH3C S6300 Switch Series Command References-Release 243x-6W10001-Fundamentals Command Reference
09-Emergency shell commands
Title Size Download
09-Emergency shell commands 130.24 KB

Emergency shell commands

Unless otherwise stated, a file name or path argument in this document is case insensitive, and must indicate the storage medium and contain no slot information. The path information might contain multiple levels of directories, and each can include 1 to 255 characters. The file name alone (without the path information) can include 1 to 255 characters. The argument, including the storage medium, the path information, and the file name, can include 1 to 511 characters.

Examples in this chapter use the flash memory. The device might have a different storage medium.

copy

Use copy to copy a file.

Syntax

copy fileurl-source fileurl-dest

Views

User view

Parameters

fileurl-source: Specifies the name of the file to be copied.

fileurl-dest: Specifies the name of the destination file or directory. If you specify a destination directory, 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.

Examples

# Copy flash:/test.cfg to flash:/testbackup.cfg.

<boot> copy flash:/test.cfg flash:/testbackup.cfg

Copy flash:/test.cfg to flash:/testbackup.cfg?[Y/N]:y

Start to copy flash:/test.cfg to flash:/testbackup.cfg...Done.

# Copy flash:/test.cfg to flash:/testbackup.cfg. Overwrite the existing file that has the same name as the destination file.

<boot> copy flash:/test.cfg flash:/testbackup.cfg

Copy flash:/test.cfg to flash:/testbackup.cfg?[Y/N]:y

flash:/testbackup.cfg already exists. Overwrite it?[Y/N]:y

Start to copy flash:/test.cfg to flash:/testbackup.cfg...Done.

delete

Use delete to permanently delete a file.

Syntax

delete file-url

Views

User view

Parameters

file-url: Specifies the name of the file to be deleted.

Examples

# Delete the tt.cfg file from the current directory.

<boot> delete flash:/tt.cfg

Delete flash:/tt.cfg? [Y/N]:y

Deleting the file permanently will take a long time. Please wait...

Start to delete flash:/tt.cfg...Done.

dir

Use dir to display files or directories.

Syntax

dir [ /all ] [ file-url ]

Views

User view

Parameters

/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 flash:

     0      -rwh          20  Jan 01 2011 01:59:37     .snmpboots

     1      -rw-      104833  Jan 01 2011 05:46:24     startup.mdb

     2      drwh           -  Jan 01 2011 04:36:53     .trash

     3      drw-           -  Jan 03 2011 03:33:27     versionInfo

     4      -rw-        5341  Jan 01 2011 05:46:24     startup.cfg

     5      -rw-    11109376  Jan 03 2011 03:26:14     s6300-cmw710-boot-e2415

.bin

     6      -rw-        3707  Jan 01 2011 01:26:51     startup.cfg_bak

     7      -rw-    33161216  Jan 01 2011 00:00:28     .pathfile

     8      drw-           -  Jan 01 2011 00:00:24     seclog

     9      drw-           -  Jan 01 2011 00:00:24     diagfile

    10      drw-           -  Jan 01 2011 00:12:20     logfile

    11      -rw-         203  Jan 01 2011 05:28:14     lauth.dat

    12      drw-           -  Jan 01 2011 00:00:30     license

    13      -rw-        1646  Jan 01 2011 05:46:24     ifindex.dat

 

524288 KB total (147072 KB free)

# Display all unhidden files and directories in the system.

<boot>dir

Directory of flash:

     0      -rw-      104833  Jan 01 2011 05:46:24     startup.mdb

     1      drw-           -  Jan 03 2011 03:33:27     versionInfo

     2      -rw-        5341  Jan 01 2011 05:46:24     startup.cfg

     3      -rw-    11109376  Jan 03 2011 03:26:14     s6300-cmw710-boot-e2415

.bin

     4      -rw-        3707  Jan 01 2011 01:26:51     startup.cfg_bak

     5      drw-           -  Jan 01 2011 00:00:24     seclog

     6      drw-           -  Jan 01 2011 00:00:24     diagfile

     7      drw-           -  Jan 01 2011 00:12:20     logfile

     8      -rw-         203  Jan 01 2011 05:28:14     lauth.dat

     9      drw-           -  Jan 01 2011 00:00:30     license

    10      -rw-        1646  Jan 01 2011 05:46:24     ifindex.dat

 

524288 KB total (147072 KB free)

# Display information about the startup.cfg file.

<boot>dir flash:/startup.cfg

Directory of flash:

     0      -rw-        5341  Jan 01 2011 05:46:24     startup.cfg

524288 KB total (147072 KB free)

Table 1 Command output

Field

Description

Directory of

Current directory.

     0      -rw-      104833  Jan 01 2011 05:46:24     startup.mdb

Information about a file or directory:

·     0—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).

·     104833—Size of the file, in bytes. For a directory, the value of this field is a hyphen (-).

·     Jan 01 2011 05:46:24—Time when the file was most recently modified.

·     startup.mdb—Name of the file or directory.

524288 KB total (147072 KB free)

Total size of the storage medium and size of the free space, in kilobytes.

 

display copyright

Use display copyright to display the copyright information.

Syntax

display copyright

Views

Any view

Examples

# Display the 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 software package name with the extension .bin, a case-insensitive string of 1 to 127 characters. This argument must indicate the name of the storage medium, such as flash:/a.bin. The software package must be saved in the root directory of the storage medium.

Examples

# Display information about the system.bin software package.

<boot> display install package flash:/system.bin

  flash:/system.bin

  [Package]

  Vendor: H3C

  Product: S6300

  Service name: system

  Platform version: 7.1.045

  Product version: ESS 2415

  Supported board: mpu

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

The value of this field is any other value for feature packages.

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

Types of cards that the software package supports. The value of mpu indicates the member 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 port M-Eth 0.

Syntax

display interface m-eth0

Views

Any view

Examples

# Display information about the management Ethernet port.

<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 the version information of the boot image.

Syntax

display version

Views

Any view

Examples

# Display the version information of the boot image.

<boot> display version

format

Use format to format a storage medium.

Syntax

format storage-medium

Views

User view

Parameters

storage-medium: Specifies the name of a storage medium.

Usage guidelines

Use the format command with caution. This command permanently deletes all files and directories from a storage medium, including the startup boot image and startup configuration files. The deleted files and directories cannot be restored. Without a boot image, the device cannot reboot.

Examples

# Format the Flash.

<boot> format flash:

All data on flash: will be lost, continue?[Y/N]:y

Formatting flash:… Done.

ftp

Use ftp to access a remote FTP server.

Syntax

ftp { server-ipv4-address | ipv6 server-ipv6-address } user username password password { 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.

user username: Specifies the login username, a case-sensitive string of 1 to 15 characters.

password password: Specifies the login password, a case-sensitive string of 1 to 15 characters.

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 by using the username test and password 123. Download the 111.txt file and save it to a local file named 222.txt.

<boot> ftp 192.168.1.100 user test password 123 get 111.txt flash:/222.txt

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 name of the system image, a case-insensitive string of 1 to 63 characters. This file must be saved in the root directory of the current member device's storage medium, with the extension .bin. The file name must indicate the storage medium and cannot contain slot information, for example, flash:/startup-system.bin.

Usage guidelines

When you execute this command, the system modifies the main startup software image set to include only the boot image and system image so the device can reboot correctly.

After the Comware system is started, 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 flash:/s6300-cmw710-system-e2415.bin

Check package flash:/s6300-cmw710-system-e2415.bin...

Extracting package ...

Loading...

            Board checking........................LSW252QF

            SDRAM fast selftest........................OK!

            Flash fast selftest........................OK!

            CPLD selftest..............................OK!

            Switch chip selftest.......................OK!

            PHY selftest...............................OK!

            Please check leds....................FINISHED!

Line aux0 is available.

Press ENTER to get started.

interface m-eth0

Use interface m-eth0 to enter management Ethernet port view.

Syntax

interface m-eth0

Views

System view

Usage guidelines

In management Ethernet port view, you can assign an IP address to the port and specify a gateway.

Examples

# Enter management Ethernet port 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 port.

Use undo ip address to restore the default.

Syntax

ip address ip-address { mask-length | mask }

undo ip address

Default

The management Ethernet port has no IPv4 address.

Views

Management Ethernet port 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

The management Ethernet port can have only one IPv4 address. If you execute this command multiple times, the most recent configuration takes effect.

When the management Ethernet port 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 port must be different from the IP addresses of the other devices on the network.

Examples

# Assign IPv4 address 192.168.1.1/24 to the management Ethernet port.

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

Use undo ip gateway to restore the default.

Syntax

ip gateway ip-address

undo ip gateway

Default

The management Ethernet port has no IPv4 gateway configured.

Views

Management Ethernet port view

Parameters

ip-address: Specifies an IPv4 gateway address 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 port.

If you execute this command multiple times, the most recent configuration takes effect.

Changing or removing the IPv4 address of the management Ethernet port removes the port's IPv4 gateway configuration.

Examples

# Configure the management Ethernet port to use 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 port.

Use undo ipv6 address to restore the default.

Syntax

ipv6 address ipv6-address prefix-length

undo ipv6 address

Default

The management Ethernet port has no IPv6 address.

Views

Management Ethernet port view

Parameters

ipv6-address: Specifies an IPv6 address.

prefix-length: Specifies a prefix length in the range of 1 to 127.

Usage guidelines

The management Ethernet port can have only one IPv6 address. If you execute this command multiple times, the most recent configuration takes effect.

When the management Ethernet port is manually shut down, assigning it an IPv6 address or removing its IPv6 address activates it at the same time.

Examples

# Assign IPv6 address 2001::1/64 to the management Ethernet port.

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

Use undo ipv6 gateway to restore the default.

Syntax

ipv6 gateway link-local

undo ipv6 gateway

Default

The management Ethernet port has no IPv6 gateway configured.

Views

Management Ethernet port 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 port.

If you execute this command multiple times, the most recent configuration takes effect.

Changing or removing the IPv6 address of the management Ethernet port removes the port's IPv6 gateway configuration.

Examples

# Configure the management Ethernet port to use 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 on a storage medium.

Syntax

mkdir directory

Views

User view

Parameters

directory: Specifies a directory name.

Usage guidelines

The path must already exist. For example, to create the flash:/test/mytest directory, the directory test must already exist on the Flash.

The name for the new directory must be unique in the upper-level directory.

Examples

# Create a directory named test in the current directory.

<boot> mkdir flash:/test

Directory flash:/test created.

# Create a directory named subtest in the test directory.

<boot> mkdir flash:/test/subtest

Directory flash:/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 name.

Examples

# Display the contents of file test.txt.

<boot> more flash:/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 you specify a non-existent destination file name, the command moves the source file to the destination directory and renames it.

If you specify an existing destination file name, the system prompts whether or not to overwrite the existing file.

Examples

# Move the config.cfg file to the flash:/002 directory.

<boot>move flash:/config.cfg flash:/test/

Move flash:/config.cfg to flash:/test/config.cfg?[Y/N]:y

<boot> dir flash:/test

Directory of flash:/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

Table 6 Command output

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 more information about the fields, see Table 6.

pwd

Use pwd to display the current path.

Syntax

pwd

Views

User view

Examples

# Display the current path.

<boot> pwd

flash:

quit

Use quit to return to the upper level view.

Syntax

quit

Views

System view, management Ethernet port view

Examples

# Return from management Ethernet port view to user view.

[boot-m-eth0] quit

[boot] quit

<boot>

reboot

Use reboot to reboot the current member device.

Syntax

reboot

Views

User view

Examples

# Reboot the current member device.

<boot> reboot

reset ssh public-key

Use reset ssh public-key to delete all 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 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 server public keys saved on the device.

Examples

# Delete all 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 RSA 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.

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

RSA 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' (RSA) to the list of known hosts.

client001@192.168.1.59's password:

****************************************************************************** 

* Copyright (c) 2004-2017 New H3C Technologies 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 name of 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 flash:/mydir

Remove directory flash:/mydir?[Y/N]:y

Directory flash:/1 removed. 

Related commands

·     delete

·     dir

·     mkdir

shutdown

Use shutdown to shut down the management Ethernet port.

Use undo shutdown to bring up the management Ethernet port.

Syntax

shutdown

undo shutdown

Default

The management Ethernet port is up.

Views

Management Ethernet port view

Usage guidelines

When the management Ethernet port is not operating correctly, you can shut it down and then bring it up.

Examples

# Shut down the management Ethernet port.

<boot> system-view

[boot] interface m-eth0

[boot-m-eth0] shutdown

# Bring up the management Ethernet port.

[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

# Use SSH to connect to 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.

RSA 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' (RSA) to the list of known hosts.

client001@192.168.1.59's password:

****************************************************************************** 

* Copyright (c) 2004-2017 New H3C Technologies Co., Ltd. All rights reserved.* 

* Without the owner's prior written consent,                                 * 

* no decompiling or reverse-engineering shall be allowed.                    * 

****************************************************************************** 

                                                                               

<Syaname.59>

# Use SSH to connect to SSH server 192.168.1.59 for the second time.

<boot> ssh2 192.168.1.59

login as:client001

client001@192.168.1.59's password:

 

****************************************************************************** 

* Copyright (c) 2004-2017 New H3C Technologies 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

Usage guidelines

After the device enters emergency shell mode, you are placed in 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

# Telnet to Telnet server 192.168.100.1.

<boot> telnet 192.168.100.1

tftp

Use tftp to log in 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

# Log in to TFTP server 192.168.1.100, download the 111.txt file, and save it to a local file named 222.txt.

<boot> tftp 192.168.1.100 get 111.txt flash:/222.txt

# Upload the startup configuration file named startup.cfg to TFTP server 192.168.1.100.

<boot> tftp 192.168.1.100 put flash:/startup.cfg startup.cfg