< Home

ntp-service source-interface

Function

The ntp-service source-interface command specifies the local source interface that sends NTP packets.

The undo ntp-service source-interface command cancels the current setting.

By default, the local source interface is not specified for sending NTP packets. The local source interface is automatically determined based on routes.

Format

ntp-service [ ipv6 ] source-interface interface-type interface-number [ vpn-instance vpn-instance-name ]

undo ntp-service [ ipv6 ] source-interface [ interface-type interface-number ] [ vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value
ipv6 Indicates that the network type of the local source interface is IPv6. -
interface-type interface-number Indicates the local interface that sends NTP packets. -
vpn-instance vpn-instance-name Indicates the name of a VPN instance. The value must be an existing VPN instance name.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Configure the local source interface for sending and receiving NTP packets to prevent other interfaces on the device from receiving NTP response packets. This configuration is convenient for a user to subsequently deploy a flow control policy. If no interface is specified, the source IP address of NTP packets is selected according to routes.

If you have specified vpn-instance when configuring a source IP address using this command, the source IP address can only be used by the NTP client bound to the specified VPN instance and cannot be used by NTP clients bound to other VPN instances or not bound to any VPN instance.

Precautions

In broadcast, multicast, and manycast modes, NTP is implemented on a specific interface, and this interface is the source interface. Therefore, the ntp-service source-interface command is invalid in broadcast, multicast, and manycast modes.

Example

# Specify VLANIF100 as the source interface to send all NTP packets.

<HUAWEI> system-view
[HUAWEI] ntp-service source-interface vlanif 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >