01-Fundamentals Command Reference

HomeSupportSwitchesS7500E SeriesReference GuidesCommand ReferencesH3C S7500E Switch Series Command References-Release758X-6W10001-Fundamentals Command Reference
09-Emergency shell commands
Title Size Download
09-Emergency shell commands 130.87 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 must contain the file system name and cannot contain file system location information. The path information can 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 can have 1 to 511 characters.

copy

Use copy to copy a file.

Syntax

copy source-file { dest-file | dest-directory }

Views

User view

Parameters

source-file: Specifies the file to be copied.

dest-file: Specifies the destination file.

dest-directory: Specifies the destination directory. The system uses the name of the source file as the name for the destination file.

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 test.cfg file. Save the copy to 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 the test.cfg file and save the copy to 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

Views

User view

Parameters

file: Specifies the file to be deleted.

Examples

# Delete the tt.cfg file.

<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 | directory ]

Views

User view

Parameters

/all: Displays both hidden and non-hidden files and subdirectories.

file: Specifies a file or directory.

directory: Specifies a 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 directory

Specify a directory for the directory argument.

Display all files and subdirectories in a directory.

dir /all directory

Specify a directory for the directory argument.

Display a file.

dir file

Specify a file for the file argument.

Examples

# Display information about all files and directories in the system.

<boot> dir /all

Directory of flash:

     0      drw-           -  Jan 01 2012 00:06:09     01

     1      drw-           -  Sep 15 2012 04:03:14     pki

     2      drw-           -  Jan 01 2012 00:04:07     test

     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-t2301001.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 flash:

     0      drw-           -  Jan 01 2012 00:06:09     01

     1      drw-           -  Sep 15 2012 04:03:14     pki

     2      drw-           -  Jan 01 2012 00:04:07     test

     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 flash:/config.cfg

Directory of flash:

     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.

61440 KB total (11108 KB free)

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 system image file in the filesystemname/filename.bin format, for example, flash:/startup-system.bin. The file must be saved in the root directory of a file system on the current MPU. The value string can have a maximum of 63 characters. The filesystemname cannot contain file system location information.

Examples

# Display information about the system.bin software package.

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

Verifying the file flash:/system-t6101010.bin ..................Done.

  flash:/system-t6101010.bin

  [Package]

  Vendor: H3C

  Product: S7500E

  Service name: system

  Platform version: 7.1.070

  Product version: Test 0001010

  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.

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

Types of cards that the software package supports:

·     mpu—MPU.

·     lpu—Service card.

[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 management Ethernet interface M-Eth 0.

<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 flash: file system.

<boot> format flash:

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

Formatting flash:… 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 flash:/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 a .bin system image file in the filesystemname/filename.bin format, for example, flash:/startup-system.bin. The file must be saved in the root directory of a file system on the current MPU. The value string can have a maximum of 63 characters. The filesystemname cannot contain file system location information.

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 software upgrade and ISSU in Fundamentals Configuration Guide.

Examples

# Load a system image and start the Comware system.

<boot> install load flash:/system.bin

Check package flash:/system.bin ...

Verifying the file flash:/system.bin ........Done.

Extracting package ...

 

Loading...

Cryptographic algorithms tests passed.

Line aux1 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 flash:/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.

<boot> mkdir flash:/test

Directory flash:/test created.

# Create a directory named subtest in the flash:/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 text file.

Syntax

more file

Views

User view

Parameters

file: Specifies a text file.

Examples

# Display the contents of the test.txt file.

<boot> more flash:/test.txt

Have a nice day.

move

Use move to move a file.

Syntax

move source-file { dest-file | dest-directory }

Views

User view

Parameters

source-file: Specifies the name of the file to be moved, a case-insensitive string of 1 to 63 characters.

dest-file: Specifies the name for the destination file, a case-insensitive string of 1 to 63 characters.

dest-directory: Specifies the name of the directory, a case-insensitive string of 1 to 63 characters. The system moves the file without changing the file name.

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 flash:/test 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     config.cfg

 

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

flash:

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 reboot to reboot the current MPU.

Syntax

reboot

Views

User view

Examples

# Reboot the current MPU.

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

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> quit

<boot>

# Connect to the 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

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 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 flash:/222.txt

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

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

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网