ntp-service port

Function

The ntp-service port command changes the port number used to receive NTP packets.

The undo ntp-service port command restores the default port number.

By default, port 123 receives NTP packets.

Format

ntp-service port port-value

undo ntp-service port

Parameters

Parameter Description Value
port-value

Specifies the port number used to receive NTP packets.

The number is an integer that can be 123, or ranges from 1025 to 65535.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ntp write

Usage Guidelines

Usage Scenario

To improve security of network packets, run the ntp-service port command to configure the port number used to receive NTP packets. A user firewall filters packets based on that port number.

Precautions

If this command is the first NTP configuration command, the system automatically adds the ntp-service [ ipv6 ] server disable command in the configuration file to disable the NTP service. To enable the NTP service, run the undo ntp-service [ ipv6 ] server disable command. If this command is the last NTP configuration command to be deleted, the system automatically deletes the ntp-service [ ipv6 ] server disable command from the configuration file.

Example

# Set the port number used to receive NTP packets to 5000.
<HUAWEI> system-view
[~HUAWEI] ntp-service port 5000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >