< Home

ntp-service source-interface

Function

The ntp-service source-interface command configures the IPv4 interface to send NTP messages.

The ntp-service ipv6 source-interface command configures the IPv6 interface to send NTP messages.

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

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 the NTP IPv6 service. -
interface-type interface-number Specifies the local interface that sends the NTP messages. -
vpn-instance vpn-instance-name Specifies the name of the created VPN instance. It is a string of 1 to 31 characters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

In the unicast mode, if you want only one interface to receive the NTP response packets, specify NTP packets sent from all local interfaces to use the same source IP address.

In the broadcast, multicast and manycast modes, the ntp-service source-interface command is invalid. It is because the NTP service is enabled on the specified interface that actually is the source interface.

If you have specified vpn-instance when configuring a source IP address with this command, the source IP address can be used only by the NTP server mapping the specified VPN instance instead of other VPN instances or NTP servers that do not have VPN instances specified.

Example

# Specify GigabitEthernet 0/0/0 as the source interface to use IPv4 address of that interface to send the NTP messages over IPv4.

<sysname> system-view
[sysname] ntp-service source-interface GigabitEthernet 0/0/0

# Specify GigabitEthernet 0/0/0 as the source interface to use IPv6 address of that interface to send all the NTP messages over IPv6.

<sysname> system-view
[sysname] ntp-service ipv6 source-interface GigabitEthernet 0/0/0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >