Syntax
clock datetime HH:MM:SS YYYY/MM/DD
View
User view
Parameter
HH:MM:SS:
Current time, where HH ranges from 0 to 23, MM and SS
range from 0 to 59.
YYYY/MM/DD
or MM/DD/YYYY: Current date, where YYYY is the year ranging from
2000 to 2099, MM is the month ranging from 1 to 12, and DD is the
day ranging from 1 to 31.
Description
Use the clock datetime command to
set the current date and time of the Ethernet switch.
By default, it is 23:55:00 2000/04/01 when
the system starts up.
In an environment that needs to obtain
exact absolute time, it is required to use this command to set the current date
and time of the Ethernet switch.
Related command: display clock.
Example
# Set the current date and time of the
Ethernet switch to 0:0:0 2001/01/01.
<H3C> clock datetime 0:0:0
2001/01/01
Syntax
clock summer-time zone_name { one-off | repeating } start-time
start-date end-time end-date offset-time
undo clock summer-time
View
User view
Parameter
zone-name:
Name of the summer time, in length of 1 to 32 characters.
one-off:
Sets the summer time for only one year (the specified year).
repeating:
Sets the summer time for every year starting from the specified year.
start-time start-date: Start time and date of the summer time, in the form of HH/MM/SS
YYYY/MM/DD.
end-time end-date: End time and date of the summer time, in the form of HH/MM/SS
YYYY/MM/DD.
offset-time:
Offset of the summer time relative to the standard time.
Description
Use the clock summer-time command to
set the name and time range of the summer time.
After the setting, you can use the display
clock command to check the results. The log information time and the debug
information time adopts the local time that has been adjusted by the time zone
and the summer time.
Related command: clock timezone and display
clock.
Example
# Set the summer time named z2, which
starts from 06:00:00 2002/06/08, ends until 06:00:00 2002/09/01, and is one
hour ahead of the standard time.
<H3C> clock summer-time z2
one-off 06:00:00 2002/06/08 06:00:00 2002/09/01 01:00:00
# Set the summer time named z2, which
starts from 06:00:00 06/08, ends until 06:00:00 09/01, and is one hour ahead of
the standard time every year from 2002 on.
<H3C> clock summer-time z2
repeating 06:00:00 2002/06/08 06:00:00 2002/09/01 01:00:00
Syntax
clock timezone zone-name { add | minus } HH:MM:SS
undo clock timezone
View
User view
Parameter
zone-name:
Name of the time zone, in length of 1 to 32 characters.
add: Sets
the time zone to a time before the UTC time.
minus: Sets
the time zone to a time behind the UTC time.
HH:MM:SS:
Time, in the form of hour/minute/second.
Description
Use the clock timezone command to
set the local time zone.
Use the undo clock timezone command
to restore the local time zone to the default UTC (universal time coordinated)
time zone.
After the setting, you can use the display
clock command to check the results. The log information time and the debug
information time adopts the local time that has been adjusted by the time zone
and the summer time.
Related command: clock summer-time
and display clock.
Example
# Set the local time zone named z5, which
is five hours ahead of the UTC time.
<H3C> clock timezone z5 add
05:00:00
Syntax
language-mode { chinese | english }
View
User view
Parameter
chinese:
Sets the CLI language environment to Chinese.
English:
Sets the CLI language environment to English.
Description
Use the language-mode command to
toggle between the language modes (that is, language environments) of the
command line interface (CLI) to meet your requirement.
By default, the CLI language mode is english.
Example
# Toggle from the english mode to the chinese
mode.
<H3C> language-mode chinese
Syntax
quit
View
Any view
Parameter
None
Description
Use the quit command to return from
current view to lower level view, or exit the system if current view is user
view.
The following lists the three levels of
views available (from lower level to higher level):
l
User view
l
System view
l
VLAN view, Ethernet port view, and so on
Related command: return and system-view.
Example
# Return from system view to user view.
<H3C> system-view
[H3C] quit
<H3C>
Syntax
return
View
System view and higher level views
Parameter
None
Description
Use the return command to return
from current view to user view. The composite key <Ctrl+Z> has the same
effect with the return command.
Related command: quit.
Example
# Return from interface view to user view.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet 1/0/1
[H3C-Ethernet1/0/1] return
<H3C>
Syntax
sysname sysname
undo sysname
View
System view
Parameter
sysname:
System name of the Ethernet switch. It is a character string in length of 1 to
30 characters. By default, it is H3C.
Description
Use the sysname command to set the
system name of the Ethernet switch. Changing the system name will affect the
CLI prompt. For example, if the system name of the switch is H3C, the prompt
for user view is <H3C>.
Use the undo sysname command
to restore the default system view of the Ethernet switch.
Example
# Set the system name of the Ethernet
switch to H3CLANSwitch.
<H3C> system-view
[H3C] sysname H3CLANSwitch
[H3CLANSwitch]
Syntax
system-view
View
User view
Parameter
None
Description
Use the system-view command to enter
system view from user view.
Related command: quit and return.
Example
# Enter system view from user view.
<H3C> system-view
[H3C]
Syntax
display clock
View
Any view
Parameter
None
Description
Use the display clock command to
display the current date and time of the system, so that you can adjust them if
they are wrong.
The maximum date and time that can be
displayed by this command is 23:59:59 9999/12/31.
Related command: clock datetime.
Example
# Display the current date and time of the
system.
<H3C> display clock
18:36:31 beijing Sat 2002/02/02
Time Zone : beijing add 01:00:00
Summer-Time : bj one-off 01:00:00
2003/01/01 01:00:00 2003/08/08 01:00:00
Table 1-1 Description on the fields of
the display clock command
|
Field
|
Description
|
|
18:36:31 beijing Sat 2002/02/02
|
Current date and time of the system
|
|
Time Zone
|
Configured time zone information
|
|
Summer-Time
|
Configured summer time information
|
Syntax
display debugging [ interface interface-type interface-number ] [ module-name
]
View
Any view
Parameter
interface-type:
Ethernet port type.
interface-number: Ethernet port number.
module-name:
Module name.
Description
Use the display debugging command to
display enabled debugging. Executing this command without any parameter will
display all enabled debugging.
Related command: debugging.
Example
# Display all the enabled debugging.
<H3C> display debugging
IP packet debugging switch is on.
The above display output indicates that the
IP packet debugging is enabled.
Syntax
display users [ all ]
View
Any view
Parameter
all:
Displays the information about all user terminal interfaces (including the
inactive user terminal interfaces).
Description
Use the display users command to
display the status and configuration information about user terminal
interfaces.
Example
# Display the status and configuration
information about user terminal interfaces.
<H3C>
[H3C]display users
UI Delay Type Ipaddress
Username Userlevel
F 0 AUX 0
00:00:00 3
+ : Current operation user.
F : Current operation user work in
async mode.
Syntax
display version
View
Any view
Parameter
None
Description
Use the display version command to
display the information (such as the version information) about the switch
system.
Specifically, you can use this command to
check the software version and issue time, the basic hardware configuration,
and some other information about the switch.
Example
# Display the version of the system.
<H3C> display version
H3C Comware Platform Software.
Comware Software, Version 3.10, Release
0011
Copyright (c) 2004-2007 Hangzhou H3C
Technologies Co., Ltd. All rights reserved.
H3C S3100-26T-SI uptime is 0 week, 0
day, 0 hour, 6 minutes
H3C S3100-26T-SI with 1 Processor
64M bytes SDRAM
8M bytes Flash Memory
Config Register points to FLASH
Hardware Version is VER.B
Bootrom Version is 400
[Subslot 0] 24FE Hardware
Version is VER.B
[Subslot 1] 1GE
[Subslot 2] 1GE
Syntax
debugging { all
| module-name [ debugging-option ] }
undo debugging { all | module-name [ debugging-option
] }
View
User view
Parameter
all: Used to
enable or disable all debugging.
module-name:
Module name.
debugging-option:
Debugging option.
Description
Use the debugging command to enable
system debugging.
Use the undo debugging command to
disable system debugging.
By default, all debugging is disabled for
the system.
Take care when you enable debugging because
this will generate a great deal of debugging information and thus will affect
the efficiency of the system. Especially, it is recommended not to use the debugging
all command because enabling all debugging may lead to network system
paralysis. The undo debugging all command brings great convenience for
you to disable all debugging at a time instead of disabling them one by one.
Related command: display debugging.
Example
# Enable IP packet debugging.
<H3C> debugging ip packet
IP packet debugging switch is on.
The above command output indicates that the
IP packet debugging is enabled.
Syntax
display diagnostic-information
View
Any view
Parameter
None
Description
Use the display diagnostic-information
command to save or display the current operating information about the modules
in the system. This command can be used to collect comprehensive information at
a time for troubleshooting the system.
When the system is in trouble, you may need
to collect a lot of information to locate the problem. You can do this by using
the display commands. There are many display commands and you
have to use them one by one to collect comprehensive information. In this case,
you can use the Display diagnostic-information command to collect the
current operating information about the modules in the system.
Example
# Save system
diagnostic information to the file default.diag.
<H3C> display
diagnostic-information
This operation may take a few
minutes, continue?[Y/N]y
Diagnostic-information is saved to
Flash or displayed(Y=save N=display)?[Y/N]y
Please input the file name(*.diag)[flash:/default.diag]:
The file is already existing,
overwrite it? [Y/N]y
% Output information to file: flash:/default.diag.
Please wait......
# Display the diagnostic information of the
system.
<H3C> display
diagnostic-information
This operation may take a few
minutes, continue?[Y/N]y
Diagnostic-information is saved to
Flash or displayed(Y=save N=display)?[Y/N]n
-------------------- display version
--------------------
……
<Omitted>
Syntax
terminal debugging
undo terminal debugging
View
User view
Parameter
None
Description
Use the terminal debugging command
to enable terminal display for debugging information.
Use the undo terminal debugging
command to disable terminal display for debugging information.
By default, terminal display for debugging information
is disabled.
Related command: debugging.
Example
# Enable terminal display for debugging
information.
<H3C> terminal debugging
Syntax
display fib
View
Any view
Parameter
None
Description
Use the display fib command to
display the forward information base (FIB) entries, each of which being
represented by an output line containing the destination address/mask length,
next hop address, current flag and forward interface.
Example
# Display the FIB entries.
<H3C> display fib
Flag:
U:Usable G:Gateway
H:Host B:Blackhole D:Dynamic S:Static
R:Reject E:Equal cost
multi-path L:Generated by ARP or ESIS
Destination/Mask Nexthop
Flag TimeStamp Interface
192.168.0.233/32 127.0.0.1
GHU t[40] InLoopBack0
192.168.0.0/24 192.168.0.233
U t[40] Vlan-interface1
127.0.0.1/32 127.0.0.1
GHU t[39] InLoopBack0
127.0.0.0/8 127.0.0.1
U t[39] InLoopBack0
Table 2-1 Description on the fields of
the display fib command
|
Field
|
Description
|
|
Destination/Mask
|
Destination address/mask length
|
|
Nexthop
|
Forward address of the next hop
|
|
Flag
|
Flag:
B indicates this is a blacklist route.
D indicates this is a dynamic route.
E indicates this is an equal-cost route.
G indicates this is a gateway route.
H indicates this is a host route.
S indicates this is a static route.
U indicates this route is up and
available.
R indicates this route is rejected and
unavailable.
L indicates this route is generated by
ARP or ESIS.
|
|
TimeStamp
|
Time stamp
|
|
Interface
|
Forward interface
|
Syntax
display icmp statistics
View
Any view
Parameter
None
Description
Use the display icmp statistics
command to display ICMP traffic statistics.
Related command: display ip interface vlan-interface
and reset ip statistics.
Example
# Display ICMP traffic statistics.
<H3C> display icmp statistics
Input: bad formats
0 bad checksum 0
echo 0
destination unreachable 0
source quench
0 redirects 0
echo reply
0 parameter problem 0
timestamp
0 information request 0
mask requests
0 mask replies 0
time exceeded 0
Output:echo
0 destination unreachable 0
source quench
0 redirects 0
echo reply 0 parameter
problem 0
timestamp
0 information reply 0
mask requests
0 mask replies 0
time exceeded 0
Table 2-2 Description on the fields of
the display icmp statistics command
|
Field
|
Description
|
|
bad formats
|
Number of incoming packets in wrong
formats
|
|
bad checksum
|
Number of incoming packets with wrong
checksums
|
|
echo
|
Number of incoming/outgoing echo request
packets
|
|
destination unreachable
|
Number of incoming/outgoing packets whose
destinations are unreachable
|
|
source quench
|
Number of incoming/outgoing packets whose
sources are inhibited.
|
|
redirects
|
Number of incoming/outgoing redirected
packets
|
|
echo reply
|
Number of incoming/outgoing echo response
packets
|
|
parameter problem
|
Number of incoming/outgoing packets with
wrong parameters
|
|
timestamp
|
Number of incoming/outgoing timestamp
packets
|
|
information request
|
Number of information request packets
|
|
mask requests
|
Number of incoming/outgoing mask request
packets
|
|
mask replies
|
Number of incoming/outgoing mask response
packets
|
|
information reply
|
Number of outgoing information response
packets
|
|
time exceeded
|
Number of timeout packets
|
Syntax
display ip socket [ socktype sock-type ] [ task-id socket-id ]
View
Any view
Parameter
sock-type:
Socket type. The value can be 1, 2, and 3 corresponding to TCP, UDP and raw IP
respectively.
task-id:
Task ID, ranging from 1 to 100.
socket-id:
Socket ID, ranging from 0 to 3072.
Description
Use the display ip socket command to
display the current socket information of the system.
Example
# Display information about sockets of the
TCP type.
<H3C> display ip socket socktype 1
SOCK_STREAM:
Task = VTYD(23), socketid = 2, Proto
= 6,
LA = 0.0.0.0:22, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_ACCEPTCONN
SO_KEEPALIVE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
Task = VTYD(23), socketid = 1, Proto
= 6,
LA = 0.0.0.0:23, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_ACCEPTCONN
SO_KEEPALIVE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
Task = HTTP(45), socketid = 1, Proto
= 6,
LA = 0.0.0.0:80, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_ACCEPTCONN
SO_REUSEPORT,
socket state = SS_PRIV SS_NBIO
Task = VTYD(23), socketid = 6, Proto
= 6,
LA = 192.168.0.233:23, FA =
192.168.0.1:1281,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_KEEPALIVE
SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV
SS_ASYNC
Task = VTYD(23), socketid = 5, Proto
= 6,
LA = 192.168.0.233:23, FA =
192.168.0.18:2343,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_KEEPALIVE
SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV
SS_ASYNC
Task = VTYD(23), socketid = 7, Proto
= 6,
LA = 192.168.0.233:23, FA =
192.168.0.18:2346,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_KEEPALIVE SO_OOBINLINE
SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV
SS_ASYNC
Task = VTYD(23), socketid = 4, Proto
= 6,
LA = 192.168.0.233:23, FA =
192.168.0.110:1296,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
586, rb_cc = 0,
socket option = SO_KEEPALIVE
SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV
SS_ASYNC
Task = VTYD(23), socketid = 3, Proto
= 6,
LA = 192.168.0.233:23, FA =
192.168.0.250:1458,
sndbuf = 8192, rcvbuf = 8192, sb_cc =
0, rb_cc = 0,
socket option = SO_KEEPALIVE
SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV
SS_ASYNC
Table 2-3 Description on the fields of
the display ip socket command
|
Field
|
Description
|
|
SOCK_STREAM
|
Socket type
|
|
Task
|
Task ID
|
|
socketid
|
Socket ID
|
|
Proto
|
Protocol number of the socket
|
|
sndbuf
|
Sending buffer size of the socket
|
|
rcvbuf
|
Receiving buffer size of the socket
|
|
sb_cc
|
Size of the data saved in the sending
buffer. Note that this value makes sense only for TCP type, because data is
buffered only for TCP type.
|
|
rb_cc
|
Size of the data saved in the receiving
buffer
|
|
socket option
|
Socket option
|
|
socket state
|
Socket state
|
Syntax
display ip statistics
View
Any view
Parameter
None
Description
Use the display ip statistics
command to display the IP traffic statistics.
Related command: display ip interface vlan-interface
and reset ip statistics.
Example
# Display the IP traffic statistics.
<H3C> display ip statistics
Input: sum
2409 local 2409
bad protocol
0 bad format 0
bad checksum
0 bad options 0
Output: forwarding
0 local 2294
dropped
0 no route 0
compress fails 0
Fragment:input
0 output 0
dropped 0
fragmented
0 couldn't fragment 0
Reassembling:sum
0 timeouts 0
Table 2-4 Description on the fields of
the display ip statistics command
|
Field
|
Description
|
|
Input:
|
sum
|
Total
number of incoming packets
|
|
local
|
Number of
incoming packets whose destination addresses are local ones
|
|
bad
protocol
|
Number of
packets with wrong protocol numbers
|
|
bad format
|
Number of
packets in wrong formats
|
|
bad
checksum
|
Number of
packets with wrong checksums
|
|
bad
options
|
Number of
packets with wrong options
|
|
Output:
|
forwarding
|
Number of
forwarded packets
|
|
local
|
Number of
packets sent to local destinations.
|
|
dropped
|
Number of
dropped outgoing packets
|
|
no route
|
Number of
packets for which no route is found
|
|
compress
fails
|
Number of
packets failed to be compressed
|
|
Fragment:
|
input
|
Number of
incoming fragments
|
|
output
|
Number of
outgoing fragments
|
|
dropped
|
Number of
dropped fragments
|
|
fragmented
|
Number of
packets successfully fragmented
|
|
couldn't
fragment
|
Number of
packets which could not be fragmented.
|
|
Reassembling:
|
sum
|
Total
number of reassembled packets
|
|
timeouts
|
Number of
timing out fragment packets
|
Syntax
display tcp statistics
View
Any view
Parameter
None
Description
Use the display tcp statistics
command to display the TCP traffic statistics.
This command displays the current traffic
statistics about all TCP connections in the system. The statistics are mainly
divided into two parts: those for received packets and those for sent packets.
Each part contains information about different types of packets, such as
duplicate packets and checksum error packets in received packets. At the end of
the display output are the statistics relevant to the connections, such as the
accepted connections, the number of the retransmitted packets, and the number
of keepalive probe packets. Most of the above statistics are offered in
packets; several ones are offered in bytes.
Related command: display tcp status
and reset tcp statistics.
Example
# Display the TCP traffic statistics.
<H3C> display tcp statistics
Received packets:
Total: 2571
packets in sequence: 1165 (1672
bytes)
window probe packets: 0, window
update packets: 0
checksum error: 0, offset error:
0, short error: 0
duplicate packets: 0 (0 bytes),
partially duplicate packets: 6 (6 bytes)
out-of-order packets: 1 (0
bytes)
packets of data after window: 0
(0 bytes)
packets received after close: 0
ACK packets: 1502 (24360 bytes)
duplicate ACK packets: 313, too
much ACK packets: 0
Sent packets:
Total: 2125
urgent packets: 0
control packets: 1 (including 3
RST)
window probe packets: 0, window
update packets: 0
data packets: 2006 (24361 bytes)
data packets retransmitted: 0 (0 bytes)
ACK-only packets: 118 (112
delayed)
Retransmitted timeout: 0, connections
dropped in retransmitted timeout: 0
Keepalive timeout: 313, keepalive
probe: 313, Keepalive timeout, so connections
disconnected : 0
Initiated connections: 0, accepted
connections: 5, established connections: 5
Closed connections: 3 (dropped: 0,
initiated dropped: 0)
Packets dropped with MD5
authentication: 0
Packets permitted with MD5 authentication:
0
Table 2-5 Description on the fields of
the display tcp statistics command
|
Field
|
Description
|
|
Received packets
|
Indicates that the following is the
statistics for the received packets.
|
|
Total
|
Total number of received packets
|
|
packets in sequence
|
Number of packets reached in sequence
|
|
window probe packets
|
Number of window probe packets
|
|
window update packets
|
Number of window update packets
|
|
checksum error
|
Number of checksum error packets
|
|
offset error
|
Number of length error packets
|
|
short error
|
Number of too short packets
|
|
duplicate packets
|
Number of completely duplicate packets
|
|
partially duplicate packets
|
Number of partly duplicate packets
|
|
out-of-order packets
|
Number of out-of-order packets
|
|
packets of data after window
|
Number of after-window packets
|
|
packets received after close
|
Number of packets reached after the
connection is closed
|
|
ACK packets
|
Number of ACK packets
|
|
duplicate ACK packets
|
Number of duplicate ACK packets
|
|
Sent packets
|
Indicates that the following is the
statistics for the sent packets.
|
|
Total
|
Total number of sent packets
|
|
urgent packets
|
Number of urgent data packets
|
|
control packets
|
Number of control packets
|
|
window probe packets
|
Number of window probe packets
|
|
window update packets
|
Number of window update packets
|
|
data packets
|
Number of data packets
|
|
ACK-only packets
|
Number of ACK packets
|
|