ntp-service server source-interface all

Function

The ntp-service server source-interface all enable command enables the NTP server to listen to all interfaces.

The ntp-service server source-interface all disable command disables the NTP server from listening to all interfaces.

By default, the NTP server does not listen to any interface.

Format

ntp-service [ ipv6 ] server source-interface all enable

ntp-service [ ipv6 ] server source-interface all disable

Parameters

Parameter Description Value
ipv6

Indicates the NTP IPv6 service.

-

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ntp write

Usage Guidelines

Usage Scenario

By default, the NTP server does not listen to any interface. To enable the server to listen to all interfaces, run this command.

Precautions

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.
  • After this command is enabled, the NTP server will receive and process the NTP packets sent by all interfaces and addresses. This leads to a high probability of attacks on the NTP server, reducing the system security. Exercise caution when executing this command.
  • If the ntp-service [ipv6] server source-interface all enable, ntp-service server source-interface, and ntp-service ipv6 server source-address commands are all run, the ntp-service [ipv6] server source-interface all enable command takes effect in priority, allowing the server to receive and process the packets sent by all interfaces and addresses.

Example

# Enable the NTP IPv4 server to listen to all interfaces.
<HUAWEI> system-view
[~HUAWEI] ntp-service server source-interface all enable
Warning: NTP IPv4 server linstening all interface will be enabled. Continue? [Y/N]:y
# Disable the NTP IPv4 server from listening to all interfaces.
<HUAWEI> system-view
[~HUAWEI] ntp-service server source-interface all disable
Warning: The NTP IPv4 server listening all interface is disabled. Run the server source-interface command to specify the ntp IPv4 server lintening function.
# Enable the NTP IPv6 server to listen to all interfaces.
<HUAWEI> system-view
[~HUAWEI] ntp-service ipv6 server source-interface all enable
Warning: NTP IPv6 server linstening all interface will be enabled. Continue? [Y/N]:y
# Disable the NTP IPv6 server from listening to all interfaces.
<HUAWEI> system-view
[~HUAWEI] ntp-service ipv6 server source-interface all disable
Warning: The NTP IPv6 server listening all interface is disabled. Run the server source-interface command to specify the ntp IPv4 server lintening function.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >