H3C S5830V2 series Command Reference Manual
Text of the manual
H3C S5830V2 & S5820V2 Switch Series
Network Management and Monitoring
Command Reference
Hangzhou H3C Technologies Co., Ltd.
http://www.h3c.com
Software version: Release2108
Document version: 6W101-20120531
Copyright © 2012, Hangzhou H3C Technologies Co., Ltd. and its licensors
All rights reserved
No part of this manual may be reproduced or transmitted in any form or by any means without prior
written consent of Hangzhou H3C Technologies Co., Ltd.
Trademarks
H3C,
, Aolynk,
, H3Care,
, TOP G,
, IRF, NetPilot, Neocean, NeoVTL,
SecPro, SecPoint, SecEngine, SecPath, Comware, Secware, Storware, NQA, VVG, V2G, VnG, PSPT,
XGbus, N-Bus, TiGem, InnoVision and HUASAN are trademarks of Hangzhou H3C Technologies Co.,
Ltd.
All other trademarks that may be mentioned in this manual are the property of their respective owners
Notice
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.
The H3C S5830V2 & S5820V2 documentation set includes 10 command references, which describe the
commands and command syntax options available for the H3C S5830V2 & S5820V2 Switch Series.
The Network Management and Monitoring Command Reference describes network management and
monitoring configuration commands. It covers the commands for viewing system information,
synchronizing time for all devices with clocks in your network, and checking and debugging the current
network connectivity with the ping, tracert, and debug commands.
This preface includes:
•
Audience
•
Release-over-release command differences
•
Conventions
•
About the H3C S5830V2 & S5820V2 documentation set
•
Obtaining documentation
•
Technical support
•
Documentation feedback
Audience
This documentation is intended for:
•
Network planners
•
Field technical support and servicing engineers
•
Network administrators working with the S5830V2 & S5820V2 series
Release-over-release command differences
This documentation set is for Release 2108 and Release 2108P02. The following table describes the
command changes in Release 2108P02 over Release 2108:
Command reference
Added and modified commands in Release 2108P02
Ping, tracert, and system debugging
None.
NTP
None.
Information center
• New commands: terminal debugging.
• Modified commands: Replaces the keywords emergencies, alerts,
errors, warnings, and notifications with emergency, alert, error,
warning, and notification, respectively for the commands
info-center source and terminal logging level.
SNMP
None.
Port mirroring
None.
This section describes the conventions used in this documentation set.
Command conventions
Convention
Description
Boldface
Bold text represents commands and keywords that you enter literally as shown.
Italic
Italic text represents arguments that you replace with actual values.
[ ]
Square brackets enclose syntax choices (keywords or arguments) that are optional.
{ x | y | ... }
Braces enclose a set of required syntax choices separated by vertical bars, from which
you select one.
[ x | y | ... ]
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
which you select one or none.
{ x | y | ... } *
Asterisk marked braces enclose a set of required syntax choices separated by vertical
bars, from which you select at least one.
[ x | y | ... ] *
Asterisk marked square brackets enclose optional syntax choices separated by vertical
bars, from which you select one choice, multiple choices, or none.
&<1-n>
The argument or keyword and argument combination before the ampersand (&) sign can
be entered 1 to n times.
#
A line that starts with a pound (#) sign is comments.
GUI conventions
Convention
Description
< >
Button names are inside angle brackets. For example, click .
[ ]
Window names, menu items, data table and field names are inside square brackets. For
example, pop up the [New User] window.
/
Multi-level menus are separated by forward slashes. For example, [File/Create/Folder].
Symbols
Convention
Description
WARNING
An alert that calls attention to important information that if not understood or followed can
result in personal injury.
CAUTION
An alert that calls attention to important information that if not understood or followed can
result in data loss, data corruption, or damage to hardware or software.
IMPORTANT
An alert that calls attention to essential information.
NOTE
An alert that contains additional or supplementary information.
TIP
An alert that provides helpful information.
About the H3C S5830V2 & S5820V2
documentation set
The H3C S5830V2&S5820V2 documentation set includes:
Category
Documents
Purposes
Hardware specifications
and installation
Compliance and safety
manual
Provides regulatory information and the safety
instructions that must be followed during installation.
Installation quick start
Provides basic installation instructions.
Installation guide
Provides a complete guide to hardware installation
and hardware specifications.
Fan assemblies
installation manual
Describes the appearance, specifications, and
installation and removal of hot-swappable fan
assemblies.
Power modules user
manual
Describes the appearance, specifications, and
installation and removal of hot-swappable power
modules.
Software configuration
Configuration guides
Describe software features and configuration
procedures.
Command references
Provide a quick reference to all available
commands.
Obtaining documentation
You can access the most up-to-date H3C product documentation on the World Wide Web
at http://www.h3c.com.
Click the links on the top navigation bar to obtain different categories of product documentation:
[Technical Support & Documents > Technical Documents] – Provides hardware installation, software
upgrading, and software feature configuration and maintenance documentation.
[Products & Solutions] – Provides information about products and technologies.
[Technical Support & Documents > Software Download] – Provides the documentation released with the
software version.
Technical support
[email protected]
http://www.h3c.com
Documentation feedback
You can e-mail your comments about product documentation to [email protected].
We appreciate your comments.
Ping, tracert, and system debugging commands ······································································································· 1
debugging ································································································································································· 1
display debugging ··················································································································································· 1
display memory ························································································································································ 2
display process ························································································································································· 3
display process cpu ················································································································································· 6
display process log ·················································································································································· 7
display process memory ·········································································································································· 8
display process memory heap ····························································································································· 10
display process memory heap address ·············································································································· 11
display process memory heap size ····················································································································· 12
monitor process ····················································································································································· 13
monitor thread ······················································································································································· 18
ping ········································································································································································· 21
ping ipv6 ································································································································································ 24
process ··································································································································································· 27
tracert ······································································································································································ 28
tracert ipv6 ····························································································································································· 30
NTP commands ·························································································································································· 32
display ntp-service ipv6 sessions ························································································································· 32
display ntp-service sessions ·································································································································· 36
display ntp-service status ······································································································································ 40
display ntp-service trace ······································································································································· 42
ntp-service acl ························································································································································ 43
ntp-service authentication enable ························································································································ 44
ntp-service authentication-keyid ··························································································································· 45
ntp-service broadcast-client ·································································································································· 46
ntp-service broadcast-server ································································································································· 47
ntp-service inbound disable ·································································································································· 48
ntp-service ipv6 acl ··············································································································································· 48
ntp-service inbound disable ·································································································································· 49
ntp-service ipv6 multicast-client ···························································································································· 50
ntp-service ipv6 multicast-server ··························································································································· 51
ntp-service ipv6 source ········································································································································· 52
ntp-service ipv6 unicast-peer ································································································································ 52
ntp-service ipv6 unicast-server ······························································································································ 54
ntp-service max-dynamic-sessions ························································································································ 55
ntp-service multicast-client ····································································································································· 56
ntp-service multicast-server ···································································································································· 56
ntp-service refclock-master ···································································································································· 57
ntp-service reliable authentication-keyid ············································································································· 58
ntp-service source ·················································································································································· 59
ntp-service unicast-peer ········································································································································· 60
ntp-service unicast-server ······································································································································ 61
SNTP commands ························································································································································ 63
display sntp ipv6 sessions ···································································································································· 63
display sntp sessions ············································································································································· 63
sntp authentication enable ··································································································································· 64
sntp authentication-keyid ······································································································································ 65
sntp ipv6 unicast-server ········································································································································· 66
sntp reliable authentication-keyid ························································································································ 67
sntp unicast-server ················································································································································· 68
Information center commands ··································································································································· 70
display info-center ················································································································································· 70
display logbuffer ···················································································································································· 71
display logbuffer summary ··································································································································· 73
display logfile summary ········································································································································ 74
info-center enable ·················································································································································· 75
info-center logbuffer ·············································································································································· 75
info-center logbuffer size ······································································································································ 76
info-center logfile enable ······································································································································ 76
info-center logfile frequency ································································································································· 77
info-center logfile size-quota ································································································································· 77
info-center logfile switch-directory ······················································································································· 78
info-center logging suppress duplicates ·············································································································· 79
info-center loghost ················································································································································· 80
info-center loghost source ····································································································································· 80
info-center source ·················································································································································· 81
info-center synchronous ········································································································································ 83
info-center timestamp ············································································································································ 84
info-center timestamp loghost ······························································································································· 85
logfile save ····························································································································································· 85
reset logbuffer ························································································································································ 86
terminal logging level ··········································································································································· 86
terminal monitor ····················································································································································· 87
terminal debugging ··············································································································································· 88
SNMP commands ······················································································································································ 89
display snmp-agent community ···························································································································· 89
display snmp-agent group ···································································································································· 90
display snmp-agent local-engineid ······················································································································ 91
display snmp-agent mib-view ······························································································································· 92
display snmp-agent remote ·································································································································· 93
display snmp-agent statistics ································································································································ 94
display snmp-agent sys-info ·································································································································· 96
display snmp-agent trap-list ·································································································································· 96
display snmp-agent usm-user ································································································································ 97
snmp-agent ····························································································································································· 98
snmp-agent calculate-password ··························································································································· 99
snmp-agent community ······································································································································· 100
snmp-agent group ················································································································································ 101
snmp-agent local-engineid ·································································································································· 103
snmp-agent log ···················································································································································· 104
snmp-agent mib-view ··········································································································································· 104
snmp-agent packet max-size ······························································································································ 105
snmp-agent remote ·············································································································································· 106
snmp-agent sys-info contact ································································································································ 107
snmp-agent sys-info location······························································································································· 107
snmp-agent sys-info version ································································································································ 108
snmp-agent target-host ········································································································································ 109
snmp-agent trap enable ······································································································································ 110
snmp-agent trap life ············································································································································· 111
snmp-agent trap source ······································································································································· 112
snmp-agent usm-user { v1 | v2c } ······················································································································ 113
snmp-agent usm-user v3 ······································································································································ 114
Port mirroring commands ······································································································································· 118
display mirroring-group ······································································································································ 118
mirroring-group ···················································································································································· 119
mirroring-group mirroring-port (interface view) ································································································ 120
mirroring-group mirroring-port (system view) ··································································································· 121
mirroring-group monitor-egress ·························································································································· 122
mirroring-group monitor-port (interface view) ··································································································· 123
mirroring-group monitor-port (system view) ······································································································ 124
mirroring-group reflector-port ····························································································································· 125
mirroring-group remote-probe vlan ···················································································································· 126
Index ········································································································································································ 128
Ping, tracert, and system debugging
commands
debugging
Use the debugging command to enable debugging for a specific module.
Use the undo debugging command to disable debugging for a specific module.
Syntax
debugging { all [ timeout time ] | module-name [ option ] }
undo debugging { all | module-name [ option ] }
Default
Debugging functions are disabled for all modules.
Views
User view
Predefined user roles
network-admin
Parameters
all: Enables all debugging functions.
timeout time: Specifies the timeout time for the debugging all command. When all debugging is enabled,
the system automatically executes the undo debugging all command after the timeout time. The time
argument is in the range of 1 to 1440 minutes.
module-name: Module name, such as arp or device. To display the current module name, use the
debugging ? command.
option: The debugging option for a specific module. The option number and content differ for different
modules. To display the supported options, use the debugging module-name ? command.
Usage guidelines
Outputting debugging information may degrade system efficiency. H3C recommends that you enable
the debugging for a specific module, rather than multiple modules.
Examples
# Enable debugging for the device management module.
debugging arp status
Related commands
display debugging
display debugging
Use the display debugging command to display the enabled debugging functions.
display debugging [ module-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
module-name: Displays the debugging settings of the specified module. To display the current module
name, use the display debugging ? command.
Examples
# Display all enabled debugging functions.
display debugging
ARP status debugging switch is on
Related commands
debugging
display memory
Use the display memory command to display the system memory statistics.
Syntax
display memory [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
the memory statistics of all IRF member devices.
Examples
# Display the memory statistics of the device.
display memory
The statistics about memory is measured in KB:
Slot 1:
total used free shared buffers cached
Mem: 2019300 318600 1700700 0 0 84500
-/+ buffers/cache: 234100 1785200
Swap: 0 0 0
Table 1 Output description
Field
Description
The statistics about memory
is measured in KB:
Memory statistics, in KB
Slot
ID of the IRF member device
Mem
Memory usage information
Total
Size of the physical memory
Used
Size of the physical memory used
Free
Size of the free physical memory
shared
Total memory shared by multiple processes
buffers
Size of buffers
cached
Size of the cache
-/+ buffers/cache
-/+ buffers/cache: used = Mem: used – Mem: buffers – Mem: cached
-/+ buffers/cache: free = Mem: used + Mem: buffers + Mem: cached
Swap
Swap usage information
display process
Use the display process command to display state information about a process.
Syntax
display process [ all | job job-id | name process-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
all: Displays the state information about all processes.
job job-id: Specifies a job ID that uniquely identifies a process. It remains the same even if the process
restarts. The job-id argument is in the range of 1 to 2147483647.
name process-name: Specifies the process name. It is a case-insensitive string of 1 to 15 characters
without the question mark (?) and space.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Examples
# Display state information about the process scmd.
display process name scmd
Job ID: 1
PID: 1
Executable path: /sbin/scmd
Instance: 0
Respawn: OFF
Respawn count: 1
Max. spawns per minute: 0
Last started: Wed Jun 1 14:45:46 2011
Process state: sleeping
Max. core: 0
ARGS: -
TID LAST_CPU Stack PRI State HH:MM:SS:MESC Name
1 0 0K 120 S 0:0:5:220 scmd
Table 2 Output description
Field
Description
Job ID
Job ID that uniquely identifies a process. It remains the same even if the process
restarts.
PID
Process ID that identifies a process. It may change when the process restarts.
Parent JID
Job ID of a parent process.
Parent PID
ID of a parent process.
Executable path
Path for the process executable. The path for the kernel process displays as the
hyphen(-).
Instance
Instance number of a process. (Whether a process runs multiple instances or not
is predefined.)
Respawn
The field indicates whether the process automatically restarts or not in case of
failure.
• On—The process restarts automatically.
• Off—The process does not restart automatically.
Respawn count
Number of times the process has been restarted. (The first start makes the count
1.)
Max. spawns per minute
Maximum number of respawns allowed in 1 minute. If the number is exceeded,
the process automatically stops restarting. To restart the process, use the process
start command.
Last started
Date and time the process was last started.
Process state
Process state:
• Running—In running state or waiting in the queue.
• Sleeping—In interruptible sleeping state.
• Traced or stopped—In traced or stopped state.
• Uninterruptible sleep—In uninterruptible sleep state.
• Zombie—In zombie state.
Max. core
Maximum number of core files that the process generates. 0 indicates no core
files are generated. The process generates a core file every time it respawns.
When the number of core files reaches the maximum, no more core files are
generated. Software development and maintenance engineers can locate the
fault and position based on the core files.
Command-line arguments passed to the process. If no arguments pass, the
hyphen (-) displays.
TID
Thread ID.
LAST_CPU
CPU where the process is located in the last assignment.
Stack
Stack size.
PRI
Thread priority.
State
Thread state:
• R—In running state or waiting in the queue.
• S—In interruptible sleeping state.
• T—In traced or stopped state.
• D—In uninterruptible sleep state.
• Z—In zombie state.
HH:MM:SS:MESC
Running time when the process started last time.
Name
Process name.
# Display state information about all processes.
display process all
JID USER %CPU %MEM STAT PRI TTY HH:MM:SS COMMAND
1 0 1.7 0.0 S 120 - 00:00:06 scmd
2 0 0.0 0.0 S 115 - 00:00:00 [kthreadd]
3 0 0.0 0.0 S 99 - 00:00:00 [migration/0]
4 0 0.0 0.0 S 115 - 00:00:00 [ksoftirqd/0]
5 0 0.0 0.0 S 99 - 00:00:00 [watchdog/0]
6 0 0.0 0.0 S 99 - 00:00:00 [migration/1]
7 0 0.0 0.0 S 115 - 00:00:00 [ksoftirqd/1]
8 0 0.0 0.0 S 99 - 00:00:00 [watchdog/1]
9 0 0.0 0.0 S 99 - 00:00:00 [migration/2]
10 0 0.0 0.0 S 115 - 00:00:00 [ksoftirqd/2]
11 0 0.0 0.0 S 99 - 00:00:00 [watchdog/2]
12 0 0.0 0.0 S 99 - 00:00:00 [migration/3]
13 0 0.1 0.0 S 115 - 00:00:00 [ksoftirqd/3]
14 0 0.0 0.0 S 99 - 00:00:00 [watchdog/3]
15 0 0.0 0.0 S 99 - 00:00:00 [migration/4]
16 0 0.0 0.0 S 115 - 00:00:00 [ksoftirqd/4]
17 0 0.0 0.0 S 99 - 00:00:00 [watchdog/4]
18 0 0.0 0.0 S 115 - 00:00:00 [events/0]
19 0 0.0 0.0 S 115 - 00:00:00 [events/1]
20 0 0.0 0.0 S 115 - 00:00:00 [events/2]
21 0 0.0 0.0 S 115 - 00:00:00 [events/3]
---- More ----
Table 3 Output description
Field
Description
JID
Job ID that uniquely identifies a process. It remains the same even if the process restarts.
USER
Username.
%CPU
CPU usage in percentage.
%MEM
Memory usage in percentage.
STAT
Process state:
• R—In running state or waiting in the queue.
• S—In interruptible sleeping state.
• T—In traced or stopped state.
• D—In uninterruptible sleep state.
• Z—In zombie state.
PRI
Process priority. (The process priority counts in the assignment. The process with top
priority gets assigned earlier than others.)
TTY
Terminal used by the process. It displays as the hyphen (-).
HH:MM:SS
Running time when the process restarted last time.
COMMAND
Process name and its parameters. If the process name is marked with the square brackets
([ ]), it refers to the kernel thread.
display process cpu
Use the display process cpu command to display the CPU usage for all processes.
Syntax
display process cpu [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Examples
# Display the CPU usage for all processes.
display process cpu
CPU utilization in 5 secs: 16.8%; 1 min: 4.7%; 5 mins: 4.7%
JID 5Sec 1Min 5Min Name
1 0.0% 0.0% 0.0% scmd
2 0.0% 0.0% 0.0% [kthreadd]
3 0.1% 0.0% 0.0% [ksoftirqd/0]
4 0.0% 0.0% 0.0% [watchdog/0]
5 0.0% 0.0% 0.0% [events/0]
6 0.0% 0.0% 0.0% [khelper]
29 0.0% 0.0% 0.0% [kblockd/0]
49 0.0% 0.0% 0.0% [vzmond]
52 0.0% 0.0% 0.0% [pdflush]
53 0.0% 0.0% 0.0% [pdflush]
54 0.0% 0.0% 0.0% [kswapd0]
110 0.0% 0.0% 0.0% [aio/0]
712 0.0% 0.0% 0.0% [mtdblockd]
719 0.0% 0.0% 0.0% [TNetJob]
720 0.0% 0.0% 0.0% [TMTH]
727 0.0% 0.0% 0.0% [CF]
730 0.0% 0.0% 0.0% [DIBC]
752 0.0% 0.0% 0.0% [lipc_topology]
762 0.0% 0.0% 0.0% [MNET]
763 0.0% 0.0% 0.0% [SYSM]
---- More ----
Table 4 Output description
Field
Description
CPU utilization in 5 secs: 16.8%;
1 min: 4.7%; 5 mins: 4.7%
CPU usage of the system in the last 5 seconds, in the last I minute, and in the
last 5 minutes.
JID
Job ID that uniquely identifies a process. It remains the same even if the
process restarts.
5Sec
Display CPU usage in the last 5 seconds.
1Min
Display CPU usage in the last I minute.
5Min
Display CPU usage in the last 5 minutes.
Name
Process name. If the process name is marked with the square brackets ([ ]),
it refers to the kernel thread.
display process log
Use the display process command to display log information about all processes.
Syntax
display process log [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
# Display log information about all processes.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Usage guidelines
When the process starts, it requests text, data, stack, and dynamic memories, where:
•
Text memory stores the process codes.
•
Data memory stores the process data.
•
Stack memory stores temporary data.
•
Dynamic memory refers to heap memory. The system dynamically allocates and releases the heap
memory as required by the process. To display detailed information, use the display process
memory heap command.
Examples
#Display the memory usage for all processes.
display process memory
JID Text Data Stack Dynamic Name
1 384 1800 16 36 scmd
2 0 0 0 0 [kthreadd]
3 0 0 0 0 [ksoftirqd/0]
4 0 0 0 0 [watchdog/0]
5 0 0 0 0 [events/0]
6 0 0 0 0 [khelper]
29 0 0 0 0 [kblockd/0]
49 0 0 0 0 [vzmond]
52 0 0 0 0 [pdflush]
---- More ----
Table 6 Output description
Field
Description
JID
Job ID that uniquely identifies a process. It remains the same even if the process restarts.
Text
Size of code segments, in KB. (It displays as 0 for the kernel process.)
Data
Size of data segments, in KB. (It displays as 0 for the kernel process.)
Stack
Size of stacks, in KB. (It displays as 0 for the kernel process.)
Dynamic
Size of the memory dynamically requested by the process, in KB. (It displays as 0 for the
kernel process.)
Name
Process name. If the process name is marked with the square brackets ([ ]), it refers to the
kernel thread.
Related commands
•
display process memory heap
•
display process memory heap address
•
display process memory heap size
display process memory heap
Use the display process memory heap command to display the heap memory statistics for a specified
process.
Syntax
display process memory heap job job-id [ verbose ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a job ID that uniquely identifies a process. It remains the same even if the process
restarts. The job-id argument is in the range 1 to 2147483647.
verbose: Displays detailed statistics about the memory. If this keyword is not specified, brief statistics is
displayed.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
the state information about processes on the master device.
Usage guidelines
The heap memory comprises fixed-size memory blocks (such as size=16 bytes or size= 64 bytes), to store
necessary data or intermediate variables. When a process starts, the system dynamically allocates the
heap memory to the process as needed. To display heap memory information about a process, use the
display process memory heap command.
Each memory block has an address represented in hexadecimal numbers. To display the address, use
the display process memory heap size command. You can access the memory block through the address.
To display the memory block, use the display process memory heap address command.
Examples
# Display brief information about the heap memory for job 48.
display process memory heap job 48
Total virtual memory heap space (in bytes) : 2293760
Total physical memory heap space (in bytes) : 58368
Total allocated memory (in bytes) : 42368
# Display detailed information about the heap memory for job 48.
display process memory heap job 48 verbose
Heap usage:
Size Free Used Total Free Ratio
16 8 52 60 13%
64 3 1262 1265 0.2%
128 2 207 209 1%
512 3 55 58 5.1%
4096 3 297 300 1%
8192 1 19 20 5%
81920 0 1 1 0%
Total virtual memory heap space (in bytes) : 2293760
Total physical memory heap space (in bytes) : 58368
Total allocated memory (in bytes) : 42368
The output shows that job 48 is allocated with 60 blocks each with a size of 16 bytes (52 already used
and 8 available), 1265 blocks each with a size of 64 bytes (1262 used and 3 available), and so on.
Table 7 Output description
Field
Description
Total allocated memory
(in bytes)
Heap memory space used by the job, in bytes.
Size
Size of the memory block, in bytes.
Free
Number of the free memory blocks.
Used
Number of the used memory blocks.
Total
Total number of memory blocks in specified size. It is the number of the free memory
blocks plus the number of the used memory blocks.
Free Ratio
Total number of the memory blocks in specified size divided by the number of the
free memory blocks. It indicates the fragment conditions of the specified memory
blocks.
Related commands
•
display process memory
•
display process memory heap address
•
display process memory heap size
display process memory heap address
Use the display process memory heap address command to check the memory space from a specified
address.
Syntax
display process memory heap job job-id address starting-address length memory-length [ slot
slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a job ID that uniquely identifies a process. It remains the same even if the process
restarts. The job-id argument is in the range of 1 to 2147483647.
address starting-address: Specifies the starting address of the memory block.
length memory-length: Specifies the memory length. The memory-length argument is in the range of 1 to
1024 bytes.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Usage guidelines
When the process runs abnormally, use this command to diagnose and locate the failures.
Examples
# Display the memory space with a length of 128 bytes starting from the address 0xb7e30580 in job 1.
display process memory heap job 1 address b7e30580 length 128
B7E30580: 14 00 EF FF 00 00 00 00 E4 39 E2 B7 7C 05 E3 B7 .........9..|...
B7E30590: 14 00 EF FF 2F 73 62 69 6E 2F 73 6C 62 67 64 00 ..../sbin/slbgd.
B7E305A0: 14 00 EF FF 00 00 00 00 44 3B E2 B7 8C 05 E3 B7 ........D;......
B7E305B0: 14 00 EF FF 2F 73 62 69 6E 2F 6F 73 70 66 64 00 ..../sbin/ospfd.
B7E305C0: 14 00 EF FF 00 00 00 00 A4 3C E2 B7 AC 05 E3 B7 .........<......
B7E305D0: 14 00 EF FF 2F 73 62 69 6E 2F 6D 73 74 70 64 00 ..../sbin/mstpd.
B7E305E0: 14 00 EF FF 00 00 00 00 04 3E E2 B7 CC 05 E3 B7 .........>......
B7E305F0: 14 00 EF FF 2F 73 62 69 6E 2F 6E 74 70 64 00 00 ..../sbin/ntpd..
Related commands
•
display process memory heap
•
display process memory heap size
display process memory heap size
Use the display process memory heap size command to display the address of a memory block in a
specified size.
Syntax
display process memory heap job job-id size memory-size [ offset offset-size ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
size memory-size: Specifies the size of the memory block.
offset offset-size: Displays the offset of a specified memory block. If this option is not specified, it displays
the addresses of the first 128 memory blocks. For example, the system has allocated 100 memory blocks
with 16 bytes in size to job 1 and the current process is using 66 blocks. If you execute the display
process memory heap job 1 size 16 offset 50 command, it displays the addresses of the 51st to the 66th
memory blocks with 16 bytes in size.
job job-id: Specifies a job ID that uniquely identifies a process. It remains the same even if the process
restarts. The job-id argument is in the range of 1 to 2147483647.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
the state information about processes on the master device.
The address displayed using this command is in hexadecimal form. Using this address and the display
process memory heap address command, you can check the memory information about the address.
Examples
# Display addresses of memory blocks with a size of 16 bytes used by job 1.
display process memory heap job 1 size 16
0xb7e300c0 0xb7e300d0 0xb7e300e0 0xb7e300f0
0xb7e30100 0xb7e30110 0xb7e30120 0xb7e30130
0xb7e30140 0xb7e30150 0xb7e30160 0xb7e30170
0xb7e30180 0xb7e30190 0xb7e301a0 0xb7e301b0
0xb7e301c0 0xb7e301d0 0xb7e301e0 0xb7e301f0
0xb7e30200 0xb7e30210 0xb7e30220 0xb7e30230
# Display addresses of memory blocks with a size of 16 bytes used by job 1, beginning with the 5th
memory block.
display process memory heap job 1 size 16 offset 4
0xb7e30100 0xb7e30110 0xb7e30120 0xb7e30130
0xb7e30140 0xb7e30150 0xb7e30160 0xb7e30170
0xb7e30180 0xb7e30190 0xb7e301a0 0xb7e301b0
0xb7e301c0 0xb7e301d0 0xb7e301e0 0xb7e301f0
0xb7e30200 0xb7e30210 0xb7e30220 0xb7e30230
Related commands
•
display process memory heap
•
display process memory heap address
monitor process
Use the monitor process command to display the statistics of a process.
Syntax
monitor process [ dumbtty ] [ iteration number ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
Parameters
dumbtty: Displays the process statistics as if on a dumb terminal. (The screen is not refreshed.) If this
keyword is specified, the statistics of all processes is listed in descending order on the screen according
to their CPU usage. If this keyword is not specified, the statistics is displayed in an interactive mode. By
default, statistics of the first 10 processes is displayed in descending order according to their CPU usage,
and refreshed every five seconds.
iteration number: Specifies the number of times the process statistics is displayed. The number argument
is in the range of 1 to 4294967295. If the keyword dumbtty is specified, the default value for the number
argument is 1. If neither dumbtty nor number is specified, the statistics is refreshed every five seconds until
you quit the monitor process command.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Usage guidelines
If the keyword dumbtty is not specified, the statistics is displayed in interactive mode:
•
The system automatically calculates the number of processes to be displayed on a screen. Processes
outside the acceptable range are not displayed.
•
You can execute operations by entering the commands listed in Table 8.
Table 8 Interactive command description
Command
Description
Question mark (?) or h
Help information, displaying interactive commands available.
c
List processes in descending order based on their CPU usage (default).
d
Set the update interval for the statistics, in the range of 1 to 2147483647, in
seconds. The default value is 5 seconds.
f
List file handles opened by the process in descending order.
k
End a job. This command affects the operation of the system. Use it with caution.
l
Refresh the screen.
m
List processes in descending order based on their memory usage.
n
Change the number of processes to be displayed, in the range of 0 to
2147483647. (The default value is 10 and 0 indicates unlimited.) If the number of
processes is outside the acceptable range, only the maximum number of processes
that can be displayed on a screen is displayed.
q
Exit the interactive mode.
t
List processes in descending order based on the running time from the last restart
of the process.
Smaller than sign (<)
Move the sort field one column to the left.
Greater than sign (>)
Move the sort field one column to the right.
Examples
# Display the process statistics as if on a dumb terminal. (The system displays the statistics for all
processes at a time and the statistics is not refreshed. Once finishing display, the system returns to the
system prompt.)
monitor process dumbtty
76 processes; 103 threads; 687 fds
Thread states: 1 running, 102 sleeping, 0 stopped, 0 zombie
CPU states: 77.16% idle, 0.00% user, 14.96% kernel, 7.87% interrupt
Memory: 496M total, 341M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
1047 1047 120 R 9 1420K 00:02:23 13.53% diagd
1 1 120 S 17 1092K 00:00:20 7.61% scmd
1000 1000 115 S 0 0K 00:00:09 0.84% [sock/1]
1026 1026 120 S 20 26044K 00:00:05 0.84% syslogd
2 2 115 S 0 0K 00:00:00 0.00% [kthreadd]
3 3 99 S 0 0K 00:00:00 0.00% [migration/0]
4 4 115 S 0 0K 00:00:06 0.00% [ksoftirqd/0]
5 5 99 S 0 0K 00:00:00 0.00% [watchdog/0]
6 6 115 S 0 0K 00:00:01 0.00% [events/0]
7 7 115 S 0 0K 00:00:00 0.00% [khelper]
4797 4797 120 S 8 28832K 00:00:02 0.00% comsh
5117 5117 120 S 8 1496K 00:00:00 0.00% top
# Display the process statistics as if on a dumb terminal. The statistics is displayed twice for one
command.
monitor process dumbtty iteration 2
76 processes; 103 threads; 687 fds
Thread states: 1 running, 102 sleeping, 0 stopped, 0 zombie
CPU states: 44.84% idle, 0.51% user, 39.17% kernel, 15.46% interrupt
Memory: 496M total, 341M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
1047 1047 120 R 9 1420K 00:02:30 37.11% diagd
1 1 120 S 17 1092K 00:00:21 11.34% scmd
1000 1000 115 S 0 0K 00:00:09 2.06% [sock/1]
1026 1026 120 S 20 26044K 00:00:05 1.54% syslogd
1027 1027 120 S 12 9280K 00:01:12 1.03% devd
4 4 115 S 0 0K 00:00:06 0.51% [ksoftirqd/0]
1009 1009 115 S 0 0K 00:00:08 0.51% [karp/1]
1010 1010 115 S 0 0K 00:00:13 0.51% [kND/1]
5373 5373 120 S 8 1496K 00:00:00 0.51% top
2 2 115 S 0 0K 00:00:00 0.00% [kthreadd]
3 3 99 S 0 0K 00:00:00 0.00% [migration/0]
5 5 99 S 0 0K 00:00:00 0.00% [watchdog/0]
6 6 115 S 0 0K 00:00:01 0.00% [events/0]
7 7 115 S 0 0K 00:00:00 0.00% [khelper]
4796 4796 120 S 11 2744K 00:00:00 0.00% login
4797 4797 120 S 8 28832K 00:00:03 0.00% comsh
// Five seconds later, the system automatically calculates and displays the information as the following:
(It is the same as executing the monitor process dumbtty command twice every five seconds.)
76 processes; 103 threads; 687 fds
Thread states: 1 running, 102 sleeping, 0 stopped, 0 zombie
CPU states: 78.71% idle, 0.16% user, 14.86% kernel, 6.25% interrupt
Memory: 496M total, 341M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
1047 1047 120 R 9 1420K 00:02:31 14.25% diagd
1 1 120 S 17 1092K 00:00:21 4.25% scmd
1027 1027 120 S 12 9280K 00:01:12 1.29% devd
1000 1000 115 S 0 0K 00:00:09 0.37% [sock/1]
5373 5373 120 S 8 1500K 00:00:00 0.37% top
6 6 115 S 0 0K 00:00:01 0.18% [events/0]
1009 1009 115 S 0 0K 00:00:08 0.18% [karp/1]
1010 1010 115 S 0 0K 00:00:13 0.18% [kND/1]
4795 4795 120 S 11 2372K 00:00:01 0.18% telnetd
2 2 115 S 0 0K 00:00:00 0.00% [kthreadd]
3 3 99 S 0 0K 00:00:00 0.00% [migration/0]
4 4 115 S 0 0K 00:00:06 0.00% [ksoftirqd/0]
5 5 99 S 0 0K 00:00:00 0.00% [watchdog/0]
7 7 115 S 0 0K 00:00:00 0.00% [khelper]
4796 4796 120 S 11 2744K 00:00:00 0.00% login
4797 4797 120 S 8 28832K 00:00:03 0.00% comsh
# Display the process statistics in interactive mode.
monitor process
76 processes; 103 threads; 687 fds
Thread states: 1 running, 102 sleeping, 0 stopped, 0 zombie
CPU states: 78.98% idle, 0.16% user, 14.57% kernel, 6.27% interrupt
Memory: 496M total, 341M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
1047 1047 120 R 9 1420K 00:02:39 14.13% diagd
1 1 120 S 17 1092K 00:00:23 3.98% scmd
1027 1027 120 S 12 9280K 00:01:13 1.44% devd
1000 1000 115 S 0 0K 00:00:09 0.36% [sock/1]
1009 1009 115 S 0 0K 00:00:09 0.36% [karp/1]
4 4 115 S 0 0K 00:00:06 0.18% [ksoftirqd/0]
1010 1010 115 S 0 0K 00:00:13 0.18% [kND/1]
4795 4795 120 S 11 2372K 00:00:01 0.18% telnetd
5491 5491 120 S 8 1500K 00:00:00 0.18% top
2 2 115 S 0 0K 00:00:00 0.00% [kthreadd]
The output information is refreshed every five seconds.
# Enter h or the question mark (?), and the help information displays as follows:
Help for interactive commands:
?,h Show the available interactive commands
c Sort by the CPU field(default)
d Set the delay interval between screen updates
f Sort by number of open files
k Kill a job
l Refresh the screen
m Sort by memory used
n Set the maximum number of processes to display
q Quit the interactive display
t Sort by run time of processes since last restart
< Move sort field to the next left column
> Move sort field to the next right column
Press any key to continue
# Enter d and then enter 3 as prompted, and the statistics is updated every three seconds.
Enter the delay interval between updates(1~2147483647):3
# Enter n and then enter 5 as prompted, and the number of processes to be displayed turns to 5.
Enter the max number of procs to display(0 is unlimited):5
87 processes; 113 threads; 735 fds
Thread states: 2 running, 111 sleeping, 0 stopped, 0 zombie
CPU states: 86.57% idle, 0.83% user, 11.74% kernel, 0.83% interrupt
Memory: 755M total, 414M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
864 864 120 S 24 27020K 00:00:43 8.95% syslogd
1173 1173 120 R 24 2664K 00:00:01 2.37% top
866 866 120 S 18 10276K 00:00:09 0.69% devd
1 1 120 S 16 1968K 00:00:04 0.41% scmd
881 881 120 S 8 2420K 00:00:07 0.41% diagd
# Enter f, the statistics is output by listing file handles in descending order. (It is similar with the command
c, m, and f.)
87 processes; 113 threads; 735 fds
Thread states: 1 running, 112 sleeping, 0 stopped, 0 zombie
CPU states: 90.66% idle, 0.88% user, 5.77% kernel, 2.66% interrupt
Memory: 755M total, 414M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
862 862 120 S 61 5384K 00:00:01 0.00% dbmd
905 905 120 S 35 2464K 00:00:02 0.00% ipbased
863 863 120 S 31 1956K 00:00:00 0.00% had
884 884 120 S 31 30600K 00:00:00 0.00% lsmd
889 889 120 S 29 61592K 00:00:00 0.00% routed
# After entering k, enter 884 for JID as prompted, and the job lsmd is ended.
Enter the JID to kill: 884
84 processes; 107 threads; 683 fds
Thread states: 1 running, 106 sleeping, 0 stopped, 0 zombie
CPU states: 59.03% idle, 1.92% user, 37.88% kernel, 1.15% interrupt
Memory: 755M total, 419M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
862 862 120 S 56 5384K 00:00:01 0.00% dbmd
905 905 120 S 35 2464K 00:00:02 0.00% ipbased
863 863 120 S 30 1956K 00:00:00 0.00% had
889 889 120 S 29 61592K 00:00:00 0.00% routed
1160 1160 120 S 28 23096K 00:00:01 0.19% sshd
# Enter q to exit the interactive mode.
Table 9 Output description
Field
Description
84 processes; 107 threads; 683
fds
Total number of processes, total number of threads, and total number of file
handles.
Thread states: 1 running, 102
sleeping, 0 stopped, 0 zombie
Thread state:
• Number of threads in running state.
• Number of threads in sleeping state (including both interruptible and
uninterruptible sleeping state).
• Number of threads in stopped state.
• Number of threads in zombie state.
CPU states
CPU state: free ratio, user usage ratio, kernel usage ratio, interruptible
usage ratio.
Memory state, in KB:
• Total memory.
• Memory available.
• Page size.
JID
Job ID that uniquely identifies a process. It remains the same even if the
process restarts.
PID
Process ID.
PRI
Process priority.
State
Process state:
• R—In running state or waiting in the queue.
• S—In interruptible sleeping state.
• T—In traced or stopped state.
• D—In uninterruptible sleep state.
• Z—In zombie state.
FDs
List file handles opened by the process.
MEM
Memory used by the process. (It displays as 0 in the kernel process.)
HH:MM:SS
Running time when the process restarted last time.
CPU
Process CPU usage.
Name
Process name. If the process name is marked with the square brackets ([ ]),
it refers to the kernel thread.
monitor thread
Use the monitor thread command to display the statistics of a thread.
Syntax
monitor thread [ dumbtty ] [ iteration number ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
Parameters
dumbtty: Displays the thread statistics as if on a dumb terminal (The screen refreshes the statistics
periodically). If this keyword is specified, the statistics of all threads is listed in descending order on the
screen according to their CPU usage. If this keyword is not specified, the statistics is displayed in an
interactive mode. By default, statistics of the first 10 threads is displayed in descending order according
to their CPU usage, and refreshed every five seconds.
iteration number: Specifies the number of times the process statistics is displayed. The number argument
is in the range of 1 to 4294967295. If the keyword dumbtty is specified, the default value for the number
argument is 1. If neither dumbtty nor number is specified, the statistics is refreshed every five seconds until
you quit the monitor process command.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
Usage guidelines
If the keyword dumbtty is not specified, the statistics are displayed in interactive mode:
•
The system automatically calculates the number of processes to be displayed on a screen. Processes
outside the acceptable range are not displayed.
•
You can execute operations by entering the commands listed in Table 10.
Table 10 Interactive command description
Command
Description
Question mark (?) or h
Help information, displaying interactive commands available.
d
Set the update intervals for the statistics. The default value is 5 seconds.
k
End a job. This command affects the operation of the system. Use it with caution.
l
Refresh the screen.
n
Change number of threads to be displayed, in the range of 0 to 2147483647
(The default value is 10 and 0 indicates unlimited). If the number of threads is out
of the acceptable range, only the maximum number of threads that can be
displayed on a screen is displayed.
q
Exit the interactive mode.
Smaller than sign (<)
Move the sort field one column to the left.
Greater than sign (>)
Move the sort field one column to the right.
Examples
# Display the thread statistics as if on a dumb terminal.
monitor thread dumbtty
84 processes; 107 threads
Thread states: 1 running, 106 sleeping, 0 stopped, 0 zombie
CPU states: 83.19% idle, 1.68% user, 10.08% kernel, 5.04% interrupt
Memory: 755M total, 417M available, page size 4K
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU Name
1175 1175 0 120 R 00:00:00 1 10.75% top
1 1 0 120 S 00:00:06 1 2.68% scmd
881 881 0 120 S 00:00:09 1 2.01% diagd
776 776 0 120 S 00:00:01 0 0.67% [DEVD]
866 866 0 120 S 00:00:11 1 0.67% devd
2 2 0 115 S 00:00:00 0 0.00% [kthreadd]
3 3 0 115 S 00:00:01 0 0.00% [ksoftirqd/0]
4 4 0 99 S 00:00:00 1 0.00% [watchdog/0]
5 5 0 115 S 00:00:00 0 0.00% [events/0]
6 6 0 115 S 00:00:00 0 0.00% [khelper]
796 796 0 115 S 00:00:00 0 0.00% [kip6fs/1]
# Display the thread statistics in interactive mode.
monitor thread
84 processes; 107 threads
Thread states: 1 running, 106 sleeping, 0 stopped, 0 zombie
CPU states: 94.43% idle, 0.76% user, 3.64% kernel, 1.15% interrupt
Memory: 755M total, 417M available, page size 4K
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU Name
1176 1176 0 120 R 00:00:01 1 3.42% top
866 866 0 120 S 00:00:12 1 0.85% devd
881 881 0 120 S 00:00:09 1 0.64% diagd
1 1 0 120 S 00:00:06 1 0.42% scmd
1160 1160 0 120 S 00:00:01 1 0.21% sshd
2 2 0 115 S 00:00:00 0 0.00% [kthreadd]
3 3 0 115 S 00:00:01 0 0.00% [ksoftirqd/0]
4 4 0 99 S 00:00:00 1 0.00% [watchdog/0]
5 5 0 115 S 00:00:00 0 0.00% [events/0]
6 6 0 115 S 00:00:00 0 0.00% [khelper]
# Enter h or the question mark (?), and the help information displays as follows:
Help for interactive commands:
?,h Show the available interactive commands
c Sort by the CPU field(default)
d Set the delay interval between screen updates
k Kill a job
l Refresh the screen
n Set the maximum number of threads to display
q Quit the interactive display
t Sort by run time of threads since last restart
< Move sort field to the next left column
> Move sort field to the next right column
Press any key to continue
# Enter d and then enter 3 as prompted, and the statistics is updated every three seconds.
Enter the delay interval between screen updates(1~2147483647):3
# Enter n and then enter 5 as prompted, and the number of the threads to be displayed turns to 5.
Enter the max number of threads to display(0 means unlimited):5
84 processes; 107 threads
Thread states: 1 running, 106 sleeping, 0 stopped, 0 zombie
CPU states: 93.26% idle, 0.99% user, 4.23% kernel, 1.49% interrupt
Memory: 755M total, 417M available, page size 4K
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU Name
1176 1176 0 120 R 00:00:02 1 3.71% top
1 1 0 120 S 00:00:06 1 0.92% scmd
866 866 0 120 S 00:00:13 1 0.69% devd
881 881 0 120 S 00:00:10 1 0.69% diagd
720 720 0 115 D 00:00:01 0 0.23% [TMTH]
# After entering k, enter JID 974 as prompted, and the job routed is ended.
Enter the JID to kill:974
83 processes; 106 threads
Thread states: 1 running, 105 sleeping, 0 stopped, 0 zombie
CPU states: 96.26% idle, 0.54% user, 2.63% kernel, 0.54% interrupt
Memory: 755M total, 418M available, page size 4K
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU Name
1176 1176 0 120 R 00:00:04 1 1.86% top
866 866 0 120 S 00:00:14 1 0.87% devd
1 1 0 120 S 00:00:07 1 0.49% scmd
730 730 0 0 S 00:00:04 1 0.12% [DIBC]
762 762 0 120 S 00:00:22 1 0.12% [MNET]
# Enter q to exit the interactive mode.
Table 11 Output description
Field
Description
84 processes; 107 threads
Total number of processes; total number of threads.
Thread states
Thread state:
• Number of threads in running state.
• Number of threads in sleeping state (including both interruptible
and uninterruptible sleeping state).
• Number of threads in stopped state.
• Number of threads in zombie state.
CPU states
CPU state: free ratio, user usage ratio, kernel usage ratio,
interruptible usage ratio.
Memory
Memory state:
• Total memory.
• Memory available.
• Page size.
JID
Job ID that uniquely identifies a process. It remains the same even if
the process restarts.
TID
Thread ID.
LAST_CPU
CPU where the thread is located in the last assignment.
PRI
Thread priority.
State
Process state:
• R—In running state or waiting in the queue.
• S—In interruptible sleeping state.
• T—In traced or stopped state.
• D—In uninterruptible sleep state.
• Z—In zombie state.
HH:MM:SS
Running time when the thread restarted last time.
MAX
Maximum period when the thread uses CPU in one assignment, in
milliseconds.
CPU
Thread CPU usage.
Name
Thread name. If the thread name is marked with the square brackets
([ ]), it refers to the kernel thread.
ping
Use the ping command to verify whether the destination IP address is reachable, and to display related
statistics.
ping [ ip ] [ -a source-ip | -c count | -f | -h ttl | -i interface-type interface-number | -m interval | -n | -p
pad | -q | -r | -s packet-size | -t timeout | -tos tos | -v | -vpn-instance vpn-instance-name ] * host
Views
Any view
Predefined user roles
network-admin
Parameters
ip: Supports IPv4 protocol. If this keyword is not specified, IPv4 is also supported.
-a source-ip: Specifies the source IP address of an ICMP echo request (ECHO-REQUEST). It must be an
IP address configured on the device. If this option is not specified, the source IP address of an ICMP echo
request is the primary IP address of the outbound interface of the request.
-c count: Specifies the number of times that an ICMP echo request is sent. The count argument is in the
range of 1 to 4294967295. The default value is 5.
-f: Discards packets larger than the MTU of an outbound interface, which means the ICMP echo request
is not allowed to be fragmented.
-h ttl: Specifies the TTL value for an ICMP echo request. The ttl argument is in the range of 1 to 255. The
default value is 255.
-i interface-type interface-number: Specifies the ICMP echo request sending interface by its type and
number. If this option is not provided, the ICMP echo request sending interface is determined by
searching the routing table or forwarding table according to the destination IP address.
-m interval: Specifies the interval (in milliseconds) to send an ICMP echo request. The interval argument
is in the range of 1 to 65535. The default value is 200.
-n: Disables domain name resolution for the host argument. If the host argument represents the host name
for the destination, and this keyword is not specified, the device translates host into an address.
-p pad: Specifies the value of the pad field in an ICMP echo request, in hexadecimal format, 1 to 8 bits,
in the range of 0 to ffffffff. If the specified value is less than 8 bits, 0s are added in front of the value to
extend it to 8 bits. For example, if pad is configured as 0x2f, then the packets are padded with
0x0000002f repeatedly to make the total length of the packet meet the requirements of the device. By
default, the padded value starts from 0x01 up to 0xff, where another round starts again if necessary, like
0x010203…feff01….
-q: Displays only statistics. If this keyword is not specified, the system displays all information.
-r: Records routing information. If this keyword is not specified, routes are not recorded.
-s packet-size: Specifies length (in bytes) of an ICMP echo request (not including the IP packet header
and the ICMP packet header). The packet-size argument is in the range of 20 to 8100. The default value
is 56.
-t timeout: Specifies the timeout time (in milliseconds) of an ICMP echo reply (ECHO-REPLY). If the source
does not receive an ICMP echo reply within the timeout, it considers the ICMP echo reply timed out. The
timeout argument is in the range of 0 to 65535. The default value is 2000.
-tos tos: Specifies type of service (ToS) of an echo request. The tos argument is in the range of 0 to 255.
The default value is 0.
-v: Displays non ICMP echo reply received. If this keyword is not specified, the system does not display
non ICMP echo reply.
-vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the destination belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the destination is on the public
network, do not specify this option.
host: IP address or host name (a string of 1 to 255 characters) for the destination.
Usage guidelines
To use the name of the destination host to perform the ping operation, you must first configure the Domain
Name System (DNS) on the device. Otherwise, the ping operation fails. In addition, you must use the
command in the form of ping ip ip instead of ping ip if the destination name is a key word, such as ip.
To abort the ping operation during the execution of the command, press Ctrl+C.
Examples
# Test whether the device with an IP address of 1.1.2.2 is reachable.
ping 1.1.2.2
PING 1.1.2.2 (1.1.2.2): 56 data bytes
56 bytes from 1.1.2.2: icmp_seq=0 ttl=254 time=2.137 ms
56 bytes from 1.1.2.2: icmp_seq=1 ttl=254 time=2.051 ms
56 bytes from 1.1.2.2: icmp_seq=2 ttl=254 time=1.996 ms
56 bytes from 1.1.2.2: icmp_seq=3 ttl=254 time=1.963 ms
56 bytes from 1.1.2.2: icmp_seq=4 ttl=254 time=1.991 ms
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.963/2.028/2.137/0.062 ms
# Test whether the device with an IP address of 1.1.2.2 in VPN 1 is reachable.
ping -vpn-instance vpn1 1.1.2.2
PING 1.1.2.2 (1.1.2.2): 56 data bytes
56 bytes from 1.1.2.2: icmp_seq=0 ttl=254 time=2.137 ms
56 bytes from 1.1.2.2: icmp_seq=1 ttl=254 time=2.051 ms
56 bytes from 1.1.2.2: icmp_seq=2 ttl=254 time=1.996 ms
56 bytes from 1.1.2.2: icmp_seq=3 ttl=254 time=1.963 ms
56 bytes from 1.1.2.2: icmp_seq=4 ttl=254 time=1.991 ms
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.963/2.028/2.137/0.062 ms
# Test whether the device with an IP address of 1.1.2.2 is reachable. Only check results are displayed.
ping -q 1.1.2.2
PING 1.1.2.2 (1.1.2.2): 56 data bytes
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.962/2.196/2.665/0.244 ms
# Test whether the device with an IP address of 1.1.2.2 is reachable. The route information is displayed.
ping -r 1.1.2.2
PING 1.1.2.2 (1.1.2.2): 56 data bytes
56 bytes from 1.1.2.2: icmp_seq=0 ttl=254 time=4.685 ms
RR: 1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
56 bytes from 1.1.2.2: icmp_seq=1 ttl=254 time=4.834 ms (same route)
56 bytes from 1.1.2.2: icmp_seq=2 ttl=254 time=4.770 ms (same route)
56 bytes from 1.1.2.2: icmp_seq=3 ttl=254 time=4.812 ms (same route)
56 bytes from 1.1.2.2: icmp_seq=4 ttl=254 time=4.704 ms (same route)
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/stddev = 4.685/4.761/4.834/0.058 ms
The output shows the following information:
•
The destination is reachable.
•
The route is 1.1.1.1 <-> {1.1.1.2; 1.1.2.1} <-> 1.1.2.2.
Table 12 Output description
Field
Description
PING 1.1.2.2
Test whether the device with IP address 1.1.2.2 is reachable.
56 data bytes
Number of data bytes in each ICMP echo request.
56 bytes from 1.1.2.2: icmp_seq=0
ttl=254 time=4.685 ms
Received the ICMP reply from the device whose IP address is 1.1.2.2. If
no reply is received during the timeout period, no information is
displayed.
• Bytes—The number of data bytes in the ICMP reply.
• Icmp_seq—The packet sequence, used to determine whether a
segment is lost, disordered or repeated.
• Ttl—The TTL value in the ICMP reply.
• Time—The response time.
RR:
The routers through which the ICMP echo request passed. They are
displayed in inversed order, that is, the router with a smaller distance to
the destination is displayed first.
--- 1.1.2.2 ping statistics ---
Statistics on data received and sent in the ping operation.
5 packet(s) transmitted
Number of ICMP echo requests sent.
5 packet(s) received
Number of ICMP reply received.
0.0% packet loss
Percentage of packets not responded to the total packets sent.
round-trip min/avg/max/stddev =
4.685/4.761/4.834/0.058 ms
Minimum/average/maximum/standard deviation response time, in
milliseconds.
ping ipv6
Use the ping ipv6 command to verify whether an IPv6 address is reachable, and display related
statistics.
ping ipv6 [ -a source-ipv6 | -c count | -m interval | -q | -s packet-size | -t timeout | –v | -vpn-instance
vpn-instance-name ] * host [ -i interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
Parameters
-a source-ipv6: Specifies the source IPv6 address of an ICMP echo request. It must be a legal IPv6
address configured on the device. If this option is not specified, the source IPv6 address of an ICMP echo
request is the IPv6 address of the outbound interface of the request. (The address selection rule is defined
by RFC 3484).
-c count: Specifies the number of times that an ICMPv6 echo request is sent. The count argument is in the
range of 1 to 4294967295. The default value is 5.
-m interval: Specifies the interval (in milliseconds) to send an ICMPv6 echo reply. The interval argument
is in the range of 1 to 65535. The default value is 1000.
-q: Displays only statistics. If this keyword is not specified, all information including the statistics is
displayed.
-s packet-size: Specifies length (in bytes) of an ICMPv6 echo request (not including the IPv6 packet
header and the ICMPv6 packet header). The packet-size argument is in the range of 20 to 8100. The
default value is 56.
-t timeout: Specifies the timeout time (in milliseconds) of an ICMPv6 echo reply. The timeout argument is
in the range of 0 to 65535. The default value is 2000.
-v: Displays all ICMPv6 packets received. If this keyword is not specified, the system only displays
ICMPv6 echo reply.
-vpn-instance vpn-instance-name: Specifies the VPN to which the destination belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the destination is on the public
network, do not specify this option.
-i interface-type interface-number: Specifies an outbound interface by its type and number. This option
must be specified when the destination address is a broadcast address or the specified outbound
interface has a link local address. If this option is not specified, the ICMP echo request sending interface
is determined by searching the routing table or forwarding table according to the destination IP address.
host: IPv6 address or host name of the destination, which is a string of 1 to 46 characters.
Usage guidelines
To use the name of the destination host to perform the ping operation, you must first configure DNS on
the device. Otherwise, the ipv6 ping operation fails.
To abort the ping ipv6 operation during the execution of the command, press Ctrl+C.
Examples
# Test whether the IPv6 address 2001::2 is reachable.
ping ipv6 2001::2
PING6(104=40+8+56 bytes) 2001::1 --> 2001::2
56 bytes from 2001::2, icmp_seq=0 hlim=64 time=62.000 ms
56 bytes from 2001::2, icmp_seq=1 hlim=64 time=23.000 ms
56 bytes from 2001::2, icmp_seq=2 hlim=64 time=20.000 ms
56 bytes from 2001::2, icmp_seq=3 hlim=64 time=4.000 ms
56 bytes from 2001::2, icmp_seq=4 hlim=64 time=16.000 ms
--- 2001::2 ping6 statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 4.000/25.000/62.000/20.000 ms
# Test whether the IPv6 address 2001::2 is reachable. Only the statistics is displayed.
ping ipv6 –q 2001::2
PING6(104=40+8+56 bytes) 2001::1 --> 2001::2
--- 2001::2 ping6 statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 4.000/25.000/62.000/20.000 ms
# Test whether the IPv6 address 2001::2 is reachable. All ping information is displayed.
ping ipv6 –v 2001::2
PING6(104=40+8+56 bytes) 2001::1 --> 2001::2
56 bytes from 2001::2, icmp_seq=0 hlim=64 dst=2001::1 idx=3 time=62.000 ms
56 bytes from 2001::2, icmp_seq=1 hlim=64 dst=2001::1 idx=3 time=23.000 ms
56 bytes from 2001::2, icmp_seq=2 hlim=64 dst=2001::1 idx=3 time=20.000 ms
56 bytes from 2001::2, icmp_seq=3 hlim=64 dst=2001::1 idx=3 time=4.000 ms
56 bytes from 2001::2, icmp_seq=4 hlim=64 dst=2001::1 idx=3 time=16.000 ms
--- 2001::2 ping6 statistics ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 4.000/25.000/62.000/20.000 ms
The output shows the following information:
•
The destination was reachable, and ICMPv6 echo request packets are replied.
•
The minimum/average/maximum/standard deviation roundtrip time of packets is 4 milliseconds,
25 milliseconds, 62 milliseconds and 20 milliseconds.
Table 13 Output description
Field
Description
PING6(104=40+8+56 bytes)
2001::1 --> 2001::2
A 104-byte ICMPv6 echo reply packet sent from the IP address
2001::1to 2001::2.
• The length of IPv6 packet header is 40 bytes.
• The length of ICMPv6 packet header is 8 bytes.
• The length of the ICMPv6 echo request packet is 56 bytes.
56 bytes from 2001::2,
icmp_seq=1 hlim=64 dst=2001::1
idx=3 time=62.000 ms
Received the ICMPv6 reply from the device whose IPv6 address is
2001::2.
• The number of data bytes is 56.
• The packet sequence is 1.
• The hop limit value is 64.
• The destination address is 2001::1 (Specify the -v keyword to
display this field).
• The index for the packet inbound interface is 3 (Specify the -v
keyword to display this field).
• The response time is 62 milliseconds.
--- 2001::2 ping6 statistics ---
Statistics on data received and sent in the ping operation.
5 packet(s) transmitted
Number of ICMPv6 echo requests sent.
5 packet(s) received
Number of ICMPv6 reply received.
0.0% packet loss
Percentage of packets not responded to the total packets sent.
round-trip min/avg/max/ std-dev
=4.000/25.000/62.000/20.000
ms
Minimum/average/maximum/standard deviation response time, in
milliseconds.
process
Use the process command to start, crash, stop, and restart a process.
Syntax
process { crash | restart | shutdown | start } { job job-id [ slot slot-number ] | name process-name [ slot
slot-number | all ] }
Views
User view
Predefined user roles
network-admin
Parameters
crash: Crashes a process.
restart: Restarts a process.
shutdown: Stops a process. A process stopped by this command will not be automatically restarted.
start: Starts a process.
job job-id: Specifies a job ID that uniquely identifies a process. It remains the same even if the process
restarts. The job-id argument is in the range of 1 to 2147483647.
slot slot-number: Specifies an IRF member device ID. If this option is not specified, the command displays
state information about processes on the master device.
name process-name: Specifies a process name, which is a case-insensitive string of 1 to 15 characters
without the question mark (?) and space.
all: Specifies processes running on all IRF member device.
This command is for testing and diagnosis purposes. Manually starting or stopping a process might affect
device operation or ongoing services. Before using this command, be sure you fully understand its impact
or get help from an H3C engineer.
A process stopped by the process shutdown command will not automatically restart. To restart the
process, execute the process start command.
The process crash command tests whether a process can normally restart. If the test succeeds, the process
restarts after you execute this command.
Examples
# Stop the process diagd on the member device 1.
process shutdown name diagd slot 1
Manually stopping or restarting a process can severely impact device operation. Use these
commands only under the guidance of H3C engineers. Continue? [Y/N]:y
Shutting down the process diagd[881] on slot 1 ...
Succeeded.
tracert
Use the tracert command to trace the path the packets traverse from source to destination.
Syntax
tracert [ -a source-ip | -f first-ttl | -m max-ttl | -p port | -q packet-number | -vpn-instance
vpn-instance-name | -w timeout ] * host
Views
Any view
Predefined user roles
network-admin
Parameters
-a source-ip: Specifies the source IP address of a tracert packet. It must be a legal IP address configured
on the device. If this option is not specified, the source IP address of a tracert packet is the primary IP
address of the outbound interface of this tracert packet.
-f first-ttl: Specifies the first TTL, or, the maximum number of hops allowed for the first packet. The first-ttl
argument is in the range of 1 to 255. The default value is 1. It must be smaller than the maximum TTL.
-m max-ttl: Specifies the maximum TTL, or, the maximum number of hops allowed for a packet. The max-ttl
argument is in the range of 1 to 255. The default value is 30. It must be greater than the first TTL.
-p port: Specifies the UDP port number of the destination. The port argument is in the range of 1 to 65535.
The default value is 33434. It is unnecessary to modify this option.
-q packet-number: Specifies the number of probe packets sent each time. The packet-number argument
is in the range of 1 to 65535. The default value is 3.
-vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the destination belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the destination is on the public
network, do not specify this option.
-w timeout: Specifies the timeout time of the reply packet of a probe packet. The timeout argument is in
the range of 1 to 65535 milliseconds. The default value is 5000 milliseconds.
host: IP address or host name (a string of 1 to 255 characters) for the destination.
Usage guidelines
After having identified network failure with the ping command, use the tracert command to locate the
failed node(s).
The output information for the tracert command includes IP addresses of all the Layer 3 devices the
packets traverse from source to destination. Asterisks (* * *) are displayed if the device cannot reply with
an ICMP error message (probably because the destination is unreachable or sending ICMP
timeout/destination unreachable packets is disabled).
To abort the tracert operation during the execution of the command, press Ctrl+C.
Examples
# Display the path that the packets traverse from source to destination with an IP address of 1.1.2.2.
tracert 1.1.2.2
traceroute to 1.1.2.2(1.1.2.2), 30 hops at most, 40 bytes each packet, press CTRL_C to
break
1 1.1.1.2 673 ms 425 ms 30 ms
2 1.1.2.2 580 ms 470 ms 80 ms
# Trace the path to destination 192.168.0.46 over an MPLS network.
tracert 192.168.0.46
traceroute to 192.168.0.46(192.168.0.46), 30 hops at most, 40 bytes each packet, press
CTRL_C to break
1 192.0.2.13 (192.0.2.13) 0.661 ms 0.618 ms 0.579 ms
2 192.0.2.9 (192.0.2.9) 0.861 ms 0.718 ms 0.679 ms
MPLS Label=100048 Exp=0 TTL=1 S=1
3 192.0.2.5 (192.0.2.5) 0.822 ms 0.731 ms 0.708 ms
MPLS Label=100016 Exp=0 TTL=1 S=1
4 192.0.2.1 (192.0.2.1) 0.961 ms 8.676 ms 0.875 ms
Table 14 Output description
Field
Description
traceroute to 1.1.2.2(1.1.2.2)
Display the route the IP packets traverse from the current device to the device
whose IP address is 1.1.2.2.
hops at most
Maximum number of hops of the probe packets, which can be set through the
-m keyword.
bytes each packet
Number of bytes of a probe packet.
press CTRL_C to break
During the execution of the command, press Ctrl+C to abort the tracert
operation.
1 1.1.1.2 673 ms 425 ms 30
ms
Probe result of the probe packets whose TTL is 1, including the IP address of
the first hop, and the roundtrip time of three probe packets.
The number of packets that can be sent in each probe can be set through the
-q keyword.
MPLS Label=100048 Exp=0
TTL=1 S=1
ICMP timeout packets on an MPLS network, carrying MPLS label information:
• Label—Label value that is used to identify a forwarding equivalence class
(FEC).
• Exp—Reserved, usually used for class of service (CoS).
• TTL—TTL value.
• S—MPLS supports multiple levels of labels. Value 1 indicates that the label
is at the bottom of the label stack, and value 0 indicates that the label is in
another label stack.
tracert ipv6
Use the tracert ipv6 command to display the path the IPv6 packets traverse from source to destination.
Syntax
tracert ipv6 [ -f first-hop | -m max-hops | -p port | -q packet-number | -vpn-instance vpn-instance-name
| -w timeout ] * host
Views
Any view
Predefined user roles
network-admin
Parameters
-f first-hop: Specifies the first hoplimit, or, the allowed number of hops for the first packet. The first-hop
argument is in the range of 1 to 255. The default value is 1. The first hoplimit must be less than the
max-hops.
-m max-hops: Specifies the maximum number of hops allowed for a packet. The max-hops argument is
in the range of 1 to 255 . The default value is 30. It must be greater than first-hop.
-p port: Specifies the UDP port number of the destination. The port argument is in the range of 1 to 65535.
The default value is 33434. It is unnecessary to modify this option.
-q packet-number: Specifies the number of probe packets sent each time. The packet-number argument
is in the range of 1 to 65535. The default value is 3.
-vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the destination belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the destination is on the public
network, do not specify this option.
-w timeout: Specifies the timeout time of the reply packet of a probe packet. The timeout argument is in
the range of 1 to 65535 milliseconds. The default value is 5000 milliseconds.
host: IPv6 address or host name for the destination, which is a string of 1 to 46 characters.
Usage guidelines
After having identified network failure with the ping ipv6 command, you can use the tracert ipv6
command to locate the failed nodes.
The output of the tracert ipv6 command includes IPv6 addresses of all the Layer 3 devices the packets
traverse from source to destination. Asterisks (* * *) are displayed if the device cannot reply with an
ICMP error message (probably because the destination is unreachable or sending ICMP
timeout/destination unreachable packets is disabled).
To abort the tracert operation during the execution of the command, press Ctrl+C.
Examples
# Display the path the packets traverse from source to destination with IPv6 address 2001:3::2.
tracert ipv6 2001:3::2
traceroute to 2001:3::2(2001:3::2), 30 hops at most, 60 byte packets, press CTRL_C to break
1 2001:1::2 0.661 ms 0.618 ms 0.579 ms
2 2001:2::2 0.861 ms 0.718 ms 0.679 ms
3 2001:3::2 0.822 ms 0.731 ms 0.708 ms
Table 15 Output description
Field
Description
traceroute to 2001:3::2
Display the route the IPv6 packets traverse from the current device to the
device whose IP address is 2001:3:2.
hops at most
Maximum number of hops of the probe packets, which can be set through
the -m keyword.
byte packets
Number of bytes of a probe packet.
1 2001:1::2 0.661 ms 0.618
ms 0.579 ms
Probe result of the probe packets whose hoplimit is 1, including the IPv6
address of the first hop, and the roundtrip time of three probe packets.
Number of packets that can be sent in each probe can be set through the
-q keyword.
display ntp-service ipv6 sessions
Use the display ntp-service ipv6 sessions command to display information about all IPv6 NTP
associations.
Syntax
display ntp-service ipv6 sessions [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
verbose: Displays detailed information about all IPv6 NTP associations. If you do not specify this
keyword, only brief information about the IPv6 NTP associations is displayed.
Examples
# Display brief information about all IPv6 NTP associations.
display ntp-service ipv6 sessions
Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.
Source: [125]3000::32
Reference: 127.127.1.0 Clock stratum: 2
Reachabilities: 1 Poll interval: 64
Last receive time: 6 Offset: -0.0
Roundtrip delay: 0.0 Dispersion: 0.0
Total sessions : 1
Table 16 Output description
Field
Description
[12345]
• 1—Clock source selected by the system, namely, the current reference
source, with a system clock stratum level less than or equal to 15.
• 2—Stratum level of the clock source is less than or equal to 15.
• 3—This clock source has survived the clock selection algorithm.
• 4—This clock source is a candidate clock source.
• 5—This clock source was created by a command.
Source
IPv6 address of the NTP server
Reference clock ID of the NTP server
• If the reference clock is the local clock, the value of this field is related to the
value of the Clock stratum field:
� When the value of the Clock stratum field is 0 or 1, this field is displayed
as "Local."
� When the Clock stratum field has another value, this field is displayed as
MD5 digest value of the first 32 bits of the IPv6 address. The MD5 digest
value is in dotted decimal format.
• If the reference clock is the clock of another device on the network, this field
is displayed as MD5 digest value of the first 32 bits of the IPv6 address. The
MD5 digest value is in dotted decimal format.
Clock stratum
Stratum level of the NTP server, which determines the clock accuracy. The
value ranges from 1 to 16. A lower stratum level represents higher clock
accuracy. A stratum 16 clock is not synchronized.
Reachabilities
Reachability count of the NTP server. 0 indicates that the NTP server is
unreachable.
Poll interval
Polling interval in seconds. It is the maximum interval between successive NTP
messages.
Last receive time
Length of time from when the last NTP message was received or when the local
clock was last updated to the current time
The time is in seconds by default. If the time length is greater than 2048
seconds, it is displayed in minutes; if greater than 300 minutes, in hours; if
greater than 96 hours, in days.
Offset
Offset of the system clock relative to the reference clock, in milliseconds
Roundtrip delay
Roundtrip delay from the local device to the clock source, in milliseconds
Dispersion
Maximum error of the system clock relative to the reference source.
Total sessions
Total number of associations
# Display detailed information about all IPv6 NTP associations.
display ntp-service ipv6 sessions verbose
Clock source: 1::1
Session ID: 36144
Clock stratum: 16
Clock status: configured, insane, valid, unsynced
Reference clock ID: INIT
VPN instance: Not specified
Local mode: sym_active, local poll interval: 6
Peer mode: unspec, peer poll interval: 10
Offset: 0.0000ms, roundtrip delay: 0.0000ms, dispersion: 15937ms
Root roundtrip delay: 0.0000ms, root dispersion: 0.0000ms
Reachabilities:0, sync distance: 15.938
Precision: 2^10, version: 4, source interface: Not specified
Reftime: 00000000.00000000 Thu, Feb 7 2036 6:28:16.000
Orgtime: d17cbb21.0f318106 Tue, May 17 2011 9:15:13.059
Rcvtime: 00000000.00000000 Thu, Feb 7 2036 6:28:16.000
Xmttime: 00000000.00000000 Thu, Feb 7 2036 6:28:16.000
Roundtrip delay samples: 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
Offset samples: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Filter order: 0 1 2 3 4 5 6 7
Total sessions: 1
Table 17 Output description
Field
Description
Clock source
IPv6 address of the clock source
Clock stratum
Stratum level of the NTP server, which determines the clock
precision. The value ranges from 1 to 16. A lower stratum level
represents a higher clock accuracy. A stratum 16 clock is not
synchronized.
Clock status
Status of the clock source corresponding to this association,
including
• configured—The association was created by a configuration
command.
• dynamic—This association is established dynamically.
• master—The clock source is the primary reference source of the
current system.
• selected—The clock source has survived the clock selection
algorithm.
• candidate—The clock source is the candidate reference source.
• sane—The clock source is available for this association.
• insane—The clock source is not available for this association.
• valid—The clock source is valid, which means the clock source
meet the following requirements: it has passed the authentication
and is being synchronized; its stratum level is valid; its root delay
and root dispersion values are within their ranges.
• invalid—The clock source is invalid.
• unsynced—The clock source has not been synchronized or the
value of the stratum level is invalid.
Reference clock ID
• If the reference clock is the local clock, the value of this field is
related to the value of the Clock stratum field:
� When the value of the Clock stratum field is 0 or 1, this field is
displayed as "Local."
� When the Clock stratum field has another value, this field is
displayed as MD5 digest value of the first 32 bits of the IPv6
address. The MD5 digest value is in dotted decimal format.
• If the reference clock is the clock of another device on the
network, this field is displayed as MD5 digest value of the first 32
bits of the IPv6 address. The MD5 digest value is in dotted
decimal format.
VPN instance
VPN instance to which the NTP server belongs. If the NTP server is
in a public network, the field is displayed as Not specified.
Operation mode of the local device:
• unspec—The mode is unspecified.
• sym_active—Active mode.
• sym_passive—Passive mode.
• client—Client mode.
• server—Server mode.
• broadcast—Broadcast or multicast server mode.
• bclient—Broadcast or multicast client mode.
local poll interval
Polling interval for the local device, in seconds. The value displayed
is a power of 2. For example, if the displayed value is 6, the poll
interval of the local device is 26, or 64 seconds.
peer mode
Operation mode of the peer device:
• unspec—The mode is unspecified.
• sym_active—Active mode.
• sym_passive—Passive mode.
• client—Client mode.
• server—Server mode.
• broadcast—Broadcast or multicast server mode.
• bclient—Broadcast or multicast client mode.
peer poll interval
Polling interval for the peer device, in seconds. The value displayed
is a power of 2. For example, if the displayed value is 6, the polling
interval of the local device is 26, or 64 seconds.
Offset
Offset of the system clock relative to the reference clock, in
milliseconds
roundtrip delay
Roundtrip delay from the local device to the clock source, in
milliseconds
dispersion
Maximum error of the system clock relative to the reference clock
Root roundtrip delay
Roundtrip delay from the local device to the primary reference
source, in milliseconds
root dispersion
Maximum error of the system clock relative to the primary reference
clock, in milliseconds
Reachabilities
Reachability count of the clock source. 0 indicates that the clock
source is unreachable.
sync distance
Synchronization distance relative to the upper-level clock, in
seconds, and calculated from dispersion and roundtrip delay
values.
Precision
Accuracy of the system clock
version
NTP version, in the range of 1 to 4.
source interface
Source interface.
If the source interface is not specified, this field is Not specified.
Reftime
Reference timestamp in the NTP message
Orgtime
Originate timestamp in the NTP message
Rcvtime
Receive timestamp in the NTP message
Transmit timestamp in the NTP message
Filter order
Dispersion information
Reference clock status
Status of the local clock. The field is displayed only when you use
the ntp-service refclock-master command to set the local clock as a
reference clock.
When the reach field of the local clock is 255, the field is displayed
as working normally. Otherwise, the field is displayed as working
abnormally.
Total sessions
Total number of associations
display ntp-service sessions
Use the display ntp-service sessions command to display information about all IPv4 NTP associations.
Syntax
display ntp-service sessions [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
verbose: Displays detailed information about all IPv4 NTP associations. If you do not specify this
keyword, only brief information about the NTP associations is displayed.
Usage guidelines
When a device is operating in NTP broadcast or multicast server mode, the display ntp-service sessions
command does not display the IPv4 NTP association information corresponding to the broadcast or
multicast server, but the associations are counted in the total number of associations.
Examples
# Display brief information about all IPv4 NTP associations.
display ntp-service sessions
source reference stra reach poll now offset delay disper
********************************************************************************
[12345]LOCAL(0) LOCL 0 1 64 - 0.0000 0.0000 7937.9
Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.
Total sessions: 1
Table 18 Output description
Field
Description
source
• When the reference clock is the local clock, the field is displayed as
LOCAL(number), which indicates that the IP address of the local clock is
127.127.1.number, where number represents the NTP process number in the
range of 0 to 3.
• When the reference clock is the clock of another device, the field is
displayed as the IP address of the NTP server.
reference
Reference clock ID of the NTP server.
• If the reference clock is the local clock, the value of this field is related to the
value of the stra field:
� When the value of the stra field is 0 or 1, this field is displayed as
"LOCL."
� When the stra field has another value, this field is displayed as the IP
address of the local clock.
• If the reference clock is the clock of another device on the network, this field
is displayed as the IP address of the device.
stra
Stratum level of the clock source, which determines the clock accuracy. The
value ranges from 1 to 16. The clock accuracy decreases from stratum 1 to
stratum 16. A stratum 1 clock has the highest precision, and a stratum 16 clock
is not synchronized.
reach
Reachability count of the clock source. 0 indicates that the clock source in
unreachable.
poll
Polling interval in seconds. It is the maximum interval between successive NTP
messages.
now
Length of time from when the last NTP message was received or when the local
clock was last updated to the current time
Time is in seconds by default. If the time length is greater than 2048 seconds,
it is displayed in minutes; if greater than 300 minutes, in hours; if greater than
96 hours, in days.
offset
Offset of the system clock relative to the reference clock, in milliseconds
delay
Roundtrip delay from the local device to the NTP server, in milliseconds
disper
Maximum error of the system clock relative to the reference source, in
milliseconds.
[12345]
• 1—Clock source selected by the system, namely, the current reference
source, with a system clock stratum level less than or equal to 15.
• 2—Stratum level of the clock source is less than or equal to 15.
• 3—This clock source has survived the clock selection algorithm.
• 4—This clock source is a candidate clock source.
• 5—This clock source was created by a configuration command.
Total sessions
Total number of associations
# Display the detailed information about all IPv4 NTP associations.
display ntp-service sessions verbose
Clock source: 192.168.1.40
Session ID: 35888
Clock stratum: 2
Clock status: configured, master, sane, valid
Reference clock ID: 127.127.1.0
VPN instance: Not specified
Local mode: client, local poll interval: 6
Peer mode: server, peer poll interval: 6
Offset: 0.2862ms, roundtrip delay: 3.2653ms, dispersion: 4.5166ms
Root roundtrip delay: 0.0000ms, root dispersion: 10.910ms
Reachabilities:31, sync distance: 0.0194
Precision: 2^18, version: 3, source interface: Not specified
Reftime: d17cbba5.1473de1e Tue, May 17 2011 9:17:25.079
Orgtime: 00000000.00000000 Thu, Feb 7 2036 6:28:16.000
Rcvtime: d17cbbc0.b1959a30 Tue, May 17 2011 9:17:52.693
Xmttime: d17cbbc0.b1959a30 Tue, May 17 2011 9:17:52.693
Roundtrip delay samples: 0.007 0.010 0.006 0.011 0.010 0.005 0.007 0.003
Offset samples: 5629.55 3913.76 5247.27 6526.92 31.99 148.72 38.27 0.29
Filter order: 7 5 2 6 0 4 1 3
Total sessions: 1
Table 19 Output description
Field
Description
Clock source
IP address of the NTP server
Clock stratum
Stratum level of the NTP server, which determines the clock
accuracy. The value ranges from 1 to 16. A lower stratum level
represents a higher clock accuracy. A stratum 16 clock is not
synchronized.
Clock status
Status of the clock source corresponding to this association:
• configured—The association was created by a configuration
command.
• dynamic—This association is established dynamically.
• master—The clock source is the primary reference source of the
current system.
• selected—The clock source has survived the clock selection
algorithm.
• candidate—The clock source is the candidate reference source.
• sane—The clock source has passed the sane authentication.
• insane—The clock source has failed the sane authentication.
• valid—The clock source is valid, which means the clock source
meet the following requirements: it has passed the authentication
and is being synchronized; its stratum level is valid; its root delay
and root dispersion values are within their ranges.
• invalid—The clock source is invalid.
• unsynced—The clock source has not been synchronized or the
value of the stratum level is invalid.
Reference clock ID
Reference clock ID of the NTP server.
• If the reference clock is the local clock, the value of this field is
related to the value of the Clock stratum field:
� When the value of the Clock stratum field is 0 or 1, this field is
displayed as "LOCL."
� When the Clock stratum field has another value, this field is
displayed as the IP address of the local clock.
• If the reference clock is the clock of another device on the
network, this field is displayed as the IP address of the device.
VPN instance
VPN instance to which the NTP server belongs. If the NTP server is
in a public network, the field is displayed as Not specified.
Local mode
Operation mode of the local device:
• unspec—The mode is unspecified.
• active—Active mode.
• passive—Passive mode.
• client—Client mode.
• server—Server mode.
• broadcast—Broadcast or multicast server mode.
• bclient—Broadcast or multicast client mode.
local poll interval
Polling interval of the local device, in seconds. The value displayed
is a power of 2. For example, if the displayed value is 6, the poll
interval of the local device is 26, or 64 seconds.
Peer mode
Operation mode of the peer device, including
• unspec—The mode is unspecified.
• active—Active mode.
• passive—Passive mode.
• client—Client mode.
• server—Server mode.
• broadcast—Broadcast or multicast server mode.
• bclient—Broadcast or multicast client mode.
peer poll interval
Polling interval of the peer device, in seconds. The value displayed
is a power of 2. For example, if the displayed value is 6, the poll
interval of the local device is 26, or 64 seconds.
Offset
Offset of the system clock relative to the reference clock, in
milliseconds
roundtrip delay
Roundtrip delay from the local device to the NTP server, in
milliseconds
dispersion
Maximum error of the system clock relative to the reference clock
Root roundtrip delay
Roundtrip delay from the local device to the primary reference
source, in milliseconds
root dispersion
Maximum error of the system clock relative to the primary reference
clock, in milliseconds
Reachabilities
Reachability count of the clock source. 0 indicates that the clock
source is unreachable.
Synchronization distance relative to the upper-level clock, in
seconds, and calculated from dispersion and roundtrip delay
values.
Precision
Accuracy of the system clock
version
NTP version, in the range of 1 to 4.
source interface
Source interface.
If the source interface is not specified, this field is Not specified.
Reftime
Reference timestamp in the NTP message
Orgtime
Originate timestamp in the NTP message
Rcvtime
Receive timestamp in the NTP message
Xmttime
Transmit timestamp in the NTP message
Filter order
Sample information order
Reference clock status
Status of the local clock. The field is displayed only when you use
the ntp-service refclock-master command to set the local clock as a
reference clock.
When the reach field of the local clock is 255, the field is displayed
as working normally. Otherwise, the field is displayed as working
abnormally.
Total sessions
Total number of associations
display ntp-service status
Use the display ntp-service status command to display the NTP service status information.
Syntax
display ntp-service status
View
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display the NTP service status after time synchronization.
display ntp-service status
Clock status: synchronized
Clock stratum: 2
System peer: LOCAL(0)
Local mode: client
Reference clock ID: 127.127.1.0
Leap indicator: 00
Clock jitter: 0.000977 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.00000 ms
Root dispersion: 3.96367 ms
Reference time: d0c5fc32.92c70b1e Wed, Dec 29 2010 18:28:02.573
# Display the NTP service status when time is not synchronized.
display ntp-service status
Clock status: unsynchronized
Clock stratum: 16
Reference clock ID: none
Clock jitter: 0.000000 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.00000 ms
Root dispersion: 0.00002 ms
Reference time: d0c5fc32.92c70b1e Wed, Dec 29 2010 18:28:02.573
Table 20 Output description
Field
Description
Clock status
Status of the system clock:
• synchronized—The system clock has been synchronized.
• unsynchronized—The system clock has not been
synchronized.
Clock stratum
Stratum level of the system clock
System peer
IP address of the selected NTP server
Local mode
Operation mode of the local device:
• Unspec—The mode is unspecified.
• active—Active mode.
• passive—Passive mode.
• client—Client mode.
• server—Server mode.
• broadcast—Broadcast or multicast server mode.
• bclient—Broadcast or multicast client mode.
Reference clock ID
For an IPv4 NTP server:
The field represents the IP address of the remote server when the
local device is synchronized to a remote NTP server.
The field represents the local clock when the local device uses the
local clock as a reference source.
• When the local clock has a stratum level of 1, this field is
displayed as "Local";
• When the local clock has any other stratum, this field is
displayed as the IP address of the local clock.
For an IPv6 NTP server:
The field represents the MD5 digest of the first 32 bits of the IPv6
address of the remote server when the local device is
synchronized to a remote IPv6 NTP server.
The field represents the local clock when the local device uses the
local clock as a reference source.
• When the local clock has a stratum level of 1, this field is
displayed as "Local."
• When the local clock has any other stratum, this field is
displayed as the MD5 digest of the first 32 bits of the IPv6
address of the local clock.
Leap indicator
Alarming status:
• 00—Normal.
• 01—Leap second, indicates that the last minute in a day has
61 seconds.
• 10—Leap second, indicates that the last minute in a day has
59 seconds.
• 11—Time is not synchronized.
Clock jitter
Difference between the system clock and reference clock, in
seconds.
Stability
Clock frequency stability. A lower value represents better
stability.
Clock precision
Accuracy of the system clock
Root delay
Roundtrip delay from the local device to the primary reference
source, in milliseconds
Root dispersion
Maximum error of the system clock relative to the primary
reference source, in milliseconds
Reference time
Reference timestamp
display ntp-service trace
Use the display ntp-service trace command to display the brief information of each NTP server from the
local device back to the primary reference source.
Syntax
display ntp-service trace
Predefined user roles
network-admin
network-operator
Examples
# Display the brief information of each NTP server from the local device back to the primary reference
source.
display ntp-service trace
Server 127.0.0.1
Stratum 3, jitter 0.000, synch distance 0.0000.
Server 3000::32
Stratum 2 , jitter 790.00, synch distance 0.0000.
RefID 127.127.1.0
The output shows that server 127.0.0.1 is synchronized to server 3000::32, and server 3000::32 is
synchronized to the local clock.
Table 21 Output description
Field
Description
Server
IP address of the NTP server
Stratum
Stratum level of the NTP server
jitter
Root mean square (RMS) value of the clock offset relative to the upper-level clock, in
seconds
synch distance
Synchronization distance relative to the upper-level NTP server, in seconds,
calculated from dispersion and roundtrip delay values.
RefID
Identifier of the primary reference source. When the stratum level of the primary
reference clock is 0, it is displayed as Local; otherwise, it is displayed as the IP
address of the primary reference clock.
ntp-service acl
Use the ntp-service acl command to configure the access-control right for the peer devices to access the
NTP services of the local device.
Use the undo ntp-service acl command to remove the configured NTP service access-control right.
Syntax
ntp-service { peer | query | server | synchronization } acl acl-number
undo ntp-service { peer | query | server | synchronization } acl acl-number
Default
The access-control right for the peer devices to access the NTP services of the local device is peer.
Views
System view
Predefined user roles
network-admin
Parameters
peer: Allows time requests and NTP control queries (such as alarms, authentication status, and time
server information) from a peer device and allows the local device to synchronize itself to a peer device.
query: Allows only NTP control queries from a peer device to the local device.
server: Allows time requests and NTP control queries from a peer device, but does not allow the local
device to synchronize itself to a peer device.
synchronization: Allows only time requests from a system whose address passes the access list criteria.
acl-number: Specifies an ACL. The peer devices that match the ACL have the access right specified in this
command. The acl-number argument represents a basic ACL number, in the range of 2000 to 2999.
Usage guidelines
You can control NTP access by using Access Control List (ACL). The access rights are in the following
order, from least restrictive to most restrictive: peer, server, synchronization, and query.
The device processes an NTP request by following these rules:
•
If no NTP access control is configured, peer is granted to the local device and peer devices.
•
If the IP address of the peer device matches a permit statement in an ACL for more than one access
right, the least restrictive access right is granted to the peer device. If a deny statement or no ACL is
matched, no access right is granted.
•
If no ACL is created for a specific access right, the associated access right is not granted.
•
If no ACL is created for any access right, peer is granted.
The ntp-service acl command provides minimal security for a system running NTP. A more secure method
is NTP authentication.
Examples
# Configure the peer devices on subnet 10.10.0.0/16 to have full access to the local device.
system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255
[Sysname-acl-basic-2001] quit
[Sysname] ntp-service access peer acl 2001
Related commands
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service authentication enable
Use the ntp-service authentication enable command to enable NTP authentication.
Use the undo ntp-service authentication enable command to disable NTP authentication.
Syntax
ntp-service authentication enable
undo ntp-service authentication enable
Default
NTP authentication is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
You need to enable NTP authentication in networks that require time synchronization security to make
sure that NTP clients are only synchronized to authenticated NTP servers.
To authenticate an NTP server, set an authentication key and specify it as a trusted key.
Examples
# Enable NTP authentication.
system-view
[Sysname] ntp-service authentication enable
Related commands
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service authentication-keyid
Use the ntp-service authentication-keyid command to set an NTP authentication key.
Use the undo ntp-service authentication-keyid command to remove the NTP authentication key.
Syntax
ntp-service authentication-keyid keyid authentication-mode md5 { cipher | simple } value
undo ntp-service authentication-keyid keyed
Default
No NTP authentication key is set.
Views
System view
Predefined user roles
network-admin
Parameters
keyid: Key ID to identify an authentication key, in the range of 1 to 4294967295.
authentication-mode md5 value: Uses the MD5 algorithm for key authentication.
simple: Sets the key as a simple text key.
cipher: Sets the key as a cipher text key.
value: Key value. It is a case-insensitive string of 1 to 73 characters in cipher text, and a case-insensitive
string of 1 to 32 characters in simple text.
In a network where there is a high security demand, the NTP authentication feature must be enabled for
a system running NTP. This feature enhances the network security by means of the client-server key
authentication, which prohibits a client from synchronizing to a device that has failed the authentication.
When the NTP authentication key is configured, use the ntp-service reliable authentication-keyid
command to configure the key as a trusted key. The key automatically changes to untrusted after you
delete the key. In this case, you do not need to execute the undo ntp-service reliable authentication-keyid
command.
A maximum of 128 keys can be set for the device by repeatedly executing the command.
Examples
# Set an MD5 authentication key, with the key ID of 10 and key value of BetterKey, in simple text.
system-view
[Sysname] ntp-service authentication enable
[Sysname] ntp-service authentication-keyid 10 authentication-mode md5 simple BetterKey
Related commands
•
ntp-service authentication enable
•
ntp-service reliable authentication-keyid
ntp-service broadcast-client
Use the ntp-service broadcast-client command to configure the device to operate in NTP broadcast client
mode and use the current interface to receive NTP broadcast packets.
Use the undo ntp-service broadcast-client command to remove the configuration.
Syntax
ntp-service broadcast-client
undo ntp-service broadcast-client
Default
The device does not operate in any NTP association mode.
Views
VLAN interface view
Predefined user roles
network-admin
Usage guidelines
After you configure this command, the device listens to NTP messages sent by the NTP broadcast server
and is synchronized based on the received NTP messages.
If you have configured the device to operate in broadcast client mode on an interface with this command,
do not add the interface to any aggregate group. To add the interface to an aggregate group, remove
the configuration of the command.
Examples
# Configure the device to operate in broadcast client mode and receive NTP broadcast messages on
VLAN-interface 1.
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service broadcast-client
Related commands
ntp-service broadcast-server
ntp-service broadcast-server
Use the ntp-service broadcast-server command to configure the device to operate in NTP broadcast
server mode and use the current interface to send NTP broadcast packets.
Use the undo ntp-service broadcast-server command to remove the configuration.
Syntax
ntp-service broadcast-server [ authentication-keyid keyid | version number ] *
undo ntp-service broadcast-server
Default
The device does not operate in any NTP association mode.
Views
VLAN interface view
Predefined user roles
network-admin
Parameters
authentication-keyid keyid: Specifies the key ID to be used for sending broadcast messages to broadcast
clients, where keyid is in the range of 1 to 4294967295. If this option is not specified, the local device
cannot synchronize broadcast clients enabled with NTP authentication.
version number: Specifies the NTP version, where number is in the range of 1 to 4 and defaults to 4.
Usage guidelines
After you configure this command, the device periodically sends NTP messages to the broadcast address
255.255.255.255.
If you have configured the device to operate in broadcast server mode on an interface with this
command, do not add the interface to any aggregate group. To add the interface to an aggregate group,
remove the configuration of the command.
Examples
# Configure the device to operate in broadcast server mode and send NTP broadcast messages on
VLAN-interface 1, using key 4 for encryption, and set the NTP version to 4.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service broadcast-server authentication-keyid 4 version 4
Related commands
•
ntp-service broadcast-client
•
ntp-service authentication enable
•
ntp-service authentication-keyid
ntp-service reliable authentication-keyid
ntp-service inbound disable
Use the ntp-service in-interface disable command to disable an interface from receiving NTP messages.
Use the undo ntp-service in-interface disable command to restore the default.
Syntax
ntp-service in-interface disable
undo ntp-service in-interface disable
Default
All interfaces are enabled to receive NTP messages.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
To disable an interface on the device from synchronizing the peer device in the corresponding subnet or
disable the device from being synchronized by the peer device in the subnet corresponding to an
interface, execute the command on the interface to disable the interface from receiving NTP messages.
Examples
# Disable VLAN-interface 1 from receiving NTP messages.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service inbound disable
ntp-service ipv6 acl
Use the ntp-service ipv6 acl command to configure the access-control right for the peer devices to access
the IPv6 NTP services of the local device.
Use the undo ntp-service ipv6 acl command to remove the configured NTP service access-control right.
Syntax
ntp-service ipv6 { peer | query | server | synchronization } acl acl-number
undo ntp-service ipv6 { peer | query | server | synchronization } acl acl-number
Default
The access-control right for the peer devices to access the IPv6 NTP services of the local device is peer.
Views
System view
Predefined user roes
network-admin
peer: Allows time requests and NTP control queries (such as alarms, authentication status, and time
server information) and allows the local device to synchronize itself to a peer device.
query: Allows only NTP control queries from a peer device to the local device.
server: Allows time requests and NTP control queries, but does not allow the local device to synchronize
itself to a peer device.
synchronization: Allows only time requests from a system whose address passes the access list criteria.
acl-number: Specifies an ACL. The peer devices that match the ACL have the access right specified in this
command. The acl-number argument represents a basic ACL number, in the range of 2000 to 2999.
Usage guidelines
You can control IPv6 NTP access by using Access Control List (ACL). The access rights are in the following
order, from least restrictive to most restrictive: peer, server, synchronization, and query.
The device processes an NTP request by following these rules:
•
If no NTP access control is configured, peer is granted to the local device and peer devices.
•
If the IP address of the peer device matches a permit statement in an ACL for more than one access
right, the least restrictive access right is granted to the peer device. If a deny statement or no ACL is
matched, no access right is granted.
•
If no ACL is created for a specific access right, the associated access right is not granted.
•
If no ACL is created for any access right, peer is granted.
The ntp-service ipv6 acl command provides a minimum security method. NTP authentication is more
secure.
Examples
# Configure the peer devices on subnet 2001::1 to have full access to the local device.
system-view
[Sysname] acl ipv6 number 2001
[Sysname-acl6-basic-2001] rule permit source 2001::1 64
[Sysname-acl6-basic-2001] quit
[Sysname] ntp-service ipv6 peer acl 2001
Related commands
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service inbound disable
Use the ntp-service ipv6 inbound disable command to disable an interface from receiving IPv6 NTP
messages.
Use the undo ntp-service ipv6 inbound disable command to restore the default.
Syntax
ntp-service ipv6 inbound disable
undo ntp-service ipv6 inbound disable
All interfaces are enabled to receive IPv6 NTP messages.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
To disable an interface on the device from synchronizing the peer devices in the corresponding subnet or
disable the device from being synchronized by the peer devices in the subnet corresponding to an
interface, execute the command on the interface.
Examples
# Disable VLAN-interface 1 from receiving IPv6 NTP messages.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service ipv6 inbound disable
ntp-service ipv6 multicast-client
Use the ntp-service ipv6 multicast-client command to configure the device to operate in IPv6 NTP
multicast client mode and use the current interface to receive IPv6 NTP multicast packets.
Use the undo ntp-service ipv6 multicast-client command to remove the configuration.
Syntax
ntp-service ipv6 multicast-client ipv6-multicast-address
undo ntp-service ipv6 multicast-client ipv6-multicast-address
Default
The device does not operate in any NTP association mode.
View
VLAN interface view
Predefined user roles
network-admin
Parameters
ipv6-multicast-address: IPv6 multicast IP address. An IPv6 broadcast client and an IPv6 broadcast server
must be configured with the same multicast address.
Usage guidelines
After you configure this command, the device listens to IPv6 NTP messages with the destination address
as the specified multicast address and is synchronized based on the received IPv6 NTP messages.
Examples
# Configure the device to operate in IPv6 multicast client mode and receive IPv6 NTP multicast messages
with the destination FF21::1 on VLAN-interface 1.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service ipv6 multicast-client ff21::1
Related commands
ntp-service ipv6 multicast-client
ntp-service ipv6 multicast-server
Use the ntp-service ipv6 multicast-server command to configure the device to operate in IPv6 NTP
multicast server mode and use the current interface to send IPv6 NTP multicast packets.
Use the undo ntp-service ipv6 multicast-server command to remove the configuration.
Syntax
ntp-service ipv6 multicast-server ipv6-multicast-address [ authentication-keyid keyid | ttl ttl-number ] *
undo ntp-service ipv6 multicast-server ipv6-multicast-address
Default
The device does not operate in any NTP association mode.
Views
VLAN interface view
Predefined user roles
network-admin
Parameters
ipv6-multicast-address: IPv6 multicast IP address. An IPv6 multicast client and server must be configured
with the same multicast address.
authentication-keyid keyid: Specifies the key ID to be used for sending multicast messages to multicast
clients, where keyid is in the range of 1 to 4294967295. If this option is not specified, the local device
cannot synchronize clients enabled with NTP authentication.
ttl ttl-number: Specifies the TTL of NTP multicast messages, where ttl-number is in the range of 1 to 255
and defaults to 16.
Usage guidelines
After you configure this command, the device periodically sends NTP messages to the specified IPv6
multicast address.Examples
# Configure the device to operate in IPv6 multicast server mode and send IPv6 NTP multicast messages
on VLAN-interface 1 to the multicast address FF21::1, using key 4 for encryption.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service ipv6 multicast-server ff21::1 authentication-keyid
4
Related commands
•
ntp-service ipv6 multicast-server
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service ipv6 source
Use the ntp-service ipv6 source command to specify the source interface for IPv6 NTP messages.
Use the undo ntp-service ipv6 source command to restore the default.
Syntax
ntp-service ipv6 source interface-type interface-number
undo ntp-service ipv6 source
Default
No source interface is specified for IPv6 NTP messages. The device automatically selects the source IP
address for IPv6 NTP messages. For more information, see RFC 3484.
Views
System view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an interface by its interface type and interface number.
Usage guidelines
If you specify the source interface for IPv6 NTP messages, the device sets the source IP address of the IPv6
NTP messages as the primary IP address of the specified interface when sending the IPv6 NTP messages.
When the device responds to an IPv6 NTP request, the source IPv6 address of the NTP response is
always the IPv6 address of the interface that has received the IPv6 NTP request.If you do not want the
IPv6 address of a certain interface on the local device to become the destination address for response
messages, use this command.If you have specified the source interface for IPv6 NTP messages in the
ntp-service ipv6 unicast-server or ntp-service ipv5 unicast-peer command, the interface specified
in the ntp-service ipv6 unicast-server or ntp-service ipv6 unicast-peer command serves as the
source interface for IPv6 NTP messages.If you have configured the ntp-service ipv6
broadcast-server or ntp-service ipv6 multicast-server command, the source interface for the
broadcast or multicast NTP messages is the interface configured with the respective command.
•
If the specified source interface is down, the device automatically selects the source IPv6 address.
For more information, see RFC 3484.
Examples
# Specify the source interface of IPv6 NTP messages as VLAN-interface 1.
system-view
[Sysname] ntp-service ipv6 source vlan-interface 1
ntp-service ipv6 unicast-peer
Use the ntp-service ipv6 unicast-peer command to specify an IPv6 symmetric-passive peer for the device.
Use the undo ntp-service ipv6 unicast-peer command to remove the IPv6 symmetric-passive peer
specified for the device.
ntp-service ipv6 unicast-peer { ipv6-address | peer-name } [ vpn-instance vpn-instance-name ]
[ authentication-keyid keyid | priority | source interface-type interface-number ] *
undo ntp-service ipv6 unicast-peer { ipv6-address | peer-name } [ vpn-instance vpn-instance-name ]
Default
No IPv6 symmetric-passive peer is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6-address: IPv6 address of the symmetric-passive peer. It must be a unicast address, rather than a
multicast address.
peer-name: Host name of the symmetric-passive peer, a case-sensitive string of 1 to 255 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the symmetric-passive peer belongs,
where vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the symmetric-passive peer is
on the public network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the peer, where
keyid is in the range of 1 to 4294967295. If this option is not specified, the local device and the peer do
not authenticate each other.
priority: Specifies the peer specified by ip-address or peer-name as the first choice under the same
condition.
source interface-type interface-number: Specifies the source interface for IPv6 NTP messages. If the
specified passive peer address is not a link local address, the source IPv6 address for IPv6 NTP messages
sent by the local device is the IPv6 address of the specified source interface. If the specified passive peer
address is a link local address, the IPv6 NTP messages are sent from the specified source interface.
interface-type interface-number represents the interface type and number. If you do not specify an
interface, the device automatically selects the source IPv6 address of IPv6 NTP messages. For more
information, see RFC 3484.
Usage guidelines
When you specify an IPv6 passive peer for the device, the device and its IPv6 passive peer can be
synchronized to each other. If their clocks are in synchronized state, the clock with a high stratum level is
synchronized to the clock with a lower stratum level.
If you include vpn-instance vpn-instance-name in the undo ntp-service ipv6 unicast-peer command, the
command removes the symmetric-passive peer with the IPv6 address of ipv6-address in the specified VPN.
If you do not include vpn-instance vpn-instance-name in this command, the command removes the
symmetric-passive peer with the IPv6 address of ipv6-address in the public network.
Examples
# Specify the device with the IPv6 address of 2001::1 as the symmetric-passive peer of the device, and
specify the source interface for IPv6 NTP messages as VLAN-interface 1.
system-view
[Sysname] ntp-service ipv6 unicast-peer 2001::1 source vlan-interface 1
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service ipv6 unicast-server
Use the ntp-service ipv6 unicast-server command to specify an IPv6 NTP server for the device.
Use the undo ntp-service ipv6 unicast-server command to remove an IPv6 NTP server specified for the
device.
Syntax
ntp-service ipv6 unicast-server { ipv6-address | server-name } [ vpn-instance vpn-instance-name ]
[ authentication-keyid keyid | priority | source interface-type interface-number ] *
undo ntp-service ipv6 unicast-server { ipv6-address | server-name } [ vpn-instance vpn-instance-name ]
Default
No IPv6 NTP server is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6-address: IPv6 address of the NTP server. It must be a unicast address, rather than a multicast
address.
server-name: Host name of the NTP server, a case-insensitive string of 1 to 255 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the NTP server belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the NTP server is on the public
network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the NTP server,
where keyid is in the range of 1 to 4294967295. If this option is not specified, the local device and NTP
server do not authenticate each other.
priority: Specifies this NTP server as the first choice under the same condition.
source interface-type interface-number: Specifies the source interface for IPv6 NTP messages. If the
specified IPv6 NTP server address is not a link local address, the source IPv6 address for IPv6 NTP
messages sent by the local device to the NTP server is the IPv6 address of the specified source interface.
If the specified IPv6 NTP server address is a link local address, the IPv6 NTP messages are sent from the
specified source interface, and the source address of the messages is the link local address of the
interface. interface-type interface-number represents the interface type and number. If you do not specify
an interface, the device automatically selects the source IPv6 address of IPv6 NTP messages. For more
information, see RFC 3484.
Usage guidelines
When you specify an IPv6 NTP server for the device, the device is synchronized to the IPv6 NTP server,
but the IPv6 NTP server is not synchronized to the device.
If you include vpn-instance vpn-instance-name in the undo ntp-service unicast-server command, the
command removes the NTP server with the IP address of ip-address in the specified VPN. If you do not
include vpn-instance vpn-instance-name in this command, the command removes the NTP server with the
IP address of ip-address in the public network.
If the specified IPv6 address of the NTP server is a link local address, you must specify the source
interface for NTP messages and cannot specify a VPN for the NTP server.
Examples
# Specify the IPv6 NTP server 2001::1 for the device.
system-view
[Sysname] ntp-service ipv6 unicast-server 2001::1
Related commands
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service max-dynamic-sessions
Use the ntp-service max-dynamic-sessions command to set the maximum number of dynamic NTP
sessions that are allowed to be established locally.
Use the undo ntp-service max-dynamic-sessions command to restore the default.
Syntax
ntp-service max-dynamic-sessions number
undo ntp-service max-dynamic-sessions
Default
The maximum number of dynamic NTP sessions is 100.
View
System view
Predefined user roles
network-admin
Parameters
number: Maximum number of dynamic NTP associations that are allowed to be established, in the range
of 0 to 100.
Usage guidelines
A single device can have a maximum of 128 concurrent associations, including static associations and
dynamic associations. A static association refers to an association that a user has manually created by
using an NTP command, while a dynamic association is a temporary association created by the system
during operation.
Examples
# Set the maximum number of dynamic NTP associations allowed to be established to 50.
system-view
[Sysname] ntp-service max-dynamic-sessions 50
display ntp-service sessions
ntp-service multicast-client
Use the ntp-service multicast-client command to configure the device to operate in NTP multicast client
mode and use the current interface to receive NTP multicast packets.
Use the undo ntp-service multicast-client command to remove the configuration.
Syntax
ntp-service multicast-client [ ip-address ]
undo ntp-service multicast-client [ ip-address ]
Default
The device does not operate in any NTP association mode.
View
VLAN interface view
Predefined user roles
network-admin
Parameters
ip-address: Multicast IP address, in the range of 224.0.1.0 to 224.0.1.255, and defaults to 224.0.1.1. A
multicast server and client must be configured with the same multicast IP address.
Usage guidelines
After you configure this command, the device listens to NTP messages with the destination address as the
specified multicast address.
Examples
# Configure the device to operate in multicast client mode and receive NTP multicast messages on
VLAN-interface 1, and set the multicast address to 224.0.1.1.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service multicast-client 224.0.1.1
Related commands
ntp-service multicast-server
ntp-service multicast-server
Use the ntp-service multicast-server command to configure the device to operate in NTP multicast server
mode and use the current interface to send NTP multicast packets.
Use the undo ntp-service multicast-server command to remove the configuration.
Syntax
ntp-service multicast-server [ ip-address ] [ authentication-keyid keyid | ttl ttl-number | version number ]
*
undo ntp-service multicast-server [ ip-address ]
The device does not operate in any NTP association mode.
View
VLAN interface view
Predefined user roles
network-admin
Parameters
ip-address: Multicast IP address, in the range of 224.0.1.0 to 224.0.1.255, and defaults to 224.0.1.1. A
multicast server and client must be configured with the same multicast IP address.
authentication-keyid keyid: Specifies the key ID to be used for sending multicast messages to multicast
clients, where keyid is in the range of 1 to 4294967295. If this option is not specified, the local device
cannot synchronize multicast clients enabled with NTP authentication.
ttl ttl-number: Specifies the TTL of NTP multicast messages, where ttl-number is in the range of 1 to 255
and defaults to 16.
version number: Specifies the NTP version, where number is in the range of 1 to 4 and defaults to 4.
Usage guidelines
After you configure this command, the device periodically sends NTP messages to the specified multicast
address.
Examples
# Configure the device to operate in multicast server mode and send NTP multicast messages on
VLAN-interface 1 to the multicast address 224.0.1.1, using key 4 for encryption, and set the NTP version
to 4.
system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service multicast-server 224.0.1.1 version 4
authentication-keyid 4
Related commands
ntp-service multicast-client
ntp-service refclock-master
Use the ntp-service refclock-master command to configure the local clock as a reference source for other
devices.
Use the undo ntp-service refclock-master command to remove the configuration.
Syntax
ntp-service refclock-master [ ip-address ] [ stratum ]
undo ntp-service refclock-master [ ip-address ]
Default
The device does not use its local clock as a reference clock.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: IP address of the local clock, which is 127.127.1.u, where u is the NTP process ID in the range
of 0 to 3. If you do not specify ip-address, it defaults to 127.127.1.0.
stratum: Stratum level of the local clock, in the range of 1 to 15 and defaults to 8. A lower stratum level
represents higher clock accuracy.
Usage guidelines
Usually an NTP server that gets its time from an authoritative time source, such as an atomic clock has
stratum 1 and operates as the primary time server to provide time synchronization for other devices in the
network. The accuracy of each server is the stratum, with the topmost level (primary servers) assigned as
one and each level downwards (secondary servers) in the hierarchy assigned as one greater than the
preceding level.
If the devices in a network cannot synchronize to an authoritative time source, you can select a device that
has a relatively accurate clock from the network, and use the local clock of the device as the reference
clock to synchronize other devices in the network.
Use this command with caution to avoid time errors. Before you execute the command, H3C
recommends that you adjust the local system time.
Examples
# Specify the local clock as the reference source, with the stratum level of 2.
system-view
[Sysname] ntp-service refclock-master 2
ntp-service reliable authentication-keyid
Use the ntp-service reliable authentication-keyid command to specify the created authentication key as
a trusted key.
Use the undo ntp-service reliable authentication-keyid command to remove the configuration.
Syntax
ntp-service reliable authentication-keyid keyid
undo ntp-service reliable authentication-keyid keyid
Default
No trust key is specified.
Views
System view
Predefined user roles
network-admin
Parameters
keyid: Authentication key number, in the range of 1 to 4294967295.
When NTP authentication is enabled, a client can be synchronized only to a server that can provide a
trusted authentication key.
Before you use the command, make sure that NTP authentication is enabled and an authentication key
is configured. The key automatically changes to untrusted after you delete the key. In this case, you do not
need to execute the undo ntp-service reliable authentication-keyid command.
Examples
# Enable NTP authentication, specify the MD5 algorithm, with the key ID of 37 and key value of
BetterKey, in simple text.
system-view
[Sysname] ntp-service authentication enable
[Sysname] ntp-service authentication-keyid 37 authentication-mode md5 simple BetterKey
# Specify this key as a trusted key.
[Sysname] ntp-service reliable authentication-keyid 37
Related commands
•
ntp-service authentication-keyid
•
ntp-service authentication enable
ntp-service source
Use the ntp-service source command to specify the source interface for NTP messages.
Use the undo ntp-service source command to restore the default.
Syntax
ntp-service source interface-type interface-number
undo ntp-service source
Default
No source interface is specified for NTP messages. The device searches the routing table for the
outbound interface of NTP messages, and uses the primary IP address of the outbound interface as the
source IP address for NTP messages.
Views
System view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an interface by its interface type and interface number.
Usage guidelines
If you specify the source interface for NTP messages, the device sets the source IP address of the NTP
messages as the primary IP address of the specified interface when sending the NTP messages.
When the device responds to an NTP request, the source IP address of the NTP response is always the
IP address of the interface that has received the NTP request.
If you do not want the IP address of an interface on the local device to become the destination address
for response messages, use this command.
•
If you have specified the source interface for NTP messages in the ntp-service unicast-server or
ntp-service unicast-peer command, the interface specified in the ntp-service unicast-server or
ntp-service unicast-peer command serves as the source interface for NTP messages.
•
If you have configured the ntp-service broadcast-server or ntp-service multicast-server command,
the source interface for the broadcast or multicast NTP messages is the interface configured with the
respective command.
•
If the specified source interface is down, the device searches the routing table for the outbound
interface, and uses the primary IP address of the outbound interface as the source IP address for
NTP messages.
Examples
# Specify the source interface for NTP messages as VLAN-interface 1.
system-view
[Sysname] ntp-service source vlan-interface 1
Related commands
•
ntp-service unicast-server
•
ntp-service unicast-peer
•
ntp-service broadcast-server
•
ntp-service multicast-server
ntp-service unicast-peer
Use the ntp-service unicast-peer command to specify a symmetric-passive peer for the device.
Use the undo ntp-service unicast-peer command to remove the symmetric-passive peer specified for the
device.
Syntax
ntp-service unicast-peer { ip-address | peer-name } [ vpn-instance vpn-instance-name ]
[ authentication-keyid keyid | priority | source interface-type interface-number | version number ] *
undo ntp-service unicast-peer { ip-address | peer-name } [ vpn-instance vpn-instance-name ]
Default
No symmetric-passive peer is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: IP address of the symmetric-passive peer. It must be a unicast address, rather than a
broadcast address, a multicast address or the IP address of the local clock.
peer-name: Host name of the symmetric-passive peer, a case-insensitive string of 1 to 20 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the symmetric-passive peer belongs,
where vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the symmetric-passive peer is
on the public network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the peer, where
keyid is in the range of 1 to 4294967295. If this option is not specified, the local device and the peer do
not authenticate each other.
priority: Specifies the peer specified by ip-address or peer-name as the first choice under the same
condition.
source interface-type interface-number: Specifies the source interface for NTP messages. In an NTP
message the local device sends to its peer, the source IP address is the primary IP address of this interface.
interface-type interface-number represents the interface type and number.
version number: Specifies the NTP version, where number is in the range of 1 to 4 and defaults to 4.
Usage guidelines
When you specify a passive peer for the device, the device and its passive peer can be synchronized to
each other. If their clocks are in synchronized state, the clock with a high stratum level is synchronized to
the clock with a lower stratum level.
If you include vpn-instance vpn-instance-name in the undo ntp-service unicast-peer command, the
command removes the symmetric-passive peer with the IP address of ip-address in the specified VPN. If
you do not include vpn-instance vpn-instance-name in this command, the command removes the
symmetric-passive peer with the IP address of ip-address in the public network.
Examples
# Specify the device with the IP address of 10.1.1.1 as the symmetric-passive peer of the device, configure
the device to run NTP version 4, and specify the source interface of NTP messages as VLAN-interface 1.
system-view
[Sysname] ntp-service unicast-peer 10.1.1.1 version 4 source-interface vlan-interface 1
Related commands
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
ntp-service unicast-server
Use the ntp-service unicast-server command to specify an NTP server for the device.
Use the undo ntp-service unicast-server command to remove an NTP server specified for the device.
Syntax
ntp-service unicast-server { ip-address | server-name } [ vpn-instance vpn-instance-name ]
[ authentication-keyid keyid | priority | source interface-type interface-number | version number ] *
undo ntp-service unicast-server { ip-address | server-name } [ vpn-instance vpn-instance-name ]
Default
No NTP server is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: IP address of the NTP server. It must be a unicast address, rather than a broadcast address,
a multicast address or the IP address of the local clock.
server-name: Host name of the NTP server, a case-insensitive string of 1 to 255 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the NTP server belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the NTP server is on the public
network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the NTP server,
where keyid is in the range of 1 to 4294967295. If the option is not specified, the local device and NTP
server do not authenticate each other.
priority: Specifies this NTP server as the first choice under the same condition.
source interface-type interface-number: Specifies the source interface for NTP messages. For an NTP
message the local device sends to the NTP server, the source IP address is the primary IP address of this
interface. The interface-type interface-number argument represents the interface type and number.
version number: Specifies the NTP version, where number is in the range of 1 to 4 and defaults to 4.
Usage guidelines
When you specify an NTP server for the device, the device is synchronized to the NTP server, but the NTP
server is not synchronized to the device.
If you include vpn-instance vpn-instance-name in the undo ntp-service unicast-server command, the
command removes the NTP server with the IP address of ip-address in the specified VPN. If you do not
include vpn-instance vpn-instance-name in this command, the command removes the NTP server with the
IP address of ip-address in the public network.
Examples
# Specify NTP server 10.1.1.1 for the device, and configure the device to run NTP version 4.
system-view
[Sysname] ntp-service unicast-server 10.1.1.1 version 4
Related commands
•
ntp-service authentication enable
•
ntp-service authentication-keyid
•
ntp-service reliable authentication-keyid
display sntp ipv6 sessions
Use the display sntp ipv6 sessions command to display information about all IPv6 SNTP associations.
Syntax
display sntp ipv6 sessions
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display brief information about all IPv6 SNTP associations.
display sntp ipv6 sessions
SNTP server: 2001::1
Stratum: 16
Version: 4
Last receive time: No packet was received.
SNTP server: 2001::100
Stratum: 3
Version: 4
Last receive time: Mon, Nov 7 2011 10:31:01.678 (Synced)
Table 22 Output description
Field
Description
SNTP server
SNTP server (NTP server)
Stratum
Stratum level of the NTP server, which determines the clock accuracy. It is in the
range of 1 to 16. A lower stratum level represents higher clock accuracy. A clock
with stratum level 16 is not synchronized.
Version
SNTP version
Last receive time
Time when the last message was received:
• Synced means the local clock is synchronized to the NTP server.
• No packet was received means the device has not received any SNTP message
from the server.
display sntp sessions
Use the display sntp sessions command to display information about all SNTP associations.
display sntp sessions
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display brief information about all SNTP associations.
display sntp sessions
SNTP server Stratum Version Last receive time
1.0.1.11 2 4 Tue, May 17 2011 9:11:20.833 (Synced)
Table 23 Output description
Field
Description
SNTP server
SNTP server (NTP server)
Stratum
Stratum level of the NTP server, which determines the clock accuracy. It is in the
range of 1 to 16. A lower stratum level represents higher clock accuracy. A clock
with stratum level 16 is not synchronized.
Version
SNTP version
Last receive time
Time when the last message was received:
• Synced means the local clock is synchronized to the NTP server.
• No packet was received means the device has not received any SNTP message
from the server.
sntp authentication enable
Use the sntp authentication enable command to enable SNTP authentication.
Use the undo sntp authentication enable command to disable SNTP authentication.
Syntax
sntp authentication enable
undo sntp authentication enable
Default
SNTP authentication is disabled.
Views
System view
Predefined user roles
network-admin
You need to enable SNTP authentication in networks that require time synchronization security to make
sure that SNTP clients are only synchronized to authenticated NTP servers.
To authenticate an NTP server, set an authentication key and specify it as a trusted key.
Examples
# Enable SNTP authentication.
system-view
[Sysname] sntp authentication enable
Related commands
•
sntp authentication-keyid
•
sntp reliable authentication-keyid
sntp authentication-keyid
Use the sntp authentication-keyid command to set an SNTP authentication key.
Use the undo sntp authentication-keyid command to remove the SNTP authentication key.
Syntax
sntp authentication-keyid keyid authentication-mode md5 { cipher | simple } value
undo sntp authentication-keyid keyid
Default
No SNTP authentication key is set.
Views
System view
Predefined user roles
network-admin
Parameters
keyid: Key ID to identify an authentication key, in the range of 1 to 4294967295.
authentication-mode md5 value: Uses the MD5 algorithm for key authentication.
simple: Sets the key as a simple text key.
cipher: Sets the key as a cipher text key.
value: Key value. It is a case-insensitive string of 1 to 73 characters in cipher text, and a case-insensitive
string of 1 to 32 characters in simple text.
Usage guidelines
You need to enable SNTP authentication in networks that require time synchronization security to make
sure that SNTP clients are only synchronized to authenticated NTP servers.
Configure the same key ID and key value on the SNTP client and NTP server. Otherwise, the SNTP client
cannot be synchronized to the NTP server.After you configure an SNTP authentication key, use the sntp
reliable authentication-keyid command to set it as a trusted key. The key automatically changes to
untrusted after you delete the key. In this case, you do not need to execute the undo sntp-service reliable
authentication-keyid command.
A maximum of 128 keys can be set for the device by repeatedly executing the command.
Examples
# Set an MD5 authentication key, with the key ID of 10 and key value of BetterKey, in simple text.
system-view
[Sysname] sntp authentication enable
[Sysname] sntp authentication-keyid 10 authentication-mode md5 simple BetterKey
Related commands
•
sntp authentication enable
•
sntp reliable authentication-keyid
sntp ipv6 unicast-server
Use the sntp ipv6 unicast-server command to specify an IPv6 NTP server for the device.
Use the undo sntp ipv6 unicast-server command to remove the IPv6 NTP server specified for the device.
Syntax
sntp ipv6 unicast-server { ipv6-address | server-name } [ vpn-instance vpn-instance-name ]
[ authentication-keyid keyid | source interface-type interface-number ] *
undo sntp ipv6 unicast-server { ipv6-address | server-name } [ vpn-instance vpn-instance-name ]
Default
No IPv6 NTP server is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6-address: IPv6 address of the NTP server.
server-name: Host name of the NTP server, a case-insensitive string of 1 to 255 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the NTP server belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the NTP server is on the public
network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the NTP server,
where keyid is in the range of 1 to 4294967295. If this option is not specified, the local device and NTP
server do not authenticate each other.
source interface-type interface-number: Specifies the source interface for IPv6 NTP messages. If the
specified IPv6 NTP server address is not a link local address, the source IPv6 address for IPv6 NTP
messages sent by the local device to the NTP server is the IPv6 address of the specified source interface.
If the specified IPv6 NTP server address is a link local address, the IPv6 NTP messages are sent from the
specified source interface, and the source address of the messages is the link local address of the
interface. interface-type interface-number represents the interface type and number. If you do not specify
an interface, the device automatically selects the source IPv6 address of IPv6 NTP messages. For more
information, see RFC 3484.
When you specify an IPv6 NTP server for the device, the device is synchronized to the NTP server, but the
NTP server is not synchronized to the device.
If you include vpn-instance vpn-instance-name in the undo ntp-service unicast-server command, the
command removes the NTP server with the IP address of ip-address in the specified VPN. If you do not
include vpn-instance vpn-instance-name in this command, the command removes the NTP server with the
IP address of ip-address in the public network.
If the specified IPv6 address of the NTP server is a link local address, you must specify the source
interface for NTP messages and cannot specify a VPN for the NTP server.
Examples
# Specify the IPv6 NTP server 2001::1 for the device.
system-view
[Sysname] sntp ipv6 unicast-server 2001::1
Related commands
•
sntp authentication enable
•
sntp authentication-keyid
•
sntp reliable authentication-keyid
sntp reliable authentication-keyid
Use the sntp reliable authentication-keyid command to specify the created authentication key as a
trusted key.
Use the undo sntp reliable authentication-keyid command to remove the specified trusted key.
Syntax
sntp reliable authentication-keyid keyid
undo sntp reliable authentication-keyid keyid
Default
No trust key is specified.
Views
System view
Predefined user roles
network-admin
Parameters
keyid: Authentication key number, in the range of 1 to 4294967295.
Usage guidelines
If SNTP is enabled, the SNTP client is only synchronized to an NTP server that provides a trusted key.
Before you use the command, make sure that SNTP authentication is enabled and an authentication key
is configured. The key automatically changes to untrusted after you delete the key. In this case, you do not
need to execute the undo sntp-service reliable authentication-keyid command.
# Enable NTP authentication, and specify the MD5 encryption algorithm, with the key ID of 37 and key
value of BetterKey, in simple text.
system-view
[Sysname] sntp authentication enable
[Sysname] sntp authentication-keyid 37 authentication-mode md5 simple BetterKey
# Specify this key as a trusted key.
[Sysname] sntp reliable authentication-keyid 37
Related commands
•
sntp authentication-keyid
•
sntp authentication enable
sntp unicast-server
Use the sntp unicast-server command to specify an NTP server for the device.
Use the undo sntp unicast-server command to remove the NTP server.
Syntax
sntp
unicast-server
{
ip-address
|
server-name
}
[
vpn-instance
vpn-instance-name
]
[ authentication-keyid keyid | source interface-type interface-number | version number ] *
undo sntp unicast-server { ip-address | server-name } [ vpn-instance vpn-instance-name ]
Default
No NTP server is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: IP address of the NTP server. It must be a unicast address, rather than a broadcast address,
a multicast address, or the IP address of the local clock.
server-name: Host name of the NTP server, a case-insensitive string of 1 to 255 characters.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN to which the NTP server belongs, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters. If the NTP server is on the public
network, do not specify this option.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the NTP server,
where keyid is in the range of 1 to 4294967295. If the option is not specified, the local device and NTP
server do not authenticate each other.
source interface-type interface-number: Specifies the source interface for NTP messages. In an NTP
message the local device sends to the NTP server, the source IP address is the primary IP address of this
interface. interface-type interface-number represents the interface type and number.
version number: Specifies the NTP version, where number is in the range of 1 to 4 and defaults to 4.
When you specify an NTP server for the device, the device is synchronized to the NTP server, but the NTP
server is not synchronized to the device.
If you include vpn-instance vpn-instance-name in the undo ntp-service unicast-server command, the
command removes the NTP server with the IP address of ip-address in the specified VPN. If you do not
include vpn-instance vpn-instance-name in this command, the command removes the NTP server with the
IP address of ip-address in the public network.
Examples
# Specify NTP server 10.1.1.1 for the device, and configure the device to run NTP version 4.
system-view
[Sysname] sntp unicast-server 10.1.1.1 version 4
Related commands
•
sntp authentication enable
•
sntp authentication-keyid
•
sntp reliable authentication-keyid
Information center commands
display info-center
Use the display info-center command to display state information for output destinations.
Syntax
display info-center
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display state information for output destinations.
display info-center
Information Center: Enabled
Console: Enabled
Monitor: Enabled
Log host: Enabled
IP address: 192.168.0.1, port number: 5000, host facility: local7
IP address: 192.168.0.2, port number: 5001, host facility: local5
Log buffer: Enabled
Max buffer size 1024, current buffer size 512,
Current messages 0, dropped messages 0, overwritten messages 0
Log file: Enabled
Security log file: Enabled
Information timestamp format:
Loghost: Date
Other output destination: Date
Table 24 Output description
Field
Description
Information Center
Information center state, including:
• Enabled—Logs can be output to the information
center.
• Disabled—Logs cannot be output to the
information center.
Console
Console state:
• Enabled—Logs can be output to the console.
• Disabled—Logs cannot be output to the console.
Monitoring terminal state:
• Enabled—Logs can be output to the monitoring
terminal.
• Disabled—Logs cannot be output to the monitoring
terminal.
Log host: Enabled
IP address: 192.168.0.1, port number: 5000, host
facility: local7
IP address: 192.168.0.2, port number: 5001, host
facility: local5
Log host configuration (This information is displayed
only when a log host and related parameters are
configured):
• Enabled—Logs can be output to the log host.
• Disabled—Logs cannot be output to the log host.
• IP address—IP address of the log host.
• port number—Port number on the log host.
• host facility—Facility used by the log host.
Log buffer: Enabled
Max buffer size 1024, current buffer size 512,
Current messages 0, dropped messages 0,
overwritten messages 0
Log buffer configuration:
• Enabled—Logs can be output to the log buffer.
• Disabled—Logs cannot be output to the log buffer.
• Max buffer size—Maximum capacity of the log
buffer.
• current buffer size—Current capacity of the log
buffer.
• Current messages—Current number of the
messages in the log buffer.
• dropped messages—Number of dropped
messages.
• overwritten messages—Number of overwritten
messages.
Log file
Log file state:
• Enabled—Logs can be output to the log file.
• Disabled—Logs cannot be output to the log file.
Information timestamp format:
Loghost: Date
Other output destination: Date
Time stamp configuration:
• boot—Time since system startup.
• date—Current date and time of the system.
• iso—Time stamp format stipulated in ISO 8601.
• none—No time stamp is included.
• no-year-date—Current date and time without year
information.
display logbuffer
Use the display logbuffer command to display the state of the log buffer and the logs recorded.
Syntax
display logbuffer [ reverse ] [ level severity | size buffersize | slot slot-number ] *
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
reverse: Displays log entries chronologically, with the most recent entry at the top. If this keyword is not
specified, the log entries will be displayed chronologically, with the oldest entry at the top.
level severity: Displays log information of at least the specified level, where severity represents
information level, which ranges from 0 to 7. Absence of the level severity option indicates that logs of all
levels recorded in the log buffer are displayed.
Table 25 Log levels
Severity
value
Level
Description
Corresponding
keyword in
commands
0
Emergency
System is unusable, such as the system authorization has
expired.
emergency
1
Alert
Action must be taken immediately, such as traffic on the
interface exceeds the upper limit.
alert
2
Critical
Critical condition, such as the device temperature exceeds
the upper limit, the power module fails, and the fan tray
fails.
critical
3
Error
Error condition, such as link state changes.
error
4
Warning
Warning conditions, such as interface disconnection and
not enough memory.
warning
5
Notification
Normal but significant condition, such as logging in to the
device through a terminal and the device reboots.
notification
6
Information
al
Informational message, such as records of input
commands and logs of the ping command.
informational
7
Debug
Debug-level message.
debugging
size buffersize: Displays specified number of the latest log messages in the log buffer, where buffersize
represents the number of the latest log messages to be displayed in the log buffer. The value range for the
buffersize argument is 1 to 1024. Absence of the size buffersize option indicates that all log information
recorded in the log buffer is displayed.
slot slot-number: ID of the IRF member device.
Examples
# Display the state and log information of the log buffer.
display logbuffer slot 1
Log buffer: Enabled
Max buffer size: 1024
Actual buffer size: 512
Dropped messages: 0
Overwritten messages: 0
Current messages: 127
%Jun 19 18:03:24:55 2006 Sysname SYSLOG /7/SYS_RESTART:System restarted
The rest is omitted here.
Table 26 Output description
Field
Description
Log buffer
• Enabled—Logs can be output to the log buffer.
• Disabled—Logs cannot be output to the buffer.
Max buffer size
Maximum capacity of the Log buffer.
Actual buffer size
Actual capacity of the log buffer.
Dropped messages
Number of dropped messages. Messages are
dropped if memory allocation fails or the allocated
size of the log buffer is not big enough.
Overwritten messages
Number of overwritten messages. When the buffer
size is not big enough to hold all messages, the latest
messages overwrite the old ones.
Current messages
The number of current messages in the log buffer.
Related commands
•
info-center logbuffer
•
reset logbuffer
display logbuffer summary
Use the display logbuffer summary command to display the summary of the log buffer.
Syntax
display logbuffer summary [ level severity | slot slot-number ] *
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
level severity: Displays the summary of the log buffer, where severity represents information level, which
ranges from 0 to 7. For more information about log levels, see Table 25. Absence of the level severity
option indicates that logs of all levels recorded in the log buffer are displayed.
slot slot-number: Specifies the ID of the IRF member device.
Examples
# Display the summary of the log buffer.
display logbuffer summary
SLOT EMERG ALERT CRIT ERROR WARN NOTIF INFO DEBUG
1 0 0 0 7 0 34 38 0
2 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0
Table 27 Output description
Field
Description
SLOT
ID of the IRF member device.
EMERG
Represents emergency. For more information, see Table 25.
ALERT
Represents alert. For more information, see Table 25.
CRIT
Represents critical. For more information, see Table 25.
ERROR
Represents error. For more information, see Table 25.
WARN
Represents warning. For more information, see Table 25.
NOTIF
Represents notification. For more information, see Table 25.
INFO
Represents informational. For more information, see Table 25.
DEBUG
Represents debug. For more information, see Table 25.
display logfile summary
Use the display logfile summary command to display the configuration of the log file.
Syntax
display logfile summary
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display the configuration of the log file.
display logfile summary
Log file: Enabled.
Log file size quota: 10 MB
Log file directory: flash:/logfile
Writing frequency: 0 hour 1 min 10 sec
Table 28 Output description
Field
Description
Log file
• Enabled—Logs can be output to the log file.
• Disabled—Logs cannot be output to the log file.
Log file size quota
The maximum storage space reserved for a log file, in MB.
Log file directory
Log file directory.
Writing frequency
Log file writing frequency.
Use the info-center enable command to enable information center.
Use the undo info-center enable command to disable information center.
Syntax
info-center enable
undo info-center enable
Default
Information center is enabled.
Views
System view
Predefined user roles
network-admin
Examples
# Enable information center.
system-view
[Sysname] info-center enable
Information center is enabled.
info-center logbuffer
Use the info-center logbuffer command to enable log output to a log buffer.
Use the undo info-center logbuffer command to disable log output to a log buffer.
Syntax
info-center logbuffer
undo info-center logbuffer
Default
Logs are allowed to be output to the log buffer.
Views
System view
Predefined user roles
network-admin
Examples
# Configure the system to output logs to the log buffer.
system-view
[Sysname] info-center logbuffer
Related commands
•
display logbuffer
•
info-center enable
info-center logbuffer size
Use the info-center logbuffer size command to set the maximum number of logs that can be stored in a
log buffer.
Use the undo info-center logbuffer size command to restore the default.
Syntax
info-center logbuffer [ size buffersize ]
undo info-center logbuffer [ size ]
Default
The log buffer can store 512 logs.
Views
System view
Predefined user roles
network-admin
Parameters
buffersize: Specifies the maximum number of logs that can be stored in a log buffer. The value range is
0 to 1024 and the default value is 512.
Examples
# Set the maximum number of logs that can be stored in a log buffer to 50.
system-view
[Sysname] info-center logbuffer size 50
# Restore the maximum number of logs that can be restored in the log buffer to 512.
system-view
[Sysname] undo info-center logbuffer size
Related commands
•
display logbuffer
•
info-center enable
info-center logfile enable
Use the info-center logfile enable command to enable the output of logs to the log file.
Use the undo info-center logfile enable command to disable the output of logs to the log file.
Syntax
info-center logfile enable
undo info-center logfile enable
Default
Logs can be output to the log file.
Views
System view
Predefined user roles
network-admin
Examples
# Enable the output of logs to the log file.
system-view
[Sysname] info-center logfile enable
info-center logfile frequency
Use the info-center logfile frequency command to configure the frequency with which the system saves
the log file.
Use the undo info-center logfile frequency command to restore the default frequency.
Syntax
info-center logfile frequency freq-sec
undo info-center logfile frequency
Default
The frequency with which the system saves the log file is 86400.
Views
System view
Predefined user roles
network-admin
Parameters
freq-sec: Specifies the frequency with which the system saves the log file, which ranges from 1 to 86,400
seconds.
Usage guidelines
With this command executed, the system saves the log file buffer content to the log file with the frequency
specified in this command.
Examples
# Configure the frequency with which the system saves the log file as 60,000 seconds.
system-view
[Sysname] info-center logfile frequency 60000
Related commands
info-center logfile enable
info-center logfile size-quota
Use the info-center logfile size-quota command to set the maximum storage space reserved for a log file.
Use the undo info-center logfile size-quota command to restore the default maximum storage space
reserved for a log file.
Syntax
info-center logfile size-quota size
undo info-center logfile size-quota
Default
The maximum storage space reserved for a log file is 10 MB.
Views
System view
Predefined user roles
network-admin
Parameters
size: Specifies the maximum storage space reserved for a log file, in MB.
Usage guidelines
The log file has a specific capacity. When the capacity is reached, the system will delete the earliest
messages and write new messages into the log file.
Examples
# Set the maximum storage space reserved for a log file to 6 MB.
system-view
[Sysname] info-center logfile size-quota 6
Related commands
info-center logfile enable
info-center logfile switch-directory
Use the info-center logfile switch-directory command to configure the directory used to save the log file.
Syntax
info-center logfile switch-directory dir-name
Default
The directory to save the log file is flash:/logfile.
Views
System view
Predefined user roles
network-admin
Parameters
dir-name: Specifies the directory where a log file is saved, which is a string of 1 to 64 characters.
Usage guidelines
Make sure that the directory is created before saving a log file into it.
The suffix of a log file is .log. When the default directory has no enough space for storing the file, you can
specify a new directory for the log file.
Typically, this command is used when you back up the log file or before moving the log file. The
configuration cannot survive a reboot or a master/slave switchover.
# Create a directory with the name test under flash root directory.
Use the info-center loghost command to specify a log host and to configure the related parameters.
Use the undo info-center loghost command to restore the default configurations on a log host.
Syntax
info-center loghost host-ipv4-address [ port port-number ] [ facility local-number ]
undo info-center loghost host-ipv4-address
Default
Output of system information to the log host is disabled and no parameter is specified.
Views
System view
Predefined user roles
network-admin
Parameters
host-ipv4-address: Specifies the IPv4 address of the log host.
port port-number: Specifies the number of the port that receives the logs on the log host. The value ranges
from 1 to 65535 and defaults to 514. In addition, the value of the port-number argument should be the
same as the value configured on the log host, otherwise, the log host cannot receive logs.
facility local-number: Specifies the logging facility of the log host. The value can be local0 to local7 and
defaults to local7. Logging facility is mainly used to mark different logging sources, query and filer the
logs of the corresponding log source.
Usage guidelines
The info-center loghost command takes effect only after information center is enabled with the
info-center enable command.
You can specify up to four different hosts as the log host.
Examples
# Output logs to a log host with the IP address being 1.1.1.1.
system-view
[Sysname] info-center loghost 1.1.1.1
info-center loghost source
Use the info-center loghost source command to specify the source IP address for logs.
Use the undo info-center loghost source command to restore the default.
Syntax
info-center loghost source interface-type interface-number
undo info-center loghost source
Default
The interface for sending log information is determined by the matched route, and the primary IP address
of this interface is the source IP address of the logs.
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies the egress interface for logs by the interface type and interface
number.
Usage guidelines
After the source IP address of logs is specified, no matter which physical interface is used to output the
logs, the source IP address of the logs is the primary IP address of the specified interface.
The info-center loghost source command takes effect only after the information center is enabled with the
info-center enable command.
The IP address of the specified source interface must be configured; otherwise, although the info-center
loghost source command can be configured successfully, the log host will not receive any log.
Examples
# Specify the IP address of interface loopback 0 as the source IP address of logs.
system-view
[Sysname] interface loopback 0
[Sysname-LoopBack0] ip address 2.2.2.2 32
[Sysname-LoopBack0] quit
[Sysname] info-center loghost source loopback 0
info-center source
Use the info-center source command to specify the output rules of the logs.
Use the undo info-center source command to restore the default.
Syntax
info-center source { module-name | default } { console | logbuffer | logfile | loghost | monitor } { deny
| level severity }
undo info-center source { module-name | default } { console | logbuffer | logfile | loghost | monitor }
Default
The following table lists the output rules for the logs:
Output
destinatio
n
System
informati
on source
Log
Security log
Hidden log
Enabled/
disabled
Level
Enabled/
disabled
Level
Enabled/
disabled
Level
Console
All
supported
modules
Enabled
Debug
Disabled
N/A
Disabled
N/A
Monitor
terminal
All
supported
modules
Enabled
Debug
Disabled
N/A
Disabled
N/A
Predefined user roles
network-admin
Parameters
module-name: Specifies the output rules of the logs of the specified modules. For instance, if information
on FTP module is to be output, you can configure this argument as FTP. You can use the info-center
source ? command to view the modules supported by the device.
default: Specifies the output rules of the logs of all the modules allowed to output the logs, including all
the modules displayed by using the info-center source ? command.
console: Outputs logs to the console.
logbuffer: Outputs logs to the log buffer.
logfile: Outputs logs to the log file.
loghost: Outputs logs to the log host.
monitor: Outputs logs to the monitor terminal.
deny: Disables log output.
level severity: Specifies the severity levels of logs. For more information, see Table 25. With this keyword,
you can specify the severity level of the logs allowed/denied to output.
Usage guidelines
Use this command to set the filter and redirection rules of logs. For example, the user can set to output
logs with severity level higher than warning to the log host, and logs with severity level higher than
informational to the log buffer. You can also set to output trap information of the IP module to a specified
output destination.
•
If you do not use the module-name argument to set output rules for a module, the module uses the
default output rules or the output rules set by the default keyword; otherwise the module uses the
output rules separately set for it.
•
If you repeatedly use the command to set the output rules for a module or for all the modules with
the default keyword, the last configured output rules take effect.
After you separately set the output rules for a module, you must use the module-name argument to
modify or remove the rules. The new configuration by using the default keyword is invalid on the
module.
Examples
# Output VLAN module's log information with a severity level of at least emergency to the console.
system-view
[Sysname] info-center source default console deny
[Sysname] info-center source vlan console level emergency
# Based on the previous configuration, disables the output of VLAN module's log information to the
console, that is, all logs are not output to the console.
system-view
[Sysname] undo info-center source vlan console
info-center synchronous
Use the info-center synchronous command to enable synchronous information output.
Use the undo info-center synchronous command to disable the synchronous information output.
Syntax
info-center synchronous
undo info-center synchronous
Default
The synchronous information output is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Synchronous information output refers to the feature that if the user's operation is interrupted by a large
amount of system logs, then after the completion of system logs the system will display a command line
prompt (a prompt in command editing mode, or a [Y/N] string in interaction mode) and your input so
far, and you can continue your operations from where you were stopped.
Examples
# Enable the synchronous information output function, and then input the display interface
ten-gigabitethe command to view the Ethernet interface information.
system-view
[Sysname] info-center synchronous
Info-center synchronous output is on
[Sysname] display interface ten-gigabitethe
At this time, the system receives log messages, and it then displays the log messages first. After the system
displays all the log messages, it displays the user's previous input, which is display interface
ten-gigabitethe in this example.
%Apr 29 08:12:44:71 2007 Sysname IFNET/4/LINK UPDOWN:
Vlan-interface1: link status is UP
[Sysname] display interface ten-gigabitethe
After the above information is displayed, you can input rnet to complete your input of the display
interface ten-gigabitethernet command, and then press the Enter key to execute the command.
# Enable the synchronous information output function, and then save the current configuration (input
interactive information).
system-view
[Sysname] info-center synchronous
Info-center synchronous output is on
[Sysname] save
The current configuration will be written to the device. Are you sure? [Y/N]:
At this time, the system receives the logs, and it then displays the logs first. After the system displays all
the logs, it displays [Y/N].
%May 21 14:33:19:425 2007 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Y/N]:
After the above information is displayed, you can input Y or N to complete your input before the output
of the logs.
info-center timestamp
Use the info-center timestamp command to configure the time stamp format of the logs sent to console,
monitor, log buffer, and log file.
Use the undo info-center timestamp command to restore the default.
Syntax
info-center timestamp { boot | date | none }
undo info-center timestamp
Default
The time stamp format of the logs sent to console, monitor terminal, log buffer, and log file is date.
Views
System view
Predefined user roles
network-admin
Parameters
boot: Specifies the time taken to boot up the system, in the format of xxx.yyy, in which xxx represents the
most significant 32 bits of the time taken to boot up the system (in milliseconds) whereas yyy is the least
significant 32 bits. For example, 0.21990989 equals Jun 25 14:09:26:881 2007.
date: Specifies the current system date and time, in the format of "MMM DD hh:mm:ss:xxx YYYY". For
example, Dec 8 10:12:21:708 2007.
•
MMM: The abbreviations of the months in English, which could be Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, or Dec.
•
DD: The date, starting with a space if less than 10, for example " 7".
•
hh:mm:ss:xxx: The local time, with hh ranging from 00 to 23, mm and ss ranging from 00 to 59,
and xxx ranging from 0 to 999.
YYYY: Represents the year.
none: Indicates no time information is provided.
Examples
# Configure the time stamp format for log information as boot.
system-view
[Sysname] info-center timestamp boot
Related commands
info-center timestamp loghost
info-center timestamp loghost
Use the info-center timestamp loghost command to configure the time stamp format of the logs sent to the
log host.
Use the undo info-center timestamp loghost command to restore the default.
Syntax
info-center timestamp loghost { date | iso | no-year-date | none }
undo info-center timestamp loghost
Default
The time stamp format for logs sent to the log host is date.
Views
System view
Predefined user roles
network-admin
Parameters
date: Indicates the current system date and time, in the format of "mmm dd hh:mm:ss:ms yyyy". For
example, Dec 8 10:12:21:708 2007.
iso: Sets the time stamp to ISO 8601 format, for example, 2009-09-21T15:32:55.
no-year-date: Indicates the current system date and time (year exclusive).
none: Indicates that no time stamp information is provided.
Examples
# Configure that the logs output to the log host includes the current data and time, and does not include
the year information.
system-view
[Sysname] info-center timestamp loghost no-year-date
Related commands
info-center timestamp
logfile save
Use the logfile save command to save all the contents in the log file buffer into the log file.
Predefined user roles
2: System level
Usage guidelines
You can specify the directory to save the security log file with the info-center logfile switch-directory
command.
All contents in the log file buffer will be cleared after they are successfully saved into the log file.
Examples
# Save the contents in the log file buffer into the log file.
logfile save
The contents in the log file buffer have been saved to the file flash:/logfile/logfile.log.
Related commands
•
info-center logfile enable
•
info-center logfile switch-directory
reset logbuffer
Use the reset logbuffer command to reset the log buffer contents.
Syntax
reset logbuffer
Views
User view
Predefined user roles
network-admin
Examples
# Reset the log buffer contents.
reset logbuffer
Related commands
display logbuffer
terminal logging level
Use the terminal logging level command to set the lowest level of the logs that can be output to the current
terminal.
Use the undo terminal logging level command to restore the default.
Syntax
terminal logging level severity
undo terminal logging level
Default
The lowest level of the logs that can be output to the console is 7 (Debug), and that of the logs that can
be output to the monitor terminal is 6 (Informational).
Views
User view
Predefined user roles
network-admin
Parameters
severity: Specifies a log level by its number in the range 0 to 7, or by a string of characters that represents
the log level. See Table 25 for more information.
Usage guidelines
If you specified the lowest level of the logs that can be output to the current terminal, the device outputs
the logs with a severity level higher than or equal to the specified level. For example, if you set the lowest
level of the logs that can be output to the current terminal to 6 (informational), the logs with a severity
value from 0 to 6 will be output.
The configuration of this command is valid for only the current connection between the terminal and the
device. If a new connection is established, the display of logs on the terminal restores the default.
Examples
# Set the lowest level of the logs that can be output on the monitor terminal to 7 (Debugging).
terminal logging level 7
terminal monitor
Use the terminal monitor command to enable the monitoring of logs on the current terminal.
Use the undo terminal monitor command to disable the monitoring of logs on the current terminal.
Syntax
terminal monitor
undo terminal monitor
Default
Monitoring of the logs on the console is enabled and that on the monitor terminal is disabled.
Views
User view
Predefined user roles
network-admin
Usage guidelines
The configuration of this command is valid for only the current connection between the terminal and the
device. If a new connection is established, the monitoring of system information on the terminal restores
the default.
# Enable the monitoring of logs on the current terminal.
The SNMP agent sends notifications (traps and informs) to inform the NMS of significant events, such as
link state changes and user logins or logouts. Unless otherwise stated, the trap keyword in the command
line includes both traps and informs.
display snmp-agent community
Use the display snmp-agent community command to display SNMPv1 or SNMPv2c community
information.
Syntax
display snmp-agent community [ read | write ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
read: Displays information about SNMP read-only communities.
write: Displays information about SNMP read and write communities.
Usage guidelines
If no keyword is specified, this command displays information about all the SNMPv1 and SNMPv2c
communities that have been created.
To create an SNMPv1 or SNMPv2c community, use the snmp-agent community command or the
snmp-agent usm-user { v1 | v2c } command.
Examples
# Display information about all SNMPv1 and SNMPv2c communities.
display snmp-agent community
Community name: aa
Group name: aa
ACL:2001
Storage-type: nonVolatile
Community name: bb
Group name: bb
Storage-type: nonVolatile
Community name: userv1
Group name: testv1
Storage-type: nonVolatile
Table 29 Output description
Field
Description
Community name
Displays the community name created by using the snmp-agent community command
or the username created by using the snmp-agent usm-user { v1 | v2c } command.
Group name
SNMP group name:
• If the community is created by using the snmp-agent community command, the
group name is the same as the community name.
• If the community is created by using the snmp-agent usm-user { v1 | v2c } command,
the name of the group that has the user is displayed.
ACL
Number of the ACL that controls the access of the NMSs in the community to the device.
Only the NMSs with the IP addresses permitted in the ACL can use the community name
to access the device.
Storage-type
Storage type:
• volatile—Settings are lost when the system reboots.
• nonVolatile—Settings remain after the system reboots.
• permanent—Settings remain after the system reboots and can be modified but not
deleted.
• readOnly—Settings remain after the system reboots and cannot be modified or
deleted.
• other—Any other storage type.
Related commands
•
snmp-agent community
•
snmp-agent usm-user { v1 | v2c }
display snmp-agent group
Use the display snmp-agent group command to display SNMP group information, including the group
name, security model, MIB view, and storage-type.
Syntax
display snmp-agent group [ group-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
group-name: Specifies an SNMPv1, SNMPv2c, or SNMPv3 group name, a case-sensitive string of 1 to
32 characters.
Usage guidelines
If no group is specified, this command displays information about all SNMP groups.